package com.njcn.device.pms.controller.distribution;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.device.pms.pojo.vo.RStatPwAlarmDetailVO;
import com.njcn.device.pms.service.distribution.RMpPwAlarmDetailDService;
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;

/**
 * @Title RMpPwAlarmDetailDController
 * @Package com.njcn.device.pms.controller.distribution
 * @Author jianghaifei
 * @Date 2022-11-23 19:46
 * @Version V1.0
 */
@RestController
@RequestMapping("/rMpPwAlarmDetail")
@Api(tags = "告警明细")
@RequiredArgsConstructor
public class RMpPwAlarmDetailDController extends BaseController {

    private final RMpPwAlarmDetailDService rMpPwAlarmDetailDService;

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