package cn.cecep.talroad.controller.analysis;

import cn.cecep.talroad.common.core.web.controller.BasesController;
import cn.cecep.talroad.common.log.annotation.Log;
import cn.cecep.talroad.common.log.enums.BusinessType;
import cn.cecep.talroad.enums.BlDeviceTypeEnum;
import cn.cecep.talroad.enums.DlDeviceTypeEnum;
import cn.cecep.talroad.enums.EnIndustry;
import cn.cecep.talroad.enums.FslDeviceTypeEnum;
import cn.cecep.talroad.enums.GtDeviceTypeEnum;
import cn.cecep.talroad.enums.SnDeviceTypeEnum;
import cn.cecep.talroad.service.STaskYieldTrendService;
import cn.cecep.talroad.service.analysis.*;
import cn.cecep.talroad.service.effective.PcNationalCityRankingHourService;
import cn.cecep.talroad.service.effective.PcNationalCityRankingOtherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 开发公司：中节能天融科技有限公司
 * 任务调度Controller 控制层
 *
 * @author szhpt
 * @date 2023-03-28
 */
@Api(tags = "任务调度--供job服务远程调用定时任务")
@RestController
@RequestMapping("/remoteTask")
public class RemoteTaskController extends BasesController {

    @Autowired
    private IBasDeviceStatusService basDeviceStatusService;

    @Autowired
    private IDischargeMathService dischargeMathService;

    @Autowired
    private IConcentrationMathService concentrationMathService;
    @Autowired
    private PcNationalCityRankingOtherService pcNationalCityRankingOtherService;
    @Autowired
    private PcNationalCityRankingHourService pcNationalCityRankingHourService;
    @Autowired
    private IMonitoringAnalyseService monitoringAnalyseService;
    @Autowired
    private STaskYieldTrendService taskYieldTrendService;
    @Autowired
    private IFacilityAnalysisService facilityAnalysisService;
    @Autowired
    private IDataLogicAnalysisService dataLogicAnalysisService;
    @Autowired
    private IPollWaterAnalysisService pollWaterAnalysisService;

    @ApiOperation(value = "定时任务-管控期车辆异常分析")
    @Log(title = "管控期车辆异常分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doAnalyseHourCarEnterAndOut")
    public void doAnalyseHourCarEnterAndOut(){
        monitoringAnalyseService.doAnalyseHourCarEnterAndOut();
    }

    @ApiOperation(value = "定时任务-超低排放车辆异常分析：每天执行1次")
    @Log(title = "超低排放车辆异常分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doAnalyseDayCarEnterAndOut")
    public void doAnalyseDayCarEnterAndOut(){
        monitoringAnalyseService.doAnalyseDayCarEnterAndOut();
    }


    @ApiOperation(value = "定时任务-钢铁设备停限产（烧结机、竖炉、炉窑、发电机组：5分钟执行一次 ）")
    @Log(title = "钢铁设备停限产", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtDeviceStatus")
    public void doCheckGtDeviceStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.SJJ.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.SL.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.LY.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.FDJZ.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁发电机组压差分析：1小时执行一次 ）")
    @Log(title = "钢铁发电机组压差分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtFdjzPress")
    public void doCheckGtFdjzPress(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.FDJZ.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁炉窑压差分析：1小时执行一次 ）")
    @Log(title = "钢铁炉窑压差分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtLyPress")
    public void doCheckGtLyPress(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.LY.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁竖炉压差分析：1小时执行一次 ）")
    @Log(title = "钢铁竖炉压差分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtSlPress")
    public void doCheckGtSlPress(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.SL.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁烧结机压差分析：1小时执行一次 ）")
    @Log(title = "钢铁烧结机压差分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtSjjPress")
    public void doCheckGtSjjPress(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.SJJ.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁设备停限产（除烧结机、竖炉、炉窑、发电机组之外其他：15分钟执行一次 ）")
    @Log(title = "钢铁设备停限产", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtOtherDeviceStatus")
    public void doCheckGtOtherDeviceStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.GL.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.ZL.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.JL.getCode());
    }

    @ApiOperation(value = "定时任务-转炉炉数统计：每小时执行一次")
    @Log(title = "转炉炉数统计", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtZlCount")
    public void doCheckGtZlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.ZL.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁高炉统计：每小时执行一次")
    @Log(title = "钢铁高炉统计", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtGlCount")
    public void doCheckGtGlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.GL.getCode());
    }


    @ApiOperation(value = "定时任务-钢铁行业装煤次数、推焦次数、焦炭产量统计：每小时执行一次")
    @Log(title = "钢铁行业装煤次数、推焦次数、焦炭产量统计", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtJlCount")
    public void doCheckGtJlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.JL.getCode());
    }

    @ApiOperation(value = "定时任务-焦化行业装煤次数、推焦次数、焦炭产量统计：每小时执行一次")
    @Log(title = "焦化行业装煤次数、推焦次数、焦炭产量统计", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckJHJlCount")
    public void doCheckJHJlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.JH.id(),GtDeviceTypeEnum.JL.getCode());
    }

    @ApiOperation(value = "定时任务-焦化焦炉停产状态")
    @Log(title = "焦化焦炉停产状态", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckJhJlStatus")
    public void doCheckJhJlStatus(){

        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.JH.id(),GtDeviceTypeEnum.JL.getCode());
    }

    @ApiOperation(value = "定时任务-水泥停限产分析：每15分钟执行一次")
    @Log(title = "水泥停限产分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckSnStatus")
    public void doCheckSnStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.SN.id(),SnDeviceTypeEnum.SNY.getCode());
    }

