From c42614978ff12013a1eabebd0289b27169a5784f Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 06 五月 2025 17:25:56 +0800 Subject: [PATCH] 1、实现万功能token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并相应修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java index 15bd426..a591161 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/records/controllerAlarmState/ControllerAlarmStateCtrl.java @@ -16,10 +16,7 @@ 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 org.springframework.web.bind.annotation.*; import java.util.List; @@ -56,7 +53,7 @@ }) @GetMapping(path = "/getControllerAlarmStateHistory") @SsoAop() - public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory(@RequestBody ControllerAlarmStateQueryVo vo) { + public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateHistory( ControllerAlarmStateQueryVo vo) { try { QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateHistory(vo); return BaseResponseUtils.buildSuccess(res); @@ -66,6 +63,33 @@ } } + + /** + * 鑾峰彇鎸囧畾鍙栨按鍙f姤璀︿笌鐘舵�佸垪琛紙鍘嗗彶锛� + * + * @param vo 鐩歌鏉′欢锛屽叾涓繀椤昏祴鍊煎彇姘村彛ID + * @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 = "/getOneControllerAlarmStateHistory") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getOneControllerAlarmStateHistory(ControllerAlarmStateQueryVo vo) { + try { + QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getOneControllerAlarmStateHistory(vo); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鑾峰彇鑾峰彇鎸囧畾鍙栨按鍙f姤璀︿笌鐘舵�佽褰曞紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } /** @@ -85,7 +109,7 @@ }) @GetMapping(path = "/getControllerAlarmStateLast") @SsoAop() - public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast(@RequestBody ControllerAlarmStateQueryVo vo) { + public BaseResponse<QueryResultVo<List<VoControllerAlarmState>>> getControllerAlarmStateLast( ControllerAlarmStateQueryVo vo) { try { QueryResultVo<List<VoControllerAlarmState>> res = controllerAlarmStateSv.getControllerAlarmStateLast(vo); return BaseResponseUtils.buildSuccess(res); -- Gitblit v1.8.0