package com.njcn.harmonic.controller;

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.harmonic.pojo.param.RMpHarmonicReportDParam;
import com.njcn.harmonic.pojo.vo.RMpHarmonicReportDVO;
import com.njcn.harmonic.service.RMpHarmonicReportDService;
import com.njcn.web.controller.BaseController;
import io.swagger.annotations.Api;
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;

import java.util.List;

/**
 * @Author jianghaifei
 * @Date 2022-10-20 19:08
 * @Version V1.0
 */
@RestController
@RequestMapping("/rMpHarmonicReportD")
@Api(tags = "主网-监测点稳态指标日报")
@RequiredArgsConstructor
public class RMpHarmonicReportDController extends BaseController {

    private final RMpHarmonicReportDService rMpHarmonicReportDService;

    @PostMapping("getMonitorStatisticsD")
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @ApiOperation("查询监测点日统计信息")
    public HttpResult<List<RMpHarmonicReportDVO>> getMonitorStatisticsD(@RequestBody RMpHarmonicReportDParam rMpHarmonicReportDParam) {
        String methodDescribe = getMethodDescribe("getMonitorStatisticsD");
        List<RMpHarmonicReportDVO> list = rMpHarmonicReportDService.getMonitorStatisticsD(rMpHarmonicReportDParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }
}
