|
@@ -269,15 +269,20 @@ open class CalcSpecialService {
|
|
|
val fMap = HashMap<String,HashSet<String>>()
|
|
|
val dMap = HashMap<String,HashSet<String>>()
|
|
|
val modelIds = ArrayList<String>()
|
|
|
-
|
|
|
+ val modelFloorIds = ArrayList<String>()
|
|
|
for (building in buildings) {
|
|
|
val buildingId = building.id!!
|
|
|
val floors = FloorService.select(SFilter.eq("projectId",projectId), SFilter.eq("buildingId",buildingId)).exec()
|
|
|
for (floor in floors) {
|
|
|
if (!floor.modelId.isNullOrEmpty()) {
|
|
|
- modelIds.add(floor.modelId!!)
|
|
|
+ modelFloorIds.add(floor.modelId!!)
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ val modelFloors = BaseDataService.floorModelService.select(SFilter.eq("projectId",projectId), SFilter.inList("id",modelFloorIds)).exec()
|
|
|
+ for (modelFloor in modelFloors) {
|
|
|
+ if(!modelFloor.currentModelId.isNullOrEmpty()) {
|
|
|
+ modelIds.add(modelFloor.currentModelId!!)
|
|
|
+ }
|
|
|
}
|
|
|
val riserMap = riserConnect("DomainHvac","",modelIds)
|
|
|
|
|
@@ -356,7 +361,7 @@ open class CalcSpecialService {
|
|
|
belongMap[belong] = belongs
|
|
|
}
|
|
|
}
|
|
|
- if(connector.riserState != null && connector.riserState!! > 0 && listOf("Duct","Pipe").contains(connector.belongType)){
|
|
|
+// if(connector.riserState != null && connector.riserState!! > 0 && listOf("Duct","Pipe").contains(connector.belongType)){
|
|
|
for (key in riserMap.keys) {
|
|
|
if(key == belong){
|
|
|
belongMap[belong]!!.addAll(riserMap[key]!!)
|
|
@@ -364,7 +369,7 @@ open class CalcSpecialService {
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
var fBlockId: Int =0
|
|
@@ -427,8 +432,8 @@ open class CalcSpecialService {
|
|
|
connectedBlock.id2 = e2.id!!
|
|
|
connectedBlock.type1 = "Equipment"
|
|
|
connectedBlock.type2 = "Equipment"
|
|
|
-// connectedBlock.modelId1 = connectorMap[key]!!.modelId
|
|
|
-// connectedBlock.modelId2 = connectorMap[s]!!.modelId
|
|
|
+ connectedBlock.modelId1 = e1.floorId
|
|
|
+ connectedBlock.modelId2 = e2.floorId
|
|
|
// connectedBlock.domain = connector.domain
|
|
|
// connectedBlock.mepSystemType = connector.mepSystemType
|
|
|
connectedBlock.projectId = projectId
|
|
@@ -459,8 +464,8 @@ open class CalcSpecialService {
|
|
|
connectedBlock.id2 = e2.id!!
|
|
|
connectedBlock.type1 = "Equipment"
|
|
|
connectedBlock.type2 = "Equipment"
|
|
|
-// connectedBlock.modelId1 = connectorMap[key]!!.modelId
|
|
|
-// connectedBlock.modelId2 = connectorMap[s]!!.modelId
|
|
|
+ connectedBlock.modelId1 = e1.floorId
|
|
|
+ connectedBlock.modelId2 = e2.floorId
|
|
|
// connectedBlock.domain = connector.domain
|
|
|
// connectedBlock.mepSystemType = connector.mepSystemType
|
|
|
connectedBlock.projectId = projectId
|