|
@@ -30,18 +30,14 @@ import com.google.gson.Gson
|
|
|
import com.google.gson.reflect.TypeToken
|
|
|
import com.persagy.base.extensions.toJson
|
|
|
import com.persagy.database.SFilter
|
|
|
-import com.persagy.mybatis.SMybatisDao
|
|
|
import com.persagy.server.datacenter.models.entities.assistant.PointPosition
|
|
|
-import com.persagy.server.datacenter.models.entities.dictnew.DictProject
|
|
|
-import com.persagy.server.datacenter.models.entities.dictnew.Group
|
|
|
-import com.persagy.server.datacenter.models.entities.objects.*
|
|
|
+import com.persagy.server.datacenter.models.entities.objects.SpaceOutline
|
|
|
import com.persagy.server.datacenter.models.entities.rel.RSpinBd
|
|
|
import com.persagy.server.datacenter.models.entities.rel.RSpinFl
|
|
|
import com.persagy.server.syn.models.api.obj.*
|
|
|
import com.persagy.server.syn.models.tools.*
|
|
|
+import com.persagy.server.syn.services.BaseDataService
|
|
|
import com.persagy.server.syn.services.dict.DClassDefService
|
|
|
-import com.persagy.service.SBaseService
|
|
|
-import com.persagy.service.SObjectService
|
|
|
import com.persagy.service.models.enums.SResponseType
|
|
|
import com.persagy.service.models.responses.SBaseResponse
|
|
|
import io.swagger.v3.oas.annotations.Operation
|
|
@@ -67,32 +63,6 @@ class ObjectFromToControllers {
|
|
|
private val logger = LoggerFactory.getLogger(ObjectFromToControllers::class.java)
|
|
|
} // Companion object
|
|
|
|
|
|
- /** 集团服务 */
|
|
|
- private val groupService = SBaseService(SMybatisDao(Group::class.java))
|
|
|
- /** 字典项目服务 */
|
|
|
- private val dictProjectService = SBaseService(SMybatisDao(DictProject::class.java))
|
|
|
- /** 数据中心项目服务 */
|
|
|
- private val projectService = SObjectService(SMybatisDao(Project::class.java))
|
|
|
- /** 数据中心建筑服务 */
|
|
|
- private val buildingService = SObjectService(SMybatisDao(Building::class.java))
|
|
|
- /** 数据中心楼层服务 */
|
|
|
- private val floorService = SObjectService(SMybatisDao(Floor::class.java))
|
|
|
- /** 数据中心设备服务 */
|
|
|
- private val equipmentService = SObjectService(SMybatisDao(Equipment::class.java))
|
|
|
- /** 建筑下的空间 */
|
|
|
- private val rSpinBdService = SObjectService(SMybatisDao(RSpinBd::class.java))
|
|
|
- /** 楼层下的空间 */
|
|
|
- private val rSpinFlService = SObjectService(SMybatisDao(RSpinFl::class.java))
|
|
|
- /** 业务空间 */
|
|
|
- private val zoneSpaceService = SObjectService(SMybatisDao(ZoneSpace::class.java))
|
|
|
- /** 系统服务 */
|
|
|
- private val generalSystemService = SObjectService(SMybatisDao(GeneralSystem::class.java))
|
|
|
- /** 竖井 */
|
|
|
- private val shaftService = SObjectService(SMybatisDao(Shaft::class.java))
|
|
|
- /** 楼层轮廓线 */
|
|
|
- private val floorOutlineService = SObjectService(SMybatisDao(FloorOutline::class.java))
|
|
|
- /** 空间轮廓线 */
|
|
|
- private val spaceOutlineService = SObjectService(SMybatisDao(SpaceOutline::class.java))
|
|
|
|
|
|
/**
|
|
|
* 项目信息 - 数据中台存储到数据中心,根据集团获取集团写所有项目
|
|
@@ -105,21 +75,17 @@ class ObjectFromToControllers {
|
|
|
DClassDefService.groupQuerys()
|
|
|
/** 项目数据 */
|
|
|
DClassDefService.dictProject()
|
|
|
-
|
|
|
- val groupList = dictProjectService.selectAll().exec()
|
|
|
+ val groupList = BaseDataService.dictProjectService.selectAll().exec()
|
|
|
for (group in groupList) {
|
|
|
val projectQueryList = ProjectApi.projectQuery(group.groupCode!!,group.id!!)
|
|
|
-
|
|
|
if (projectQueryList.size > 0) {
|
|
|
for (projectQuery in projectQueryList) {
|
|
|
val projectDataConversion = ProjectUtil.projectDataConversions(group.groupCode!!, projectQuery)
|
|
|
logger.debug("项目: ${projectDataConversion.toJson()} ")
|
|
|
-
|
|
|
- projectService.replace(projectDataConversion)
|
|
|
+ BaseDataService.projectService.replace(projectDataConversion)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
SBaseResponse(SResponseType.success)
|
|
|
} catch (e: Exception) {
|
|
|
e.printStackTrace()
|
|
@@ -140,18 +106,18 @@ class ObjectFromToControllers {
|
|
|
/** 项目数据 */
|
|
|
DClassDefService.dictProject()
|
|
|
if (!sign){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id",projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id",projectId)).entity()
|
|
|
val projectQueryList = ProjectApi.projectQuery(dictProject!!.groupCode!!,projectId!!)
|
|
|
if (projectQueryList.size > 0) {
|
|
|
for (projectQuery in projectQueryList) {
|
|
|
logger.debug("项目1: ${projectQuery.toJson()} ")
|
|
|
val projectDataConversion = ProjectUtil.projectDataConversions(dictProject!!.groupCode!!, projectQuery)
|
|
|
logger.debug("项目: ${projectDataConversion.toJson()} ")
|
|
|
- projectService.replace(projectDataConversion)
|
|
|
+ BaseDataService.projectService.replace(projectDataConversion)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- val dictProjectList = dictProjectService.selectAll().exec()
|
|
|
+ val dictProjectList = BaseDataService.dictProjectService.selectAll().exec()
|
|
|
for (dictProject in dictProjectList) {
|
|
|
val projectQueryList = ProjectApi.projectQuery(dictProject!!.groupCode!!,projectId!!)
|
|
|
if (projectQueryList.size > 0) {
|
|
@@ -159,7 +125,7 @@ class ObjectFromToControllers {
|
|
|
logger.debug("项目1: ${projectQuery.toJson()} ")
|
|
|
val projectDataConversion = ProjectUtil.projectDataConversions(dictProject!!.groupCode!!, projectQuery)
|
|
|
logger.debug("项目: ${projectDataConversion.toJson()} ")
|
|
|
- projectService.replace(projectDataConversion)
|
|
|
+ BaseDataService.projectService.replace(projectDataConversion)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -181,30 +147,30 @@ class ObjectFromToControllers {
|
|
|
fun buildingSyn( @RequestParam projectId: String, @RequestParam switch: Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch) {
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val buildingSynList = BuildingApi.buildingSyn(dictProject!!.groupCode!!,projectId,"building")
|
|
|
if (buildingSynList.size > 0) {
|
|
|
for (buildingSyn in buildingSynList) {
|
|
|
val buildingDataConversion =
|
|
|
BuildingUtil.buildingDataConversions(projectId, dictProject!!.groupCode!!, buildingSyn)
|
|
|
logger.debug("建筑: ${buildingDataConversion.toJson()} ")
|
|
|
- buildingService.replace(buildingDataConversion)
|
|
|
+ BaseDataService.buildingService.replace(buildingDataConversion)
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
/** 查询所有的项目 */
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val buildingSynList = BuildingApi.buildingSyn(dictProject!!.groupCode!!,projectId,"building")
|
|
|
if (buildingSynList.size > 0) {
|
|
|
for (buildingSyn in buildingSynList) {
|
|
|
val buildingDataConversion =
|
|
|
BuildingUtil.buildingDataConversions(project.id!!, dictProject!!.groupCode!!, buildingSyn)
|
|
|
logger.debug("建筑: ${buildingDataConversion.toJson()} ")
|
|
|
- buildingService.replace(buildingDataConversion)
|
|
|
+ BaseDataService.buildingService.replace(buildingDataConversion)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -225,7 +191,7 @@ class ObjectFromToControllers {
|
|
|
fun floorSyn(@RequestParam projectId: String, @RequestParam switch: Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val floorSynList = BuildingApi.buildingSyn(dictProject!!.groupCode!!,projectId, "floor")
|
|
|
if (floorSynList.size>0) {
|
|
|
for (floorSyn in floorSynList){
|
|
@@ -240,7 +206,7 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- floorService.replace(floor)
|
|
|
+ BaseDataService.floorService.replace(floor)
|
|
|
val containsKeyOutline = floorSyn.containsKey("outline")
|
|
|
if (containsKeyOutline){
|
|
|
val id = floorSyn["id"].toString()
|
|
@@ -253,14 +219,14 @@ class ObjectFromToControllers {
|
|
|
// floorOutlineService.replace(FloorOutline(id,outline))
|
|
|
floor.outline = outline
|
|
|
}
|
|
|
- floorService.replace(floor)
|
|
|
+ BaseDataService.floorService.replace(floor)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
/** 查询所有的项目 */
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val floorSynList = BuildingApi.buildingSyn(dictProject!!.groupCode!!,projectId, "floor")
|
|
|
if (floorSynList.size>0) {
|
|
|
for (floorSyn in floorSynList){
|
|
@@ -275,7 +241,7 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- floorService.replace(floor)
|
|
|
+ BaseDataService.floorService.replace(floor)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -303,7 +269,7 @@ class ObjectFromToControllers {
|
|
|
return try {
|
|
|
var num = page
|
|
|
if (switch) {
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val equipSynApi = EquipApi.equipSynApi(dictProject!!.groupCode!!,projectId, page)
|
|
|
val equipDataList = equipSynApi.data
|
|
|
for (equipData in equipDataList!!){
|
|
@@ -328,23 +294,23 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
if (equipSyn.buildingId.isNullOrEmpty()){
|
|
|
if (!equipSyn.floorId.isNullOrEmpty()){
|
|
|
- val floor = floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
+ val floor = BaseDataService.floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
if (floor!=null){
|
|
|
equipSyn.buildingId = floor.buildingId
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- equipmentService.replace(equipSyn)
|
|
|
+ BaseDataService.equipmentService.replace(equipSyn)
|
|
|
}
|
|
|
if (equipSynApi.data!!.size>= 1000){
|
|
|
num ++
|
|
|
equipSyn(projectId,switch,isBuildingFloor,num)
|
|
|
}
|
|
|
} else {
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val equipSynApi = EquipApi.equipSynApi(dictProject!!.groupCode!!,project.id!!, page)
|
|
|
val equipDataList = equipSynApi.data
|
|
|
for (equipData in equipDataList!!){
|
|
@@ -368,14 +334,14 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
if (equipSyn.buildingId.isNullOrEmpty()&&!equipSyn.floorId.isNullOrEmpty()){
|
|
|
if (!equipSyn.floorId.isNullOrEmpty()){
|
|
|
- val floor = floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
+ val floor = BaseDataService.floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
if (floor!=null){
|
|
|
equipSyn.buildingId = floor.buildingId
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- equipmentService.replace(equipSyn)
|
|
|
+ BaseDataService.equipmentService.replace(equipSyn)
|
|
|
}
|
|
|
if (equipSynApi.data!!.size>= 1000){
|
|
|
num ++
|
|
@@ -398,7 +364,7 @@ class ObjectFromToControllers {
|
|
|
fun equipSynAll(@RequestParam projectId: String,@RequestParam switch: Boolean = true,@RequestParam isBuildingFloor: Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch) {
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val equipSynApi = EquipApi.equipSynApiAll(dictProject!!.groupCode!!,projectId)
|
|
|
logger.debug("数量 = ${equipSynApi.data?.size}")
|
|
|
// return SBaseResponse(SResponseType.success)
|
|
@@ -425,19 +391,19 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
if (equipSyn.buildingId.isNullOrEmpty()&&!equipSyn.floorId.isNullOrEmpty()){
|
|
|
if (!equipSyn.floorId.isNullOrEmpty()){
|
|
|
- val floor = floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
+ val floor = BaseDataService.floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
if (floor!=null){
|
|
|
equipSyn.buildingId = floor.buildingId
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- equipmentService.replace(equipSyn)
|
|
|
+ BaseDataService.equipmentService.replace(equipSyn)
|
|
|
}
|
|
|
} else {
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val equipSynApi = EquipApi.equipSynApiAll(dictProject!!.groupCode!!,project.id!!)
|
|
|
val equipDataList = equipSynApi.data
|
|
|
for (equipData in equipDataList!!){
|
|
@@ -461,14 +427,14 @@ class ObjectFromToControllers {
|
|
|
}
|
|
|
if (equipSyn.buildingId.isNullOrEmpty()){
|
|
|
if (!equipSyn.floorId.isNullOrEmpty()){
|
|
|
- val floor = floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
+ val floor = BaseDataService.floorService.select(SFilter.eq("id", equipSyn.floorId!!)).entity()
|
|
|
if (floor!=null){
|
|
|
equipSyn.buildingId = floor.buildingId
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- equipmentService.replace(equipSyn)
|
|
|
+ BaseDataService.equipmentService.replace(equipSyn)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -496,14 +462,14 @@ class ObjectFromToControllers {
|
|
|
fun spaceSyn(@RequestParam projectId: String,@RequestParam switch: Boolean = true,@RequestParam isBuildingFloor:Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val spaceSynApiList = SpaceApi.spaceSynApi(dictProject!!.groupCode!!,projectId)
|
|
|
if (spaceSynApiList.size>0){
|
|
|
for (spaceSyn in spaceSynApiList){
|
|
|
val spaceDataConversion =
|
|
|
SpaceUtil.spaceDataConversions(projectId, dictProject!!.groupCode!!, spaceSyn)
|
|
|
logger.debug("打印空间02 = ${spaceDataConversion.toJson()}")
|
|
|
- zoneSpaceService.replace(spaceDataConversion)
|
|
|
+ BaseDataService.zoneSpaceService.replace(spaceDataConversion)
|
|
|
if (isBuildingFloor){
|
|
|
val spaceInBuildingList = SpaceApi.spaceInBuilding(dictProject!!.groupCode!!,projectId, spaceDataConversion.id!!)
|
|
|
if (spaceInBuildingList.size>0){
|
|
@@ -515,7 +481,7 @@ class ObjectFromToControllers {
|
|
|
rSpinBd.sign = 1
|
|
|
rSpinBd.spaceId = spaceDataConversion.id
|
|
|
rSpinBd.objectType = spaceDataConversion.classCode
|
|
|
- rSpinBdService.replace(rSpinBd)
|
|
|
+ BaseDataService.rSpinBdService.replace(rSpinBd)
|
|
|
}
|
|
|
}
|
|
|
val spaceInFloorList = SpaceApi.spaceInFloor(dictProject!!.groupCode!!,projectId, spaceDataConversion.id!!)
|
|
@@ -523,7 +489,7 @@ class ObjectFromToControllers {
|
|
|
for (spaceInFloor in spaceInFloorList){
|
|
|
val any = spaceInFloor["objFrom"].toString()
|
|
|
val floor =
|
|
|
- floorService.select(SFilter.eq("id", spaceInFloor["objFrom"].toString())).entity()
|
|
|
+ BaseDataService.floorService.select(SFilter.eq("id", spaceInFloor["objFrom"].toString())).entity()
|
|
|
val rSpinFl = RSpinFl()
|
|
|
spaceDataConversion.floorId = spaceInFloor["objFrom"].toString()
|
|
|
|
|
@@ -534,7 +500,7 @@ class ObjectFromToControllers {
|
|
|
rSpinFl.sign = 1
|
|
|
rSpinFl.spaceId = spaceDataConversion.id
|
|
|
logger.debug("空間和楼层关系 = ${rSpinFl.toJson()} *************************************************************************************************************")
|
|
|
- rSpinFlService.replace(rSpinFl)
|
|
|
+ BaseDataService.rSpinFlService.replace(rSpinFl)
|
|
|
if (spaceDataConversion.buildingId.isNullOrEmpty()) {
|
|
|
spaceDataConversion.buildingId = floor?.buildingId
|
|
|
val rSpinBd = RSpinBd()
|
|
@@ -543,7 +509,7 @@ class ObjectFromToControllers {
|
|
|
rSpinBd.sign = 1
|
|
|
rSpinBd.spaceId = spaceDataConversion.id
|
|
|
rSpinBd.objectType = spaceDataConversion.classCode
|
|
|
- rSpinBdService.replace(rSpinBd)
|
|
|
+ BaseDataService. rSpinBdService.replace(rSpinBd)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -560,24 +526,24 @@ class ObjectFromToControllers {
|
|
|
// spaceOutlineService.replace(SpaceOutline(id,outline))
|
|
|
spaceDataConversion.outline = outline
|
|
|
}
|
|
|
- zoneSpaceService.update(spaceDataConversion)
|
|
|
+ BaseDataService.zoneSpaceService.update(spaceDataConversion)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
/** 查询所有的项目 */
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
val projectId = project.id!!
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val spaceSynApiList = SpaceApi.spaceSynApi(dictProject!!.groupCode!!,projectId)
|
|
|
if (spaceSynApiList.size>0){
|
|
|
for (spaceSyn in spaceSynApiList){
|
|
|
val spaceDataConversion =
|
|
|
SpaceUtil.spaceDataConversions(projectId, dictProject!!.groupCode!!, spaceSyn)
|
|
|
|
|
|
- zoneSpaceService.replace(spaceDataConversion)
|
|
|
+ BaseDataService.zoneSpaceService.replace(spaceDataConversion)
|
|
|
if (isBuildingFloor){
|
|
|
val spaceInBuildingList = SpaceApi.spaceInBuilding(dictProject!!.groupCode!!,projectId, spaceDataConversion.id!!)
|
|
|
if (spaceInBuildingList.size>0){
|
|
@@ -589,7 +555,7 @@ class ObjectFromToControllers {
|
|
|
rSpinBd.sign = 1
|
|
|
rSpinBd.spaceId = spaceDataConversion.id
|
|
|
rSpinBd.objectType = spaceDataConversion.classCode
|
|
|
- rSpinBdService.replace(rSpinBd)
|
|
|
+ BaseDataService.rSpinBdService.replace(rSpinBd)
|
|
|
}
|
|
|
}
|
|
|
val spaceInFloorList = SpaceApi.spaceInFloor(dictProject!!.groupCode!!,projectId, spaceDataConversion.id!!)
|
|
@@ -597,7 +563,7 @@ class ObjectFromToControllers {
|
|
|
for (spaceInFloor in spaceInFloorList){
|
|
|
val any = spaceInFloor["objFrom"].toString()
|
|
|
val floor =
|
|
|
- floorService.select(SFilter.eq("id", spaceInFloor["objFrom"].toString())).entity()
|
|
|
+ BaseDataService.floorService.select(SFilter.eq("id", spaceInFloor["objFrom"].toString())).entity()
|
|
|
spaceDataConversion.floorId = spaceInFloor["objFrom"].toString()
|
|
|
val rSpinFl = RSpinFl()
|
|
|
rSpinFl.buildingId = floor?.buildingId
|
|
@@ -606,10 +572,10 @@ class ObjectFromToControllers {
|
|
|
rSpinFl.projectId = projectId
|
|
|
rSpinFl.sign = 1
|
|
|
rSpinFl.spaceId = spaceDataConversion.id
|
|
|
- rSpinFlService.replace(rSpinFl)
|
|
|
+ BaseDataService.rSpinFlService.replace(rSpinFl)
|
|
|
}
|
|
|
}
|
|
|
- zoneSpaceService.update(spaceDataConversion)
|
|
|
+ BaseDataService.zoneSpaceService.update(spaceDataConversion)
|
|
|
val containsKey = spaceSyn.containsKey("outline")
|
|
|
if (containsKey){
|
|
|
val id = spaceSyn["id"].toString()
|
|
@@ -619,7 +585,7 @@ class ObjectFromToControllers {
|
|
|
val type = object : TypeToken<ArrayList<ArrayList<ArrayList<PointPosition>>>>() {
|
|
|
}.type
|
|
|
var outline= Gson().fromJson<ArrayList<ArrayList<ArrayList<PointPosition>>>>(replace3,type)
|
|
|
- spaceOutlineService.replace(SpaceOutline(id,outline))
|
|
|
+ BaseDataService.spaceOutlineService.replace(SpaceOutline(id,outline))
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -646,26 +612,26 @@ class ObjectFromToControllers {
|
|
|
fun systemSyn(@RequestParam projectId: String,@RequestParam switch: Boolean = true,@RequestParam isBuildingFloor:Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch) {
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val systemQueryList = SystemApi.systemQuery(dictProject!!.groupCode!!,projectId)
|
|
|
if (systemQueryList.size>0){
|
|
|
for (systemQuery in systemQueryList){
|
|
|
val spaceDataConversion =
|
|
|
SystemUtil.systemDataConversions(projectId, dictProject!!.groupCode!!, systemQuery)
|
|
|
- generalSystemService.replace(spaceDataConversion)
|
|
|
+ BaseDataService.generalSystemService.replace(spaceDataConversion)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
/** 查询所有的项目 */
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val systemQueryList = SystemApi.systemQuery(dictProject!!.groupCode!!,project.id!!)
|
|
|
if (systemQueryList.size>0){
|
|
|
for (systemQuery in systemQueryList){
|
|
|
val spaceDataConversion =
|
|
|
SystemUtil.systemDataConversions(project.id!!, dictProject!!.groupCode!!, systemQuery)
|
|
|
- generalSystemService.replace(spaceDataConversion)
|
|
|
+ BaseDataService.generalSystemService.replace(spaceDataConversion)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -690,26 +656,26 @@ class ObjectFromToControllers {
|
|
|
fun shaftSyn(@RequestParam projectId: String,@RequestParam switch: Boolean = true,@RequestParam isBuildingFloor:Boolean = true): SBaseResponse {
|
|
|
return try {
|
|
|
if (switch){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", projectId)).entity()
|
|
|
val shaftQueryList = ShaftApi.shaftQuery(dictProject!!.groupCode!!,projectId)
|
|
|
if (!shaftQueryList.isNullOrEmpty()) {
|
|
|
for (shaftQuery in shaftQueryList) {
|
|
|
val shaftDataConversion =
|
|
|
ShaftUtil.shaftDataConversions(projectId, dictProject?.groupCode!!, shaftQuery)
|
|
|
- shaftService.replace(shaftDataConversion)
|
|
|
+ BaseDataService.shaftService.replace(shaftDataConversion)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
/** 查询所有的项目 */
|
|
|
- val projectList = projectService.selectAll().exec()
|
|
|
+ val projectList = BaseDataService.projectService.selectAll().exec()
|
|
|
for (project in projectList){
|
|
|
- val dictProject = dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
+ val dictProject = BaseDataService.dictProjectService.select(SFilter.eq("id", project.id!!)).entity()
|
|
|
val shaftQueryList = ShaftApi.shaftQuery(dictProject!!.groupCode!!,project.id!!)
|
|
|
if (!shaftQueryList.isNullOrEmpty()) {
|
|
|
for (shaftQuery in shaftQueryList) {
|
|
|
val shaftDataConversion =
|
|
|
ShaftUtil.shaftDataConversions(project.id!!, dictProject?.groupCode!!, shaftQuery)
|
|
|
- shaftService.replace(shaftDataConversion)
|
|
|
+ BaseDataService.shaftService.replace(shaftDataConversion)
|
|
|
}
|
|
|
}
|
|
|
}
|