package cn.cecep.talroad.task;

import cn.cecep.talroad.data.analyse.task.label.GapLabelTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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;

/**
 * @author hehongyu
 * @description: 标签任务
 * @date 2023/8/6 21:15
 */
@Api(tags = "单项重点污染物减排量 判断任务")
@RestController
@RequestMapping("/gap/label")
@Slf4j
public class LabelTaskController {

    @Autowired
    private GapLabelTaskService gapLabelTaskService;

    @ApiOperation(value = "废气排放 超总量 标签任务")
    @GetMapping("/execute")
    public void electricityAnalyse(){
        try {
            gapLabelTaskService.execute();
        }catch (Exception e){
            log.error("单项重点污染物减排量 标签任务 打标签 失败！",e);
        }
    }
}
