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

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.RStatAreaAlarmCountMParam;
import com.njcn.device.pms.pojo.vo.RStatAreaAlarmCountMVO;
import com.njcn.device.pms.service.distribution.PwRStatAreaAlarmCountMService;
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 RStatAreaAlarmCountMController
 * @Package com.njcn.device.pms.controller
 * @Author jianghaifei
 * @Date 2022-10-10 15:13
 * @Version V1.0
 */

@RestController
@Api(tags = "配网-区域告警统计(月)")
@RequiredArgsConstructor
@RequestMapping("/pwRStatAreaAlarmCountM")
public class PwRStatAreaAlarmCountMController extends BaseController {

    private final PwRStatAreaAlarmCountMService rStatAreaAlarmCountMService;

    @PostMapping("getPwAllRStatAreaAlarmCountMList")
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @ApiOperation("查询区域告警统计(月)(配网)")
    public HttpResult<List<RStatAreaAlarmCountMVO>> getPwAllRStatAreaAlarmCountMList(@RequestBody RStatAreaAlarmCountMParam rStatAreaAlarmCountMParam) {
        String methodDescribe = getMethodDescribe("getPwAllRStatAreaAlarmCountMList");
        List<RStatAreaAlarmCountMVO> list = rStatAreaAlarmCountMService.getPwAllRStatAreaAlarmCountMList(rStatAreaAlarmCountMParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }
}
