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.IRMpEmissionMService;
import com.njcn.prepare.harmonic.service.mysql.newalgorithm.IRMpInfluenceMService;
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-17
 */
@Slf4j
@Api(tags = "专项分析-影响特性算法")
@RestController
@RequestMapping("/rMpInfluenceM")
@RequiredArgsConstructor
public class RMpInfluenceMController extends BaseController {
    private final IRMpInfluenceMService irMpEmissionMService;

    @ApiOperation("影响特性(r_mp_influence_m)")
    @ApiImplicitParam(value = "jobParam", name = "jobParam", required = true)
    @PostMapping("rMpInfluenceMHandler")
    @OperateInfo(info = LogEnum.BUSINESS_MEDIUM)
    public HttpResult<Boolean> rMpInfluenceMHandler(@RequestBody LineParam jobParam) {
        log.info(LocalDateTime.now() + "rMpInfluenceMHandler开始执行");
        String methodDescribe = getMethodDescribe("rMpInfluenceMHandler");
        irMpEmissionMService.rMpInfluenceMHandler(jobParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);

    }
}

