|
@@ -31,6 +31,7 @@ import com.persagy.mybatis.SMybatisDao
|
|
|
import com.persagy.server.datacenter.models.entities.dictnew.DictProject
|
|
|
import com.persagy.server.datacenter.models.entities.objects.ZoneSpace
|
|
|
import com.persagy.server.datacenter.models.entities.rel.RSpinBd
|
|
|
+import com.persagy.server.datacenter.models.entities.rel.RSpinFl
|
|
|
import com.persagy.server.syn.Configure
|
|
|
import com.persagy.server.syn.jms.bean.SyncRwdDatacenterMessage
|
|
|
import com.persagy.server.syn.models.api.obj.BuildingApi
|
|
@@ -56,6 +57,8 @@ class RwdSpace {
|
|
|
private val dictProjectService = SObjectService(SMybatisDao(DictProject::class.java))
|
|
|
/** 空间所在的建筑 */
|
|
|
val rSpinBdService = SObjectService(SMybatisDao(RSpinBd::class.java))
|
|
|
+ /** 空间所在的楼层 */
|
|
|
+ val rSpinFlService = SObjectService(SMybatisDao(RSpinFl::class.java))
|
|
|
/**
|
|
|
* 空间
|
|
|
*
|
|
@@ -75,21 +78,24 @@ class RwdSpace {
|
|
|
dictProject!!.groupCode!!,
|
|
|
queryIdList[0]
|
|
|
)
|
|
|
+
|
|
|
+ val toJsonObj = Configure.toJsonObj("ArchSubset", "Bd2Sp", null, message.targetId)
|
|
|
/** 空间的建筑 */
|
|
|
val equipInBuildingList =
|
|
|
- EquipApi.equipInBuilding(dictProject.groupCode!!, message.projectId!!, message.targetId!!)
|
|
|
+ EquipApi.queryRelation(dictProject.groupCode!!, message.projectId!!, toJsonObj)
|
|
|
if (equipInBuildingList.size>0){
|
|
|
val hashMap = equipInBuildingList[0]
|
|
|
- if (hashMap.containsKey("objTo")){
|
|
|
- space.buildingId = hashMap["objTo"].toString()
|
|
|
+ if (hashMap.containsKey("objFrom")){
|
|
|
+ space.buildingId = hashMap["objFrom"].toString()
|
|
|
}
|
|
|
}
|
|
|
+ val toJsonObj02 = Configure.toJsonObj("ArchSubset", "Fl2Sp", null, message.targetId)
|
|
|
/** 查询空间和楼层关系 */
|
|
|
- val equipInFloorList = EquipApi.equipInFloor(dictProject.groupCode!!, message.projectId!!, message.targetId!!)
|
|
|
+ val equipInFloorList = EquipApi.queryRelation(dictProject.groupCode!!, message.projectId!!, toJsonObj02)
|
|
|
if (equipInFloorList.size>0){
|
|
|
val hashMap = equipInFloorList[0]
|
|
|
- if (hashMap.containsKey("objTo")){
|
|
|
- space.floorId = hashMap["objTo"].toString()
|
|
|
+ if (hashMap.containsKey("objFrom")){
|
|
|
+ space.floorId = hashMap["objFrom"].toString()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -117,6 +123,8 @@ class RwdSpace {
|
|
|
dictProject!!.groupCode!!,
|
|
|
queryIdList[0]
|
|
|
)
|
|
|
+
|
|
|
+
|
|
|
spaceService.update(space)
|
|
|
message.state = 0
|
|
|
} else {
|