package com.dy.pipIrrStatistics.allRound;
|
|
import com.dy.common.aop.SsoAop;
|
import com.dy.common.webUtil.BaseResponse;
|
import com.dy.common.webUtil.BaseResponseUtils;
|
import com.dy.common.webUtil.ResultCodeMsg;
|
import com.dy.pipIrrGlobal.VoAllRound.*;
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.http.MediaType;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* @Author: liurunyu
|
* @Date: 2025/2/5 10:46
|
* @Description
|
*/
|
@Slf4j
|
@Tag(name = "取水口综合信息之相关统计数据", description = "取水口综合信息之相关统计数据")
|
@RestController
|
@RequestMapping(path = "ar4Statistics")
|
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
|
public class Ar4StatisticsCtrl {
|
|
private Ar4StatisticsSv sv;
|
|
@Autowired
|
private void setSv(Ar4StatisticsSv sv) {
|
this.sv = sv;
|
}
|
|
/**
|
* 综合信息
|
* 取水口开关阀数据
|
* @return
|
*/
|
@Operation(summary = "综合信息", description = "取水口开关阀数据")
|
@ApiResponses(value = {
|
@ApiResponse(
|
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
|
description = "取水口开关阀数据(BaseResponse.content:VoArIntakeOpenCloseValve[{}])",
|
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
schema = @Schema(implementation = VoArIntakeOpenCloseValve.class))}
|
)
|
})
|
@GetMapping(path = "openCloseValveInfo")
|
@SsoAop()
|
public BaseResponse<List<VoArIntakeOpenCloseValve>> openCloseValveInfo(Long intakeId) {
|
if (intakeId == null || intakeId.longValue() == 0L) {
|
return BaseResponseUtils.buildException("取水口id不能为空");
|
}
|
List<VoArIntakeOpenCloseValve> res = this.sv.openCloseValveRecords(intakeId);
|
return BaseResponseUtils.buildSuccess(res);
|
}
|
|
|
/**
|
* 综合信息
|
* 取水口日漏损数据
|
* @return
|
*/
|
@Operation(summary = "综合信息", description = "取水口日漏损数据")
|
@ApiResponses(value = {
|
@ApiResponse(
|
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
|
description = "取水口日漏损数据(BaseResponse.content:VoArIntakeLossDay[{}])",
|
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
schema = @Schema(implementation = VoArIntakeLossDay.class))}
|
)
|
})
|
@GetMapping(path = "lossDayRecords")
|
@SsoAop()
|
public BaseResponse<List<VoArIntakeLossDay>> lossDayRecords(Long intakeId) {
|
if (intakeId == null || intakeId.longValue() == 0L) {
|
return BaseResponseUtils.buildException("取水口id不能为空");
|
}
|
List<VoArIntakeLossDay> res = this.sv.lossDayRecords(intakeId);
|
return BaseResponseUtils.buildSuccess(res);
|
}
|
|
/**
|
* 综合信息
|
* 取水口月漏损数据
|
* @return
|
*/
|
@Operation(summary = "综合信息", description = "取水口月漏损数据")
|
@ApiResponses(value = {
|
@ApiResponse(
|
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
|
description = "取水口月漏损数据(BaseResponse.content:VoArIntakeLossMonth[{}])",
|
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
schema = @Schema(implementation = VoArIntakeLossMonth.class))}
|
)
|
})
|
@GetMapping(path = "lossMonthRecords")
|
@SsoAop()
|
public BaseResponse<List<VoArIntakeLossMonth>> lossMonthRecords(Long intakeId) {
|
if (intakeId == null || intakeId.longValue() == 0L) {
|
return BaseResponseUtils.buildException("取水口id不能为空");
|
}
|
List<VoArIntakeLossMonth> res = this.sv.lossMonthRecords(intakeId);
|
return BaseResponseUtils.buildSuccess(res);
|
}
|
|
/**
|
* 综合信息
|
* 取水口日取水数据
|
* @return
|
*/
|
@Operation(summary = "综合信息", description = "取水口日取水数据")
|
@ApiResponses(value = {
|
@ApiResponse(
|
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
|
description = "取水口日取水数据(BaseResponse.content:VoArIntakeAmountDay[{}])",
|
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
schema = @Schema(implementation = VoArIntakeAmountDay.class))}
|
)
|
})
|
@GetMapping(path = "amountDayRecords")
|
@SsoAop()
|
public BaseResponse<List<VoArIntakeAmountDay>> amountDayRecords(Long intakeId) {
|
if (intakeId == null || intakeId.longValue() == 0L) {
|
return BaseResponseUtils.buildException("取水口id不能为空");
|
}
|
List<VoArIntakeAmountDay> res = this.sv.amountDayRecords(intakeId);
|
return BaseResponseUtils.buildSuccess(res);
|
}
|
|
/**
|
* 综合信息
|
* 取水口月取水数据
|
* @return
|
*/
|
@Operation(summary = "综合信息", description = "取水口月取水数据")
|
@ApiResponses(value = {
|
@ApiResponse(
|
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
|
description = "取水口月取水数据(BaseResponse.content:VoArIntakeAmountDay[{}])",
|
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
|
schema = @Schema(implementation = VoArIntakeAmountMonth.class))}
|
)
|
})
|
@GetMapping(path = "amountMonthRecords")
|
@SsoAop()
|
public BaseResponse<List<VoArIntakeAmountMonth>> amountMonthRecords(Long intakeId) {
|
if (intakeId == null || intakeId.longValue() == 0L) {
|
return BaseResponseUtils.buildException("取水口id不能为空");
|
}
|
List<VoArIntakeAmountMonth> res = this.sv.amountMonthRecords(intakeId);
|
return BaseResponseUtils.buildSuccess(res);
|
}
|
|
|
}
|