package com.njcn.harmonic.controller.dataquality;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.harmonic.pojo.dto.RMpPartHarmonicDetailDTO;
import com.njcn.harmonic.pojo.param.RMpPartHarmonicDetailQueryParam;
import com.njcn.harmonic.service.majornetwork.RMpPartHarmonicDetailDService;
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 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;

/**
 * Description:
 * Date: 2024/4/3  15:58【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "稳态指标超标警告统计")
@RequestMapping("/rmppartharmonicdetail")
public class RMpPartHarmonicDetailController extends BaseController {

    private final RMpPartHarmonicDetailDService rMpPartHarmonicDetailDService;
    /**
     * 稳态指标超标明细表-月表统计
     *
     */
    @PostMapping("/getRMpPartHarmonicDetail")
    @ApiOperation("稳态指标超标在线监测超标问题详情")
    @ApiImplicitParam(name = "param", value = "参数", required = true)
    public HttpResult<Page<RMpPartHarmonicDetailDTO>> getRMpPartHarmonicDetail(@RequestBody RMpPartHarmonicDetailQueryParam param) {
        String methodDescribe = getMethodDescribe("getRMpPartHarmonicDetail");
        Page<RMpPartHarmonicDetailDTO> list = rMpPartHarmonicDetailDService.getRMpPartHarmonicDetail(param);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }

}
