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


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.SpecialAnalysisIndexOverviewService;
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.IRMpEmissionMService;
import com.njcn.web.controller.BaseController;
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 java.time.LocalDateTime;

/**
 * <p>
 * 风电场发射特性-月表 前端控制器
 * </p>
 *
 * @author wr
 * @since 2023-10-16
 */
@Slf4j
@Api(tags = "专项分析指标总览（按月来算）")
@RestController
@RequestMapping("/specialAnalysisIndexOverview")
@RequiredArgsConstructor
public class SpecialAnalysisIndexOverviewController extends BaseController {

    private final SpecialAnalysisIndexOverviewService specialAnalysisIndexOverviewService;

    @ApiOperation("指标总览")
    @ApiImplicitParam(value = "jobParam", name = "jobParam", required = true)
    @PostMapping("hanlder")
    @OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
    public HttpResult<Boolean> hanlder(@RequestBody LineParam jobParam) {
        log.info(LocalDateTime.now() + "专项分析-指标总览开始执行");
        String methodDescribe = getMethodDescribe("hanlder");
        specialAnalysisIndexOverviewService.hanlder(jobParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);

    }
}

