zhubaomin
2024-09-14 cc1dd856e31c27f835ab2495f0415c4e8578b93f
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/card/IcCardCtrl.java
@@ -17,6 +17,7 @@
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
@@ -128,4 +129,25 @@
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 获取售水总计信息:充值金额总计、水表消费金额总计
     * @param qo
     * @param bindingResult
     * @return
     */
    @GetMapping(path = "/total_water_use")
    @SsoAop()
    public BaseResponse<Map> getTotalWaterUse(@Valid CardUsageQO qo, BindingResult bindingResult) {
        if(bindingResult != null && bindingResult.hasErrors()){
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        try {
            return BaseResponseUtils.buildSuccess(icCardSv.getTotalWaterUse(qo));
        } catch (Exception e) {
            log.error("获取开卡记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
}