package com.njcn.harmonic.controller.specialanalysis;

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.StreamReverseParam;
import com.njcn.harmonic.pojo.vo.PermeabilityVO;
import com.njcn.harmonic.service.specialanalysis.PermeabilityService;
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-28 11:22
 * @Version V1.0
 */
@RestController
@Api(tags = "专项分析-分布式光伏")
@RequiredArgsConstructor
@RequestMapping("/permeability")
public class PermeabilityController extends BaseController {

    private final PermeabilityService permeabilityService;

    @PostMapping("/getPermeabilityList")
    @OperateInfo(info = LogEnum.BUSINESS_COMMON)
    @ApiOperation("渗透率分析")
    public HttpResult<Page<PermeabilityVO>> getPermeabilityList(@RequestBody StreamReverseParam streamReverseParam) {
        String methodDescribe = getMethodDescribe("getPermeabilityList");

        Page<PermeabilityVO> resultList = permeabilityService.getPermeabilityList(streamReverseParam);

        return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resultList, methodDescribe);
    }
}
