|
@@ -1114,153 +1114,15 @@ open class RelationCalcService {
|
|
|
// var result = 0
|
|
|
logger.debug("计算结果= ${result}")
|
|
|
|
|
|
- var equipment = EquipmentService.select(SFilter.eq("localId", "20.30.40.50.10.0001"), SFilter.contain("bimId", "3353659"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var space = ZoneSpaceBaseService.select(SFilter.eq("localName", "F1-补风机房-01"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- val list = ArrayList<REq2Sp>()
|
|
|
- if (equipment != null && space != null) {
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment.id
|
|
|
- req.id2 = space.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- }
|
|
|
-
|
|
|
- var equipment2 = EquipmentService.select(SFilter.eq("localId", "20.30.30.30.10.10.0860"), SFilter.contain("bimId", "3360171"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var space2 = ZoneSpaceBaseService.select(SFilter.eq("localName", "F1-女卫生间-02"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- if (equipment2 != null && space2 != null) {
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment2.id
|
|
|
- req.id2 = space2.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- if(equipment != null){
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment.id
|
|
|
- req.id2 = space2.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- var equipment3 = EquipmentService.select(SFilter.eq("localId", "20.30.30.30.10.10.0861"), SFilter.contain("bimId", "3360429"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var equipment4 = EquipmentService.select(SFilter.eq("localId", "20.30.30.30.10.10.0862"), SFilter.contain("bimId", "3360571"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var space3 = ZoneSpaceBaseService.select(SFilter.eq("localName", "F1-卫生间前室-02"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- if (equipment3 != null && space3 != null) {
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment3.id
|
|
|
- req.id2 = space3.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- if(equipment != null){
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment.id
|
|
|
- req.id2 = space3.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (equipment4 != null && space3 != null) {
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment4.id
|
|
|
- req.id2 = space3.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- }
|
|
|
-
|
|
|
- var equipment5 = EquipmentService.select(SFilter.eq("localId", "20.30.30.30.10.10.0863"), SFilter.contain("bimId", "3360088"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var equipment6 = EquipmentService.select(SFilter.eq("localId", "20.30.30.30.10.10.0864"), SFilter.contain("bimId", "3359745"), SFilter.eq("projectId", projectId)).entity()
|
|
|
- var space4 = ZoneSpaceBaseService.select(SFilter.eq("localName", "F1-男卫生间-02"), SFilter.eq("projectId", projectId)).entity()
|
|
|
-
|
|
|
- if (equipment5 != null && space4 != null && equipment6 != null) {
|
|
|
- val req1 = REq2Sp()
|
|
|
- req1.id1 = equipment5.id
|
|
|
- req1.id2 = space4.id
|
|
|
- req1.projectId = projectId
|
|
|
- req1.sign = 1
|
|
|
- req1.type = "eq2sp_for"
|
|
|
- req1.zoneType = "GeneralZone"
|
|
|
- req1.lastUpdate = Date()
|
|
|
- list.add(req1)
|
|
|
- val req2 = REq2Sp()
|
|
|
- req2.id1 = equipment6.id
|
|
|
- req2.id2 = space4.id
|
|
|
- req2.projectId = projectId
|
|
|
- req2.sign = 1
|
|
|
- req2.type = "eq2sp_for"
|
|
|
- req2.zoneType = "GeneralZone"
|
|
|
- req2.lastUpdate = Date()
|
|
|
- list.add(req2)
|
|
|
- if(equipment != null){
|
|
|
- val req = REq2Sp()
|
|
|
- req.id1 = equipment.id
|
|
|
- req.id2 = space4.id
|
|
|
- req.projectId = projectId
|
|
|
- req.sign = 1
|
|
|
- req.type = "eq2sp_for"
|
|
|
- req.zoneType = "GeneralZone"
|
|
|
- req.lastUpdate = Date()
|
|
|
- list.add(req)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-// for (rEq2Sp in list) {
|
|
|
-//
|
|
|
-// }
|
|
|
-//// val element = REq2SpService.select(SFilter.eq("id1",mapKey), SFilter.eq("id2",mapValue)).exec()
|
|
|
-//// if(element != null && element.size >0){
|
|
|
-//// continue
|
|
|
-//// }
|
|
|
-// val req = REq2Sp()
|
|
|
-// req.id1 = mapKey
|
|
|
-// req.id2 = mapValue
|
|
|
-// req.projectId = projectId
|
|
|
-// req.sign = 1
|
|
|
-// req.type = "eq2sp_for"
|
|
|
-// req.zoneType = "GeneralZone"
|
|
|
-// req.lastUpdate = Date()
|
|
|
- for (rEq2Sp in list) {
|
|
|
- REq2SpService.replace(rEq2Sp)
|
|
|
- }
|
|
|
-
|
|
|
- Thread.sleep(2000000);
|
|
|
-
|
|
|
/*************************上面添加数据**********************************/
|
|
|
|
|
|
|
|
|
- try {
|
|
|
-// // val r1 = mapper.deletesp(projectId)
|
|
|
-// val r1 = REq2SpService.delete(SFilter.eq("projectId", projectId), SFilter.eq("sign0", 3))
|
|
|
-// val r2 = mapper.insertsp(projectId)
|
|
|
+
|
|
|
+// REq2SpService.delete(SFilter.eq("projectId", projectId),
|
|
|
+// SFilter.eq("type", "eq2sp_for"))
|
|
|
+ val r2 = mapper.insertsp(projectId)
|
|
|
// logger.debug("设备关联业务空间计算结果= ${r1}+${r2}")
|
|
|
- } catch (e: Exception) {
|
|
|
- e.printStackTrace()
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
|
|
|
if (result != null && result == 0) {
|
|
@@ -1282,7 +1144,7 @@ open class RelationCalcService {
|
|
|
/** 处理关系 */
|
|
|
val equipmentList = EquipmentService.select(SFilter.eq("projectId", projectId),
|
|
|
SFilter.inList("classCode",
|
|
|
- arrayListOf("ACATIO", "ACVTIO","ACATFC","ACVTAC"))).exec()
|
|
|
+ arrayListOf("ACATIO", "ACVTIO","ACATFC","ACVTAC","FFSCIO"))).exec()
|
|
|
if (equipmentList.size > 0) {
|
|
|
var listId = ArrayList<String>()
|
|
|
for (equipment in equipmentList) {
|