package cn.cecep.talroad.task;

import cn.cecep.talroad.common.log.annotation.Log;
import cn.cecep.talroad.common.log.enums.BusinessType;
import cn.cecep.talroad.service.IBMainPollDisService;
import cn.cecep.talroad.service.analysis.IDisPermitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.RestController;

/**
 * @Auther: cjh
 * @Date: 2023-06-09 15:53
 * @Class: DisPermitController
 * @Deseription:
 * @Version V1.0
 */
@Api("排污许可定时任务")
@RestController
@RequestMapping("/disPermit")
public class DisPermitController {

    @Autowired
    private IDisPermitService disPermitService;

    @ApiOperation(value = "定时任务-排污许可延续提醒：每10天执行一次")
    @Log(title = "排污许可延续提醒", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doDisPermitWarn")
    public void doDisPermitWarn(){

        disPermitService.doDisPermitWarn();
    }


    @ApiOperation(value = "定时任务-排污许可整改超期提醒：每5天执行一次")
    @Log(title = "排污许可延续提醒", businessType = BusinessType.UPDATE)
    @PostMapping(value = "/doDisPermitExceed")
    public void doDisPermitExceed(){

        disPermitService.doDisPermitExceed();
    }
}
