|
@@ -766,15 +766,22 @@ class RelToFromController {
|
|
fun sy2sp(@RequestParam projectId: String,@RequestParam graphCode: String,@RequestParam type: String,@RequestParam isDel: Boolean = false): SBaseResponse{
|
|
fun sy2sp(@RequestParam projectId: String,@RequestParam graphCode: String,@RequestParam type: String,@RequestParam isDel: Boolean = false): SBaseResponse{
|
|
try {
|
|
try {
|
|
val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
|
+
|
|
|
|
+ var types = ""
|
|
|
|
+ if (graphCode == "MechInArch") {
|
|
|
|
+ types = "sy2sp"
|
|
|
|
+ } else {
|
|
|
|
+ types = "sy2spfor"
|
|
|
|
+ }
|
|
if (graphCode == "MechInArch") {
|
|
if (graphCode == "MechInArch") {
|
|
val rSy2SpList = rSy2SpService.select(SFilter.eq("projectId", projectId),
|
|
val rSy2SpList = rSy2SpService.select(SFilter.eq("projectId", projectId),
|
|
- SFilter.eq("graphCode", graphCode),
|
|
|
|
- SFilter.eq("type", type)).exec()
|
|
|
|
|
|
+// SFilter.eq("graphCode", graphCode),
|
|
|
|
+ SFilter.eq("type", types)).exec()
|
|
if (rSy2SpList.size>0) {
|
|
if (rSy2SpList.size>0) {
|
|
|
|
|
|
for (rSy2Sp in rSy2SpList) {
|
|
for (rSy2Sp in rSy2SpList) {
|
|
if (isDel) {
|
|
if (isDel) {
|
|
- val toJsonObj = Configure.toJsonObj(graphCode, type, rSy2Sp.id1!!, null)
|
|
|
|
|
|
+ val toJsonObj = Configure.toJsonObj(graphCode, type, rSy2Sp.id1!!, rSy2Sp.id2)
|
|
EquipApi.delRel(dictProject!!.groupCode!!, projectId,toJsonObj)
|
|
EquipApi.delRel(dictProject!!.groupCode!!, projectId,toJsonObj)
|
|
}
|
|
}
|
|
val toJsonObjArray =
|
|
val toJsonObjArray =
|