Browse Source

***********************WX*****************************
关系调整

张维新 4 năm trước cách đây
mục cha
commit
fbe450b29d

+ 2 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/Configure.kt

@@ -104,7 +104,7 @@ object Configure {
             jsonObject["relValue"] = objTo
         }
         /** 添加到列表 */
-        jsonArray.plus(jsonObject)
+        jsonArray.add(jsonObject)
         return jsonArray
     }
 
@@ -131,7 +131,7 @@ object Configure {
             /** 从对象 id */
             jsonObject["objTo"] = id
             /** 添加到列表 */
-            jsonArray.plus(jsonObject)
+            jsonArray.add(jsonObject)
         }
         return jsonArray
     }
@@ -161,7 +161,6 @@ object Configure {
             jsonObject["objTo"] = objTo
             /** 添加到列表 */
             jsonArray.add(jsonObject)
-            logger.debug("数组001 ${jsonArray?.toJson() }   **************************************************************************")
         }
         return jsonArray
     }

+ 22 - 3
datasyn/src/main/kotlin/com/persagy/server/syn/jms/DataCenterSync.kt

@@ -140,9 +140,6 @@ class DataCenterSync {
                                 var ids=  Gson().fromJson<ArrayList<String>>(message.toId,type)
                                 logger.debug("id= ${ids.toJson()}**************************")
                                 equipInSpaceSync.equipInSpaceCreate(message,"MechInArch","Eq2Sp",ids)
-                            }else {
-                                logger.debug("没识别**************************")
-
                             }
                         }
                     }
@@ -157,6 +154,28 @@ class DataCenterSync {
                         "12" -> { // 删除关系
                             equipInSpaceSync.delRel(message, "MechSubset", "Sy2Eq")
                         }
+                        "13" ->{
+                            if (message.fromId!!.startsWith("Eq")){
+                                var ids=  Gson().fromJson<ArrayList<String>>(message.toId,type)
+                                equipInSpaceSync.addRelSuperposition(message,ids,"MechSubset","Sy2Eq")
+
+                            } else if (message.fromId!!.startsWith("Sy")) {
+                                var ids=  Gson().fromJson<ArrayList<String>>(message.toId,type)
+
+                                equipInSpaceSync.addRelSuperpositionFan(message,ids,"MechSubset","Sy2Eq")
+                            }
+
+                        }
+                        "14" ->{
+                            if (message.fromId!!.startsWith("Sy")) {
+                                var ids=  Gson().fromJson<ArrayList<String>>(message.toId,type)
+                                logger.debug("id= ${ids.toJson()}**************************")
+                                equipInSpaceSync.equipInSpaceCreate(message,"MechSubset","Sy2Eq",ids)
+                            }
+                        }
+
+
+
                     }
                 }
                 "Sy2Sh" -> {