|
@@ -120,15 +120,15 @@ object EquipmentAnalyzer {
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (null != family && !param.name.isNullOrEmpty()) {
|
|
|
- //信息点编码转换
|
|
|
- val infoPointComp = infoPointCompService.select(SFilter.eq("family", family), SFilter.eq("infoPointCode", param.name!!)).entity()
|
|
|
- if (infoPointComp != null) {
|
|
|
- infos[infoPointComp.sInfoPointCode!!] = param.value ?: ""
|
|
|
- } else {
|
|
|
- infos[param.name!!] = param.value ?: ""
|
|
|
- }
|
|
|
- }
|
|
|
+// if (null != family && !param.name.isNullOrEmpty()) {
|
|
|
+// //信息点编码转换
|
|
|
+// val infoPointComp = infoPointCompService.select(SFilter.eq("family", family), SFilter.eq("infoPointCode", param.name!!)).entity()
|
|
|
+// if (infoPointComp != null) {
|
|
|
+// infos[infoPointComp.sInfoPointCode!!] = param.value ?: ""
|
|
|
+// } else {
|
|
|
+// infos[param.name!!] = param.value ?: ""
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
var equipComp: EquipComp? = null
|
|
|
|
|
@@ -137,12 +137,17 @@ object EquipmentAnalyzer {
|
|
|
if(! obj.sysName.isNullOrEmpty()){
|
|
|
equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!), SFilter.eq("sysName",obj.sysName!!)).entity()
|
|
|
if(equipComp != null){
|
|
|
- obj.family = equipComp.classCode
|
|
|
+ obj.family = equipComp.classCode?:"OTXXXX"
|
|
|
+ }else{
|
|
|
+ //未识别的设备类型,类型码转换为"OTXXXX",OT表示“其他系统”,“XXXX”表示未识别的设备
|
|
|
+ obj.family = "OTXXXX"
|
|
|
}
|
|
|
}else{
|
|
|
equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!)).entity()
|
|
|
if(equipComp != null){
|
|
|
- obj.family = equipComp.classCode
|
|
|
+ obj.family = equipComp.classCode?:"OTXXXX"
|
|
|
+ }else{
|
|
|
+ obj.family = "OTXXXX"
|
|
|
}
|
|
|
}
|
|
|
if(!obj.family.isNullOrEmpty()){
|
|
@@ -183,6 +188,7 @@ object EquipmentAnalyzer {
|
|
|
equipmentService.delete(SFilter.eq("modelId", baseObj.modelId!!))
|
|
|
val create = SCreateRequest<Equipment>()
|
|
|
create.content = newEquipmnets
|
|
|
+// create.content = equipments
|
|
|
val result = equipmentService.createList(create)
|
|
|
return SResponseType.success == result.result
|
|
|
}
|