| package com.dy.pipIrrRemote.records; | 
|   | 
| 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.voRm.VoControllerAlarmState; | 
| import com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay; | 
| import com.dy.pipIrrGlobal.voSe.VoActiveCard; | 
| import com.dy.pipIrrRemote.records.clientAmountDay.ClientAmountDayQueryVo; | 
| import com.dy.pipIrrRemote.records.controllerAlarmState.ControllerAlarmStateQueryVo; | 
| import com.dy.pipIrrRemote.records.intakeAmountDay.IntakeAmountDayQueryVo; | 
| 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.RequestBody; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.RestController; | 
|   | 
| import java.util.List; | 
|   | 
| /** | 
|  * @author :WuZeYu | 
|  * @Date :2024/7/22  20:00 | 
|  * @LastEditTime :2024/7/22  20:00 | 
|  * @Description | 
|  */ | 
| @Slf4j | 
| @Tag(name = "检测控制查询", description = "检测控制查询") | 
| @RestController | 
| @RequestMapping(path = "remoteRecords") | 
| public class RecordsCtrl { | 
|     @Autowired | 
|     private RecordsSv recordsSv; | 
|   | 
|   | 
|     /** | 
|      * 根据指定条件获取控制器报警与状态列表(历史) | 
|      * | 
|      * @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 = "/getControllerAlarmStateHistory") | 
|     @SsoAop() | 
|     public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory(@RequestBody ControllerAlarmStateQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoControllerAlarmState>> res = recordsSv.getControllerAlarmStateHistory(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 = "/getControllerAlarmStateLast") | 
|     @SsoAop() | 
|     public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast(@RequestBody ControllerAlarmStateQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoControllerAlarmState>> res = recordsSv.getControllerAlarmStateLast(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 = "/getClientAmountDayHistory") | 
|     @SsoAop() | 
|     public BaseResponse<QueryResultVo<List<VoClientAmountDay>>> getClientAmountDayHistory(@RequestBody ClientAmountDayQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoClientAmountDay>> res = recordsSv.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(@RequestBody ClientAmountDayQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoClientAmountDay>> res = recordsSv.getClientAmountDayLast(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 = "/getIntakeAmountDayHistory") | 
|     @SsoAop() | 
|     public BaseResponse<QueryResultVo<List<VoIntakeAmountDay>>> getIntakeAmountDayHistory(@RequestBody IntakeAmountDayQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoIntakeAmountDay>> res = recordsSv.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(@RequestBody IntakeAmountDayQueryVo vo) { | 
|         try { | 
|             QueryResultVo<List<VoIntakeAmountDay>> res = recordsSv.getIntakeAmountDayLast(vo); | 
|             return BaseResponseUtils.buildSuccess(res); | 
|         } catch (Exception e) { | 
|             log.error("获取农户日用水量统计记录异常", e); | 
|             return BaseResponseUtils.buildException(e.getMessage()); | 
|         } | 
|     } | 
| } |