package com.njcn.harmonic.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.harmonic.pojo.param.RStatPwPermeabilityMParam;
import com.njcn.harmonic.pojo.vo.RStatPwPermeabilityMVO;
import com.njcn.harmonic.service.distribution.RStatPwPermeabilityMService;
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;

/**
 * @author jianghaifei
 * @date 2022-11-07 13:55
 * @version V1.0
 */
@RestController
@RequestMapping("/rStatPwPermeability")
@RequiredArgsConstructor
@Api(tags = "配网-各渗透率光伏台区基准水平")
public class RStatPwPermeabilityMController extends BaseController {

    private final RStatPwPermeabilityMService rStatPwPermeabilityMService;

    @PostMapping("getPwPermeabilityList")
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @ApiOperation("查询各渗透率光伏台区基准水平")
    public HttpResult<Page<RStatPwPermeabilityMVO>> getPwPermeabilityList(@RequestBody RStatPwPermeabilityMParam rStatPwPermeabilityMParam) {
        String methodDescribe = getMethodDescribe("getPwPermeabilityList");
        Page<RStatPwPermeabilityMVO> list = rStatPwPermeabilityMService.getPwPermeabilityList(rStatPwPermeabilityMParam);
        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
    }
}
