From 26d63d120e517624be6fcf70ae9620c3582a91dd Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期二, 18 六月 2024 17:35:06 +0800
Subject: [PATCH] 2024-06-18 朱宝民 优化开关阀逻辑

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
index 3d9cbf5..3888f7c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java
@@ -111,7 +111,7 @@
         // 鍙栨按鍙D鎹㈤榾鎺у櫒鍦板潃鍙婇�氳鍗忚
         JSONObject job_rtu = getRtu(intakeId, null);
         if(job_rtu == null) {
-            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
@@ -343,7 +343,7 @@
         // 闃�鎺у櫒鍦板潃鎹㈠彇姘村彛ID鍜岄�氳鍗忚
         JSONObject job_rtu = getRtu(null, rtuAddr);
         if(job_rtu == null) {
-            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
         }
         Long intakeId = job_rtu.getLong("intakeId");
         String protocol = job_rtu.getString("protocol");
@@ -384,7 +384,7 @@
                     //rmCommandHistory.setResult((byte)0);
                     //commandSv.updateCommandResult(rmCommandHistory);
                     return BaseResponseUtils.buildFail(response_CallBack.getMsg());
-                    //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
+                    //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
                 }
 
                 // 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛
@@ -527,7 +527,13 @@
         Long intakeId = dtoBase.getIntakeId();
         Long operator = dtoBase.getOperator();
 
-        VoUnclosedParam voUnclosedParam = commandSv.getUncloseParam(intakeId);
+        VoUnclosedParam voUnclosedParam = null;
+        try {
+            voUnclosedParam = commandSv.getUncloseParam(intakeId);
+        }catch (Exception e) {
+            return BaseResponseUtils.buildErrorMsg("鑾峰彇鏈叧闃�淇℃伅閿欒");
+        }
+
         if(voUnclosedParam == null) {
             return BaseResponseUtils.buildSuccess(RemoteResultCode.VALVE_CLOSED.getMessage());
         }
@@ -544,7 +550,7 @@
         // 闃�鎺у櫒鍦板潃鎹㈠彇姘村彛ID鍜岄�氳鍗忚
         JSONObject job_rtu = getRtu(null, rtuAddr);
         if(job_rtu == null) {
-            return BaseResponseUtils.buildError(RemoteResultCode.RTU_NOT_EXIST.getMessage());
+            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
         }
         //Long intakeId = job_rtu.getLong("intakeId");
         String protocol = job_rtu.getString("protocol");
@@ -585,7 +591,7 @@
                     //rmCommandHistory.setResult((byte)0);
                     //commandSv.updateCommandResult(rmCommandHistory);
                     return BaseResponseUtils.buildFail(response_CallBack.getMsg());
-                    //return BaseResponseUtils.buildError(WechatResultCode.GET_RESULT_ERROR.getMessage());
+                    //return BaseResponseUtils.buildErrorMsgMsg(WechatResultCode.GET_RESULT_ERROR.getMessage());
                 }
 
                 // 鍥炶皟鎴愬姛锛屽啀鍒ゆ柇鎵ц鏄惁鎴愬姛

--
Gitblit v1.8.0