New file |
| | |
| | | package com.dy.pipIrrRemote.records.clientAmountDay; |
| | | |
| | | 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.VoClientAmountDay; |
| | | 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:30 |
| | | * @LastEditTime :2024/7/24 14:30 |
| | | * @Description |
| | | */ |
| | | @Slf4j |
| | | @Tag(name = "农户日用水量统计查询", description = "农户日用水量统计查询") |
| | | @RestController |
| | | @RequestMapping(path = "clientAmountDay") |
| | | public class ClientAmountDayCtrl { |
| | | |
| | | @Autowired |
| | | private ClientAmountDaySv clientAmountDaySv; |
| | | |
| | | |
| | | /** |
| | | * 根据指定条件获取农户日用水量统计列表(历史) |
| | | * |
| | | * @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 = "/getClientAmountDayHistory") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayHistory( ClientAmountDayQueryVo vo) { |
| | | try { |
| | | QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayHistory(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 = "/getClientAmountDayLast") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayLast( ClientAmountDayQueryVo vo) { |
| | | try { |
| | | QueryResultVo<List<VoClientAmountDay>> res = clientAmountDaySv.getClientAmountDayLast(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取农户日用水量统计记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()); |
| | | } |
| | | } |
| | | } |