Jelajahi Sumber

实体调整,增加objectType常量

lvxianyun 3 tahun lalu
induk
melakukan
753d84ad02
23 mengubah file dengan 72 tambahan dan 84 penghapusan
  1. 6 6
      src/main/java/com/persagy/proxy/adm/controller/AdmBuildingController.java
  2. 2 2
      src/main/java/com/persagy/proxy/adm/controller/AdmComponentController.java
  3. 2 2
      src/main/java/com/persagy/proxy/adm/controller/AdmEquipmentController.java
  4. 8 7
      src/main/java/com/persagy/proxy/adm/controller/AdmFloorController.java
  5. 2 4
      src/main/java/com/persagy/proxy/adm/controller/AdmISpaceController.java
  6. 1 1
      src/main/java/com/persagy/proxy/adm/controller/AdmProjectController.java
  7. 6 7
      src/main/java/com/persagy/proxy/adm/controller/AdmSpaceController.java
  8. 9 9
      src/main/java/com/persagy/proxy/adm/controller/AdmSystemController.java
  9. 3 3
      src/main/java/com/persagy/proxy/adm/controller/AdmTenantController.java
  10. 3 5
      src/main/java/com/persagy/proxy/adm/model/AdmBuilding.java
  11. 2 3
      src/main/java/com/persagy/proxy/adm/model/AdmComponent.java
  12. 2 4
      src/main/java/com/persagy/proxy/adm/model/AdmEquipment.java
  13. 3 4
      src/main/java/com/persagy/proxy/adm/model/AdmFloor.java
  14. 3 4
      src/main/java/com/persagy/proxy/adm/model/AdmISpace.java
  15. 1 0
      src/main/java/com/persagy/proxy/adm/model/AdmProject.java
  16. 2 2
      src/main/java/com/persagy/proxy/adm/model/AdmProperty.java
  17. 4 4
      src/main/java/com/persagy/proxy/adm/model/AdmShaft.java
  18. 2 3
      src/main/java/com/persagy/proxy/adm/model/AdmSpace.java
  19. 2 4
      src/main/java/com/persagy/proxy/adm/model/AdmSystem.java
  20. 2 3
      src/main/java/com/persagy/proxy/adm/model/AdmTenant.java
  21. 1 1
      src/main/java/com/persagy/proxy/adm/service/impl/AdmComponentServiceImpl.java
  22. 1 1
      src/main/java/com/persagy/proxy/adm/service/impl/AdmEquipmentServiceImpl.java
  23. 5 5
      src/main/java/com/persagy/proxy/adm/service/impl/AdmSpaceServiceImpl.java

+ 6 - 6
src/main/java/com/persagy/proxy/adm/controller/AdmBuildingController.java

@@ -92,23 +92,23 @@ public class AdmBuildingController {
         filters+= "]";
 
         admQueryCriteria.setFilters(filters);
-        admQueryCriteria.setName("floor");
+        admQueryCriteria.setName(AdmFloor.OBJ_TYPE);
         AdmResponse admResponseF = floorService.doQuery(context, admQueryCriteria, AdmFloor.class);
         if(DmpResult.SUCCESS.equals(admResponseF.getResult()) && CollUtil.isNotEmpty(admResponseF.getContent())){
             return AdmResponse.failure(msg);
         }
-        admQueryCriteria.setName("space");
+        admQueryCriteria.setName(AdmSpace.OBJ_TYPE);
         AdmResponse admResponseSpace = spaceService.doQuery(context, admQueryCriteria, AdmSpace.class);
         if(admResponseSpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseSpace.getContent())){
             return AdmResponse.failure(msg);
         }
-        admQueryCriteria.setName("ispace");
+        admQueryCriteria.setName(AdmISpace.OBJ_TYPE);
         AdmResponse admResponseISpace = iAdmISpaceService.doQuery(context, admQueryCriteria, AdmISpace.class);
         if(admResponseISpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseISpace.getContent())){
             return AdmResponse.failure(msg);
         }
 
