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

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.majornetwork.RStatAreaAlarmCountMService;
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("/rStatAreaAlarmCountM")
public class RStatAreaAlarmCountMController extends BaseController {

    private final RStatAreaAlarmCountMService rStatAreaAlarmCountMService;

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

}
