| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.records.intakeAmountDay; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.aop.SsoAop; | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponse; | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.common.webUtil.ResultCodeMsg; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoActiveCard; | 
|---|
|  |  |  | 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.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author :WuZeYu | 
|---|
|  |  |  | * @Date :2024/7/24  14:37 | 
|---|
|  |  |  | * @LastEditTime :2024/7/24  14:37 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Tag(name = "取水口日取水量漏损量查询", description = "取水口日取水量漏损量查询") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(path = "intakeAmountDay") | 
|---|
|  |  |  | public class IntakeAmountDayCtrl { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private IntakeAmountDaySv intakeAmountDaySv; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取取水口日取水量漏损量列表(历史) | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param vo 查询条件 | 
|---|
|  |  |  | * @return 符合条件的取水口日取水量漏损量列表(历史) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "获得一页取水口日取水量漏损量记录", description = "返回一页取水口日取水量漏损量数据") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "返回一页取水口日取水量漏损数据(BaseResponse.content:QueryResultVo[{}])", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = VoActiveCard.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "/getIntakeAmountDayHistory") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory( IntakeAmountDayQueryVo vo) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayHistory(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取取水口日取水量漏损量记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件获取取水口日取水量漏损量列表(最新) | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param vo 查询条件 | 
|---|
|  |  |  | * @return 符合条件的取水口日取水量漏损量列表(最新) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "获得一页取水口日取水量漏损量记录", description = "返回一页取水口日取水量漏损量数据") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "返回一页取水口日取水量漏损量数据(BaseResponse.content:QueryResultVo[{}])", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = VoActiveCard.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "/getIntakeAmountDayLast") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayLast( IntakeAmountDayQueryVo vo) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | QueryResultVo<List<VoIntakeAmountDay>> res = intakeAmountDaySv.getIntakeAmountDayLast(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取取水口日取水量漏损量记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|