package cn.cecep.talroad.task;

import cn.cecep.talroad.common.core.web.domain.AjaxResults;
import cn.cecep.talroad.common.log.annotation.Log;
import cn.cecep.talroad.common.log.enums.BusinessType;
import cn.cecep.talroad.service.TradeMonitorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: cjh
 * @Date: 2023-06-09 15:53
 * @Class: TradeMonitorController
 * @Deseription:
 * @Version V1.0
 */
@Api("排污单位在线监测缺少污染物排放因子")
@RestController
@RequestMapping("/trade-monitor")
public class TradeMonitorController {

    @Autowired
    private TradeMonitorService tradeMonitorService;

    @ApiOperation(value = "定时任务-排污单位在线监测缺少污染物排放因子：每月分析一次")
    @Log(title = "排污单位在线监测缺少污染物排放因子-废气", businessType = BusinessType.UPDATE)
    @GetMapping(value = "/unit-pollutant-gas")
    public AjaxResults<Void> doUnitPollutantGasWarn(){
        tradeMonitorService.doUnitPollutantGasWarn();
        return AjaxResults.success();
    }

    @ApiOperation(value = "定时任务-排污单位在线监测缺少污染物排放因子：每月分析一次")
    @Log(title = "排污单位在线监测缺少污染物排放因子-废水", businessType = BusinessType.UPDATE)
    @GetMapping(value = "/unit-pollutant-water")
    public AjaxResults<Void> doUnitPollutantWaterWarn(){
        tradeMonitorService.doUnitPollutantWaterWarn();
        return AjaxResults.success();
    }

}
