Просмотр исходного кода

子系统连接不保存日志

lirong 2 лет назад
Родитель
Сommit
8e8d9d8e28

+ 31 - 31
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/rest/RestUtil.java

@@ -287,8 +287,8 @@ public class RestUtil {
             }
         }
         JSONArray subsystem_connect_status_array = new JSONArray();
-        StringBuffer sb = new StringBuffer();
-        sb.append("用户控制日志." + userName + ":");
+//        StringBuffer sb = new StringBuffer();
+//        sb.append("用户控制日志." + userName + ":");
         for (int i = 0; i < subsystemStatusList.size(); i++) {
             JSONObject item = (JSONObject) subsystemStatusList.get(i);
             String ibmsSceneCode = item.getString("ibmsSceneCode");
@@ -297,37 +297,37 @@ public class RestUtil {
                 subsystem_connect_status_array.add(itemObject.toJSON(2));
                 Object connectName = itemObject.get("名称").value_prim.value;
                 Object connectStatus = itemObject.get("连接状态").value_prim.value;
-                sb.append("" + connectName + "");
-                if (connectStatus != null && connectStatus.toString().equals("1")) {
-                    sb.append("联通正常");
-                } else {
-                    sb.append("联通中断");
-                }
-                sb.append("、");
+//                sb.append("" + connectName + "");
+//                if (connectStatus != null && connectStatus.toString().equals("1")) {
+//                    sb.append("联通正常");
+//                } else {
+//                    sb.append("联通中断");
+//                }
+//                sb.append("、");
             }
         }
-        JSONObject postParam = new JSONObject();
-        postParam.put("logSource", "sys");
-        postParam.put("ipAddress", ipAddress);
-        postParam.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
-        postParam.put("projectId", RepositoryContainer.RepositoryProject.projectId);
-        if (userId != null) {
-            postParam.put("userId", userId);
-        }
-        if (userName != null) {
-            postParam.put("userName", userName);
-        }
-        if (authorization != null) {
-            postParam.put("token", authorization);
-        }
-        postParam.put("module", "shop");
-        postParam.put("systemType", "connectionstatus");
-        postParam.put("details", sb.toString());
-        try {
-            ControlUtil.saveOperationLog(postParam);
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
-        }
+//        JSONObject postParam = new JSONObject();
+//        postParam.put("logSource", "sys");
+//        postParam.put("ipAddress", ipAddress);
+//        postParam.put("groupCode", RepositoryContainer.RepositoryProject.groupCode);
+//        postParam.put("projectId", RepositoryContainer.RepositoryProject.projectId);
+//        if (userId != null) {
+//            postParam.put("userId", userId);
+//        }
+//        if (userName != null) {
+//            postParam.put("userName", userName);
+//        }
+//        if (authorization != null) {
+//            postParam.put("token", authorization);
+//        }
+//        postParam.put("module", "shop");
+//        postParam.put("systemType", "connectionstatus");
+//        postParam.put("details", sb.toString());
+//        try {
+//            ControlUtil.saveOperationLog(postParam);
+//        } catch (Exception e) {
+//            log.error(e.getMessage(), e);
+//        }
         return JSONArray.toJSONString(subsystem_connect_status_array, SerializerFeature.WriteMapNullValue);
     }
 

+ 3 - 3
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/ControlUtil.java

@@ -315,9 +315,9 @@ public class ControlUtil {
                             commandRecordParam.put("executeStatus",2);
                         }
                     }
-                    if (i < sdoList.size() - 1) {
-                        sb.append(",");
-                    }
+//                    if (i < sdoList.size() - 1) {
+//                        sb.append(",");
+//                    }
                 }
                 for (int j = 1; j <= 2; j++) {
                     postParam2 = JSONObject.parseObject(postParam.toJSONString());