pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsCtrl.java
@@ -1,12 +1,15 @@
package com.dy.pipIrrStatistics.largeScreen;
import com.dy.common.aop.SsoAop;
import com.dy.common.util.DateTime;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.voLargeScreen.VoBaseInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoCurrentInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoMonitorInfo;
import com.dy.pipIrrGlobal.voSpecial.VoTopXClient;
import com.dy.pipIrrGlobal.voSpecial.VoTopXIntake;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -21,6 +24,7 @@
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
/**
 * @Author: liurunyu
@@ -86,7 +90,7 @@
    /**
     * 大屏展示---监测信息
     * @return 监测信息
     * @param startDt 开始日期(格式 yyyy-mm-dd)
     * @param fromDt 开始日期(格式 yyyy-mm-dd)
     */
    @Operation(summary = "大屏展示", description = "监测信息")
    @ApiResponses(value = {
@@ -99,9 +103,56 @@
    })
    @GetMapping(path = "monitorInfo")
    @SsoAop()
    public BaseResponse<VoMonitorInfo> monitorInfo(Date startDt) {
    public BaseResponse<VoMonitorInfo> monitorInfo(String fromDt) throws Exception {
        if(fromDt == null || fromDt.trim().equals("")){
            return BaseResponseUtils.buildException("开始日期不能为空");
        }
        Date startDt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(fromDt + " 00:00:00");
        VoMonitorInfo res = this.sv.monitorInfo(startDt);
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * 昨日农户用水前5名
     * @return 数据集合
     */
    @Operation(summary = "昨日农户用水前5名", description = "昨日农户用水前5名统计")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "昨日农户用水前5名统计(BaseResponse.content:[VoTopXClient{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoTopXClient.class))}
            )
    })
    @GetMapping(path = "top5ClientYesterday")
    @SsoAop()
    public BaseResponse<List<VoTopXClient>> top5ClientYesterday(){
        List<VoTopXClient> res = this.sv.top5ClientYesterday();
        return BaseResponseUtils.buildSuccess(res);
    }
    /**
     * 昨日取水口用水前5名
     * @return 数据集合
     */
    @Operation(summary = "昨日取水口用水前5名", description = "昨日取水口用水前5名统计")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "昨日取水口用水前5名统计(BaseResponse.content:[VoTopXIntake{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoTopXIntake.class))}
            )
    })
    @GetMapping(path = "top5IntakeYesterday")
    @SsoAop()
    public BaseResponse<List<VoTopXIntake>> top5IntakeYesterday(){
        List<VoTopXIntake> res = this.sv.top5IntakeYesterday();
        return BaseResponseUtils.buildSuccess(res);
    }
}