|
@@ -125,41 +125,6 @@ class RelFromToControllers {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 系统下的设备设施
|
|
|
- */
|
|
|
- @Operation(summary= "系统下的设备设施-同步到数据中心", description = "")
|
|
|
- @PostMapping("/sy2EqIn")
|
|
|
- fun sy2EqIn(@RequestParam projectId: String): SBaseResponse {
|
|
|
- try {
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
- if (dictProject!=null) {
|
|
|
- val relList = EquipApi.getRel(dictProject.groupCode!!, projectId, "MechSubset", "Sy2Eq")
|
|
|
- if (!relList.isNullOrEmpty()){
|
|
|
- for ( rel in relList) {
|
|
|
- try {
|
|
|
- val fromId = rel["objFrom"].toString()
|
|
|
- val toId = rel["objTo"].toString()
|
|
|
- val rSyEq = RSyEq()
|
|
|
- rSyEq.sysId = fromId
|
|
|
- rSyEq.equipId = toId
|
|
|
- rSyEq.projectId = projectId
|
|
|
- rSyEq.graphCode = "MechSubset"
|
|
|
- rSyEq.type = "Sy2Eq"
|
|
|
- rSyEqService.replace(rSyEq)
|
|
|
- } catch (e: Exception) {
|
|
|
- e.printStackTrace()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return SBaseResponse(SResponseType.success)
|
|
|
- } catch (e: Exception) {
|
|
|
- e.printStackTrace()
|
|
|
- return SBaseResponse(SResponseType.failure)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 设备设施服务业务空间
|
|
|
*/
|
|
|
@Operation(summary= "设备设施服务业务空间-同步到数据中心", description = "")
|
|
@@ -206,6 +171,41 @@ class RelFromToControllers {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 系统下的设备设施
|
|
|
+ */
|
|
|
+ @Operation(summary= "系统下的设备设施-同步到数据中心", description = "")
|
|
|
+ @PostMapping("/sy2EqIn")
|
|
|
+ fun sy2EqIn(@RequestParam projectId: String): SBaseResponse {
|
|
|
+ try {
|
|
|
+ val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ if (dictProject!=null) {
|
|
|
+ val relList = EquipApi.getRel(dictProject.groupCode!!, projectId, "MechSubset", "Sy2Eq")
|
|
|
+ if (!relList.isNullOrEmpty()){
|
|
|
+ for ( rel in relList) {
|
|
|
+ try {
|
|
|
+ val fromId = rel["objFrom"].toString()
|
|
|
+ val toId = rel["objTo"].toString()
|
|
|
+ val rSyEq = RSyEq()
|
|
|
+ rSyEq.sysId = fromId
|
|
|
+ rSyEq.equipId = toId
|
|
|
+ rSyEq.projectId = projectId
|
|
|
+ rSyEq.graphCode = "MechSubset"
|
|
|
+ rSyEq.type = "Sy2Eq"
|
|
|
+ rSyEqService.replace(rSyEq)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return SBaseResponse(SResponseType.success)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ return SBaseResponse(SResponseType.failure)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 建筑下的竖井
|
|
|
*/
|
|
|
@Operation(summary= "建筑下的竖井-同步到数据中心", description = "")
|
|
@@ -317,4 +317,99 @@ class RelFromToControllers {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 楼层下的业务空间
|
|
|
+ */
|
|
|
+ @Operation(summary= "楼层下的业务空间 - 同步到数据中心", description = "")
|
|
|
+ @PostMapping("/fl2SpIn")
|
|
|
+ fun fl2SpIn(@RequestParam projectId: String): SBaseResponse {
|
|
|
+ try {
|
|
|
+ val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ if (dictProject!=null) {
|
|
|
+ val relList = EquipApi.getRel(dictProject.groupCode!!, projectId, "ArchSubset", "Fl2Sp")
|
|
|
+ if (!relList.isNullOrEmpty()){
|
|
|
+ for ( rel in relList) {
|
|
|
+ try {
|
|
|
+ val fromId = rel["objFrom"].toString()
|
|
|
+ val toId = rel["objTo"].toString()
|
|
|
+ val entity = floorService.select(SFilter.eq("id", fromId)).entity()
|
|
|
+ val rSpinFl = RSpinFl()
|
|
|
+ rSpinFl.floorId = fromId
|
|
|
+ rSpinFl.spaceId = toId
|
|
|
+ rSpinFl.projectId = projectId
|
|
|
+ if (entity!=null) {
|
|
|
+ rSpinFl.buildingId = entity.buildingId
|
|
|
+ }
|
|
|
+ val containsKey = rel.containsKey("relValue")
|
|
|
+ if (containsKey) {
|
|
|
+ rSpinFl.objectType = rel["relValue"].toString()
|
|
|
+ } else {
|
|
|
+ val zoneSpace = zoneSpaceService.select(
|
|
|
+ SFilter.eq("projectId", projectId),
|
|
|
+ SFilter.eq("id", rSpinFl.spaceId!!)
|
|
|
+ ).entity()
|
|
|
+ if (zoneSpace!=null) {
|
|
|
+ rSpinFl.objectType = zoneSpace.classCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rSpinFlService.replace(rSpinFl)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return SBaseResponse(SResponseType.success)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ return SBaseResponse(SResponseType.failure)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 竖井下的业务空间
|
|
|
+ */
|
|
|
+ fun sh2SpIn(@RequestParam projectId: String): SBaseResponse{
|
|
|
+ try {
|
|
|
+ val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ if (dictProject!=null) {
|
|
|
+ val relList = EquipApi.getRel(dictProject.groupCode!!, projectId, "ArchSubset", "Sh2Sp")
|
|
|
+ if (!relList.isNullOrEmpty()){
|
|
|
+ for ( rel in relList) {
|
|
|
+ try {
|
|
|
+ val fromId = rel["objFrom"].toString()
|
|
|
+ val toId = rel["objTo"].toString()
|
|
|
+ val rSh2Sp = RSh2Sp()
|
|
|
+ rSh2Sp.id1 = fromId
|
|
|
+ rSh2Sp.id2 = toId
|
|
|
+ rSh2Sp.projectId = projectId
|
|
|
+ rSh2Sp.type = "sh2sp"
|
|
|
+ val containsKey = rel.containsKey("relValue")
|
|
|
+ if (containsKey) {
|
|
|
+ rSh2Sp.zoneType = rel["relValue"].toString()
|
|
|
+ } else {
|
|
|
+ val zoneSpace = zoneSpaceService.select(
|
|
|
+ SFilter.eq("projectId", projectId),
|
|
|
+ SFilter.eq("id", rSh2Sp.id2!!)
|
|
|
+ ).entity()
|
|
|
+ if (zoneSpace!=null) {
|
|
|
+ rSh2Sp.zoneType = zoneSpace.classCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rSh2SpService.replace(rSh2Sp)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return SBaseResponse(SResponseType.success)
|
|
|
+ } catch (e: Exception) {
|
|
|
+ e.printStackTrace()
|
|
|
+ return SBaseResponse(SResponseType.failure)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|