|
@@ -42,7 +42,368 @@ class RwdRelationDel {
|
|
|
*/
|
|
|
fun delRelation(message: SyncRwdDatacenterMessage){
|
|
|
if (!message.exts.isNullOrEmpty()){
|
|
|
+ val graphCodeContains = message.exts!!.contains("graphCode")
|
|
|
+ val relCodeContains = message.exts!!.contains("relCode")
|
|
|
|
|
|
+ if (graphCodeContains&&relCodeContains){
|
|
|
+ val graphCode = message.exts!!["graphCode"]
|
|
|
+ val relCode = message.exts!!["relCode"]
|
|
|
+ val objFrom = message.exts!!["objFrom"]
|
|
|
+ val objTo = message.exts!!["relCode"]
|
|
|
+ when (graphCode) {
|
|
|
+ "ArchSubset" -> {
|
|
|
+ /** 建筑从属关系 */
|
|
|
+ when (relCode) {
|
|
|
+ "Bd2Fl" -> {
|
|
|
+ /** 建筑体下的楼层 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Bd2Sh" -> {
|
|
|
+ /** 建筑体下的竖井 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Bd2Sp" -> {
|
|
|
+ /** 建筑体下的业务空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Fl2Sp" -> {
|
|
|
+ /** 楼层下的业务空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sh2Sp" -> {
|
|
|
+ /** 竖井下的业务空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ "ThroughRelationship" -> {
|
|
|
+ /** 贯通关系 */
|
|
|
+ if (relCode == "Fl2Fl"){
|
|
|
+ /** 楼层贯通关系 */
|
|
|
+ }else if (relCode == "Sh2Sh") {
|
|
|
+ /** 竖井贯通关系 */
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ "MechInArch" -> {
|
|
|
+ /** 机电类所在区域关系 */
|
|
|
+ when (relCode) {
|
|
|
+ "Sy2Bd" -> {
|
|
|
+ /** 系统所在建筑 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Fl" -> {
|
|
|
+ /** 系统所在楼层 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Sh" -> {
|
|
|
+ /** 系统所在竖井 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Sp" -> {
|
|
|
+ /** 系统所在空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Bd" -> {
|
|
|
+ /** 设备设施所在建筑 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Fl" -> {
|
|
|
+ /** 设备设施所在楼层 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Sh" -> {
|
|
|
+ /** 设备设施所在竖井 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Sp" -> {
|
|
|
+ /** 设备设施所在空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ "MechForArch" -> {
|
|
|
+ /** 机电类服务区域关系 */
|
|
|
+ when (relCode) {
|
|
|
+ "Sy2Bd" -> {
|
|
|
+ /** 系统服务于建筑 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Fl" -> {
|
|
|
+ /** 系统服务于楼层 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Sh" -> {
|
|
|
+ /** 系统服务于竖井 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Sy2Sp" -> {
|
|
|
+ /** 系统服务于空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Bd" -> {
|
|
|
+ /** 设备设施服务于建筑 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Fl" -> {
|
|
|
+ /** 设备设施服务于楼层 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Sh" -> {
|
|
|
+ /** 设备设施服务于竖井 */
|
|
|
+
|
|
|
+ }
|
|
|
+ "Eq2Sp" -> {
|
|
|
+ /** 设备设施服务于空间 */
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "SpaceNeighborhood" -> {
|
|
|
+ /** 业务空间(同类)邻接关系 */
|
|
|
+ if (relCode == "None"){
|
|
|
+ /** 空间隔断无门窗 */
|
|
|
+ }else if (relCode == "Door") {
|
|
|
+ /** 空间隔断有门 */
|
|
|
+ }else if (relCode == "Window") {
|
|
|
+ /** 空间隔断有窗 */
|
|
|
+ }else if (relCode == "DoorWindow") {
|
|
|
+ /** 空间隔断有门窗 */
|
|
|
+ }else if (relCode == "Connect") {
|
|
|
+ /** 空间连通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "TrafficNetwork" -> {
|
|
|
+ /** 建筑交通网络(同类) */
|
|
|
+ if (relCode == "Normal"){
|
|
|
+ /** 普通交通 */
|
|
|
+ }else if (relCode == "FFOpen") {
|
|
|
+ /** 消防常开交通 */
|
|
|
+ }else if (relCode == "FFClose") {
|
|
|
+ /** 消防常关交通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "ConvectionNetwork" -> {
|
|
|
+ /** 空气流通网络(同类) */
|
|
|
+ if (relCode == "Natural"){
|
|
|
+ /** 空气自然对流 */
|
|
|
+ }else if (relCode == "OnewayMech") {
|
|
|
+ /** 空气单向机械通风 */
|
|
|
+ }else if (relCode == "MixMech") {
|
|
|
+ /** 空气混合机械通风 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "RadiationNetwork" -> {
|
|
|
+ /** 光照辐射网络(同类) */
|
|
|
+ if (relCode == "Connect"){
|
|
|
+ /** 光照连通 */
|
|
|
+ }else if (relCode == "Transparent"){
|
|
|
+ /** 光照透明隔断 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "LUDistribution" -> {
|
|
|
+ /** 低压配电网络 */
|
|
|
+ if (relCode == "Normal"){
|
|
|
+ /** 低压配电普通连接 */
|
|
|
+ }else if (relCode == "Backup"){
|
|
|
+ /** 低压配电互备连接 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "HUDistribution" -> {
|
|
|
+ /** 高压变配电网络 */
|
|
|
+ if (relCode == "Normal"){
|
|
|
+ /** 高压变配电普通连接 */
|
|
|
+ }else if (relCode == "Backup"){
|
|
|
+ /** 高压变配电互备连接 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "ChillWaterLoop" -> {
|
|
|
+ /** 空调冷冻水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 空调冷冻水供水 */
|
|
|
+ }else if (relCode == "Return"){
|
|
|
+ /** 空调冷冻水回水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 空调冷冻水旁通 */
|
|
|
+ }else if (relCode == "Fill"){
|
|
|
+ /** 空调冷冻水补水 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "CoolingWaterLoop" -> {
|
|
|
+ /** 空调冷却水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 空调冷却水供水 */
|
|
|
+ }else if (relCode == "Return"){
|
|
|
+ /** 空调冷却水回水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 空调冷却水旁通 */
|
|
|
+ }else if (relCode == "Fill"){
|
|
|
+ /** 空调冷却水补水 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "HeatWaterLoop" -> {
|
|
|
+ /** 采暖水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 采暖水供水 */
|
|
|
+ }else if (relCode == "Return"){
|
|
|
+ /** 采暖水回水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 采暖水旁通 */
|
|
|
+ }else if (relCode == "Fill"){
|
|
|
+ /** 采暖水补水 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "CondWaterNetwork" -> {
|
|
|
+ /** 空调冷凝水管网 */
|
|
|
+ if (relCode == "Discharge"){
|
|
|
+ /** 空调冷凝水排水 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "ACAirNetwork" -> {
|
|
|
+ /** 空调风管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 空调送风 */
|
|
|
+ }else if (relCode == "Return"){
|
|
|
+ /** 空调回风 */
|
|
|
+ }else if (relCode == "Discharge"){
|
|
|
+ /** 空调排风 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "FreshAirNetwork" -> {
|
|
|
+ /** 新风管网 */
|
|
|
+ if (relCode == "Fresh"){
|
|
|
+ /** 新风送风 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "VentNetwork" -> {
|
|
|
+ /** 通风管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 通风送风 */
|
|
|
+ }else if (relCode == "Discharge"){
|
|
|
+ /** 通风排风 */
|
|
|
+ }else if (relCode == "Uncertain"){
|
|
|
+ /** 通风不确定 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "VRFNetwork" -> {
|
|
|
+ /** 多联机管网 */
|
|
|
+ if (relCode == "SupplyReturn"){
|
|
|
+ /** 多联机供回制冷剂 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "DomesticWaterNetwork" -> {
|
|
|
+ /** 生活给水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 生活给水供水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 生活给水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "DrainingWaterNetwork" -> {
|
|
|
+ /** 污水排水管网 */
|
|
|
+ if (relCode == "Discharge"){
|
|
|
+ /** 污水排水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 污水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "RecycleWaterNetwork" -> {
|
|
|
+ /** 中水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 中水供水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 中水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "DrinkingWaterNetwork" -> {
|
|
|
+ /** 直饮水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 直饮水供水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 直饮水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "DHWNetwork" -> {
|
|
|
+ /** 生活热水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 生活热水供水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 生活热水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "GasNetwork" -> {
|
|
|
+ /** 燃气管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 燃气供气 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 燃气旁通 */
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ "FireWaterNetwork" -> {
|
|
|
+ /** 消防给水管网 */
|
|
|
+ if (relCode == "Supply"){
|
|
|
+ /** 消防给水供水 */
|
|
|
+ }else if (relCode == "Bypass"){
|
|
|
+ /** 消防给水旁通 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "FireVentNetwork" -> {
|
|
|
+ /** 消防排烟管网 */
|
|
|
+ if (relCode == "Discharge"){
|
|
|
+ /** 消防排烟 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "WENetwork" -> {
|
|
|
+ /** 弱电通信网络 */
|
|
|
+ if (relCode == "Normal"){
|
|
|
+ /** 弱电通信连接 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "MechCtrl" -> {
|
|
|
+ /** 设备控制关系 */
|
|
|
+ if (relCode == "SyCtrl"){
|
|
|
+ /** 系统控制关系 */
|
|
|
+ }else if (relCode == "EqCtrl"){
|
|
|
+ /** 设备控制关系 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "MechPower" -> {
|
|
|
+ /** 设备供电关系 */
|
|
|
+ if (relCode == "SyNormal"){
|
|
|
+ /** 系统常规电源 */
|
|
|
+ }else if (relCode == "SyBackup"){
|
|
|
+ /** 系统备用电源 */
|
|
|
+ }else if (relCode == "EqNormal"){
|
|
|
+ /** 设备常规电源 */
|
|
|
+ }else if (relCode == "EqBackup"){
|
|
|
+ /** 设备备用电源 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "SensorRelationship" -> {
|
|
|
+ /** 传感器关系 */
|
|
|
+ if (relCode == "Ss2Eq"){
|
|
|
+ /** 传感器测量设备关系 */
|
|
|
+ }else if (relCode == "Ss2Sy"){
|
|
|
+ /** 传感器测量系统关系 */
|
|
|
+ }else if (relCode == "Ss2Sp"){
|
|
|
+ /** 传感器测量空间关系 */
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ "ValveRelationship" -> {
|
|
|
+ /** 阀门关系 */
|
|
|
+ if (relCode == "Vv2Eq"){
|
|
|
+ /** 阀门限制设备关系 */
|
|
|
+ }else if (relCode == "Vv2Sy"){
|
|
|
+ /** 阀门限制系统关系 */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|