pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java
@@ -6,9 +6,11 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.voSt.*;
import com.dy.pipIrrStatistics.intake.qo.*;
import com.dy.pipIrrStatistics.result.StatisticlResultCode;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -334,7 +336,11 @@
     */
    @GetMapping(path = "/getDayIntakeAmount")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoDayIntakeAmount>>> getDayIntakeAmount(DayIntakeAmountQO qo) {
    public BaseResponse<QueryResultVo<List<VoDayIntakeAmount>>> getDayIntakeAmount(@NotNull IntakeAmountQO qo) {
        if(qo.getYearMonth() == null) {
            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_AND_MONTH_CANNOT_BE_NULL.getMessage());
        }
        try {
            return BaseResponseUtils.buildSuccess(intakeSv.getDayIntakeAmount(qo));
        } catch (Exception e) {
@@ -342,4 +348,62 @@
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 统计指定年份各月用水量
     * @param qo
     * @return
     */
    @GetMapping(path = "/getMonthIntakeAmount")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoMonthAmount>>> getMonthIntakeAmount(IntakeAmountQO qo) {
        if(qo.getYear() == null) {
            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_CANNOT_BE_NULL.getMessage());
        }
        try {
            return BaseResponseUtils.buildSuccess(intakeSv.getMonthIntakeAmount(qo));
        } catch (Exception e) {
            log.error("获取记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 统计指定月份各天漏损量
     * @param qo
     * @return
     */
    @GetMapping(path = "/getDayLossAmount")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoDayLoss>>> getDayLossAmount(IntakeAmountQO qo) {
        if(qo.getYearMonth() == null) {
            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_AND_MONTH_CANNOT_BE_NULL.getMessage());
        }
        try {
            return BaseResponseUtils.buildSuccess(intakeSv.getDayLossAmount(qo));
        } catch (Exception e) {
            log.error("获取记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 统计指定年份各月漏损量
     * @param qo
     * @return
     */
    @GetMapping(path = "/getMonthLossAmount")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoMonthAmount>>> getMonthLossAmount(IntakeAmountQO qo) {
        if(qo.getYear() == null) {
            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_CANNOT_BE_NULL.getMessage());
        }
        try {
            return BaseResponseUtils.buildSuccess(intakeSv.getMonthLossAmount(qo));
        } catch (Exception e) {
            log.error("获取记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
}