caiaf vor 4 Jahren
Ursprung
Commit
400b4aee8e

+ 29 - 26
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/state/ExportPassedState_3.kt

@@ -132,32 +132,35 @@ class ExportPassedState_3 : ModelState {
                 // 开始同步设备, 部件, 元空间
                 syncUtil.syncDataWithBindingFloor(syncFloor, it, floor)
 
-                val prevBimId = CommonService.generateBIMIDPrefix(SPageContext.getHeader("ProjectId")!!, floor!!.folderId!!, floor!!.floorName!!, false)
-
-
-                val bimId = CommonService.generateBIMIDPrefix(floor.projectId!!, floor.folderId!!, floor.floorName!!, false)
-                val bindFloorRequest = BindFloorRequest()
-                bindFloorRequest.attributeMap["floorElevation"] = it.baseLevel
-                bindFloorRequest.bimId = bimId
-                bindFloorRequest.oldBimId = prevBimId
-                bindFloorRequest.floorId = floor.id
-                bindFloorRequest.floorMap = "${myProperties.fileService.baseGraph}/${floor.currentModelId}.jsonz"
-                bindFloorRequest.modelId = floor.id
-                // 访问数据中心绑定楼层接口
-                var message: MessageEntity
-                if(!dataCenterService.bindFloor(bindFloorRequest, floor.projectId!!)){
-                    // 转状态到4
-                    it.status = 31
-                    it.syncRetryDate = Date()
-                    it.syncErrorMsg = "数据中心绑定楼层失败"
-                    dataService.modelFileService.update(it, arrayListOf("status", "syncRetryDate", "syncErrorMsg"))
-                    message = messageService.buildMessageEntityWithoutLink("${folderFloorName.first}的${folderFloorName.second}模型绑定楼层失败",MessageType.Error, it.projectId, arrayListOf(it.userId?:""),"即将重试")
-                }else{
-                    // 转状态到4
-                    it.status = 4
-                    dataService.modelFileService.update(it, arrayListOf("status"))
-                    message = messageService.buildMessageEntityWithoutLink("${folderFloorName.first}的${folderFloorName.second}模型上传成功", MessageType.Success, it.projectId, arrayListOf(it.userId?:""), "")
-                }
+
+//                val prevBimId = CommonService.generateBIMIDPrefix(SPageContext.getHeader("ProjectId")!!, floor!!.folderId!!, floor!!.floorName!!, false)
+//                val bimId = CommonService.generateBIMIDPrefix(floor.projectId!!, floor.folderId!!, floor.floorName!!, false)
+//                val bindFloorRequest = BindFloorRequest()
+//                bindFloorRequest.attributeMap["floorElevation"] = it.baseLevel
+//                bindFloorRequest.bimId = bimId
+//                bindFloorRequest.oldBimId = prevBimId
+//                bindFloorRequest.floorId = floor.id
+//                bindFloorRequest.floorMap = "${myProperties.fileService.baseGraph}/${floor.currentModelId}.jsonz"
+//                bindFloorRequest.modelId = floor.id
+//                // 访问数据中心绑定楼层接口
+//                var message: MessageEntity
+//                if(!dataCenterService.bindFloor(bindFloorRequest, floor.projectId!!)){
+//                    // 转状态到4
+//                    it.status = 31
+//                    it.syncRetryDate = Date()
+//                    it.syncErrorMsg = "数据中心绑定楼层失败"
+//                    dataService.modelFileService.update(it, arrayListOf("status", "syncRetryDate", "syncErrorMsg"))
+//                    message = messageService.buildMessageEntityWithoutLink("${folderFloorName.first}的${folderFloorName.second}模型绑定楼层失败",MessageType.Error, it.projectId, arrayListOf(it.userId?:""),"即将重试")
+//                }else{
+//                    // 转状态到4
+//                    it.status = 4
+//                    dataService.modelFileService.update(it, arrayListOf("status"))
+//                    message = messageService.buildMessageEntityWithoutLink("${folderFloorName.first}的${folderFloorName.second}模型上传成功", MessageType.Success, it.projectId, arrayListOf(it.userId?:""), "")
+//                }
+                //                    // 转状态到4
+                it.status = 4
+                dataService.modelFileService.update(it, arrayListOf("status"))
+                val message = messageService.buildMessageEntityWithoutLink("${folderFloorName.first}的${folderFloorName.second}模型上传成功", MessageType.Success, it.projectId, arrayListOf(it.userId?:""), "")
                 messageService.sendMessage(message)
             } catch (e: Exception) {
                 // 转状态到31

+ 4 - 3
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/controllers/modelFile/ModelFileController.kt

@@ -256,12 +256,13 @@ class ModelFileController {
                 val result = dataCenterService.floorCreate(dcfloor,request.projectId!!)
                 if(!result){
                     return  SBaseResponse(SResponseType.failure, "创建楼层失败")
-                }else{
-                    if(!dataService.modelFileService.replace(model))
-                        throw Exception("添加模型失败")
                 }
 
             }
+
+            if(!dataService.modelFileService.replace(model))
+                throw Exception("添加模型失败")
+
             // 注册uploadId
             val uploadId = modelFileService.registerMultipartUpload(model, properties)
             var uploadModelResponse = UploadModelResponse()

+ 0 - 5
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/models/entities/Project.kt

@@ -28,9 +28,4 @@ open class Project {
     @Column(name = "name")
     var name: String? = null
 
-    /** 项目配置 */
-    @ApiModelProperty(value = "项目配置")
-    @Column(name = "config_json")
-    var configJson: TaskEntity? = null
-
 }

+ 0 - 27
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/models/modelFile/TaskEntity.kt

@@ -42,31 +42,4 @@ class TaskEntity {
 
     @JSONField(name = "DownloadFinishTime")
     var downloadFinishTime : Date? = null
-
-    @JSONField(name = "FloorServerUrl")
-    var floorServerUrl:String? = null
-
-    @JSONField(name = "UseablePhaseName")
-    var useablePhaseName:String? = null
-
-    @JSONField(name = "SagaSign")
-    var sagaSign:String? = null
-
-    @JSONField(name = "CheckItems")
-    var checkItems:String? = null
-
-    @JSONField(name = "FacilityParameters")
-    var facilityParameters:String? = null
-
-    @JSONField(name = "SpaceParameters")
-    var spaceParameters:String? = null
-
-    @JSONField(name = "RoomParameters")
-    var roomParameters:String? = null
-
-    @JSONField(name = "MEPCurveParameters")
-    var mEPCurveParameters:String? = null
-
-    @JSONField(name = "EquipComponentCode")
-    var equipComponentCode:String? = null
 }

+ 10 - 9
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/services/json/EquipmentAnalyzer.kt

@@ -21,11 +21,11 @@ object EquipmentAnalyzer {
 
     fun analyze(equipmentService: SObjectService<Equipment>, baseObj: BaseObj<AllComponents>, equipments: ArrayList<Equipment>?, bimIdPrefix: String, equipMap: HashMap<String, BaseComponent>, flag: Boolean, equipCompService: SObjectService<EquipComp>, infoPointCompService: SObjectService<InfoPointComp>): Boolean {
 
-        if(flag){
-            return analyze1(equipmentService,baseObj,equipments,bimIdPrefix,equipMap)
-        }else{
-            return analyze2(equipmentService,baseObj,equipments,bimIdPrefix,equipMap,equipCompService,infoPointCompService)
-        }
+//        if(flag){
+//            return analyze1(equipmentService,baseObj,equipments,bimIdPrefix,equipMap)
+//        }else{
+        return analyze2(equipmentService,baseObj,equipments,bimIdPrefix,equipMap,equipCompService,infoPointCompService)
+//        }
     }
 
 
@@ -180,15 +180,16 @@ object EquipmentAnalyzer {
                         continue
                     }
                     obj.infos = infos
-//                    newEquipmnets.add(obj)
+                    if(("OTXXXX").equals(obj.family)){
+                        newEquipmnets.add(obj)
+                    }
                 }
-
             }
         }
         equipmentService.delete(SFilter.eq("modelId", baseObj.modelId!!))
         val create = SCreateRequest<Equipment>()
