|
@@ -134,35 +134,29 @@ object EquipmentAnalyzer {
|
|
|
|
|
|
//bimtypeID转换,设备构建码没有抛弃,查不到抛弃
|
|
|
if(! obj.bimTypeID.isNullOrEmpty()){
|
|
|
- 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?:"XXXXXX"
|
|
|
- obj.bimTypeName = equipComp.bimTypeName
|
|
|
- obj.wdCode = equipComp.aliasCode
|
|
|
- obj.aliasName = equipComp.aliasName
|
|
|
- }else{
|
|
|
- equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!), SFilter.or(SFilter.isNull("sysName"),SFilter.eq("sysName",""))).entity()
|
|
|
+ val equipComps = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!)).exec()
|
|
|
+ if(equipComps.size > 1){
|
|
|
+ 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?:"XXXXXX"
|
|
|
obj.bimTypeName = equipComp.bimTypeName
|
|
|
obj.wdCode = equipComp.aliasCode
|
|
|
obj.aliasName = equipComp.aliasName
|
|
|
- }else{
|
|
|
+ }else {
|
|
|
obj.family = "OTXXXX"
|
|
|
}
|
|
|
- //未识别的设备类型,类型码转换为"OTXXXX",OT表示“其他系统”,“XXXX”表示未识别的设备
|
|
|
- }
|
|
|
- }else{
|
|
|
- equipComp = equipCompService.select(SFilter.eq("bimTypeID",obj.bimTypeID!!), SFilter.or(SFilter.isNull("sysName"),SFilter.eq("sysName",""))).entity()
|
|
|
- if(equipComp != null){
|
|
|
- obj.family = equipComp.classCode?:"XXXXXX"
|
|
|
- obj.bimTypeName = equipComp.bimTypeName
|
|
|
- obj.wdCode = equipComp.aliasCode
|
|
|
- obj.aliasName = equipComp.aliasName
|
|
|
}else{
|
|
|
obj.family = "OTXXXX"
|
|
|
}
|
|
|
+ }else if(equipComps.size == 1){
|
|
|
+ equipComp = equipComps[0]
|
|
|
+ obj.family = equipComp.classCode?:"XXXXXX"
|
|
|
+ obj.bimTypeName = equipComp.bimTypeName
|
|
|
+ obj.wdCode = equipComp.aliasCode
|
|
|
+ obj.aliasName = equipComp.aliasName
|
|
|
+ }else {
|
|
|
+ obj.family = "OTXXXX"
|
|
|
}
|
|
|
family = obj.family
|
|
|
if(!family.isNullOrEmpty()){
|