-        admQueryCriteria.setName("equipment");
+        admQueryCriteria.setName(AdmEquipment.OBJ_TYPE);
         AdmResponse admResponseEuip = equipmentService.doQuery(context, admQueryCriteria, AdmEquipment.class);
         if(admResponseEuip.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseEuip.getContent())){
             return AdmResponse.failure(msg);
@@ -161,7 +161,7 @@ public class AdmBuildingController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("building");
+        request.setName(AdmBuilding.OBJ_TYPE);
         return service.doQuery(context, request, AdmBuilding.class);
     }
 
@@ -177,7 +177,7 @@ public class AdmBuildingController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("building");
+        request.setName(AdmBuilding.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmBuilding.class);
     }

+ 2 - 2
src/main/java/com/persagy/proxy/adm/controller/AdmComponentController.java

@@ -44,7 +44,7 @@ public class AdmComponentController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("component");
+        request.setName(AdmComponent.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmComponent.class);
     }
@@ -104,7 +104,7 @@ public class AdmComponentController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("component");
+        request.setName(AdmComponent.OBJ_TYPE);
         return service.doQuery(context, request, AdmComponent.class);
     }
 }

+ 2 - 2
src/main/java/com/persagy/proxy/adm/controller/AdmEquipmentController.java

@@ -42,7 +42,7 @@ public class AdmEquipmentController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("equipment");
+        request.setName(AdmEquipment.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmEquipment.class);
     }
@@ -105,7 +105,7 @@ public class AdmEquipmentController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("equipment");
+        request.setName(AdmEquipment.OBJ_TYPE);
         return service.doQuery(context, request, AdmEquipment.class);
     }
 

+ 8 - 7
src/main/java/com/persagy/proxy/adm/controller/AdmFloorController.java

