package cn.cecep.talroad.task;

import cn.cecep.talroad.data.analyse.task.service.GasExceededTotalLabelTaskService;
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/6/30 0:02
 */
@Api(tags = "废气排放 超总量 标签任务")
@RestController
@RequestMapping("/gas/exceededTotal/label")
@Slf4j
public class GasExceededTotalLabelTaskController {

    @Autowired
    private GasExceededTotalLabelTaskService gasExceededTotalLabelTaskService;

    @ApiOperation(value = "废气排放 超总量 标签任务")
    @GetMapping("/invoke")
    public void electricityAnalyse(){
        try {
            gasExceededTotalLabelTaskService.invoke();
        }catch (Exception e){
            log.error("废气排放超总量 标签任务 打标签 失败！",e);
        }
    }
}
