Kaynağa Gözat

不执行受影响业务空间

caiaf 3 yıl önce
ebeveyn
işleme
cabb7d0fa7

+ 28 - 28
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/state/FinishState_4.kt

@@ -57,34 +57,34 @@ class FinishState_4 : ModelState {
         }
         // 先给模型文件版本号和接收时间
         addVersionChangeName(modelList!!)
-        modelList!!.forEach {
-            try {
-                // 获取模型的statusInfo的affectedSpace是否是true
-                // 如果不是true
-                if (it.statusInfo == null || it.statusInfo!!.affectedSpace != true) {
-                    if (it.floorModelId == null) {
-                        return@forEach
-                    }
-                    val floorModel = dataService.floorModelService.select(SFilter.and(SFilter.eq("currentModelId", it.id!!), SFilter.eq("id", it.floorModelId!!))).entity()
-                            ?: return@forEach
-                    // 判断数据中心是否有楼层绑定了该模型
-                    val floors = dataCenterService.getFloorWithModelId(it.floorModelId!!, it.projectId!!)
-                    // 如果有绑定, 则执行受影响的业务空间函数
-                    if (!floors.isNullOrEmpty()) {
-                        val calcAffected = floorMapper.calcAffected(it.floorModelId!!)
-                        // 如果返回true, 更新模型的statusInfo信息点
-                        if (calcAffected == true) {
-                            it.statusInfo = StatusInfo()
-                            it.statusInfo!!.affectedSpace = true
-                            dataService.modelFileService.update(it, arrayListOf("statusInfo"))
-                        }
-                    }
-                }
-            }catch (ex : Exception){
-                ex.printStackTrace()
-                logger.error(ex.message)
-            }
-        }
+//        modelList!!.forEach {
+//            try {
+//                // 获取模型的statusInfo的affectedSpace是否是true
+//                // 如果不是true
+//                if (it.statusInfo == null || it.statusInfo!!.affectedSpace != true) {
+//                    if (it.floorModelId == null) {
+//                        return@forEach
+//                    }
+//                    val floorModel = dataService.floorModelService.select(SFilter.and(SFilter.eq("currentModelId", it.id!!), SFilter.eq("id", it.floorModelId!!))).entity()
+//                            ?: return@forEach
+//                    // 判断数据中心是否有楼层绑定了该模型
+//                    val floors = dataCenterService.getFloorWithModelId(it.floorModelId!!, it.projectId!!)
+//                    // 如果有绑定, 则执行受影响的业务空间函数
+//                    if (!floors.isNullOrEmpty()) {
+//                        val calcAffected = floorMapper.calcAffected(it.floorModelId!!)
+//                        // 如果返回true, 更新模型的statusInfo信息点
+//                        if (calcAffected == true) {
+//                            it.statusInfo = StatusInfo()
+//                            it.statusInfo!!.affectedSpace = true
+//                            dataService.modelFileService.update(it, arrayListOf("statusInfo"))
+//                        }
+//                    }
+//                }
+//            }catch (ex : Exception){
+//                ex.printStackTrace()
+//                logger.error(ex.message)
+//            }
+//        }
     }
     private val projection = arrayListOf("version", "acceptTime")
     private fun addVersionChangeName(modelList: java.util.ArrayList<ModelFile>) {