From 05702adf7e0732f90176fd3f9c5f4afe8c8f29da Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 19 十月 2024 11:22:03 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/valve/ValveCtrl.java |   74 ++++++++++++++++++++----------------
 1 files changed, 41 insertions(+), 33 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 648354f..1247977 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
@@ -2,6 +2,7 @@
 
 import com.alibaba.fastjson2.JSONObject;
 import com.dy.common.aop.SsoAop;
+import com.dy.common.multiDataSource.DataSourceContext;
 import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1;
 import com.dy.common.mw.protocol.p206V1_0_0.downVos.*;
 import com.dy.common.mw.protocol.p206V202404.CodeV202404;
@@ -110,10 +111,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�
@@ -241,10 +243,11 @@
         }
         //Long intakeId = job_rtu.getLong("intakeId");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         String commandCode = null;
@@ -359,10 +362,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�
@@ -479,11 +483,11 @@
             return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_EXIST.getMessage());
         }
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
-
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         String commandCode = null;
@@ -601,10 +605,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�
@@ -704,10 +709,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�
@@ -814,10 +820,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�
@@ -929,10 +936,11 @@
         }
         String rtuAddr = job_rtu.getString("rtuAddr");
         String protocol = job_rtu.getString("protocol");
-        String orgTag = job_rtu.getString("orgTag");
-        if(orgTag == null) {
-            return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
-        }
+        //String orgTag = job_rtu.getString("orgTag");
+        //if(orgTag == null) {
+        //    return BaseResponseUtils.buildErrorMsg(RemoteResultCode.RTU_NOT_SET_DATA_SOURCE.getMessage());
+        //}
+        String orgTag = DataSourceContext.get();
         comSendUrl = env.getProperty(pro_mw + "." + orgTag + "." + key_mw);
 
         // 鐢熸垚璁㈠崟鍙�

--
Gitblit v1.8.0