-//        create.content = newEquipmnets
-        create.content = equipments
+        create.content = newEquipmnets
+//        create.content = equipments
         val result = equipmentService.createList(create)
         return SResponseType.success == result.result
     }

+ 0 - 13
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/services/modelCheck/TaskService.kt

@@ -142,19 +142,6 @@ class TaskService {
             task.name = modelFile.modelName
             task.param = ""
             task.projectId = modelFile.projectId
-            pconfig = projectService.select(SFilter.eq("id",modelFile.projectId!!)).entity()
-            if(pconfig != null){
-                val configJSON = pconfig!!.configJson!!
-                task.floorServerUrl = configJSON.floorServerUrl
-                task.useablePhaseName = configJSON.useablePhaseName
-                task.sagaSign = configJSON.sagaSign
-                task.checkItems = configJSON.checkItems
-                task.facilityParameters = configJSON.facilityParameters
-                task.spaceParameters = configJSON.spaceParameters
-                task.roomParameters = configJSON.roomParameters
-                task.mEPCurveParameters = configJSON.mEPCurveParameters
-                task.equipComponentCode = configJSON.equipComponentCode
-            }
             if(request.content == null)
                 request.content = ArrayList()
             request.content!!.add(task)

+ 0 - 45
scheduler/src/main/kotlin/cn/sagacloud/server/scheduler/models/TaskEntity.kt

@@ -108,51 +108,6 @@ open class TaskEntity: SBaseEntity() {
     @JsonProperty(value = "DownloadFinishTime")
     @JSONField(name = "DownloadFinishTime")
     var downloadFinishTime: Date? = null
-
-    @JsonProperty(value = "FloorServerUrl")
-    @JSONField(name = "FloorServerUrl")
-    @Column(name = "floor_server_url")
-    var floorServerUrl:String? = null
-
-    @JsonProperty(value = "UseablePhaseName")
-    @JSONField(name = "UseablePhaseName")
-    @Column(name = "useable_phase_name")
-    var useablePhaseName:String? = null
-
-    @JsonProperty(value = "SagaSign")
-    @JSONField(name = "SagaSign")
-    @Column(name = "saga_sign")
-    var sagaSign:String? = null
-
-    @JsonProperty(value = "CheckItems")
-    @JSONField(name = "CheckItems")
-    @Column(name = "check_items")
-    var checkItems:String? = null
-
-    @JsonProperty(value = "FacilityParameters")
-    @JSONField(name = "FacilityParameters")
-    @Column(name = "facility_parameters")
-    var facilityParameters:String? = null
-
-    @JsonProperty(value = "SpaceParameters")
-    @JSONField(name = "SpaceParameters")
-    @Column(name = "space_parameters")
-    var spaceParameters:String? = null
-
-    @JsonProperty(value = "RoomParameters")
-    @JSONField(name = "RoomParameters")
-    @Column(name = "room_parameters")
-    var roomParameters:String? = null
-
-    @JsonProperty(value = "MEPCurveParameters")
-    @JSONField(name = "MEPCurveParameters")
-    @Column(name = "mepcurve_parameters")
-    var mEPCurveParameters:String? = null
-
-    @JsonProperty(value = "EquipComponentCode")
-    @JSONField(name = "EquipComponentCode")
-    @Column(name = "equip_code")
-    var equipComponentCode:String? = null
 } // Class AppendixType
 
 

+ 0 - 11
scheduler/src/main/kotlin/cn/sagacloud/server/scheduler/pojo/ChannelHandlerContextWrapper.kt

@@ -90,17 +90,6 @@ class ChannelHandlerContextWrapper(val ctx: ChannelHandlerContext) { // 通信ha
                 toBeSent.param = param.toString()
             }
         }
-        var jsonInfo = JSONObject.parseObject(toBeSent.param)
-        jsonInfo["FloorServerUrl"] = toBeSent.floorServerUrl
-        jsonInfo["UseablePhaseName"] = toBeSent.useablePhaseName
-        jsonInfo["SagaSign"] = toBeSent.sagaSign
-        jsonInfo["CheckItems"] = toBeSent.checkItems
-        jsonInfo["FacilityParameters"] = toBeSent.facilityParameters
-        jsonInfo["SpaceParameters"] = toBeSent.spaceParameters
-        jsonInfo["RoomParameters"] = toBeSent.roomParameters
-        jsonInfo["MEPCurveParameters"] = toBeSent.mEPCurveParameters
-        jsonInfo["EquipComponentCode"] = toBeSent.equipComponentCode
-        toBeSent.param = jsonInfo.toString()
         return JSON.toJSONString(toBeSent)
     }