package com.njcn.process.controller.alarm;

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.device.pms.pojo.param.RStatPwAlarmDetailParam;
import com.njcn.device.pms.pojo.vo.RStatAlarmDetailVO;
import com.njcn.process.pojo.po.RMpOnlineMonitorOverproofProblem;
import com.njcn.process.service.alarm.RMpAlarmDetailDService;
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;

/**
 * pqs
 *
 * @author cdf
 * @date 2024/3/18
 */
@RestController
@RequestMapping("/rMpPwAlarmDetail")
@Api(tags = "告警明细")
@RequiredArgsConstructor
public class RMpAlarmDetailDController extends BaseController {

    private final RMpAlarmDetailDService rMpPwAlarmDetailDService;

    @PostMapping("getAllAlarmDetailList")
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @ApiOperation("告警明细查看(主配网)")
    public HttpResult<List<RMpOnlineMonitorOverproofProblem>> getAllAlarmDetailList(@RequestBody RStatPwAlarmDetailParam rStatPwAlarmDetailParam) {
        String methodDescribe = getMethodDescribe("getAllAlarmDetailList");
        List<RMpOnlineMonitorOverproofProblem> list = rMpPwAlarmDetailDService.getAllAlarmDetailList(rStatPwAlarmDetailParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }


}
