package cn.cecep.talroad.task;

import cn.cecep.talroad.common.core.web.controller.BaseController;
import cn.cecep.talroad.common.core.web.domain.AjaxResults;
import cn.cecep.talroad.service.STaskYieldTrendService;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: weizhuang
 * @Date:2023/3/9 13:30
 * @Version 1.0
 */
@Api(tags = "A企业排放监控-产量趋势图-wz")
@RestController
@RequestMapping("/yieldTrend")
public class STaskYieldTrendController extends BaseController {

    @Autowired
    private STaskYieldTrendService sTaskYieldTrendService;

    @ApiOperation(value = "触发计算产量趋势", notes = "触发计算产量趋势")
    @GetMapping("/triggerYieldTrendSynchro")
    public AjaxResults<Void> triggerManagementPlanSynchro(
            @RequestParam(name = "factoryId", required = false) String factoryId
    ) {

        sTaskYieldTrendService.triggerYieldTrendSynchro(factoryId);
        return AjaxResults.success();
    }
}