    @ApiOperation(value = "定时任务-计算水泥产量：每1小时执行一次")
    @Log(title = "计算水泥产量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckSnCount")
    public void doCheckSnCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.SN.id(), SnDeviceTypeEnum.SNY.getCode());
    }

    @ApiOperation(value = "定时任务-玻璃停限产分析：每15分钟执行一次")
    @Log(title = "玻璃停限产分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckBlStatus")
    public void doCheckBlStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.BL.id(),BlDeviceTypeEnum.SCX.getCode());
    }

    @ApiOperation(value = "定时任务-计算玻璃产量：每1小时执行一次")
    @Log(title = "计算玻璃产量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckBlCount")
    public void doCheckBlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.BL.id(), BlDeviceTypeEnum.SCX.getCode());
    }

    @ApiOperation(value = "定时任务-垃圾焚烧炉停限产分析：每15分钟执行一次")
    @Log(title = "垃圾焚烧炉停限产分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckFslStatus")
    public void doCheckFslStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.FS.id(),FslDeviceTypeEnum.FSL.getCode());
    }

    @ApiOperation(value = "定时任务-垃圾处理产量分析：每1小时执行一次")
    @Log(title = "垃圾处理产量分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckFslCount")
    public void doCheckFslCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.FS.id(), FslDeviceTypeEnum.FSL.getCode());
    }

    @ApiOperation(value = "定时任务-统计锅炉机组负荷：每1小时执行一次")
    @Log(title = "统计锅炉机组负荷", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckDlCount")
    public void doCheckDlCount(){
        basDeviceStatusService.doCheckCount(EnIndustry.DL.id(),DlDeviceTypeEnum.GUOLU.getCode());
    }

    @ApiOperation(value = "定时任务-静电除尘压差超高、电流异常、电压异常：每1小时执行一次")
    @Log(title = "静电除尘压差超高、电流异常、电压异常", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckJdcc")
    public void doCheckJdcc(){
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),DlDeviceTypeEnum.FDJZ.getCode());
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.LY.getCode());
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.SJJ.getCode());
        basDeviceStatusService.doCheckCount(EnIndustry.GT.id(),GtDeviceTypeEnum.SL.getCode());
    }

    @ApiOperation(value = "定时任务-火电锅炉停限产分析：每15分钟执行一次")
    @Log(title = "火电锅炉停限产分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckDlglStatus")
    public void doCheckDlglStatus(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.DL.id(),DlDeviceTypeEnum.GUOLU.getCode());
    }


    @ApiOperation(value = "定时任务-高炉煤气放散分析：每10分钟执行一次")
    @Log(title = "高炉煤气放散分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGlmqAnalyse")
    public void doCheckGlmqAnalyse(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.GLMQ.getCode());
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.GLMQG.getCode());
    }

    @ApiOperation(value = "定时任务-转炉煤气放散分析：每10分钟执行一次")
    @Log(title = "转炉煤气放散分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckZlmqAnalyse")
    public void doCheckZlmqAnalyse(){

        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.ZLMQ.getCode());
    }

    @ApiOperation(value = "定时任务-钢铁煤气管网放散分析：每10分钟执行一次")
    @Log(title = "钢铁煤气管网放散分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckGtMqgwAnalyse")
    public void doCheckGtMqgwAnalyse(){

        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.GT.id(),GtDeviceTypeEnum.MQGW.getCode());
    }

    @ApiOperation(value = "定时任务-焦化煤气管网煤气放散分析：每10分钟执行一次")
    @Log(title = "焦化煤气管网煤气放散分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doCheckJhMqgwAnalyse")
    public void doCheckJhMqgwAnalyse(){
        basDeviceStatusService.doCheckDeviceStatus(EnIndustry.JH.id(),GtDeviceTypeEnum.MQGW.getCode());
    }




    @ApiOperation(value = "定时任务-大气污染物在线小时排放量：每小时执行一次")
    @Log(title = "大气污染物在线小时排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasPollutantHourDischarge")
    public void doGasPollutantHourDischarge(@RequestParam(value = "mathDate",required = false) String mathDate) {
        try {
            dischargeMathService.doGasPollutantHourDischarge(mathDate);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }


    @ApiOperation(value = "定时任务-水污染物在线日排放量：每天执行一次")
    @Log(title = "水污染物在线日排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterPollutantDayDischarge")
    public void doWaterPollutantDayDischarge(@RequestParam(value = "mathDate",required = false) String mathDate){
        try {
            dischargeMathService.doWaterPollutantDayDischarge(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-水污染物在线排放量统计值：每天执行一次")
    @Log(title = "水污染物在线排放量统计值", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterPollutantDayDischargeTotal")
    public void doWaterPollutantDayDischargeTotal(@RequestParam(value = "mathDate",required = false) String mathDate){
        try {
            dischargeMathService.doWaterPollutantDayDischargeTotal(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }


    @ApiOperation(value = "定时任务-大气污染物在线排放量统计值：每天执行一次")
    @Log(title = "大气污染物在线排放量统计值", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasPollutantHourDischargeTotal")
    public void doGasPollutantDayDischargeTotal(@RequestParam(value = "mathDate",required = false) String mathDate){
        try {
            dischargeMathService.doGasPollutantHourDischargeTotal(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-废气手工月排放量：每月执行一次")
    @Log(title = "废气手工月排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasHandiworkMonthDischarge")
    public void doGasHandiworkMonthDischarge(){
        dischargeMathService.doGasHandiworkMonthDischarge();
    }

    @ApiOperation(value = "定时任务-废水手工月排放量：每月执行一次")
    @Log(title = "废水手工月排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterHandiworkMonthDischarge")
    public void doWaterHandiworkMonthDischarge(){
        dischargeMathService.doWaterHandiworkMonthDischarge();
    }

    @ApiOperation(value = "定时任务-废气排放量超标：每日执行一次")
    @Log(title = "废气排放量超标", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasDischargeExceeded")
    public void doGasDischargeExceeded(){
        try {
            dischargeMathService.doGasDischargeExceeded();
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-废水排放量超标：每日执行一次")
    @Log(title = "废水排放量超标", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterDischargeExceeded")
    public void doWaterDischargeExceeded(){
        try {
            dischargeMathService.doWaterDischargeExceeded();
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }


    @ApiOperation(value = "定时任务-废气排放量预警：每日执行一次")
    @Log(title = "废气排放量预警", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasDischargeAlarm")
    public void doGasDischargeAlarm(){
        try {
            dischargeMathService.doGasDischargeAlarm();
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-废水排放量预警：每日执行一次")
    @Log(title = "废水排放量预警", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterDischargeAlarm")
    public void doWaterDischargeAlarm(){
        try {
            dischargeMathService.doWaterDischargeAlarm();
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }



    @ApiOperation(value = "定时任务-大气浓度超标：每小时执行一次")
    @Log(title = "大气浓度超标", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasPollutantHourConcentration")
    @Deprecated
    public void doGasPollutantHourConcentration(@RequestParam(value = "mathDate",required = false)String mathDate){
        try {
            concentrationMathService.doGasPollutantHourConcentration(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-水浓度超标：每天执行一次")
    @Log(title = "水浓度超标", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterPollutantDayConcentration")
    @Deprecated
    public void doWaterPollutantDayConcentration(@RequestParam(value = "mathDate",required = false)String mathDate){
        try {
            concentrationMathService.doWaterPollutantDayConcentration(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-大气浓度预警：每10分钟执行一次")
    @Log(title = "大气浓度预警", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasPollutantHourConcentrationAlarm")
    public void doGasPollutantHourConcentrationAlarm(@RequestParam(value = "mathDate",required = false)String mathDate){

        try {
            concentrationMathService.doGasPollutantHourConcentrationAlarm(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-AI模型推算大气数据复核：每1小时执行一次")
    @Log(title = "AI模型推算大气数据复核", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasPollutantHourConcentrationAIReview")
    public void doGasPollutantHourConcentrationAIReview(@RequestParam(value = "mathDate",required = false)String mathDate){
        try {
            concentrationMathService.doGasPollutantHourConcentrationAIReview(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }


    @ApiOperation(value = "定时任务-水浓度预警：每小时执行一次")
    @Log(title = "水浓度超标", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doWaterPollutantDayConcentrationAlarm")
    public void doWaterPollutantDayConcentrationAlarm(@RequestParam(value = "mathDate",required = false)String mathDate){
        try {
            concentrationMathService.doWaterPollutantDayConcentrationAlarm(mathDate);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

    @ApiOperation(value = "定时任务-无组织大气浓度超标报警：每小时执行一次")
    @Log(title = "无组织大气浓度超标报警", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasOverStandAlarm")
    public void doGasOverStandAlarm(){
        concentrationMathService.doGasOverStandAlarmAndWarn(true);
    }


    @ApiOperation(value = "定时任务-无组织大气浓度预警：每10分钟执行一次")
    @Log(title = "无组织大气浓度预警", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doGasStandWarn")
    public void doGasStandWarn(){
        concentrationMathService.doGasOverStandAlarmAndWarn(false);
    }

    @ApiOperation(value = "定时任务-临时接口处理历史数据")
    @PostMapping(value = "/doCheckTemp")
    public void doCheckTemp(@RequestParam("factoryId")String factoryId,@RequestParam("industry")String industry,@RequestParam("startTime")String startTime){
        if("GTZL".equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(),GtDeviceTypeEnum.ZL.getCode(),startTime);
        }
        if(EnIndustry.JH.id().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.JH.id(),GtDeviceTypeEnum.JL.getCode(),startTime);
        }
        if(EnIndustry.SN.id().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.SN.id(), SnDeviceTypeEnum.SNY.getCode(),startTime);
        }
        if(EnIndustry.FS.id().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.FS.id(), FslDeviceTypeEnum.FSL.getCode(),startTime);
        }
        if("GTJL".equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(),GtDeviceTypeEnum.JL.getCode(),startTime);
        }
        if("GTGL".equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(),GtDeviceTypeEnum.GL.getCode(),startTime);
        }
        if(EnIndustry.DL.id().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.DL.id(),DlDeviceTypeEnum.GUOLU.getCode(),startTime);
        }
        if(EnIndustry.BL.id().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.BL.id(), BlDeviceTypeEnum.SCX.getCode(),startTime);
        }

        if(GtDeviceTypeEnum.SJJ.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.SJJ.getCode(),startTime);
        }
        if(GtDeviceTypeEnum.SL.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.SL.getCode(),startTime);
        }
        if(GtDeviceTypeEnum.LY.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.LY.getCode(),startTime);
        }
        if(GtDeviceTypeEnum.FDJZ.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.FDJZ.getCode(),startTime);
        }
        if(GtDeviceTypeEnum.ZLMQ.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.ZLMQ.getCode(),startTime);
        }

        if(GtDeviceTypeEnum.GLMQ.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.GLMQ.getCode(),startTime);
        }
        if(GtDeviceTypeEnum.MQGW.getCode().equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.GT.id(), GtDeviceTypeEnum.MQGW.getCode(),startTime);
        }
        if("JHMQGW".equals(industry)){
            basDeviceStatusService.doCheckCountTemp(factoryId,EnIndustry.JH.id(), GtDeviceTypeEnum.MQGW.getCode(),startTime);
        }


    }

    @ApiOperation(value = "定时任务-产量趋势日统计：每天执行一次")
    @Log(title = "产量趋势日统计", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analyseDayTaskYieldTrendData")
    public void analyseDayTaskYieldTrendData(){

        taskYieldTrendService.analyseDayTaskYieldTrendData();
    }

    @ApiOperation(value = "定时任务-治理设施PH合理范围分析：每天执行一次")
    @Log(title = "治理设施PH合理范围分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisPhData")
    public void analysisPhData(){

        facilityAnalysisService.analysisPhData();
    }

    @ApiOperation(value = "定时任务-脱硫浆液循环泵运行异常分析：每小时执行一次")
    @Log(title = "脱硫浆液循环泵运行异常分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisPumpStateData")
    public void analysisPumpStateData(){

        facilityAnalysisService.analysisPumpStateData();
    }

    @ApiOperation(value = "定时任务-氧化风机运行异常分析：每小时执行一次")
    @Log(title = "氧化风机运行异常分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisOxFanStateData")
    public void analysisOxFanStateData(){

        facilityAnalysisService.analysisOxFanStateData();
    }

    @ApiOperation(value = "定时任务-脱硝SCR工艺反应器入口烟气温度：每小时执行一次")
    @Log(title = "脱硝SCR工艺反应器入口烟气温度", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisScrTemp")
    public void analysisScrTemp(){

        facilityAnalysisService.analysisScrTemp();
    }

    @ApiOperation(value = "定时任务-脱硝出入口压差过高分析：每小时执行一次")
    @Log(title = "脱硝出入口压差过高分析", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisPressOverStand")
    public void analysisPressOverStand(){

        facilityAnalysisService.analysisPressOverStand();
    }

    @ApiOperation(value = "定时任务-分表计电-数据逻辑异常：每小时计算一次")
    @Log(title = "分表计电-数据逻辑异常", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisElecRealData")
    public void analysisElecRealData(){
        dataLogicAnalysisService.analysisElecRealDataLogic();
    }

    @ApiOperation(value = "定时任务-网格化精准监测-数据逻辑异常：每小时计算一次")
    @Log(title = "网格化精准监测-数据逻辑异常", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/analysisMeshingData")
    public void analysisMeshingDataLogic(){
        dataLogicAnalysisService.analysisMeshingDataLogic();
    }

    @ApiOperation(value = "定时任务-大气污染物小时排放量：每1小时执行一次")
    @Log(title = "大气污染物小时排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessGasStationDataFlag")
    public void doProcessGasStationDataFlag(){

        dischargeMathService.doProcessGasStationDataFlag();
    }

    @ApiOperation(value = "定时任务-水污染物日排放量：每日执行一次")
    @Log(title = "水污染物日排放量", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessWaterStationDataFlag")
    public void doProcessWaterStationDataFlag(){

        dischargeMathService.doProcessWaterStationDataFlag();
    }

    @ApiOperation(value = "定时任务-污染物小时均值连续8H处于标准值的20%以下：每小时执行一次")
    @Log(title = "污染物小时均值连续8H处于标准值的20%以下", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessHourPollutantConcentration")
    public void doProcessHourPollutantConcentration(){

        dischargeMathService.doProcessHourPollutantConcentration();
    }

	@ApiOperation(value = "定时任务-本年是否有废水污染物总量超标情况：每年计算一次")
    @Log(title = "本年是否有废水污染物总量超标情况", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessEmissionPollutionWater")
    public void doProcessEmissionPollutionWater(){
        pollWaterAnalysisService.emissionPollutionWaterLabelTask();
    }

    @ApiOperation(value = "定时任务-1月内是否有废水污染物排放浓度情况：每月一次")
    @Log(title = "1月内是否有废水污染物排放浓度情况", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessEnvWaterMonDay")
    public void doProcessEnvWaterMonDay(){
        pollWaterAnalysisService.envWaterMonDayLabelTask();
    }

    @ApiOperation(value = "定时任务-省内城市AQI小时排名：每小时一次")
    @Log(title = "省内城市AQI小时排名", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessCityRankHour")
    public void doProcessCityRankHour(){
        pcNationalCityRankingHourService.doProcessCityRankHour();
    }

    @ApiOperation(value = "定时任务-省内城市AQI日排名：每日一次")
    @Log(title = "省内城市AQI日排名", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessCityRankDay")
    public void doProcessCityRankDay(){
        pcNationalCityRankingOtherService.doProcessCityRankDay();
    }

    @ApiOperation(value = "定时任务-省内城市AQI月度排名：每月一次")
    @Log(title = "省内城市AQI月度排名", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessCityRankMonth")
    public void doProcessCityRankMonth(){
        pcNationalCityRankingOtherService.doProcessCityRankMonth();
    }

    @ApiOperation(value = "定时任务-省内城市AQI年度排名：每年一次")
    @Log(title = "省内城市AQI年度排名", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doProcessCityRankYear")
    public void doProcessCityRankYear(){
        pcNationalCityRankingOtherService.doProcessCityRankYear();
    }


}
