package com.njcn.prepare.harmonic.controller.newalgorithm;


import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.IPmsStatisticsSpecialMonitorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.njcn.web.controller.BaseController;

import java.time.LocalDateTime;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wr
 * @since 2023-10-13
 */
@RestController
@RequestMapping("/pmsStatisticsSpecialMonitor")
@Api(tags = "专项分析-台账统计")
@Slf4j
@RequiredArgsConstructor
public class PmsStatisticsSpecialMonitorController extends BaseController {

    private final IPmsStatisticsSpecialMonitorService pmsStatisticsSpecialMonitorService;

    @ApiOperation("专项分析-台账统计(pms_statistics_special_monitor表数据)")
    @ApiImplicitParam(value = "jobParam", name = "jobParam", required = true)
    @PostMapping("pmsStatisticsSpecialMonitorHandler")
    @OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
    public HttpResult<Boolean> pmsStatisticsSpecialMonitorHandler(@RequestBody LineParam jobParam) {
        log.info(LocalDateTime.now() + "pmsStatisticsSpecialMonitorHandler开始执行");
        String methodDescribe = getMethodDescribe("pmsStatisticsSpecialMonitorHandler");
        pmsStatisticsSpecialMonitorService.pmsStatisticsSpecialMonitorHandler(jobParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);

    }
}