@@ -59,7 +59,7 @@ public class AdmFloorController {
     public AdmResponse create(@RequestBody AdmCreateRequest<AdmFloor> createRequest, @QueryParam("projectId") String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        List<AdmFloor> vos = service.doInsert(context, AdmFloor.class, createRequest.getContent());
+        List<AdmFloor> vos = createRequest.getContent();
         for(AdmFloor floor : vos){
             if(StrUtil.isEmpty(floor.getName())){
                 floor.setName(ObjectNameUtil.objectName("楼层-"));
@@ -94,7 +94,8 @@ public class AdmFloorController {
                 }
             }
         }
-        return AdmResponse.success(vos);
+        List<AdmFloor> admFloors = service.doInsert(context, AdmFloor.class, createRequest.getContent());
+        return AdmResponse.success(admFloors);
     }
 
     /**
@@ -122,17 +123,17 @@ public class AdmFloorController {
         admQueryCriteria.setFilters(filters);
         admQueryCriteria.setOnlyCount(true);
 
-        admQueryCriteria.setName("space");
+        admQueryCriteria.setName(AdmSpace.OBJ_TYPE);
         AdmResponse admResponseSpace = spaceService.doQuery(context, admQueryCriteria, AdmSpace.class);
         if(admResponseSpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseSpace.getContent())){
             return AdmResponse.failure(msg);
         }
-        admQueryCriteria.setName("ispace");
+        admQueryCriteria.setName(AdmISpace.OBJ_TYPE);
         AdmResponse admResponseISpace = iAdmISpaceService.doQuery(context, admQueryCriteria, AdmISpace.class);
         if(admResponseISpace.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseISpace.getContent())){
             return AdmResponse.failure(msg);
         }
-        admQueryCriteria.setName("equipment");
+        admQueryCriteria.setName(AdmEquipment.OBJ_TYPE);
         AdmResponse admResponseEuip = equipmentService.doQuery(context, admQueryCriteria, AdmEquipment.class);
         if(admResponseEuip.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(admResponseEuip.getContent())){
             return AdmResponse.failure(msg);
@@ -240,7 +241,7 @@ public class AdmFloorController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("floor");
+        request.setName(AdmFloor.OBJ_TYPE);
         return service.doQuery(context, request, AdmFloor.class);
     }
 
@@ -257,7 +258,7 @@ public class AdmFloorController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("floor");
+        request.setName(AdmFloor.OBJ_TYPE);
         return service.doQueryOutLine(context, request, AdmFloor.class);
     }
 

+ 2 - 4
src/main/java/com/persagy/proxy/adm/controller/AdmISpaceController.java

@@ -1,14 +1,12 @@
 package com.persagy.proxy.adm.controller;
 
 import cn.hutool.core.collection.CollUtil;
-import com.alibaba.fastjson.JSONArray;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
 import com.persagy.proxy.adm.model.AdmISpace;
 import com.persagy.proxy.adm.request.AdmCreateRequest;
 import com.persagy.proxy.adm.request.AdmQueryCriteria;
 import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmISpaceService;
-import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -46,7 +44,7 @@ public class AdmISpaceController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("ispace");
+        request.setName(AdmISpace.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmISpace.class);
     }
@@ -106,7 +104,7 @@ public class AdmISpaceController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("ispace");
+        request.setName(AdmISpace.OBJ_TYPE);
         return service.doQuery(context, request, AdmISpace.class);
     }
 

+ 1 - 1
src/main/java/com/persagy/proxy/adm/controller/AdmProjectController.java

@@ -41,7 +41,7 @@ public class AdmProjectController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("project");
+        request.setName(AdmProject.OBJ_TYPE);
         return service.doQuery(context, request, AdmProject.class);
     }
 

+ 6 - 7
src/main/java/com/persagy/proxy/adm/controller/AdmSpaceController.java

@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.ws.rs.QueryParam;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -157,7 +156,7 @@ public class AdmSpaceController {
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
         request.setName("building");
         AdmQueryCriteria criteriaFloor = new AdmQueryCriteria();
-        criteriaFloor.setName("floor");
+        criteriaFloor.setName(AdmFloor.OBJ_TYPE);
 
         AdmQueryCriteria criteriaSpace = new AdmQueryCriteria();
         criteriaSpace.setName("spaceList");
@@ -215,7 +214,7 @@ public class AdmSpaceController {
             if(StrUtil.isNotEmpty(id)){
                 if(id.startsWith("Fl") && StrUtil.isNotEmpty(spaceId)){
                     AdmQueryCriteria admQueryCriteria = new AdmQueryCriteria();
-                    admQueryCriteria.setName("floor");
+                    admQueryCriteria.setName(AdmFloor.OBJ_TYPE);
                     AdmResponse admResponseFl = floorService.doQuery(context, admQueryCriteria, AdmFloor.class);
                     if(CollUtil.isNotEmpty(admResponseFl.getContent())){
                         AdmFloor floor = JSONUtil.toBean(admResponseFl.getContent().get(0).toString(), AdmFloor.class);
@@ -236,7 +235,7 @@ public class AdmSpaceController {
                             //更新实体
                             AdmSpace space = new AdmSpace();
                             space.setId(spaceId);
-                            space.setObjectType("space");
+                            space.setObjectType(AdmSpace.OBJ_TYPE);
                             space.setZoneType(type);
                             space.setClassCode(type);
                             space.setBuildingId(floor.getBuildingId());
@@ -255,7 +254,7 @@ public class AdmSpaceController {
                     //更新实体
                     AdmSpace space = new AdmSpace();
                     space.setId(spaceId);
-                    space.setObjectType("space");
+                    space.setObjectType(AdmSpace.OBJ_TYPE);
                     space.setZoneType(type);
                     space.setClassCode(type);
                     space.setBuildingId(id);
@@ -298,7 +297,7 @@ public class AdmSpaceController {
                                       @RequestBody AdmDCSQueryRequest request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("space");
+        request.setName(AdmSpace.OBJ_TYPE);
         request.setProjection(null);
         List<String> list = new ArrayList<>();
         list.add("id");
@@ -356,7 +355,7 @@ public class AdmSpaceController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("space");
+        request.setName(AdmSpace.OBJ_TYPE);
         return service.doQuery(context, request, AdmSpace.class);
     }
 

+ 9 - 9
src/main/java/com/persagy/proxy/adm/controller/AdmSystemController.java

@@ -42,7 +42,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmSystem.class);
     }
@@ -119,7 +119,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -150,7 +150,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -168,7 +168,7 @@ public class AdmSystemController {
                                 @QueryParam("floorId") String floorId, @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -185,7 +185,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -202,7 +202,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -220,7 +220,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -238,7 +238,7 @@ public class AdmSystemController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 
@@ -256,7 +256,7 @@ public class AdmSystemController {
                                      @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("system");
+        request.setName(AdmSystem.OBJ_TYPE);
         return service.doQuery(context, request, AdmSystem.class);
     }
 }

+ 3 - 3
src/main/java/com/persagy/proxy/adm/controller/AdmTenantController.java

@@ -46,7 +46,7 @@ public class AdmTenantController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("virtual");
+        request.setName(AdmTenant.OBJ_TYPE);
         request.setOnlyCount(true);
         return service.doQuery(context, request, AdmTenant.class);
     }
@@ -112,7 +112,7 @@ public class AdmTenantController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("virtual");
+        request.setName(AdmTenant.OBJ_TYPE);
         return service.doQuery(context, request, AdmTenant.class);
     }
 
@@ -129,7 +129,7 @@ public class AdmTenantController {
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("virtual");
+        request.setName(AdmTenant.OBJ_TYPE);
         return service.doQuery(context, request, AdmTenant.class);
     }
 

+ 3 - 5
src/main/java/com/persagy/proxy/adm/model/AdmBuilding.java

@@ -4,9 +4,7 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 建筑 实体
@@ -16,7 +14,7 @@ import java.util.Map;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class AdmBuilding extends AdmSBaseEntity<AdmBuilding>{
-
+    public static final String OBJ_TYPE = "building";
     /** 名称 */
     private String name;
     /** 本地编码 */
@@ -30,7 +28,7 @@ public class AdmBuilding extends AdmSBaseEntity<AdmBuilding>{
     /** 建筑二维码图片 */
     private String buildQRCode;
     /** 对象类型 */
-    private String objectType = "building";
+    private String objectType = OBJ_TYPE;
 
     /** 级联-项目 */
     @CascadeColumn(graphCode = "ArchSubset", relCode = "Pj2Bd", selectToObj = false)
@@ -40,5 +38,5 @@ public class AdmBuilding extends AdmSBaseEntity<AdmBuilding>{
     private List<AdmFloor> floor;
 
     /** 建筑类型code */
-    private String classCode = "building";
+    private String classCode;
 }

+ 2 - 3
src/main/java/com/persagy/proxy/adm/model/AdmComponent.java

@@ -4,9 +4,7 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 组件 实体 ==> Equipment
@@ -17,6 +15,7 @@ import java.util.Map;
 @EqualsAndHashCode(callSuper = true)
 public class AdmComponent extends AdmSBaseEntity<AdmComponent>{
 
+        public static final String OBJ_TYPE = "component";
         /** 部件名称 */
         private String name;
         /** 本地编码 */
@@ -85,7 +84,7 @@ public class AdmComponent extends AdmSBaseEntity<AdmComponent>{
         /** 二维码图片 */
         private String qrcodePic;
         /** 对象类型 */
-        private String objectType = "component";
+        private String objectType;
 
         /** 资产信息实体类   资产对应部件设施关系 资产→部件设施*/
         @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)

+ 2 - 4
src/main/java/com/persagy/proxy/adm/model/AdmEquipment.java

@@ -4,9 +4,7 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 设备 实体
@@ -16,7 +14,7 @@ import java.util.Map;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class AdmEquipment extends AdmSBaseEntity<AdmEquipment>{
-
+    public static final String OBJ_TYPE = "equipment";
     /** 设备名称 */
     private String name;
     /** 本地编码 */
@@ -107,7 +105,7 @@ public class AdmEquipment extends AdmSBaseEntity<AdmEquipment>{
     private String qrcodePic;
 
     /** 对象类型 */
-    private String objectType = "equipment";
+    private String objectType;
 
     /** 资产信息实体类   资产对应设备设施关系 资产→设备设施*/
     @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)

+ 3 - 4
src/main/java/com/persagy/proxy/adm/model/AdmFloor.java

@@ -5,7 +5,6 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -17,7 +16,7 @@ import java.util.Map;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class AdmFloor extends AdmSBaseEntity<AdmFloor>{
-
+    public static final String OBJ_TYPE = "floor";
     /** 名称 */
     private String name;
     /** 本地编码 */
@@ -70,9 +69,9 @@ public class AdmFloor extends AdmSBaseEntity<AdmFloor>{
 
 
     /** 对象类型 */
-    private String objectType = "floor";
+    private String objectType = OBJ_TYPE;
     /** 楼层类型code */
-    private String classCode = "floor";
+    private String classCode;
 
 
     /** 空间列表 非中台信息*/

+ 3 - 4
src/main/java/com/persagy/proxy/adm/model/AdmISpace.java

@@ -1,11 +1,9 @@
 package com.persagy.proxy.adm.model;
 
-import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 
 import java.util.ArrayList;
 import java.util.Date;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -16,6 +14,7 @@ import java.util.Map;
 @Data
 public class AdmISpace {
 
+    public static final String OBJ_TYPE = "ispace";
     /** 空间ID */
     private String id;
     /** 名称 */
@@ -70,13 +69,13 @@ public class AdmISpace {
     /** 信息点 */
     private Map<String, Object> infos;
     /** 对象类型 */
-    private String objectType = "ispace";
+    private String objectType;
 
     /** 轮廓线 */
     private ArrayList<ArrayList<AdmPointPosition>> outline;
 
     /** 对象类型code */
-    private String classCode = "ispace";
+    private String classCode;
     /** 创建时间 */
     private Date createTime;
 

+ 1 - 0
src/main/java/com/persagy/proxy/adm/model/AdmProject.java

@@ -12,6 +12,7 @@ import java.util.Map;
  */
 @Data
 public class AdmProject {
+    public static final String OBJ_TYPE = "project";
     /** 项目ID */
     private String id;
     /** 项目名称 */

+ 2 - 2
src/main/java/com/persagy/proxy/adm/model/AdmProperty.java

@@ -16,7 +16,7 @@ import java.util.Map;
 
 @Data
 public class AdmProperty {
-
+    public static final String OBJ_TYPE = "property";
     /** 资产id */
     private String id;
     /** 资产名称 */
@@ -54,7 +54,7 @@ public class AdmProperty {
     /** 信息点 */
     private Map<String, Object> infos;
     /** 对象类型 */
-    private String objectType = "property";
+    private String objectType;
     /** 位置信息 */
     private String position;
     /** 贴码状态 */

+ 4 - 4
src/main/java/com/persagy/proxy/adm/model/AdmShaft.java

@@ -1,12 +1,11 @@
 package com.persagy.proxy.adm.model;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 竖井 实体
@@ -16,7 +15,7 @@ import java.util.Map;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class AdmShaft extends AdmSBaseEntity<AdmShaft>{
-
+    public static final String OBJ_TYPE = "shaft";
     /** 竖井名称 */
     private String name;
     /** 竖井本地编码 */
@@ -26,6 +25,7 @@ public class AdmShaft extends AdmSBaseEntity<AdmShaft>{
     /** BIM模型中编码 */
     private String bimId;
     /** 设计图纸中编码 */
+    @JSONField(name = "cADID")
     private String cadId;
     /** 二维码图片 */
     private String qRCodePic;
@@ -44,7 +44,7 @@ public class AdmShaft extends AdmSBaseEntity<AdmShaft>{
     /** BIM模型中轮廓坐标 */
     private List<AdmPointPosition> outline;
     /** 对象类型 */
-    private String objectType = "shaft";
+    private String objectType;
     /** 级联-竖井内的设备 */
     @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sh", selectToObj = false)
     private List<AdmEquipment> equipmentList;

+ 2 - 3
src/main/java/com/persagy/proxy/adm/model/AdmSpace.java

@@ -5,9 +5,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 空间 实体
@@ -18,6 +16,7 @@ import java.util.Map;
 @EqualsAndHashCode(callSuper = true)
 public class AdmSpace extends AdmSBaseEntity<AdmSpace>{
 
+    public static final String OBJ_TYPE = "space";
     /** 名称 */
     private String name;
     /** 本地编码 */
@@ -127,7 +126,7 @@ public class AdmSpace extends AdmSBaseEntity<AdmSpace>{
     /** 空间轮廓线 未使用 */
     //private T spaceOutline;
     /** 对象类型 */
-    private String objectType = "space";
+    private String objectType = OBJ_TYPE;
 
     public String getZoneType(){
         return zoneType;

+ 2 - 4
src/main/java/com/persagy/proxy/adm/model/AdmSystem.java

@@ -4,9 +4,7 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 系统实体
@@ -16,7 +14,7 @@ import java.util.Map;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class AdmSystem extends AdmSBaseEntity<AdmSystem> {
-
+    public static final String OBJ_TYPE = "system";
     /** 名称 */
     private String name;
     /** 本地编码 */
@@ -45,7 +43,7 @@ public class AdmSystem extends AdmSBaseEntity<AdmSystem> {
     private AdmSystemCategory categoryNames;
 
     /** 对象类型 */
-    private String objectType = "system";
+    private String objectType = OBJ_TYPE;
 
     /** 级联-设备 */
     @CascadeColumn(graphCode = "MechSubset", relCode = "Sy2Eq")

+ 2 - 3
src/main/java/com/persagy/proxy/adm/model/AdmTenant.java

@@ -4,9 +4,7 @@ import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * ADM 租户 实体
@@ -17,6 +15,7 @@ import java.util.Map;
 @EqualsAndHashCode(callSuper = true)
 public class AdmTenant extends AdmSBaseEntity<AdmTenant>{
 
+    public static final String OBJ_TYPE = "virtual";
     /** 租户名称 */
     private String name;
     /** 租户本地编码 */
@@ -40,6 +39,6 @@ public class AdmTenant extends AdmSBaseEntity<AdmTenant>{
     private List<AdmSpace> zoneGeneraltList;
 
     /** 租户  */
-    private String classCode = "VOTn";
+    private String classCode;
 
 }

+ 1 - 1
src/main/java/com/persagy/proxy/adm/service/impl/AdmComponentServiceImpl.java

@@ -43,7 +43,7 @@ public class AdmComponentServiceImpl extends AbstractAdmBaseServiceImpl<AdmCompo
         }
         Set<String> classCodes = voList.stream().map(AdmComponent::getClassCode).collect(Collectors.toSet());
         //查询定义类型
-        QueryCriteria criteriaObject = getDmpCriteria(context, classCodes, "component");
+        QueryCriteria criteriaObject = getDmpCriteria(context, classCodes, AdmComponent.OBJ_TYPE);
         JSONObject paraPe = null;
         try {
             String paraStr = objectMapper.writeValueAsString(criteriaObject);

+ 1 - 1
src/main/java/com/persagy/proxy/adm/service/impl/AdmEquipmentServiceImpl.java

@@ -56,7 +56,7 @@ public class AdmEquipmentServiceImpl extends AbstractAdmBaseServiceImpl<AdmEquip
         }
         Set<String> classCodes = voList.stream().map(AdmEquipment::getClassCode).collect(Collectors.toSet());
         //查询定义类型
-        QueryCriteria criteriaObject = getDmpCriteria(context, classCodes, "equipment");
+        QueryCriteria criteriaObject = getDmpCriteria(context, classCodes, AdmEquipment.OBJ_TYPE);
         JSONObject paraPe = null;
         try {
             String paraStr = objectMapper.writeValueAsString(criteriaObject);

+ 5 - 5
src/main/java/com/persagy/proxy/adm/service/impl/AdmSpaceServiceImpl.java

@@ -95,7 +95,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
             querySpaceByFl(dmpRequest,context, spaceArray, zoneTypeList, request.getFloorId(), "Fl2Sp");
 
         }else if(StrUtil.isNotEmpty(request.getBuildingId()) && StrUtil.isNotEmpty(request.getFloorId()) && request.getFloorId().equals("isnull")){
-            QueryCriteria queryFloor = ensureQueryCommParm(dmpRequest,context, Arrays.asList("floor"), "floor");
+            QueryCriteria queryFloor = ensureQueryCommParm(dmpRequest,context, Arrays.asList("floor"), AdmFloor.OBJ_TYPE);
             ObjectNode criteriaFl = queryFloor.getCriteria();
             criteriaFl.put("buildingId", request.getBuildingId());
             queryFloor.setCriteria(criteriaFl);
@@ -104,7 +104,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
             Map<String, AdmFloor> floorMap = CollUtil.fieldValueMap(floorList, BaseEntity.PROP_ID);
 
             if(CollUtil.isNotEmpty(floorMap)){
-                QueryCriteria queryCriteria = ensureQueryCommParm(dmpRequest, context, zoneTypeList, "space");
+                QueryCriteria queryCriteria = ensureQueryCommParm(dmpRequest, context, zoneTypeList, AdmSpace.OBJ_TYPE);
                 ObjectNode criteriaPe = queryCriteria.getCriteria();
                 JSONArray jsonArray = new JSONArray();
                 floorMap.keySet().forEach(floorId -> jsonArray.add(floorId));
@@ -171,7 +171,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
      * @param relCode
      */
     private void querySpaceByFl(QueryCriteria dmpRequest, InstanceUrlParam context, List spaceArray, List<String> zoneTypeList, String objFrom, String relCode){
-        QueryCriteria queryCriteria = ensureQueryCommParm(dmpRequest,context, zoneTypeList, "space");
+        QueryCriteria queryCriteria = ensureQueryCommParm(dmpRequest,context, zoneTypeList, AdmSpace.OBJ_TYPE);
         addRelationTo(queryCriteria,objFrom,relCode);
         DmpResult<JSONArray> dmpResult = queryObj(context, queryCriteria);
         if(CollUtil.isNotEmpty(dmpResult.getData())){
@@ -240,7 +240,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
     }
 
     private JSONArray queryAndDealObjs(InstanceUrlParam context, Set<String> codes){
-        QueryCriteria criteriaObject = ensureQueryCommParm(new QueryCriteria(), context, codes,"space");
+        QueryCriteria criteriaObject = ensureQueryCommParm(new QueryCriteria(), context, codes,AdmSpace.OBJ_TYPE);
         criteriaObject.setSize(50L);
         DmpResult<JSONArray> dmpResult = queryObj(context, criteriaObject);
         if(CollUtil.isEmpty(dmpResult.getData())){
@@ -260,7 +260,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
         Map<String, String> codeNameMap = null;
         ObjectNode criteriaEq = JsonNodeFactory.instance.objectNode();
         criteriaEq.put("projectId", context.getProjectId());
-        criteriaEq.put("objType", "space");
+        criteriaEq.put("objType", AdmSpace.OBJ_TYPE);
         DmpResult<JSONArray> resultDef = queryDefineType(context, criteriaEq);
         if(resultDef.getResult().equals(DmpResult.SUCCESS) && CollUtil.isNotEmpty(resultDef.getData())){
             List<ObjectTypeDefine> defineList = JSONUtil.toList(resultDef.getData().toString(), ObjectTypeDefine.class);