Browse Source

修改日志详情内容

lirong 2 years ago
parent
commit
244895a984

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

@@ -283,7 +283,7 @@ public class RestUtil {
 		}
 		JSONArray subsystem_connect_status_array=new JSONArray();
 		StringBuffer sb = new StringBuffer();
-		sb.append( "[" + userName + "]:");
+		sb.append( "用户控制日志." + userName + ":");
 		for (int i = 0; i < subsystemStatusList.size(); i++) {
 			JSONObject item = (JSONObject) subsystemStatusList.get(i);
 			String ibmsSceneCode = item.getString("ibmsSceneCode");
@@ -293,13 +293,13 @@ 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 + "]");
+				sb.append("" + connectName + "");
 				if(connectStatus!=null&&connectStatus.toString().equals("1"))
 				{
-					sb.append("[连接成功]");
+					sb.append("联通正常");
 				}else
 				{
-					sb.append("[连接失败]");
+					sb.append("联通中断");
 				}
 				sb.append("、");
 			}

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

@@ -244,11 +244,10 @@ public class ControlUtil {
                         infoName = (String) infoDef.get("name").value_prim.value;
                         infoValue = ControlUtil.value2CanRead(infoDef, infoValue);
                     }
-                    sb.append("[" + infoName + "]" + "设为:" + "[" + infoValue + "]");
-                    sb.append(";");
+                    sb.append("" + infoName + "设为:" +  "" + infoValue + "");
                     if (controlReason != null && !controlReason.isEmpty()) {
                         if (infoDef.get("code").value_prim.value.equals("manualAutoSet")) {
-                            sb.append("原因:" + controlReason + ";");
+                            sb.append(",切换原因:" + controlReason + "");
                         }
                     }
                     String id = (String) sdo.get("id").value_prim.value;
@@ -264,19 +263,23 @@ public class ControlUtil {
                                 .findFirst().get();
                         String status = (String) point.get("status");
                         if (status.equals("finish:success")) {
-                            sb.append("控制结果:成功;");
+                            sb.append("*成功;");
                         } else {
-                            sb.append("控制结果:失败;");
+                            sb.append("*失败;");
                         }
                     }
+                    if(i < sdoList.size()-1)
+                    {
+                        sb.append(",");
+                    }
                 }
                 for (int j = 1; j <= 2; j++) {
                     postParam2 = JSONObject.parseObject(postParam.toJSONString());
                     if (j == 1) {
-                        postParam2.put("details", "【" + ibmsSceneName + "】:" + ibmsxianshimingcheng + "-" + sb.toString());
+                        postParam2.put("details", "控制:" + ibmsxianshimingcheng + "," + sb.toString());
                         postParam2.put("logSource", "user");
                     } else {
-                        postParam2.put("details", sb.toString());
+                        postParam2.put("details", "用户控制日志."+userName+":" + ibmsxianshimingcheng + "," + sb.toString());
                         postParam2.put("logSource", "sys");
                     }
                     postParamArray.add(postParam2);