Browse Source

Merge remote-tracking branch 'origin/develop' into develop

lijie 3 years ago
parent
commit
da97358a68
65 changed files with 4103 additions and 105 deletions
  1. 4 0
      pom.xml
  2. 20 0
      src/main/java/com/persagy/proxy/adm/constant/AdmCommonConstant.java
  3. 23 0
      src/main/java/com/persagy/proxy/adm/constant/AdmDictConstant.java
  4. 46 0
      src/main/java/com/persagy/proxy/adm/constant/AdmRelationType.java
  5. 2 0
      src/main/java/com/persagy/proxy/adm/constant/AdmRelationTypeEnum.java
  6. 25 0
      src/main/java/com/persagy/proxy/adm/constant/FuncidCategory.java
  7. 21 0
      src/main/java/com/persagy/proxy/adm/constant/GraphCodeEnum.java
  8. 24 0
      src/main/java/com/persagy/proxy/adm/constant/RelCodeEnum.java
  9. 44 0
      src/main/java/com/persagy/proxy/adm/constant/enums/AdmDictCategoryEnum.java
  10. 39 0
      src/main/java/com/persagy/proxy/adm/constant/enums/ValidEnum.java
  11. 178 0
      src/main/java/com/persagy/proxy/adm/controller/AdmDictController.java
  12. 56 0
      src/main/java/com/persagy/proxy/adm/controller/AdmModelRelController.java
  13. 34 3
      src/main/java/com/persagy/proxy/adm/controller/AdmSpaceController.java
  14. 144 0
      src/main/java/com/persagy/proxy/adm/controller/RelationEqForSpConreoller.java
  15. 189 0
      src/main/java/com/persagy/proxy/adm/controller/RelationSyEqController.java
  16. 175 14
      src/main/java/com/persagy/proxy/adm/controller/ReportDownloadController.java
  17. 11 4
      src/main/java/com/persagy/proxy/adm/model/AdmComponent.java
  18. 16 0
      src/main/java/com/persagy/proxy/adm/model/AdmDict.java
  19. 25 0
      src/main/java/com/persagy/proxy/adm/model/AdmDictBatch.java
  20. 18 0
      src/main/java/com/persagy/proxy/adm/model/AdmDictQueryCriteria.java
  21. 19 0
      src/main/java/com/persagy/proxy/adm/model/AdmEquipFamilyCategory.java
  22. 6 0
      src/main/java/com/persagy/proxy/adm/model/AdmFloor.java
  23. 25 74
      src/main/java/com/persagy/proxy/adm/model/AdmISpace.java
  24. 32 0
      src/main/java/com/persagy/proxy/adm/model/AdmModelRel.java
  25. 126 0
      src/main/java/com/persagy/proxy/adm/model/AdmObjectInfo.java
  26. 59 0
      src/main/java/com/persagy/proxy/adm/model/AdmObjectType.java
  27. 84 0
      src/main/java/com/persagy/proxy/adm/model/AdmRelationObject.java
  28. 2 6
      src/main/java/com/persagy/proxy/adm/model/AdmSpace.java
  29. 9 0
      src/main/java/com/persagy/proxy/adm/service/IAdmBuildingService.java
  30. 65 0
      src/main/java/com/persagy/proxy/adm/service/IAdmDictBaseService.java
  31. 49 0
      src/main/java/com/persagy/proxy/adm/service/IAdmDictService.java
  32. 13 0
      src/main/java/com/persagy/proxy/adm/service/IAdmModelRelService.java
  33. 5 0
      src/main/java/com/persagy/proxy/adm/service/IAdmSpaceService.java
  34. 66 0
      src/main/java/com/persagy/proxy/adm/service/IReportDownloadService.java
  35. 254 0
      src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmDictBaseServiceImpl.java
  36. 7 0
      src/main/java/com/persagy/proxy/adm/service/impl/AdmBuildingServiceImpl.java
  37. 302 0
      src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java
  38. 18 0
      src/main/java/com/persagy/proxy/adm/service/impl/AdmModelRelServiceImpl.java
  39. 10 0
      src/main/java/com/persagy/proxy/adm/service/impl/AdmSpaceServiceImpl.java
  40. 109 0
      src/main/java/com/persagy/proxy/adm/service/impl/ReportDownloadService.java
  41. 53 0
      src/main/java/com/persagy/proxy/adm/strategy/QueryRelationObjectContext.java
  42. 165 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/AbstractQueryRelationObject.java
  43. 97 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2BdForRelationObject.java
  44. 88 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2BdRelationObject.java
  45. 98 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2FlForRelationObject.java
  46. 82 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2FlRelationObject.java
  47. 97 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2ShForRelationObject.java
  48. 77 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2SpRelationObject.java
  49. 31 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/QueryRelationObjectStrategy.java
  50. 77 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2BdForRelationObject.java
  51. 85 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2FlForRelationObject.java
  52. 77 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2ShForRelationObject.java
  53. 97 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2SpForRelationObject.java
  54. 95 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sp2BdForRelationObject.java
  55. 97 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sp2FlForRelationObject.java
  56. 77 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2BdForRelationObject.java
  57. 86 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2FlForRelationObject.java
  58. 77 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2ShForRelationObject.java
  59. 98 0
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2SpForRelationObject.java
  60. 1 1
      src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java
  61. 3 3
      src/main/java/com/persagy/proxy/adm/utils/AdmQueryCriteriaHelper.java
  62. 36 0
      src/main/java/com/persagy/proxy/common/client/DmpDicClient.java
  63. 37 0
      src/main/java/com/persagy/proxy/common/client/DmpRwdClient.java
  64. 18 0
      src/main/java/com/persagy/proxy/common/constant/DmpUrlConstant.java
  65. BIN
      src/main/resources/template/relation-template.xlsx

+ 4 - 0
pom.xml

@@ -71,5 +71,9 @@
             <artifactId>easyexcel</artifactId>
             <version>${easyexcel.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 20 - 0
src/main/java/com/persagy/proxy/adm/constant/AdmCommonConstant.java

@@ -10,9 +10,14 @@ public interface AdmCommonConstant {
 	/** 项目根路径*/
 	String SERVER_ROOT_PATH = System.getProperty("user.dir");
 	
+	String EMPTY = "";
+	
     /** appId */
     String APP_ID = "ADM";
     
+    /** 默认的userId */
+    String USER_ID = "systemId";
+    
     /** 集团编码 header key*/
     String GROUP_CODE_HEADER = "groupCode";
 
@@ -28,4 +33,19 @@ public interface AdmCommonConstant {
     /** excel文件后缀*/
     String EXCEL_SUFFIX_XLSX = ".xlsx";
     
+    /** 连接符 ? */
+    String WHERE = "?";
+
+    /** 连接符 & */
+    String AND = "&";
+    
+    /** 连接符 _ */
+    String UNDERLINE = "_";
+    
+    /** 连接符 - */
+    String LINE_THROUGH = "-";
+    
+    /** 有效标示*/
+    String VALID = "valid";
+
 }

+ 23 - 0
src/main/java/com/persagy/proxy/adm/constant/AdmDictConstant.java

@@ -0,0 +1,23 @@
+package com.persagy.proxy.adm.constant;
+
+/**
+ * @ClassName AdmDictConstant
+ * @Description: 字典常量
+ * @Author linhuili
+ * @Date 2021/9/1 10:07
+ * @Version V1.0
+ **/
+public interface AdmDictConstant {
+
+    /** 类型编码 */
+    String CLASS_CODE ="classCode";
+
+    /** 信息点infos前缀 */
+    String INFOS_EX ="infos.";
+
+    /** 一级标签名称 */
+    String FIRST_BASE_TAG ="基本信息";
+
+    /** 一级标签历史名称 */
+    String HIS_FIRST_BASE_TAG="基础参数";
+}

+ 46 - 0
src/main/java/com/persagy/proxy/adm/constant/AdmRelationType.java

@@ -0,0 +1,46 @@
+package com.persagy.proxy.adm.constant;
+
+/**
+ * 所有数据的来源为
+ * {@link com.persagy.proxy.adm.constant.AdmRelationTypeEnum}
+ * 的relationType字段
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:55:09
+ */
+public interface AdmRelationType {
+
+	String EQ2BD = "eq2bd";
+	
+	String EQ2FL = "eq2fl";
+
+	String EQ2BD_FOR = "eq2bd_for";
+	
+	String EQ2FL_FOR = "eq2fl_for";
+	
+	String EQ2SH_FOR = "eq2sh_for";
+	
+	String SY2BD_FOR = "sy2bd_for";
+	
+	String SY2FL_FOR = "sy2fl_for";
+	
+	String SY2SH_FOR = "sy2sh_for";
+	
+	String SY2SP_FOR = "sy2sp_for";
+	
+	String EQ2SP_SENSORRELATIONSHIP_SS2SP = "eq2sp_SensorRelationship_ss2sp";
+	
+	String SH2BD_ARCHFORARCH = "sh2bd_ArchForArch";
+	
+	String SH2FL_ARCHFORARCH = "sh2fl_ArchForArch";
+	
+	String SH2SH_ARCHFORARCH = "sh2sh_ArchForArch";
+	
+	String SH2SP_ARCHFORARCH = "sh2sp_ArchForArch";
+	
+	String SP2BD_ARCHFORARCH = "sp2bd_ArchForArch";
+	
+	String SP2FL_ARCHFORARCH ="sp2fl_ArchForArch";
+	
+}

+ 2 - 0
src/main/java/com/persagy/proxy/adm/constant/AdmRelationTypeEnum.java

@@ -229,6 +229,8 @@ public enum AdmRelationTypeEnum {
     SH2BD_ARCHFORARCH("sh2bd_ArchForArch","ArchForArch","Sh2Bd",AdmObjectType.SHAFT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,true,false),
     /**系统所在空间-系统→业务空间-【系统台账】,【业务空间台账】*/
     SY2SP("sy2sp","MechInArch","Sy2Sp",AdmObjectType.SYSTEM.getIndex(),AdmObjectType.SPACE.getIndex(),false,false,false,false,false,false),
+    /**设备所在建筑-设备→建筑*/
+    EQ2BD("eq2bd","MechInArch","Eq2Bd",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
     /**设备所在建筑-设备→建筑-【设备台账】*/
     SYEQ2BD("syeq2bd","MechInArch","Eq2Bd",AdmObjectType.EQUIPMENT.getIndex(),AdmObjectType.BUILDING.getIndex(),false,false,false,false,false,false),
     /**系统服务于空间-系统→业务空间-【业务空间台账】*/

+ 25 - 0
src/main/java/com/persagy/proxy/adm/constant/FuncidCategory.java

@@ -0,0 +1,25 @@
+package com.persagy.proxy.adm.constant;
+
+/**
+ * @author: yaoll
+ * @date: 2020-09-09
+ * @verison: 1.0
+ */
+public enum FuncidCategory {
+	/**
+	 * 静态量
+	 */
+	STATIC,
+	/**
+	 * 脉冲量
+	 */
+	PULSE,
+	/**
+	 * 阶段量
+	 */
+	GRADATION,
+	/**
+	 * 时序量
+	 */
+	SEQUENTIAL
+}

+ 21 - 0
src/main/java/com/persagy/proxy/adm/constant/GraphCodeEnum.java

@@ -0,0 +1,21 @@
+package com.persagy.proxy.adm.constant;
+
+/**
+ * 图类型编码
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月2日 下午4:31:27
+ */
+
+public enum GraphCodeEnum {
+
+	ArchSubset,SpaceNeighborhood,ThroughRelationship,TrafficNetwork,ConvectionNetwork,
+	RadiationNetwork,SpaceCorrespond,ArchForArch,MechInArch,MechForArch,MechSubset,LUDistribution,
+	HUDistribution,ChillWaterLoop,CoolingWaterLoop,HeatWaterLoop,CondWaterNetwork,ACAirNetwork,FreshAirNetwork,
+	VentNetwork,VRFNetwork,DomesticWaterNetwork,DrainingWaterNetwork,RecycleWaterNetwork,DrinkingWaterNetwork,DHWNetwork,
+	GasNetwork,FireWaterNetwork,FireVentNetwork,WENetwork,MechCtrl,MechPower,SensorRelationship,ValveRelationship,
+	EnergySubMeter,ScheduleRelationship,MeteorologyRelationship,TenentInArch,BlocRelationship,Property2Mech,PropertyInArch,
+	
+}

+ 24 - 0
src/main/java/com/persagy/proxy/adm/constant/RelCodeEnum.java

@@ -0,0 +1,24 @@
+package com.persagy.proxy.adm.constant;
+
+/**
+ * 边类型编码
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月2日 下午4:32:28
+ */
+public enum RelCodeEnum {
+	Pj2Bd,Bd2Fl,
+	None,Door,Window,DoorWindow,
+	FFOpen,FFClose,
+	Natural,OnewayMech,MixMech,Connect,Transparent,
+	Fl2Bd,Fl2Fl,Fl2Sh,Fl2Sp,Sh2Bd,Sh2Fl,Sh2Sh,Sh2Sp,Sp2Bd,
+	ExactCorrespond,InexactCorrespond,Bd2Bd,Bd2Sh,Bd2Sp,
+	Sp2Fl,Sp2Sh,Sp2Sp,
+	Sy2Bd,Sy2Fl,Sy2Sh,Sy2Sp,Eq2Bd,Eq2Fl,Eq2Sh,Eq2Sp,Pj2Sy,Pj2Eq,Sy2Eq,Eq2Ec,
+	Backup,Fill,Return,Fresh,
+	Uncertain,SupplyReturn,Supply,Bypass,Discharge,Normal,SyCtrl,EqCtrl,SyNormal,
+	SyBackup,EqNormal,EqBackup,Ss2Eq,Ss2Sy,Ss2Sp,Vv2Eq,Vv2Sy,Vv2Vv,Em2Bd,Sub2Em,SubTree,Br2Sub,
+	Br2Eq,Sch2Pj,Sch2Bd,Sch2Fl,Sch2Sp,Sch2Tn,Ms2Pj,Tn2Sp,Bl2Pj,Pe2Eq,Pe2Ec,Pe2Pj,Pe2Bd,Pe2Fl,Pe2Sh,Pe2Sp;
+}

+ 44 - 0
src/main/java/com/persagy/proxy/adm/constant/enums/AdmDictCategoryEnum.java

@@ -0,0 +1,44 @@
+package com.persagy.proxy.adm.constant.enums;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName DtTypeEnum
+ * @Description: 数据中台类型定义
+ * @Author linhuili
+ * @Date 2021/8/9 16:07
+ * @Version V1.0
+ **/
+public enum AdmDictCategoryEnum {
+    EQUIPMENT("equipment", "设备"),
+    COMPONENT("component", "组件"),
+    SYSTEM("system", "系统"),
+    MAJOR("major", "专业"),
+    SPACE("space", "空间"),
+    PROPRTY("property", "资产"),
+    EQUIPMENT_AND_COMPONENT("equipmentAndComponent", "设备和部件"),
+
+    MAJOR_SYSTEM("majorSystem", "专业下的系统"),
+    SYSTEM_EQUIP("systemEquip", "系统下的设备类"),
+    MAJOR_SYSTEM_EQUIP("majorSystemEquip", "专业下的系统,系统下的设备"),
+
+    EQUIPMENT_COMPONENT("equipmentComponent", "设备类型以及对应的部件"),
+    MAJOR_EQUIPMENT("majorEquipment", "专业下的设备类");
+
+    private String value;
+    private String desc;
+
+    AdmDictCategoryEnum(String value, String desc) {
+        this.value = value;
+        this.desc = desc;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}

+ 39 - 0
src/main/java/com/persagy/proxy/adm/constant/enums/ValidEnum.java

@@ -0,0 +1,39 @@
+package com.persagy.proxy.adm.constant.enums;
+
+/**
+ * @ClassName ValidEnum
+ * @Description: 有效标示
+ * @Author linhuili
+ * @Date 2021/9/2 11:12
+ * @Version V1.0
+ **/
+
+public enum ValidEnum {
+    /** 有效标识 */
+    FALSE(0, false),
+    TRUE(1, true);
+
+    private Integer value;
+    private Boolean desc;
+
+    ValidEnum(Integer value, Boolean desc) {
+        this.value = value;
+        this.desc = desc;
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public void setValue(Integer value) {
+        this.value = value;
+    }
+
+    public Boolean getDesc() {
+        return desc;
+    }
+
+    public void setDesc(Boolean desc) {
+        this.desc = desc;
+    }
+}

+ 178 - 0
src/main/java/com/persagy/proxy/adm/controller/AdmDictController.java

@@ -0,0 +1,178 @@
+package com.persagy.proxy.adm.controller;
+
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmDictConstant;
+import com.persagy.proxy.adm.model.*;
+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.IAdmDictBaseService;
+import com.persagy.proxy.adm.service.IAdmDictService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.ws.rs.QueryParam;
+import java.util.ArrayList;
+
+/**
+ * @ClassName AdmDictController
+ * @Description: 字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 18:21
+ * @Version V1.0
+ **/
+@RestController
+@RequestMapping("/dict")
+@Slf4j
+public class AdmDictController {
+
+    @Value("${middleware.group.code}")
+    private String groupCode;
+
+    @Autowired
+    private IAdmDictService service;
+
+    @Autowired
+    private IAdmDictBaseService baseService;
+
+    /**
+     * 字典类型查询:所有设备类型、部件类型、系统类型、专业类型
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/category")
+    public AdmResponse queryCategory(@QueryParam("projectId") String projectId,
+                                     @RequestBody AdmDict request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        if(StringUtils.isEmpty(request.getType())){
+            throw new Exception("type不能为空");
+        }
+        return service.queryCategory(context,request,AdmObjectType.class);
+    }
+
+
+    /**
+     * 批量处理字典信息操作:方案设定(BDTP暂不支持)
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/dict-batch")
+    public AdmResponse dictBatch(@QueryParam("projectId") String projectId,
+                                     @RequestBody AdmCreateRequest<AdmDictBatch> request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        //方案设定:方案id :全新设定(schemeZero)、方案1(schemeOne)、方案2(schemeTwo),
+        //"注意SchemeId为必填字段 ,优先级在列表中[R,S,M] ,一级标签[技术参数,基本参数] 列表为String类型
+        return AdmResponse.success(new ArrayList<>());
+    }
+
+    /**
+     * 查询项目下类型的信息点
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/query")
+    public AdmResponse query(@QueryParam("projectId") String projectId,
+                             @RequestBody AdmDictQueryCriteria request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        request.setName(request.getType());
+        return baseService.doQueryObjectInfo(context, request, AdmDictConstant.CLASS_CODE, AdmObjectInfo.class);
+    }
+
+    /**
+     * 查询设备对应的设备族(废弃)
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/family/query")
+    @Deprecated
+    public AdmResponse familyQuery(@QueryParam("projectId") String projectId,
+                             @RequestBody AdmQueryCriteria request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        return AdmResponse.success(new ArrayList<>());
+    }
+
+    /**
+     * 重置项目下所有得定制信息点
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/reset-dic")
+    public AdmResponse resetDic(@QueryParam("projectId") String projectId,
+                                   @RequestBody AdmDictQueryCriteria request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        return service.resetDic(context,request,null,AdmObjectInfo.class);
+    }
+
+
+    /**
+     * 根据类型,项目id重置信息点
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/reset-type")
+    public AdmResponse resetType(@QueryParam("projectId") String projectId,
+                                @RequestBody AdmDictQueryCriteria request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        if(StringUtils.isEmpty(request.getType())){
+            throw new Exception("type不能为空");
+        }
+        request.setName(request.getType());
+        return service.resetDic(context,request,AdmDictConstant.CLASS_CODE,AdmObjectInfo.class);
+    }
+
+    /**
+     * 设置-项目定制化字典
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/setting-dic-project")
+    public AdmResponse settingDicProject(@QueryParam("projectId") String projectId,
+                                 @RequestBody AdmCreateRequest<AdmObjectInfo> request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        return service.settingDicProject(context,request,AdmObjectInfo.class);
+    }
+
+    /**
+     * 查询项目下已有的设备类型带系统(废弃:数据中心无此接口)
+     * @param projectId
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/system/equip/category")
+    @Deprecated
+    public AdmResponse querySystemEquipCategory(@QueryParam("projectId") String projectId,
+                                 @RequestBody AdmDictQueryCriteria request) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        return AdmResponse.success(new ArrayList<>());
+    }
+}

+ 56 - 0
src/main/java/com/persagy/proxy/adm/controller/AdmModelRelController.java

@@ -0,0 +1,56 @@
+package com.persagy.proxy.adm.controller;
+
+import cn.hutool.core.collection.CollUtil;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.model.AdmLocationPoint;
+import com.persagy.proxy.adm.model.AdmModelRel;
+import com.persagy.proxy.adm.request.AdmCreateRequest;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmModelRelService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.ws.rs.QueryParam;
+import java.util.List;
+
+/**
+ * @ClassName AdmModelRelController
+ * @Description: 模型修改设备元空间的建筑楼层信息
+ * @Author linhuili
+ * @Date 2021/8/31 14:30
+ * @Version V1.0
+ **/
+@RestController
+@RequestMapping("/rel/update")
+@Slf4j
+public class AdmModelRelController {
+
+    @Value("${middleware.group.code}")
+    private String groupCode;
+
+
+    @Autowired
+    private IAdmModelRelService service;
+
+    /**
+     * 模型修改设备元空间的建筑楼层信息
+     * @param createRequest
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/equip-ispace")
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmModelRel> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        List<AdmModelRel> vos = CollUtil.newArrayList(createRequest.getContent());
+       // vos = service.doUpdate(context, AdmModelRel.class, vos);
+        return AdmResponse.success(vos);
+    }
+
+}

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

@@ -2,10 +2,13 @@ package com.persagy.proxy.adm.controller;
 
 import cn.hutool.core.collection.CollUtil;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.model.AdmBuilding;
+import com.persagy.proxy.adm.model.AdmFloor;
 import com.persagy.proxy.adm.model.AdmSpace;
 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.IAdmBuildingService;
 import com.persagy.proxy.adm.service.IAdmSpaceService;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.ws.rs.QueryParam;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -29,6 +33,8 @@ import java.util.List;
 public class AdmSpaceController {
     @Autowired
     private IAdmSpaceService service;
+    @Autowired
+    private IAdmBuildingService buildingService;
     @Value("${middleware.group.code}")
     private String groupCode;
 
@@ -116,12 +122,37 @@ public class AdmSpaceController {
      * @throws Exception
      */
     @PostMapping("/building-floor")
-    public AdmResponse queryFloor(@QueryParam("projectId") String projectId,
+    public AdmResponse queryBuildingFloor(@QueryParam("projectId") String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
-        request.setName("space");
-        return service.doQuery(context, request, AdmSpace.class);
+        request.setName("building");
+        AdmQueryCriteria criteriaFloor = new AdmQueryCriteria();
+        criteriaFloor.setName("floor");
+
+        AdmQueryCriteria criteriaSpace = new AdmQueryCriteria();
+        criteriaSpace.setName("spaceList");
+        criteriaSpace.setFilters("state = 1");
+
+        criteriaFloor.setCascade(CollUtil.newArrayList(criteriaSpace));
+        request.setCascade(CollUtil.newArrayList(criteriaFloor));
+        AdmResponse response = buildingService.doQueryBuildingFloor(context, request);
+        List<AdmBuilding> buildings = (List<AdmBuilding>) response.getContent();
+        buildings.stream().forEach(building -> {
+            if(CollUtil.isNotEmpty(building.getFloor())){
+                List<AdmFloor> floors = building.getFloor();
+                floors.stream().forEach(floor -> {
+                    if(CollUtil.isNotEmpty(floor.getSpaceList())){
+                        floor.setCount(String.valueOf(floor.getSpaceList().size()));
+                        floor.setSpaceList(null);
+                    }else{
+                        floor.setCount("0");
+                    }
+                });
+            }
+        });
+
+        return response;
     }
 
     /**

+ 144 - 0
src/main/java/com/persagy/proxy/adm/controller/RelationEqForSpConreoller.java

@@ -0,0 +1,144 @@
+package com.persagy.proxy.adm.controller;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmRelationService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.common.entity.RelationDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description:设备服务于业务空间
+ * 018、关系-设备服务于业务空间
+ * @author:lgy
+ * @data:2021/9/1 10:23
+ */
+@RestController
+@RequestMapping("/rel/eq-for-sp-base")
+public class RelationEqForSpConreoller {
+
+    @Autowired
+    private IAdmRelationService service;
+    @Value("${middleware.group.code}")
+    private String groupCode;
+
+    /**
+     * create 创建设备服务于业务空间关系
+     * @param projectId projectId
+     * @param type type
+     * @param param param
+     * @return {@link com.persagy.proxy.adm.request.AdmResponse}
+     * @author lgy
+     * @date 2021/9/1 10:28
+     */
+    @PostMapping("/link-list")
+    public AdmResponse create(@RequestParam("projectId") String projectId,
+                              @RequestParam(value = "type", required = false) String type,
+                              @RequestBody JSONObject param) throws Exception {
+
+        JSONArray content = param == null ? null : param.getJSONArray("content");
+        if(CollUtil.isEmpty(content)) {
+            return AdmResponse.success();
+        }
+        // 创建关系对象
+        List<RelationDTO> voList = new ArrayList<>();
+        for(int i = 0;i < content.size();i++) {
+            JSONObject para = content.getJSONObject(i);
+            String equipId = para.getString("equipId");
+            String spaceId = para.getString("spaceId");
+            if(StrUtil.isBlank(equipId) || StrUtil.isBlank(spaceId)) {
+                return AdmResponse.failure("必填项:EquipId(设备id)、SpaceId(业务空间id)");
+            }
+            // 创建关系对象 - 参考(datasyn中DataCenterSync.kt)
+            voList.add(new RelationDTO(null, "MechForArch", "Eq2Sp", type, equipId, spaceId));
+        }
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        service.doSave(context, voList);
+        return AdmResponse.success();
+    }
+
+
+    /**
+     * 创建服务于业务空间的设备关系
+     * 服务于业务空间的设备,业务空间一对多,累计添加不会覆盖以前记(必填项:EquipIdList(设备id列表)、SpaceId(业务空间id))
+     * @param type
+     * @param param
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/link-eq-sp")
+    public AdmResponse createEq(@RequestParam("projectId") String projectId,
+                                @RequestParam(value = "type", required = false) String type,
+                                @RequestBody JSONObject param) throws Exception {
+        String spaceId = param.getString("spaceId");
+        JSONArray equipIdList = param.getJSONArray("equipIdList");
+        if(StrUtil.isBlank(spaceId) || CollUtil.isEmpty(equipIdList)) {
+            return AdmResponse.failure("必填项:EquipId(设备id)、SpaceId(业务空间id)");
+        }
+        // 创建关系对象
+        List<RelationDTO> voList = new ArrayList<>();
+        for(int i = 0;i < equipIdList.size();i++) {
+            String equipId = equipIdList.getString(i);
+            if(StrUtil.isBlank(equipId)) {
+                continue;
+            }
+            // 创建关系对象 - 参考(datasyn中DataCenterSync.kt)
+            voList.add(new RelationDTO(null, "MechForArch", "Eq2Sp", type, equipId, spaceId));
+        }
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        service.doSave(context, voList);
+        return AdmResponse.success();
+    }
+
+    /**
+     * 根据对象删除关系
+     * 根据对象删除设备服务于业务空间关系(必填项:EquipId(设备id)、SpaceId(业务空间id))
+     * @param type
+     * @param param
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/unlink-list")
+    public AdmResponse delete(@RequestParam String projectId,
+                              @RequestParam(value = "type", required = false) String type,
+                              @RequestBody JSONArray param) throws Exception {
+        if(CollUtil.isEmpty(param)) {
+            return AdmResponse.success();
+        }
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        // 组装条件
+        QueryCriteria criteria = new QueryCriteria();
+        for(int i = 0;i < param.size();i++) {
+            JSONObject para = param.getJSONObject(i);
+            String equipId = para.getString("equipId");
+            String spaceId = para.getString("spaceId");
+            if(StrUtil.isBlank(equipId) || StrUtil.isBlank(spaceId)) {
+                return AdmResponse.failure("必填项:EquipId(设备id)、SpaceId(业务空间id)");
+            }
+            ObjectNode node = JsonNodeFactory.instance.objectNode();
+            node.put("graphCode", "MechForArch");
+            node.put("relCode", "Eq2Sp");
+            node.put("relValue", type);
+            node.put("objFrom", equipId);
+            node.put("objTo", spaceId);
+            criteria.setCriteria(node);
+            service.doDelete(context, criteria);
+        }
+        return AdmResponse.success();
+    }
+}

+ 189 - 0
src/main/java/com/persagy/proxy/adm/controller/RelationSyEqController.java

@@ -0,0 +1,189 @@
+package com.persagy.proxy.adm.controller;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmRelationService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.common.entity.RelationDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description:系统下的设备设施
+ * @author:lgy
+ * @data:2021/9/3 15:25
+ */
+@RestController
+@RequestMapping("/rel/sy-in-eq")
+public class RelationSyEqController {
+
+    @Autowired
+    private IAdmRelationService service;
+    @Value("${middleware.group.code}")
+    private String groupCode;
+
+
+    /**
+     * 创建系统下的设备关系,数据叠加,不会覆盖以前的数据
+     * 必填项:EquipID(设备id)、SysID(系统id)
+     * @param param
+     * @return
+     * @throws Exception
+     */
+    @PostMapping(value = {"/link-sy-eq","/link"})
+    public AdmResponse create(@RequestParam("projectId") String projectId,
+                                @RequestBody JSONObject param) throws Exception {
+        String equipId = param.getString("equipId");
+        String sysID = param.getString("sysId");
+        if(!StrUtil.isAllNotEmpty(equipId,sysID)) {
+            return AdmResponse.failure("必填项:EquipID(设备id)、SysID(系统id)");
+        }
+        // 创建关系对象
+        List<RelationDTO> voList = new ArrayList<>();
+        voList.add(new RelationDTO(null, "MechSubset", "Sy2Eq", null, sysID , equipId));
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        service.doSave(context, voList);
+        return AdmResponse.success();
+    }
+
+    /**
+     * 根据对象删除系统和设备的关系,只针对一个对象
+     *必填项:EquipID(设备id)、SysID(系统id)
+     * @param   param      对象
+     * @return             删除的结果信息
+     */
+
+    @PostMapping("/unlink")
+    public AdmResponse delete(@RequestParam String projectId,
+                              @RequestBody JSONObject param) throws Exception {
+        if(CollUtil.isEmpty(param)) {
+            return AdmResponse.success();
+        }
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        // 组装条件
+        QueryCriteria criteria = new QueryCriteria();
+        String equipId = param.getString("equipId");
+        String sysID = param.getString("sysId");
+        if(!StrUtil.isAllNotEmpty(equipId,sysID)) {
+            return AdmResponse.failure("必填项:EquipID(设备id)、SysID(系统id)");
+        }
+        ObjectNode node = JsonNodeFactory.instance.objectNode();
+        node.put("graphCode", "MechSubset");
+        node.put("relCode", "Sy2Eq");
+        node.put("objFrom", sysID);
+        node.put("objTo", equipId);
+        criteria.setCriteria(node);
+        service.doDelete(context, criteria);
+        return AdmResponse.success();
+    }
+
+    /**
+     * 创建系统下的设备关系
+     *
+     * @param   syEqList           系统和设备的关系对象
+     * @return                  创建结果信息
+     */
+    @PostMapping("/link-eq")
+    public AdmResponse createBatchWithDeleteOldsysIdRelation(@RequestParam("projectId") String projectId,
+                              @RequestBody JSONObject syEqList) throws Exception {
+        JSONArray equipIdList = syEqList.getJSONArray("equipIdList");
+        String sysId = syEqList.getString("sysId");
+        if(StrUtil.isBlank(sysId) || CollUtil.isEmpty(equipIdList)) {
+            return AdmResponse.failure("必填项:EquipIdList(设备id列表)、SysID(系统id)");
+        }
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        QueryCriteria queryRequest = new QueryCriteria();
+        ObjectNode node = JsonNodeFactory.instance.objectNode();
+        node.put("graphCode", "MechSubset");
+        node.put("relCode", "Sy2Eq");
+        node.put("objFrom", sysId);
+        queryRequest.setCriteria(node);
+        service.doDelete(context,queryRequest);
+        // 创建关系对象
+        List<RelationDTO> voList = new ArrayList<>();
+        for (int i = 0; i < equipIdList.size(); i++) {
+            voList.add(new RelationDTO(null, "MechSubset", "Sy2Eq", null, sysId , equipIdList.getString(i)));
+        }
+        // 组装上下文条件
+        service.doSave(context, voList);
+        return AdmResponse.success();
+    }
+
+    /**
+     * 创建系统下的设备关系
+     *
+     * @param   param           系统和设备的关系对象
+     * @return                  创建结果信息
+     */
+    @PostMapping("/link-sy")
+    public AdmResponse createDistinctEq(@RequestParam("projectId") String projectId,
+                              @RequestBody JSONObject param) throws Exception {
+        String equipId = param.getString("equipId");
+        String sysID = param.getString("sysId");
+        if(!StrUtil.isAllNotEmpty(equipId,sysID)) {
+            return AdmResponse.failure("必填项:EquipId(设备id)、sysIdList(系统id列表)");
+        }
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        QueryCriteria queryRequest = new QueryCriteria();
+        ObjectNode node = JsonNodeFactory.instance.objectNode();
+        node.put("graphCode", "MechSubset");
+        node.put("relCode", "Sy2Eq");
+        node.put("objTo", equipId);
+        queryRequest.setCriteria(node);
+        service.doDelete(context,queryRequest);
+        // 创建关系对象
+        List<RelationDTO> voList = new ArrayList<>();
+        voList.add(new RelationDTO(null, "MechSubset", "Sy2Eq", null, sysID , equipId));
+        // 组装上下文条件
+        service.doSave(context, voList);
+        return AdmResponse.success();
+    }
+
+
+    /**
+     * 根据对象删除系统和设备的关系
+     *
+     * @param   entytyList           根据对象删除系统和设备的关系
+     * @return                  创建结果信息
+     */
+    public AdmResponse deleteBatch(@RequestParam String projectId,
+                              @RequestBody JSONArray entytyList) throws Exception {
+        if(CollUtil.isEmpty(entytyList)) {
+            return AdmResponse.success();
+        }
+        // 组装上下文条件
+        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+        for (int i = 0; i < entytyList.size(); i++) {
+            JSONObject entity = entytyList.getJSONObject(i);
+            // 组装条件
+            QueryCriteria criteria = new QueryCriteria();
+            String equipId = entity.getString("equipId");
+            String sysID = entity.getString("sysId");
+            if(!StrUtil.isAllNotEmpty(equipId,sysID)) {
+                continue;
+            }
+            ObjectNode node = JsonNodeFactory.instance.objectNode();
+            node.put("graphCode", "MechSubset");
+            node.put("relCode", "Sy2Eq");
+            node.put("objFrom", sysID);
+            node.put("objTo", equipId);
+            criteria.setCriteria(node);
+            service.doDelete(context, criteria);
+        }
+        return AdmResponse.success();
+    }
+
+}

+ 175 - 14
src/main/java/com/persagy/proxy/adm/controller/ReportDownloadController.java

@@ -4,19 +4,24 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
+import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import com.alibaba.excel.ExcelWriter;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.ResourceUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
 
+import cn.hutool.core.util.StrUtil;
 import lombok.extern.slf4j.Slf4j;
 
 /**
@@ -31,6 +36,11 @@ import lombok.extern.slf4j.Slf4j;
 @RestController
 public class ReportDownloadController {
 
+	public static final String EXPORT_SHEET_NAME = "关系维护";
+	
+	@Autowired
+	private IReportDownloadService reportDownloadService;
+	
 	/**
 	 * 下载报告-设备静态信息维护模板
 	 * 
@@ -48,16 +58,8 @@ public class ReportDownloadController {
 			String fileName = URLEncoder.encode("台账信息导入模板", encode);
 			response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
 			
-			File file = null;
-			try {
-				file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/equip_template.xlsx");
-			} catch (FileNotFoundException e) {
-			}
-			if (file == null || !file.exists()) {
-				file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "/template/equip_template.xlsx");
-			}
-			
-			excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(file).build();
+			File templateFile = this.getTemplateFile("equip_template.xlsx");
+			excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(templateFile).build();
 		} catch (Exception e) {
 			log.error("设备静态信息维护模板下载失败", e);
 		} finally {
@@ -86,20 +88,179 @@ public class ReportDownloadController {
 			try {
 				file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/upload/" + key);
 			} catch (FileNotFoundException e) {
-				file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/relation-template.xlsx");
+				file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "template/upload/" + key);
 			}
 			if (file == null || !file.exists()) {
-				file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "/template/relation-template.xlsx");
+				try {
+					file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "/template/relation-template.xlsx");
+				} catch (FileNotFoundException e) {
+					file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "/template/relation-template.xlsx");
+				}
 			}
 			
 			excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(file).build();
 		} catch (Exception e) {
-			log.error("设备静态信息维护模板下载失败", e);
+			log.error("下载报告-点表失败", e);
+		} finally {
+			if (excelWriter != null) {
+				excelWriter.finish();
+			}
+		}
+	}
+	
+	/**
+	 * 下载模板
+	 * 
+	 * @param request
+	 * @param response
+	 */
+	@RequestMapping("/graphic/template-downloads")
+	public void templateDownloads(HttpServletRequest request, HttpServletResponse response) {
+		ExcelWriter excelWriter = null;
+		try {
+			response.setContentType("application/vnd.ms-excel");
+			String encode = StandardCharsets.UTF_8.name();
+			response.setCharacterEncoding(encode);
+			response.setHeader("Content-disposition", "attachment;filename=relation-template.xlsx");
+			
+			File templateFile = this.getTemplateFile("relation-template.xlsx");
+			excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(templateFile).build();
+		} catch (Exception e) {
+			log.error("模板下载失败", e);
 		} finally {
 			if (excelWriter != null) {
 				excelWriter.finish();
 			}
 		}
 	}
+	
+	/**
+	 * 下载报告
+	 * 
+	 * @param request
+	 * @param response
+	 */
+	@RequestMapping("/graphic/report-downloads")
+	public void reportDownloads(@RequestParam String projectId, @RequestParam String relType, @RequestParam(required = false) String zoneType, 
+			HttpServletRequest request, HttpServletResponse response) {
+		ExcelWriter excelWriter = null;
+		try {
+			response.setContentType("application/vnd.ms-excel");
+			String encode = StandardCharsets.UTF_8.name();
+			response.setCharacterEncoding(encode);
+			
+			String templateFile = projectId + AdmCommonConstant.LINE_THROUGH + relType + AdmCommonConstant.EXCEL_SUFFIX_XLSX;
+			response.setHeader("Content-disposition", "attachment;filename=" + templateFile);
+			
+			File file = this.getTemplateOrDefaultFile(templateFile);
+			excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(file).build();
+		} catch (Exception e) {
+			log.error("下载报告失败", e);
+		} finally {
+			if (excelWriter != null) {
+				excelWriter.finish();
+			}
+		}
+	}
+	
+	/**
+	 * 导出-点位模板
+	 * 
+	 * @param request
+	 * @param response
+	 */
+	@RequestMapping("/graphic/export/point")
+	public void exportPoint(@RequestParam String buildingId, @RequestParam String floorId, @RequestParam String category, 
+			HttpServletRequest request, HttpServletResponse response) {
+		ExcelWriter excelWriter = null;
+		try {
+			response.setContentType("application/vnd.ms-excel");
+			String encode = StandardCharsets.UTF_8.name();
+			response.setCharacterEncoding(encode);
+			
+			//excelWriter = EasyExcel.write(response.getOutputStream()).withTemplate(file).build();
+		} catch (Exception e) {
+			log.error("导出-点位模板失败", e);
+		} finally {
+			if (excelWriter != null) {
+				excelWriter.finish();
+			}
+		}
+	}
+	
+	/**
+	 * 导出关系
+	 * 
+	 * @param request
+	 * @param response
+	 */
+	@RequestMapping("/graphic/export")
+	public void export(@RequestParam String projectId, @RequestParam String relType, @RequestParam(required = false) String code, 
+			@RequestParam(required = false) String zoneType, HttpServletRequest request, HttpServletResponse response) {
+		ExcelWriter excelWriter = null;
+		try {
+			String groupCode = request.getHeader(AdmCommonConstant.GROUP_CODE_HEADER);
+			code = StrUtil.isBlank(code) ? "对象ID" : code;
+			
+			response.setContentType("application/vnd.ms-excel");
+			String encode = StandardCharsets.UTF_8.name();
+			response.setCharacterEncoding(encode);
+			response.setHeader("Content-disposition", "attachment;filename=relation-template.xlsx");
+			
+			List<AdmRelationObject> relationObjects = this.reportDownloadService.reportRelationObject(groupCode, projectId, relType, code, zoneType);
+			
+			File templateFile = this.getTemplateFile("relation-template.xlsx");
+			EasyExcel.write(response.getOutputStream()).withTemplate(templateFile).sheet(EXPORT_SHEET_NAME).needHead(false).doWrite(relationObjects);
+		} catch (Exception e) {
+			log.error("导出关系失败", e);
+		} finally {
+			if (excelWriter != null) {
+				excelWriter.finish();
+			}
+		}
+	}
+	
+	/**
+	 * 获取对应的文件,或者默认文件
+	 * 不同路径,防止镜像部署时获取不到
+	 * 
+	 * @param templateName 带后缀的文件名
+	 * @return
+	 * @throws FileNotFoundException 
+	 */
+	private File getTemplateOrDefaultFile(String templateName) throws FileNotFoundException {
+		File file = null;
+		try {
+			file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/" + templateName);
+		} catch (FileNotFoundException e) {
+			file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "template/" + templateName);
+		}
+		if (file == null || !file.exists()) {
+			try {
+				file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/relation-template.xlsx");
+			} catch (FileNotFoundException e) {
+				file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "/template/relation-template.xlsx");
+			}
+		}
+		return file;
+	}
+	
+	/**
+	 * 获取对应的模板文件,不同路径,防止镜像内获取不到
+	 * 
+	 * @param templateName 带后缀的文件名
+	 * @return
+	 * @throws FileNotFoundException 
+	 */
+	private File getTemplateFile(String templateName) throws FileNotFoundException {
+		File file = null;
+		try {
+			file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "template/" + templateName);
+		} catch (FileNotFoundException e) {}
+		if (file == null || !file.exists()) {
+			file = ResourceUtils.getFile(AdmCommonConstant.SERVER_ROOT_PATH + "/template/" + templateName);
+		}
+		return file;
+	}
 
 }

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

@@ -1,5 +1,6 @@
 package com.persagy.proxy.adm.model;
 
+import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 
 import java.util.Date;
@@ -94,26 +95,32 @@ public class AdmComponent {
         private Map<String, Object> infos;
         /** 统计信息 */
         private Map<String, Object> statistics;
-        /** 资产信息实体类 */
+
+        /** 资产信息实体类   资产对应部件设施关系 资产→部件设施*/
+        @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)
         private AdmProperty property;
         /** 建筑信息实体类 */
+        @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Bd")
         private AdmBuilding building;
         /** 楼层信息实体类 */
+        @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Fl")
         private AdmFloor floor;
         /** 项目信息实体类 */
+        @CascadeColumn(graphCode = "MechSubset", relCode = "Pj2Eq", selectToObj = false)
         private AdmProject project;
-
         /**BIM模型中坐标json,坐标x,y,z */
         private AdmBIMLocation locationJson;
         /** 级联-部件服务所在的空 */
+        @CascadeColumn(graphCode = "MechForArch", relCode = "Eq2Sp")
         private List<AdmSpace> zoneSpaceForBase;
         /** 级联-部件服务所在的空 */
+        @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sp")
         private List<AdmSpace> zoneSpaceInBase;
         /** 级联-部件所在的竖井 */
+        @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sh")
         private List<AdmShaft> shaftList;
         /** 资产列表 */
+        @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)
         private List<AdmProperty> propertyList;
-        /** 级联-部件 */
-        private List<AdmEquipment> component;
         
 }

+ 16 - 0
src/main/java/com/persagy/proxy/adm/model/AdmDict.java

@@ -0,0 +1,16 @@
+package com.persagy.proxy.adm.model;
+
+import lombok.Data;
+
+/**
+ * @ClassName AdmLocationPoint
+ * @Description: ADM字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 18:34
+ * @Version V1.0
+ **/
+@Data
+public class AdmDict {
+
+  private String type;
+}

+ 25 - 0
src/main/java/com/persagy/proxy/adm/model/AdmDictBatch.java

@@ -0,0 +1,25 @@
+package com.persagy.proxy.adm.model;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @ClassName AdmDictBatch
+ * @Description: 批量处理字典信息操作:方案设定
+ * @Author linhuili
+ * @Date 2021/8/31 18:34
+ * @Version V1.0
+ **/
+@Data
+public class AdmDictBatch {
+
+    /** 方案 id */
+    private String schemeId;
+
+    /** 优先级列表 */
+    private String priorityList;
+
+    /** 一级标签名称列表 */
+    private List<String> firstNameList;
+}

+ 18 - 0
src/main/java/com/persagy/proxy/adm/model/AdmDictQueryCriteria.java

@@ -0,0 +1,18 @@
+package com.persagy.proxy.adm.model;
+
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import lombok.Data;
+
+/**
+ * @ClassName AdmEquipFamilyCategory
+ * @Description: 字典查询通用条件
+ * @Author linhuili
+ * @Date 2021/9/1 18:05
+ * @Version V1.0
+ **/
+@Data
+public class AdmDictQueryCriteria extends AdmQueryCriteria {
+
+    /** 查询类型 */
+    private String type;
+}

+ 19 - 0
src/main/java/com/persagy/proxy/adm/model/AdmEquipFamilyCategory.java

@@ -0,0 +1,19 @@
+package com.persagy.proxy.adm.model;
+
+import lombok.Data;
+
+/**
+ * @ClassName AdmEquipFamilyCategory
+ * @Description: ADM设备族
+ * @Author linhuili
+ * @Date 2021/9/1 14:05
+ * @Version V1.0
+ **/
+@Data
+public class AdmEquipFamilyCategory {
+  /** 族编码 */
+  private String family;
+
+  /** 族名称 */
+  private String familyName;
+}

+ 6 - 0
src/main/java/com/persagy/proxy/adm/model/AdmFloor.java

@@ -81,4 +81,10 @@ public class AdmFloor {
     private String objectType = "floor";
     /** 楼层类型code */
     private String classCode = "floor";
+
+
+    /** 空间列表 非中台信息*/
+    @CascadeColumn(graphCode = "ArchSubset", relCode = "Fl2Sp")
+    private List<AdmSpace> spaceList;
+
 }

+ 25 - 74
src/main/java/com/persagy/proxy/adm/model/AdmISpace.java

@@ -1,5 +1,6 @@
 package com.persagy.proxy.adm.model;
 
+import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 
 import java.util.ArrayList;
@@ -30,21 +31,16 @@ public class AdmISpace {
     private String buildingId;
     /** 楼层ID */
     private String floorId;
-    /** 平台二维码 */
-    private String defaultQRCode;
+    /** 二维码图片 */
+    private String qrCode;
     /** BIM模型中编码 */
     private String bimId;
-
-    /** 楼层选定区域轮廓线 */
-    private ArrayList<ArrayList<ArrayList<AdmPointPosition>>> outline;
-    /** 轮廓线2 */
-    private ArrayList<ArrayList<ArrayList<AdmPointPosition>>> outline2;
-    /** 图片 */
-    private ArrayList<AdmTaskPic> pic;
-    /** 空间是否受影响 */
-    private String state;
-    /** 空间常驻人数 */
-    private Integer permanentPeopleNum;
+    /** BIM模型中坐标 */
+    private String bimLocation;
+    /** 模型文件id */
+    private String modelId;
+    /** 空间功能区类型 */
+    private String funcType;
 
     /** 井深 */
     private Float depth;
@@ -56,75 +52,30 @@ public class AdmISpace {
     private Float netArea;
     /** 高 */
     private Float height;
-    /** 备注文字 */
-    private String intro;
-    /** 设计供冷功率 */
-    private Float ratedCoolingp;
-    /** 设计供热功率 */
-    private Float ratedHeatingp;
-    /** 空调形式 */
-    private String acType;
-    /** 空间朝向 */
-    private String zoneOrientation;
-    /** 空间功能区类型 */
-    private String roomFuncType;
 
-    /** 空间序号 */
-    private Float roomSerial;
-    /** 项目空间功能区类型 */
-    private String projRoomFuncType;
-    /** 设计照明功率 */
-    private Float ratedLightp;
-    /** 内外区分类 */
-    private String zoneType;
-    /** 租赁业态类型 */
-    private Integer tenantType;
-    /** 所属租户 */
-    private String tenant;
+    /** 图片 */
+    private ArrayList<AdmTaskPic> pic;
+    /** 空间是否受影响 */
+    private String state;
+    /** 空间常驻人数 */
+    private Integer permanentPeopleNum;
+
     /** 配电容量 */
     private Float elecCap;
     /** 污染等级 */
     private String pollutionDegree;
 
-    /** 对象类型code */
-    private String classCode = "ispace";
-
-    /** 二维码图片 */
-    private String qrcodePic;
-    /** 创建时间 */
-    private Date createTime;
-    /** 最后更新日期 */
-    private Date lastUpdate;
-
+    /** 备注文字 */
+    private String intro;
     /** 信息点 */
     private Map<String, Object> infos;
-    /** 统计信息 */
-    private Map<String, Object> statistics;
+    /** 对象类型 */
+    private String objectType = "ispace";
 
-    /** 级联-设备 */
-    private List<AdmEquipment> equipment;
-    /** 级联-元空间 */
-    //@SCascade(table="relationship.r_sp2si", idColumn="sp_id", childIdColumn="si_id")
-    //private List<AdmSpace> zoneIspace;
-    /** 级联-系统 */
-    private List<AdmSystem> generalSystem;
-    /** 级联-服务于空间的设备 */
-    private List<AdmEquipment> equipmentFor;
-    /** 建筑信息实体类 */
-    private AdmBuilding building;
-    /** 楼层信息实体类 */
-    private AdmFloor floor;
-    /** 级联-建筑 */
-    private List<AdmBuilding> buildingList;
-    /** 级联-楼层 */
-    private List<AdmFloor> floorList;
-    /** 资产列表 */
-    private List<AdmProperty> propertyList;
-    /** 级联-部件 */
-    private List<AdmEquipment> component;
+    /** 轮廓线 */
+    private ArrayList<ArrayList<AdmPointPosition>> outline;
+
+    /** 对象类型code */
+    private String classCode = "ispace";
 
-    /** 空间轮廓线 */
-    //private T spaceOutline;
-    /** 对象类型 */
-    private String objectType = "space";
 }

+ 32 - 0
src/main/java/com/persagy/proxy/adm/model/AdmModelRel.java

@@ -0,0 +1,32 @@
+package com.persagy.proxy.adm.model;
+
+import lombok.Data;
+
+/**
+ * @ClassName AdmLocationPoint
+ * @Description: ADM点位坐标实体类
+ * @Author linhuili
+ * @Date 2021/8/31 14:34
+ * @Version V1.0
+ **/
+@Data
+public class AdmModelRel {
+
+    /** 旧的BIMID */
+    private String oldBimId;
+
+    /** BIMID */
+    private String bimId;
+
+    /** 楼层id */
+    private String floorId;
+
+    /** 楼层平面图地址 */
+    private String floorMap;
+
+    /** 模型id */
+    private String modelId;
+
+    /** 自定义属性 */
+    private String attributeMap;
+}

+ 126 - 0
src/main/java/com/persagy/proxy/adm/model/AdmObjectInfo.java

@@ -0,0 +1,126 @@
+package com.persagy.proxy.adm.model;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class AdmObjectInfo {
+
+    /** 全局id */
+    private String id;
+
+    /** 类型编码 */
+    private String classCode;
+
+    /** 动静分类:静态STATIC,脉冲PULSE,阶段GRADATION,时序SEQUENTIAL */
+    private String category;
+
+    /** 信息点编码 */
+    private String code;
+
+    /** 信息点名称 */
+    private String name;
+
+    /** 分类:commo平台级, group集团级, project项目级 */
+    private String type="project";
+
+    /** 集团id, 默认为"0" */
+    private String groupCode;
+
+    /** 项目id, 默认为"0" */
+    private String projectId;
+
+    /** 数据类型 */
+    private String dataType;
+
+    /** 数据格式 */
+    private String formater;
+
+    /** 数据格式 */
+    private ArrayList<JsonNode> dataSource;
+
+    /** 输入方式 */
+    private String inputMode;
+
+    /** 一级标签 */
+    private String firstTag;
+
+    /** 一级名称 */
+    private String firstName;
+
+    /** 二级标签 */
+    private String secondTag;
+
+    /** 二级名称 */
+    private String secondName;
+
+    /** 序列 */
+    private String idx;
+
+    /** 优先级,重要程度 */
+    private String priority;
+
+    /** 单位 */
+    private String unit;
+
+    /** 备注 */
+    private String note;
+
+    /** 输入类型 */
+    private String origDataType;
+
+    /** 旧信息点编码 */
+    private String origCode;
+
+    /** 别编码 */
+    private String aliasCode;
+
+    /** 别名称 */
+    private String aliasName;
+
+    /** 是否分类标签 */
+    private String canSub;
+
+    /** 是否复数 */
+    private Boolean isMultiple;
+
+    /** 是否复数-字段兼容 */
+    private Boolean multiple;
+
+    /** 是否区间 */
+    private Boolean isRegion;
+
+    /** 是否区间-字段兼容 */
+    private Boolean region;
+
+    /** 子分类标记 */
+    private Boolean subFlag;
+
+    /** 是否只读, 如果是则不允许对该信息点做变更 */
+    private Boolean readonly;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** 是否显示 */
+   private Boolean visible;
+
+    /** 是否编辑 */
+    private Boolean editable;
+
+    /** 禁止操作 */
+    private Boolean unDisabled;
+
+    /** 关键信息点 */
+    private Boolean keyWord;
+
+    /**路径 :
+     * 若firstName == "基本信息"|| firstName.isNullOrEmpty()||firstName == "基本参数 path为code编码,否则,path为infos.$code */
+    private String path;
+
+    /** 字典内容 */
+    private List<AdmObjectInfo> content;
+}

+ 59 - 0
src/main/java/com/persagy/proxy/adm/model/AdmObjectType.java

@@ -0,0 +1,59 @@
+package com.persagy.proxy.adm.model;
+
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName AdmObjectType
+ * @Description: ADM对象类型查询
+ * @Author linhuili
+ * @Date 2021/8/31 20:34
+ * @Version V1.0
+ **/
+@Data
+public class AdmObjectType {
+
+    /** 全局id */
+    private String id;
+
+    /** 编码 */
+    private String code;
+
+    /** 名称 */
+    private String name;
+
+    /** 别编码 */
+    private String aliasCode;
+
+    /** 别编名 */
+    private String aliasName;
+
+    /** 分类:common平台级, group集团级, project项目级 */
+    private String type;
+
+    /** 集团id, 默认为 '0' */
+    private String groupCode;
+
+    /** 项目id, 默认为 '0' */
+    private String projectId;
+
+    /** 上级类型编码 */
+    private String parentCode;
+
+    /** 专业编码 */
+    private String majorCode;
+
+    /** 系统编码 */
+    private String systemCode;
+
+    /** 部件所属的设备类型 */
+    private String equipmentCode;
+
+    /** 对象类型 */
+    private String objType;
+
+    /** 子列表 */
+    private List<AdmObjectType> children;
+}

+ 84 - 0
src/main/java/com/persagy/proxy/adm/model/AdmRelationObject.java

@@ -0,0 +1,84 @@
+package com.persagy.proxy.adm.model;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * graphic/export 导出所使用的实体类对象
+ * 
+ * @version 1.0.0
+ * @company persagy
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午11:23:39
+ */
+@Getter
+@Setter
+public class AdmRelationObject {
+	// 主对象
+	// *识别编码 -- 对象ID
+	@ExcelProperty(value = "*识别编码", index = 0)
+	private String masterCode;
+	// 设计图纸中编码
+	@ExcelProperty(value = "设计图纸中编码", index = 1)
+	private String masterCadId;
+	// 对象名称
+	@ExcelProperty(value = "对象名称", index = 2)
+	private String masterName;
+	// 对象id
+	@ExcelProperty(value = "对象id", index = 3)
+	private String masterId;
+	// 对象本地编码
+	@ExcelProperty(value = "对象本地编码", index = 4)
+	private String masterLocalId;
+	// 对象本地名称
+	@ExcelProperty(value = "对象本地名称", index = 5)
+	private String masterLocalName;
+	// 对象-类型
+	@ExcelProperty(value = "对象-类型", index = 6)
+	private String masterType;
+	// 所属建筑楼层 中划线隔开
+	@ExcelProperty(value = "所属建筑楼层", index = 7)
+	private String masterBelong;
+
+	// 从对象
+	// *识别编码 -- 对象ID
+	@ExcelProperty(value = "*识别编码", index = 8)
+	private String slaveCode;
+	// 设计图纸中编码
+	@ExcelProperty(value = "设计图纸中编码", index = 9)
+	private String slaveCadId;
+	// 对象名称
+	@ExcelProperty(value = "对象名称", index = 10)
+	private String slaveName;
+	// 对象id
+	@ExcelProperty(value = "对象id", index = 11)
+	private String slaveId;
+	// 对象本地编码
+	@ExcelProperty(value = "对象本地编码", index = 12)
+	private String slaveLocalId;
+	// 对象本地名称
+	@ExcelProperty(value = "对象本地名称", index = 13)
+	private String slaveLocalName;
+	// 对象-类型
+	@ExcelProperty(value = "对象-类型", index = 14)
+	private String slaveType;
+	// 所属建筑楼层 中划线隔开
+	@ExcelProperty(value = "所属建筑楼层", index = 15)
+	private String slaveBelong;
+	
+	@ExcelIgnore
+	private String masterBuildingName;	// 建筑本地名称
+
+	@ExcelIgnore
+	private String masterFloorName;		// 楼层本地名称
+	
+	@ExcelIgnore
+	private String slaveBuildingName;	// 建筑本地名称
+
+	@ExcelIgnore
+	private String slaveFloorName;		// 楼层本地名称
+	
+}

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

@@ -38,7 +38,7 @@ public class AdmSpace {
 
     /** 楼层选定区域轮廓线 */
     private ArrayList<ArrayList<ArrayList<AdmPointPosition>>> outline;
-    /** 轮廓线2 */
+    /** 轮廓线2 未使用*/
     private ArrayList<ArrayList<ArrayList<AdmPointPosition>>> outline2;
     /** 图片 */
     private ArrayList<AdmTaskPic> pic;
@@ -129,11 +129,7 @@ public class AdmSpace {
     /** 资产列表 */
     @CascadeColumn
     private List<AdmProperty> propertyList;
-    /** 级联-部件 */
-    @CascadeColumn
-    private List<AdmEquipment> component;
-
-    /** 空间轮廓线 */
+    /** 空间轮廓线 未使用 */
     //private T spaceOutline;
     /** 对象类型 */
     private String objectType = "space";

+ 9 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmBuildingService.java

@@ -1,6 +1,9 @@
 package com.persagy.proxy.adm.service;
 
 import com.persagy.proxy.adm.model.AdmBuilding;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
 
 /**
  * ADM 建筑 接口类
@@ -8,4 +11,10 @@ import com.persagy.proxy.adm.model.AdmBuilding;
  * @date 2021-08-16
  */
 public interface IAdmBuildingService extends IAdmBaseService<AdmBuilding> {
+    /**
+     * 查询业务空间的建筑楼层数量
+     *
+     * @return
+     */
+    AdmResponse doQueryBuildingFloor(InstanceUrlParam context, AdmQueryCriteria request);
 }

+ 65 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmDictBaseService.java

@@ -0,0 +1,65 @@
+package com.persagy.proxy.adm.service;
+
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.adm.model.AdmDict;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+
+import java.util.List;
+
+/**
+ * @ClassName IAdmDictService
+ * @Description: 字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 14:30
+ * @Version V1.0
+ **/
+public interface IAdmDictBaseService<T>{
+
+    /**
+     * 查询DMP字典数据
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    AdmResponse doQueryDictData(InstanceUrlParam context, QueryCriteria dmpRequest, Class<T> clazz);
+
+    /**
+     * 查询DMP对象类型
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    AdmResponse doQueryObjectType(InstanceUrlParam context, QueryCriteria dmpRequest, Class<T> clazz);
+
+
+    /**
+     * 查询DMP对象信息点
+     * @param context
+     * @param request
+     * @param clazz
+     * @return
+     */
+    AdmResponse doQueryObjectInfo(InstanceUrlParam context, AdmQueryCriteria request,String fieldName, Class<T> clazz);
+
+
+    /**
+     * 修改信息点
+     * @param context
+     * @param clazz
+     * @param voList
+     * @return
+     */
+    List<T> doUpdateObjectInfo(InstanceUrlParam context, Class<T> clazz, List<T> voList);
+    /**
+     * 删除信息点
+     * @param context
+     * @param voList
+     */
+    void doDeleteObjectInfo(InstanceUrlParam context, List<T> voList);
+
+
+}

+ 49 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmDictService.java

@@ -0,0 +1,49 @@
+package com.persagy.proxy.adm.service;
+
+import com.persagy.proxy.adm.model.AdmDict;
+import com.persagy.proxy.adm.model.AdmDictQueryCriteria;
+import com.persagy.proxy.adm.model.AdmLocationPoint;
+import com.persagy.proxy.adm.model.AdmObjectInfo;
+import com.persagy.proxy.adm.request.AdmCreateRequest;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+
+/**
+ * @ClassName IAdmDictService
+ * @Description: 字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 14:30
+ * @Version V1.0
+ **/
+public interface IAdmDictService<T> {
+
+    /**
+     * 查询字典分类
+     * @param context
+     * @param request
+     * @param clazz
+     * @return
+     * @throws Exception
+     */
+    AdmResponse queryCategory(InstanceUrlParam context , AdmDict request, Class<T> clazz) throws Exception;
+
+
+    /**
+     * 重置项目下的定制信息点
+     * @param context
+     * @param clazz
+     * @return
+     * @throws Exception
+     */
+    AdmResponse resetDic(InstanceUrlParam context , AdmDictQueryCriteria request ,String fieldName, Class<T> clazz) throws Exception;
+
+    /**
+     * 设置-项目定制化字典
+     * @param context
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    AdmResponse settingDicProject(InstanceUrlParam context , AdmCreateRequest<AdmObjectInfo> request, Class<T> clazz) throws Exception;
+
+}

+ 13 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmModelRelService.java

@@ -0,0 +1,13 @@
+package com.persagy.proxy.adm.service;
+
+import com.persagy.proxy.adm.model.AdmLocationPoint;
+
+/**
+ * @ClassName IAdmModelRelService
+ * @Description: 模型修改设备元空间的建筑楼层信息
+ * @Author linhuili
+ * @Date 2021/8/31 14:30
+ * @Version V1.0
+ **/
+public interface IAdmModelRelService extends IAdmBaseService<AdmLocationPoint>{
+}

+ 5 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmSpaceService.java

@@ -1,6 +1,11 @@
 package com.persagy.proxy.adm.service;
 
+import com.persagy.proxy.adm.model.AdmBuilding;
 import com.persagy.proxy.adm.model.AdmSpace;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import org.apache.poi.ss.formula.functions.T;
 
 /**
  * ADM 空间 接口

+ 66 - 0
src/main/java/com/persagy/proxy/adm/service/IReportDownloadService.java

@@ -0,0 +1,66 @@
+package com.persagy.proxy.adm.service;
+
+import java.util.List;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+
+/**
+ * 报表/模板下载
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年8月31日 下午4:42:51
+ */
+public interface IReportDownloadService {
+
+	/**
+	 * 获取指定对象信息
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 * @param id
+	 * @return 不会返回null
+	 */
+	ObjectNode getObjectNode(String groupCode, String projectId, String id);
+	
+	/**
+	 * 获取对象,通过关系对象的id和rel_code
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 * @param graphCode
+	 * @param relCode
+	 * @param objFrom 与objTo不可同时存在
+	 * @param objTo	  与objFrom不可同时存在
+	 * @return 不会返回null
+	 */
+	ObjectNode getObjectByCodeAndId(String groupCode, String projectId, String graphCode, String relCode, String objFrom, String objTo);
+	
+	/**
+	 * 获取对象关系数据
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 * @param graphCode
+	 * @param relCode
+	 * @return
+	 */
+	List<ObjectRelation> findObjectRelationList(String groupCode, String projectId, String graphCode, String relCode);
+	
+	/**
+	 * 查询出所有的关系信息
+	 * <p>因原代码中,不存在zoneType类型不为空时对应的方法,所以此处不再进行此数据的判断</p>
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 * @param relType
+	 * @param code
+	 * @param zoneType
+	 * @return 可以被直接导出的数据集
+	 */
+	List<AdmRelationObject> reportRelationObject(String groupCode, String projectId, String relType, String code, String zoneType);
+	
+}

+ 254 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmDictBaseServiceImpl.java

@@ -0,0 +1,254 @@
+package com.persagy.proxy.adm.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.basic.utils.JsonNodeUtils;
+import com.persagy.dmp.common.utils.JsonHelper;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmDictConstant;
+import com.persagy.proxy.adm.constant.enums.ValidEnum;
+import com.persagy.proxy.adm.model.AdmObjectInfo;
+import com.persagy.proxy.adm.model.AdmObjectType;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmDictBaseService;
+import com.persagy.proxy.adm.utils.AdmEntityTransferUtil;
+import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
+import com.persagy.proxy.common.client.DmpDicClient;
+import com.persagy.proxy.common.client.DmpRwdClient;
+import com.persagy.proxy.common.entity.DmpResult;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName AbstractAdmDictBaseServiceImpl
+ * @Description: 字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 18:21
+ * @Version V1.0
+ **/
+@Slf4j
+public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T> {
+
+    @Autowired
+    private DmpRwdClient rwdClient;
+
+    @Autowired
+    private DmpDicClient dicClient;
+
+    /**
+     * 查询DMP字典数据
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    @Override
+    public AdmResponse doQueryDictData(InstanceUrlParam context,QueryCriteria dmpRequest, Class<T> clazz) {
+        // 转换参数
+        JSONObject para = null;
+        try {
+            para = JsonHelper.toJSONObject(dmpRequest);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+            return null;
+        }
+        // 调用中台查询
+        DmpResult<JSONArray> dmpResult = dicClient.queryDictData(context, para);
+        List<AdmObjectType> admVOs = dictDataVOTransfer(dmpResult.getData());
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(admVOs);
+        Long total = dmpResult.getCount() == null ? null : dmpResult.getCount().longValue();
+        response.setTotal(total);
+        return response;
+    }
+
+
+    /**
+     * 查询DMP对象类型
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    @Override
+    public AdmResponse doQueryObjectType(InstanceUrlParam context,QueryCriteria dmpRequest, Class<T> clazz) {
+        // 转换参数
+        JSONObject para = null;
+        try {
+            para = JsonHelper.toJSONObject(dmpRequest);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+            return null;
+        }
+        // 调用中台查询
+        DmpResult<JSONArray> dmpResult = rwdClient.queryObjectType(context, para);
+        JSONArray data = dmpResult.getData();
+        List<T> admVOs = data.toJavaList(clazz);
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(admVOs);
+        Long total = dmpResult.getCount() == null ? null : dmpResult.getCount().longValue();
+        response.setTotal(total);
+        return response;
+    }
+
+    /**
+     * 查询对象信息点
+     * @param request
+     * @return
+     */
+    @Override
+    public AdmResponse doQueryObjectInfo(InstanceUrlParam context, AdmQueryCriteria request,String fieldName, Class<T> clazz) {
+        // 转换为数据中台查询条件
+        QueryCriteria dmpRequest = toDmpCriteria(request,fieldName);
+        // 转换参数
+        JSONObject para = null;
+        try {
+            para = JsonHelper.toJSONObject(dmpRequest);
+        } catch (IOException e) {
+            log.error(e.getMessage(), e);
+            return null;
+        }
+        // 调用中台查询
+        DmpResult<JSONArray> dmpResult = rwdClient.queryObjectInfo(context, para);
+        List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), request.getProjection(), clazz);
+        // BDTP信息点格式与ADM兼容处理
+        handleObjectInfoResult((List<AdmObjectInfo>) admVOs);
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(admVOs);
+        Long total = dmpResult.getCount() == null ? null : dmpResult.getCount().longValue();
+        response.setTotal(total);
+        response.setPageNumber(request.getPageNumber());
+        response.setPageSize(request.getPageSize());
+        return response;
+    }
+
+    /**
+     * 修改
+     * @param context
+     * @param clazz
+     * @param voList
+     * @return
+     */
+    @Override
+    public List<T> doUpdateObjectInfo(InstanceUrlParam context, Class<T> clazz, List<T> voList) {
+        if(CollUtil.isEmpty(voList)) {
+            return null;
+        }
+        ArrayNode vos = JsonNodeUtils.toArrayNode(voList, null, null);
+        // 调用中台修改
+        DmpResult<cn.hutool.json.JSONArray> response = rwdClient.batchUpdateObjectInfo(context, JSONArray.parseArray(vos.toString()));
+        if(!DmpResult.SUCCESS.equals(response.getResult())) {
+            throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
+        }
+        // 转换为结果
+        return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
+    }
+
+    /**
+     * 删除信息点
+     * @param context
+     * @param voList
+     * @return
+     */
+    @Override
+    public void doDeleteObjectInfo(InstanceUrlParam context, List<T> voList) {
+        if(CollUtil.isEmpty(voList)) {
+            return;
+        }
+        List<String> idList = CollUtil.getFieldValues(voList, "id", String.class);
+        // 调用中台修改
+        DmpResult response = rwdClient.batchDeleteObjectInfo(context, idList);
+        if(!DmpResult.SUCCESS.equals(response.getResult())) {
+            throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
+        }
+    }
+
+    /**
+     * 信息点格式与ADM兼容处理
+     * @param admVOs
+     */
+    private void handleObjectInfoResult(List<AdmObjectInfo> admVOs){
+        for (AdmObjectInfo admVO : admVOs) {
+            admVO.setFirstName(admVO.getFirstTag());
+            admVO.setSecondName(admVO.getSecondTag());
+            admVO.setMultiple(admVO.getIsMultiple());
+            admVO.setRegion(admVO.getIsRegion());
+
+            //path路径处理
+            if(StringUtils.isEmpty(admVO.getFirstName()) || AdmDictConstant.FIRST_BASE_TAG.equals(admVO.getFirstName())
+                    || AdmDictConstant.HIS_FIRST_BASE_TAG.equals(admVO.getFirstName())){
+                admVO.setPath(admVO.getCode());
+            }else{
+                admVO.setPath(AdmDictConstant.INFOS_EX+admVO.getCode());
+            }
+        }
+    }
+
+    /**
+     * 字典数据格式与ADM兼容
+     * @param array
+     */
+    private List<AdmObjectType> dictDataVOTransfer(JSONArray array){
+        List<AdmObjectType> result = new ArrayList<>();
+        if(CollUtil.isEmpty(array)){
+            return result;
+        }
+        ArrayNode dataNode = JsonNodeUtils.toArrayNode(array, null, null);
+        for (JsonNode dicData : dataNode) {
+            AdmObjectType objectType = new AdmObjectType();
+            objectType.setCode(dicData.get("code").textValue());
+            objectType.setName(dicData.get("label").textValue());
+            objectType.setAliasCode(dicData.get("code").textValue());
+            objectType.setAliasName(dicData.get("label").textValue());
+            objectType.setObjType(dicData.get("type").textValue());
+            result.add(objectType);
+        }
+        return result;
+    }
+
+    /**
+     * 将ADM的查询条件转换为DMP的
+     * 调用前注意:
+     * - 调用前将name赋值,才会将条件中adm的属性替换为dmp的属性
+     * - 统计查询时将isOnlyCount设置为true
+     * 调用后注意(需要调用者自行处理的):
+     * - 不处理级联,级联应在调用者里处理级联调用转换后查询赋值
+     * - 不处理projection,查询后自行根据projection筛选返回属性。(dmp只能指定扩展属性,而adm的是针对所有属性的)
+     * @param admCriteria
+     * @return
+     */
+    public static QueryCriteria toDmpCriteria(AdmQueryCriteria admCriteria,String fieldName) {
+        QueryCriteria dmpCriteria = new QueryCriteria();
+        // 拷贝分页
+        AdmQueryCriteriaHelper.copyPageInfo(admCriteria, dmpCriteria);
+        // 处理filters
+        dmpCriteria.setCriteria(AdmQueryCriteriaHelper.toCriteria(admCriteria.getName(), admCriteria.getFilters()));
+        if(StrUtil.isNotEmpty(admCriteria.getName())){
+            // 处理name
+            dmpCriteria.getCriteria().put(fieldName, admCriteria.getName());
+        }
+        dmpCriteria.getCriteria().put(AdmCommonConstant.VALID,ValidEnum.TRUE.getValue());
+        // 处理排序
+        dmpCriteria.setOrders(AdmQueryCriteriaHelper.toOrderItem(admCriteria.getOrders()));
+        // 处理统计
+        dmpCriteria.setOnlyCount(admCriteria.isOnlyCount());
+        return dmpCriteria;
+    }
+
+}

+ 7 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AdmBuildingServiceImpl.java

@@ -1,7 +1,10 @@
 package com.persagy.proxy.adm.service.impl;
 
 import com.persagy.proxy.adm.model.AdmBuilding;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmBuildingService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.stereotype.Service;
 
 /**
@@ -12,4 +15,8 @@ import org.springframework.stereotype.Service;
 @Service
 public class AdmBuildingServiceImpl extends AbstractAdmBaseServiceImpl<AdmBuilding> implements IAdmBuildingService {
 
+    @Override
+    public AdmResponse doQueryBuildingFloor(InstanceUrlParam context, AdmQueryCriteria request) {
+        return doQuery(context, request, AdmBuilding.class);
+    }
 }

+ 302 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java

@@ -0,0 +1,302 @@
+package com.persagy.proxy.adm.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.adm.constant.enums.AdmDictCategoryEnum;
+import com.persagy.proxy.adm.model.*;
+import com.persagy.proxy.adm.request.AdmCreateRequest;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmDictService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @ClassName AdmDictServiceImpl
+ * @Description: 字典查询
+ * @Author linhuili
+ * @Date 2021/8/31 18:21
+ * @Version V1.0
+ **/
+@Service
+@Slf4j
+public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> implements IAdmDictService<T> {
+
+    /**
+     * 字典类型查询:所有设备类型、部件类型、系统类型、专业类型
+     * 查询类型:输入设备类型:equipment,输入部件类型:component,输入系统类型:system,输入专业类型:major,业务空间类型 space ,资产 property,
+     *         专业和系统:majorSystem(树),设备和部件equipmentAndComponent,设备类型要以及对应的部件equipmentComponent(树),
+     *         专业下的设备类型 majorEquipment (树),专业下的系统,系统下的设备majorSystemEquip (树),systemEquip 系统下的设备类(树)
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public AdmResponse queryCategory(InstanceUrlParam context , AdmDict request, Class<T> clazz) throws Exception {
+        String type = request.getType();
+        QueryCriteria criteria = new QueryCriteria();
+        ObjectNode node = JsonNodeFactory.instance.objectNode();
+        if(AdmDictCategoryEnum.MAJOR.getValue().equals(type)){
+            //查询专业分类
+            node.put("type",AdmDictCategoryEnum.MAJOR.getValue());
+            criteria.setCriteria(node);
+            return doQueryDictData(context, criteria, clazz);
+        }
+
+        List<String> baseCategory = getDictBaseCategory();
+        if(baseCategory.contains(type)){
+            //查询设备类型:equipment,部件类型:component,输入系统类型:system,输入专业类型:major,业务空间类型 space ,资产 property
+            node.put("objType",type);
+            criteria.setCriteria(node);
+            return doQueryObjectType(context, criteria, clazz);
+        }
+
+        if(AdmDictCategoryEnum.EQUIPMENT_AND_COMPONENT.getValue().equals(type)){
+            //查询设备类型:equipment,部件类型:component,输入系统类型:system,输入专业类型:major,业务空间类型 space ,资产 property
+            List<String> objTypes = new ArrayList<>();
+            objTypes.add(AdmDictCategoryEnum.EQUIPMENT.getValue());
+            objTypes.add(AdmDictCategoryEnum.COMPONENT.getValue());
+            node.put("objType",objTypes.toString());
+            criteria.setCriteria(node);
+            return doQueryObjectType(context, criteria, clazz);
+        }
+        List<String> dictTreeCategory = getDictTreeCategory();
+        if(dictTreeCategory.contains(type)){
+            //查询树形结构:专业和系统:majorSystem(树),设备类型要以及对应的部件equipmentComponent(树),专业下的设备类型 majorEquipment(树),
+            //专业下的系统,系统下的设备majorSystemEquip (树),systemEquip 系统下的设备类(树)
+            return queryDictObjectTypeTree(context ,type,clazz);
+        }
+        return null;
+    }
+
+
+    /**
+     * 查询字典树
+     * @param context
+     * @param type
+     * @param clazz
+     */
+    private AdmResponse queryDictObjectTypeTree(InstanceUrlParam context ,String type, Class<T> clazz){
+        //查询所有的专业
+        List<AdmObjectType> allMajor = getAllMajor(context, clazz);
+
+        //查询所有的类型
+        AdmResponse admResponse = doQueryObjectType(context, new QueryCriteria(), clazz);
+        List<AdmObjectType> objectTypes = (List<AdmObjectType>) admResponse.getContent();
+        Map<String, List<AdmObjectType>> objectTypeMap = objectTypes.stream().filter(k-> StringUtils.isNotEmpty(k.getObjType()))
+                                                         .collect(Collectors.groupingBy(AdmObjectType::getObjType));
+        //获取专业-设备类关系
+        List<AdmObjectType> equipments = objectTypeMap.get(AdmDictCategoryEnum.EQUIPMENT.getValue());
+        Map<String,List<AdmObjectType>> majorEquipMap = equipments.stream().collect(Collectors.groupingBy(item -> item.getMajorCode()));
+
+        //获取专业-系统类关系
+        List<AdmObjectType> systems = objectTypeMap.get(AdmDictCategoryEnum.SYSTEM.getValue());
+        Map<String, List<AdmObjectType>> majorSystemMap = systems.stream().collect(Collectors.groupingBy(item -> item.getMajorCode()));
+
+        //获取系统-设备类关系
+        Map<String, List<AdmObjectType>> systemEquipMap = equipments.stream().collect(Collectors.groupingBy(item -> item.getSystemCode()));
+
+        //获取设备类-部件关系
+        List<AdmObjectType> components = objectTypeMap.get(AdmDictCategoryEnum.COMPONENT.getValue());
+        Map<String, List<AdmObjectType>> equipComponentMap = components.stream().collect(Collectors.groupingBy(item -> item.getEquipmentCode()));
+
+        List<AdmObjectType> content = new ArrayList<>();
+        if(AdmDictCategoryEnum.MAJOR_SYSTEM.getValue().equals(type)){
+            //查询专业下的系统
+            content = buildDictTree(allMajor,majorSystemMap,null);
+        }
+        if(AdmDictCategoryEnum.SYSTEM_EQUIP.getValue().equals(type)){
+            //查询系统下的设备类
+            content = buildDictTree(systems,systemEquipMap,null);
+        }
+        if(AdmDictCategoryEnum.MAJOR_SYSTEM_EQUIP.getValue().equals(type)){
+            //专业下的系统,系统下的设备
+            content = buildDictTree(allMajor,majorSystemMap,systemEquipMap);
+        }
+        if(AdmDictCategoryEnum.MAJOR_EQUIPMENT.getValue().equals(type)){
+            //查询专业下的设备类
+            content = buildDictTree(allMajor,majorEquipMap,null);
+        }
+        if(AdmDictCategoryEnum.EQUIPMENT_COMPONENT.getValue().equals(type)){
+            //查询设备类下的部件
+            content = buildDictTree(equipments,equipComponentMap,null);
+        }
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(content);
+        response.setTotal(Long.valueOf(content.size()));
+        return response;
+    }
+
+    /**
+     * 构建专业-系统-设备类树形结构
+     * @param allMajor
+     * @param majorSystemMap
+     * @param systemEquipMap
+     * @return
+     */
+    private ArrayList<AdmObjectType> buildDictTree(List<AdmObjectType> allMajor,Map<String, List<AdmObjectType>> majorSystemMap,Map<String, List<AdmObjectType>> systemEquipMap){
+        ArrayList<AdmObjectType> result = new ArrayList<>();
+        if(CollUtil.isEmpty(allMajor)){
+            return result;
+        }
+        //构建专业-系统-设备类树形结构
+        for (AdmObjectType major : allMajor) {
+             //设置专业
+            if(CollUtil.isNotEmpty(majorSystemMap)){
+                //专业下的系统
+                List<AdmObjectType> systemCodes = majorSystemMap.get(major.getCode());
+                major.setChildren(systemCodes);
+                //系统下的设备类
+                if(CollUtil.isNotEmpty(systemEquipMap) && CollUtil.isNotEmpty(systemCodes)){
+                    for (AdmObjectType systemType : systemCodes) {
+                        systemType.setChildren(systemEquipMap.get(systemType.getCode()));
+                    }
+                }
+            }
+            result.add(major);
+        }
+        return result;
+    }
+
+    /**
+     * 获取所有的专业
+     * @param context
+     * @param clazz
+     * @return
+     */
+    private List<AdmObjectType> getAllMajor(InstanceUrlParam context, Class<T> clazz){
+        //查询专业分类
+        QueryCriteria criteria = new QueryCriteria();
+        ObjectNode node = JsonNodeFactory.instance.objectNode();
+        node.put("type",AdmDictCategoryEnum.MAJOR.getValue());
+        criteria.setCriteria(node);
+        AdmResponse admResponse = doQueryDictData(context, criteria, clazz);
+        List<AdmObjectType> content = (List<AdmObjectType>) admResponse.getContent();
+        return content;
+    }
+
+    /**
+     * 基础数据类型
+     * @return
+     */
+    private List<String> getDictBaseCategory(){
+        List<String> category = new ArrayList<>();
+        category.add(AdmDictCategoryEnum.EQUIPMENT.getValue());
+        category.add(AdmDictCategoryEnum.COMPONENT.getValue());
+        category.add(AdmDictCategoryEnum.SYSTEM.getValue());
+        category.add(AdmDictCategoryEnum.SPACE.getValue());
+        category.add(AdmDictCategoryEnum.PROPRTY.getValue());
+        return category;
+    }
+
+    /**
+     * 查询字典树形结构
+     * @return
+     */
+    private List<String> getDictTreeCategory(){
+        List<String> category = new ArrayList<>();
+        category.add(AdmDictCategoryEnum.MAJOR_SYSTEM.getValue());
+        category.add(AdmDictCategoryEnum.MAJOR_EQUIPMENT.getValue());
+        category.add(AdmDictCategoryEnum.MAJOR_SYSTEM_EQUIP.getValue());
+        category.add(AdmDictCategoryEnum.EQUIPMENT_COMPONENT.getValue());
+        category.add(AdmDictCategoryEnum.SYSTEM_EQUIP.getValue());
+        return category;
+    }
+
+    /**
+     * 重置项目下的信息点
+     * @param context
+     * @param clazz
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public AdmResponse resetDic(InstanceUrlParam context, AdmDictQueryCriteria request, String fieldName, Class<T> clazz) throws Exception {
+
+        //查询项目下点所有信息点
+        AdmResponse admResponse = doQueryObjectInfo(context, request, fieldName, clazz);
+        List<AdmObjectInfo> content = (List<AdmObjectInfo>) admResponse.getContent();
+        if(CollUtil.isEmpty(content)){
+            AdmResponse response = AdmResponse.success(new ArrayList<>());
+            response.setTotal(Long.valueOf(0));
+            return response;
+        }
+        //因BDTP根据项目查询信息点时返回的包含集团+通用信息点,需手动过滤除项目级的信息点
+        String projectId = context.getProjectId();
+
+        Iterator<AdmObjectInfo> infoIterator = content.iterator();
+        while (infoIterator.hasNext()){
+            String admProjectId = infoIterator.next().getProjectId();
+            if(StringUtils.isEmpty(admProjectId) || !projectId.equals(admProjectId)){
+                infoIterator.remove();
+            }
+        }
+        //删除信息点
+        doDeleteObjectInfo(context,(List<T>)content);
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(content);
+        response.setTotal(Long.valueOf(content.size()));
+        return response;
+    }
+
+    /**
+     * 设置-项目定制化字典
+     * @param context
+     * @param request
+     * @param clazz
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public AdmResponse settingDicProject(InstanceUrlParam context, AdmCreateRequest<AdmObjectInfo> request, Class<T> clazz) throws Exception {
+        List<AdmObjectInfo> content = request.getContent();
+        //信息点转换为中台格式
+        List<AdmObjectInfo> dmpObjectInfo = new ArrayList<>();
+        objectInfosTransforDmp(content, dmpObjectInfo ,context.getProjectId());
+        request.setContent(dmpObjectInfo);
+
+        //修改项目级信息点
+        List<T> vos = doUpdateObjectInfo(context, clazz, (List<T>) dmpObjectInfo);
+        return AdmResponse.success(vos);
+    }
+
+    /**
+     * 信息点转换为中台格式
+     * @param content
+     * @param dmpObjectInfos
+     */
+    private void objectInfosTransforDmp(List<AdmObjectInfo> content,List<AdmObjectInfo> dmpObjectInfos,String projectId){
+        if(CollUtil.isEmpty(content)){
+            return;
+        }
+        for (AdmObjectInfo admObjectInfo : content) {
+            admObjectInfo.setProjectId(projectId);
+            if(admObjectInfo.getMultiple() != null){
+                admObjectInfo.setIsMultiple(admObjectInfo.getMultiple());
+            }
+            if(admObjectInfo.getIsRegion() != null){
+                admObjectInfo.setIsRegion(admObjectInfo.getRegion());
+            }
+            if(StringUtils.isNotEmpty(admObjectInfo.getFirstName())){
+                admObjectInfo.setFirstTag(admObjectInfo.getFirstName());
+            }
+            if(StringUtils.isNotEmpty(admObjectInfo.getSecondName())){
+                admObjectInfo.setSecondTag(admObjectInfo.getSecondName());
+            }
+            admObjectInfo.setType(null);
+            dmpObjectInfos.add(admObjectInfo);
+            //处理子级
+            List<AdmObjectInfo> sencondContent = admObjectInfo.getContent();
+            if(CollUtil.isNotEmpty(sencondContent)){
+                objectInfosTransforDmp(sencondContent,dmpObjectInfos,projectId);
+            }
+        }
+    }
+}

+ 18 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AdmModelRelServiceImpl.java

@@ -0,0 +1,18 @@
+package com.persagy.proxy.adm.service.impl;
+
+import com.persagy.proxy.adm.model.AdmLocationPoint;
+import com.persagy.proxy.adm.service.IAdmLocationPointService;
+import com.persagy.proxy.adm.service.IAdmModelRelService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @ClassName AdmModelRelServiceImpl
+ * @Description: 模型修改设备元空间的建筑楼层信息
+ * @Author linhuili
+ * @Date 2021/8/31 14:31
+ * @Version V1.0
+ **/
+@Service
+public class AdmModelRelServiceImpl extends AbstractAdmBaseServiceImpl<AdmLocationPoint> implements IAdmModelRelService {
+
+}

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

@@ -1,7 +1,17 @@
 package com.persagy.proxy.adm.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.adm.model.AdmBuilding;
 import com.persagy.proxy.adm.model.AdmSpace;
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
+import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmSpaceService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.stereotype.Service;
 
 /**

+ 109 - 0
src/main/java/com/persagy/proxy/adm/service/impl/ReportDownloadService.java

@@ -0,0 +1,109 @@
+package com.persagy.proxy.adm.service.impl;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.Lists;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.client.DigitalObjectFacade;
+import com.persagy.dmp.digital.client.DigitalRelationFacade;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+import com.persagy.proxy.adm.strategy.QueryRelationObjectContext;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 报表/模板下载
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年8月31日 下午4:43:15
+ */
+@Slf4j
+@Service
+public class ReportDownloadService implements IReportDownloadService {
+
+	public static final String cADID = "cADID";
+	
+	public static final String pe2bd = "pe2bd";
+	public static final String pe2fl = "pe2fl";
+
+	@Value("${middleware.group.code}")
+	private String defaultCode;
+
+	@Autowired
+	private QueryRelationObjectContext queryRelationObjectContext;
+	
+	@Override
+	public ObjectNode getObjectNode(String groupCode, String projectId, String id) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode objectNode = objectMapper.createObjectNode();
+		objectNode.put("id", id);
+		queryCriteria.setCriteria(objectNode);
+		List<ObjectNode> objectNodes = DigitalObjectFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
+		return CollectionUtil.isEmpty(objectNodes) ? objectMapper.createObjectNode() : objectNodes.get(0); 
+	}
+	
+	@Override
+	public ObjectNode getObjectByCodeAndId(String groupCode, String projectId, String graphCode, String relCode, String objFrom, String objTo) {
+		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
+		
+		// 获取出关联对象
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode objectNode = objectMapper.createObjectNode();
+		objectNode.put("graphCode", graphCode);
+		objectNode.put("relCode", relCode);
+		objectNode.put("objFrom", objFrom);
+		objectNode.put("objTo", objTo);
+		queryCriteria.setCriteria(objectNode);
+		List<ObjectRelation> objectRelations = DigitalRelationFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
+		if (CollectionUtil.isEmpty(objectRelations)) {
+			return objectMapper.createObjectNode();
+		}
+		
+		// 获取关联对象的本地名称
+		ObjectRelation objectRelation = objectRelations.get(0);
+		String relationId = StrUtil.isBlank(objFrom) ? objectRelation.getObjFrom() : objectRelation.getObjTo();
+		return this.getObjectNode(groupCode, projectId, relationId); 
+	}
+	
+	@Override
+	public List<ObjectRelation> findObjectRelationList(String groupCode, String projectId, String graphCode, String relCode) {
+		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
+		
+		// 获取出关联对象
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		criteria.put("graphCode", graphCode);
+		criteria.put("relCode", relCode);
+		queryCriteria.setCriteria(criteria);
+		List<ObjectRelation> objectRelations = DigitalRelationFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
+		return CollectionUtil.isEmpty(objectRelations) ? Lists.newArrayList() : objectRelations;
+	}
+	
+	
+	@Override
+	public List<AdmRelationObject> reportRelationObject(String groupCode, String projectId, String relType, String code, String zoneType) {
+		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
+		log.info("下载报表: groupCode[{}], projectId[{}], relType[{}], code[{}]", groupCode, projectId, relType, code);
+		return this.queryRelationObjectContext.findRelationObject(groupCode, projectId, relType);
+	}
+	
+}

+ 53 - 0
src/main/java/com/persagy/proxy/adm/strategy/QueryRelationObjectContext.java

@@ -0,0 +1,53 @@
+package com.persagy.proxy.adm.strategy;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Component;
+
+import com.google.common.collect.Lists;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.strategy.relationdata.QueryRelationObjectStrategy;
+
+/**
+ * 获取关系对象的上下文类
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月2日 下午10:44:32
+ */
+@Component
+public class QueryRelationObjectContext {
+
+	/**
+	 * 策略执行类
+	 */
+	private Map<String, QueryRelationObjectStrategy> relationObjectStrategyMap;
+	
+	/**
+	 * 自动注入 byName
+	 * 
+	 * @param relationObjectStrategyMap
+	 */
+	@Resource
+	public void relationObjectStrategyMap(Map<String, QueryRelationObjectStrategy> relationObjectStrategyMap) {
+		this.relationObjectStrategyMap = relationObjectStrategyMap;
+	}
+	
+	/**
+	 * 获取关系对象数据
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 * @param relType
+	 * @return
+	 */
+	public List<AdmRelationObject> findRelationObject(String groupCode, String projectId, String relType) {
+		QueryRelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
+		return strategy == null ? Lists.newArrayList() : strategy.findRelationObject(groupCode, projectId, relType);
+	}
+	
+}

+ 165 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/AbstractQueryRelationObject.java

@@ -0,0 +1,165 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.digital.client.DigitalObjectFacade;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.collection.CollectionUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月2日 下午11:00:26
+ */
+public abstract class AbstractQueryRelationObject implements QueryRelationObjectStrategy {
+
+	protected String groupCode;
+	
+	protected String projectId;
+	
+	protected IReportDownloadService reportDownloadService;
+	
+	public AbstractQueryRelationObject(IReportDownloadService reportDownloadService) {
+		this.reportDownloadService = reportDownloadService;
+	}
+	
+	@Override
+	public List<AdmRelationObject> findRelationObject(String groupCode, String projectId, String relType) {
+		this.groupCode = groupCode;
+		this.projectId = projectId;
+		return this.findRelationObject(relType);
+	}
+	
+	/**
+	 * 查询出指定设备信息
+	 * 
+	 * @param relType
+	 * @return 返回ADM所需要的数据
+	 */
+	protected abstract List<AdmRelationObject> findRelationObject(String relType);
+	
+	/**
+	 * 根据项目ID,查询出所有的对象信息
+	 * 
+	 * @param requestData
+	 * @param relType
+	 * @param extraMapping
+	 * @return
+	 */
+	protected List<AdmRelationObject> queryAllObjectInfo(QueryCriteria queryCriteria, String relType) {
+		List<ObjectNode> tempList = new ArrayList<ObjectNode>();
+		
+		// 获取数据
+		this.queryPageObjectInfo(tempList, queryCriteria, queryCriteria.getPage());
+		
+		// 转换中台数据
+		return this.handleObjectDigital(tempList, relType);
+	}
+	
+	/**
+	 * 分页查询
+	 * 
+	 * @param tempList
+	 * @param queryCriteria
+	 * @param groupCode
+	 * @param projectId
+	 * @param page
+	 * @param pageSize
+	 */
+	protected void queryPageObjectInfo(List<ObjectNode> tempList, QueryCriteria queryCriteria, Long page) {
+		queryCriteria.setPage(page);
+		List<ObjectNode> objectNodes = DigitalObjectFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
+		if (CollectionUtil.isEmpty(objectNodes)) {
+			return;
+		}
+		tempList.addAll(objectNodes);
+		this.queryPageObjectInfo(tempList, queryCriteria, ++page);
+	}
+	
+	/**
+	 * 处理中台响应数据,转换为ADM所需要的数据
+	 * 
+	 * @param tempList
+	 * @param groupCode
+	 * @param projectId
+	 * @param relType
+	 * @return
+	 */
+	private List<AdmRelationObject> handleObjectDigital(List<ObjectNode> tempList, String relType) {
+		// 第一次遍历
+		// id -> object
+		Map<String, ObjectNode> tempAllMap = new HashMap<String, ObjectNode>(tempList.size());
+		for (ObjectNode objectNode : tempList) {
+			String id = objectNode.get("id").asText();
+			tempAllMap.put(id, objectNode);
+		}
+		
+		return this.handleObjectDigital(tempAllMap, relType);
+	}
+	
+	
+	/**
+	 * 处理中台响应数据,转换为ADM所需要的数据
+	 * 
+	 * @param tempAllMap 对象ID -> 对象
+	 * @param relType
+	 * @return 不允许返回null
+	 */
+	protected abstract List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType);	
+	
+	/**
+	 * 封装响应数据,具体的传值,请仔细侦查,这里仅返回共有字段,特殊字段,自行赋值
+	 * 
+	 * @param master
+	 * @param masterType
+	 * @param slave
+	 * @param slaveType
+	 * @return
+	 */
+	protected AdmRelationObject convertObject(ObjectNode master, String masterType, ObjectNode slave, String slaveType) {
+		AdmRelationObject relationObject = new AdmRelationObject();
+		
+		// ID
+		String masterId = master.get("id") == null ? AdmCommonConstant.EMPTY  : master.get("id").asText();
+		relationObject.setMasterCode(masterId);
+		relationObject.setMasterId(masterId);
+		// 图纸编码
+		relationObject.setMasterCadId(master.get("cADID") == null ? AdmCommonConstant.EMPTY  : master.get("cADID").asText());
+		// 名称
+		relationObject.setMasterName(master.get("name") == null ? AdmCommonConstant.EMPTY  : master.get("name").asText());
+		// 本地ID
+		relationObject.setMasterLocalId(master.get("localId") == null ? AdmCommonConstant.EMPTY  : master.get("localId").asText());
+		// 本地名称
+		relationObject.setMasterLocalName(master.get("localName") == null ? AdmCommonConstant.EMPTY  : master.get("localName").asText());
+		// 类型
+		relationObject.setMasterType(masterType);
+		
+		// ID
+		String slaveId = slave.get("id") == null ? AdmCommonConstant.EMPTY  : slave.get("id").asText();
+		relationObject.setSlaveCode(slaveId);
+		relationObject.setSlaveId(slaveId);
+		// 图纸编码
+		relationObject.setSlaveCadId(master.get("cADID") == null ? AdmCommonConstant.EMPTY  : master.get("cADID").asText());
+		// 名称
+		relationObject.setSlaveName(slave.get("name") == null ? AdmCommonConstant.EMPTY  : slave.get("name").asText());
+		// 本地ID
+		relationObject.setSlaveLocalId(slave.get("localId") == null ? AdmCommonConstant.EMPTY  : slave.get("localId").asText());
+		// 本地名称
+		relationObject.setSlaveLocalName(slave.get("localName") == null ? AdmCommonConstant.EMPTY  : slave.get("localName").asText());
+		// 类型
+		relationObject.setSlaveType(slaveType);
+		
+		return relationObject;
+	}
+	
+}

+ 97 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2BdForRelationObject.java

@@ -0,0 +1,97 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2BD_FOR)
+public class Eq2BdForRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2BdForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.BUILDING.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.EQ2BD_FOR.getGraphCode(), AdmRelationTypeEnum.EQ2BD_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String buildingId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(buildingId)) {
+				continue;
+			}
+			ObjectNode equipment = tempAllMap.get(equipId);
+			ObjectNode building = tempAllMap.get(buildingId);
+			
+			// 获取楼层信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.EQ2BD_FOR.getGraphCode(), 
+					RelCodeEnum.Eq2Fl.name(), equipId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", building, "建筑");
+			String buildingName = building.get("localName") == null ? AdmCommonConstant.EMPTY : building.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setMasterFloorName(floorName);
+			
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setMasterBelong(buildingName);
+			} else {
+				convertObject.setMasterBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 88 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2BdRelationObject.java

@@ -0,0 +1,88 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2BD)
+public class Eq2BdRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2BdRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.BUILDING.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.EQ2BD.getGraphCode(), AdmRelationTypeEnum.EQ2BD.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String buildingId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(buildingId)) {
+				continue;
+			}
+			ObjectNode equipment = tempAllMap.get(equipId);
+			ObjectNode building = tempAllMap.get(buildingId);
+			
+			// 获取楼层信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.EQ2BD.getGraphCode(), 
+					RelCodeEnum.Eq2Fl.name(), equipId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", building, "建筑");
+			String buildingName = building.get("localName") == null ? AdmCommonConstant.EMPTY : building.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setSlaveFloorName(floorName);
+			
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 98 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2FlForRelationObject.java

@@ -0,0 +1,98 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2FL_FOR)
+public class Eq2FlForRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2FlForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.FLOOR.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.EQ2FL_FOR.getGraphCode(), AdmRelationTypeEnum.EQ2FL_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String floorId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(floorId)) {
+				continue;
+			}
+			ObjectNode equipment = tempAllMap.get(equipId);
+			ObjectNode floor = tempAllMap.get(floorId);
+			
+			// 获取建筑信息
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.EQ2FL_FOR.getGraphCode(), 
+					RelCodeEnum.Eq2Bd.name(), equipId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", floor, "楼层");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			String floorName = floor.get("localName") == null ? AdmCommonConstant.EMPTY : floor.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setMasterFloorName(floorName);
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveBelong(buildingName);
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setMasterBelong(buildingName);
+			} else {
+				convertObject.setMasterBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 82 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2FlRelationObject.java

@@ -0,0 +1,82 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2FL)
+public class Eq2FlRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2FlRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.FLOOR.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.EQ2FL.getGraphCode(), AdmRelationTypeEnum.EQ2FL.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String floorId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(floorId)) {
+				continue;
+			}
+			ObjectNode equipment = tempAllMap.get(equipId);
+			ObjectNode floor = tempAllMap.get(floorId);
+			
+			AdmRelationObject convertObject = this.convertObject(floor, "楼层", equipment, "设备");
+			String floorName = floor.get("localName") == null ? AdmCommonConstant.EMPTY : floor.get("localName").asText();
+			convertObject.setMasterFloorName(floorName);
+			convertObject.setSlaveFloorName(floorName);
+			
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 97 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2ShForRelationObject.java

@@ -0,0 +1,97 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2SH_FOR)
+public class Eq2ShForRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2ShForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.SHAFT.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.EQ2SH_FOR.getGraphCode(), AdmRelationTypeEnum.EQ2SH_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String shaftId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(shaftId)) {
+				continue;
+			}
+			ObjectNode equipment = tempAllMap.get(equipId);
+			ObjectNode shaft = tempAllMap.get(shaftId);
+			
+			// 获取楼层信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.EQ2SH_FOR.getGraphCode(), 
+					RelCodeEnum.Eq2Fl.name(), equipId, null);
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.EQ2SH_FOR.getGraphCode(), 
+					RelCodeEnum.Eq2Bd.name(), equipId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", shaft, "竖井");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setMasterFloorName(floorName);
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setMasterBelong(buildingName);
+			} else {
+				convertObject.setMasterBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 77 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Eq2SpRelationObject.java

@@ -0,0 +1,77 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 此类型需转为 AdmRelationTypeEnum.EQ2SP_IN 进行数据查询
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.EQ2SP_SENSORRELATIONSHIP_SS2SP)
+public class Eq2SpRelationObject extends AbstractQueryRelationObject {
+
+	public Eq2SpRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.EQUIPMENT.getIndex()).add(AdmObjectType.SPACE.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, AdmRelationTypeEnum.EQ2SP_IN.getGraphCode(), AdmRelationTypeEnum.EQ2SP_IN.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String spaceId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(spaceId)) {
+				continue;
+			}
+			ObjectNode space = tempAllMap.get(spaceId);
+			ObjectNode equipment = tempAllMap.get(equipId);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", space, "空间");
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 31 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/QueryRelationObjectStrategy.java

@@ -0,0 +1,31 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.List;
+
+import com.persagy.proxy.adm.model.AdmRelationObject;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月2日 下午10:46:03
+ */
+public interface QueryRelationObjectStrategy {
+
+	String WHERE_IN = "$in";
+	
+	String OBJ_TYPE = "objType";
+	
+	/**
+	 * 查询出所有的关系信息
+	 * <p>因原代码中,不存在zoneType类型不为空时对应的方法,所以此处不再进行此数据的判断</p>
+	 * 
+	 * @param groupCode 集团编码
+	 * @param projectId 项目ID
+	 * @param relType   边类型--ADM的
+	 * @return 不会返回null
+	 */
+	List<AdmRelationObject> findRelationObject(String groupCode, String projectId, String relType);
+	
+}

+ 77 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2BdForRelationObject.java

@@ -0,0 +1,77 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SH2BD_ARCHFORARCH)
+public class Sh2BdForRelationObject extends AbstractQueryRelationObject {
+
+	public Sh2BdForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SHAFT.getIndex()).add(AdmObjectType.BUILDING.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SH2BD_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SH2BD_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String equipId = objectRelation.getObjFrom();
+			String spaceId = objectRelation.getObjTo();
+			if (!allKeys.contains(equipId) || !allKeys.contains(spaceId)) {
+				continue;
+			}
+			ObjectNode space = tempAllMap.get(spaceId);
+			ObjectNode equipment = tempAllMap.get(equipId);
+			
+			AdmRelationObject convertObject = this.convertObject(equipment, "设备", space, "空间");
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 85 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2FlForRelationObject.java

@@ -0,0 +1,85 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SH2FL_ARCHFORARCH)
+public class Sh2FlForRelationObject extends AbstractQueryRelationObject {
+
+	public Sh2FlForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SHAFT.getIndex()).add(AdmObjectType.FLOOR.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SH2FL_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SH2FL_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String shaftId = objectRelation.getObjFrom();
+			String floorId = objectRelation.getObjTo();
+			if (!allKeys.contains(shaftId) || !allKeys.contains(floorId)) {
+				continue;
+			}
+			ObjectNode shaft = tempAllMap.get(shaftId);
+			ObjectNode floor = tempAllMap.get(floorId);
+			// 获取建筑的信息
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SH2FL_ARCHFORARCH.getGraphCode(), 
+					RelCodeEnum.Sh2Bd.name(), shaftId, null);
+
+			AdmRelationObject convertObject = this.convertObject(shaft, "竖井", floor, "楼层");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveBelong(buildingName);
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 77 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2ShForRelationObject.java

@@ -0,0 +1,77 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SH2SH_ARCHFORARCH)
+public class Sh2ShForRelationObject extends AbstractQueryRelationObject {
+
+	public Sh2ShForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SHAFT.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SH2SH_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SH2SH_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String shaftIdF = objectRelation.getObjFrom();
+			String shaftIdT = objectRelation.getObjTo();
+			if (!allKeys.contains(shaftIdF) || !allKeys.contains(shaftIdT)) {
+				continue;
+			}
+			ObjectNode shaftF = tempAllMap.get(shaftIdF);
+			ObjectNode shaftT = tempAllMap.get(shaftIdT);
+			
+			AdmRelationObject convertObject = this.convertObject(shaftF, "竖井", shaftT, "竖井");
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 97 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sh2SpForRelationObject.java

@@ -0,0 +1,97 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SH2SP_ARCHFORARCH)
+public class Sh2SpForRelationObject extends AbstractQueryRelationObject {
+
+	public Sh2SpForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SHAFT.getIndex()).add(AdmObjectType.SPACE.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SH2SP_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SH2SP_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String shaftId = objectRelation.getObjFrom();
+			String spaceId = objectRelation.getObjTo();
+			if (!allKeys.contains(shaftId) || !allKeys.contains(spaceId)) {
+				continue;
+			}
+			ObjectNode shaft = tempAllMap.get(shaftId);
+			ObjectNode space = tempAllMap.get(spaceId);
+			// 获取建筑的信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SH2SP_ARCHFORARCH.getGraphCode(), 
+					RelCodeEnum.Sh2Fl.name(), shaftId, null);
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SH2SP_ARCHFORARCH.getGraphCode(), 
+					RelCodeEnum.Sh2Bd.name(), shaftId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(shaft, "竖井", space, "空间");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveFloorName(floorName);
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setSlaveBelong(buildingName);
+			} else {
+				convertObject.setSlaveBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 95 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sp2BdForRelationObject.java

@@ -0,0 +1,95 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SP2BD_ARCHFORARCH)
+public class Sp2BdForRelationObject extends AbstractQueryRelationObject {
+
+	public Sp2BdForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SPACE.getIndex()).add(AdmObjectType.BUILDING.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SP2BD_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SP2BD_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String spaceId = objectRelation.getObjFrom();
+			String buildingId = objectRelation.getObjTo();
+			if (!allKeys.contains(spaceId) || !allKeys.contains(buildingId)) {
+				continue;
+			}
+			ObjectNode space = tempAllMap.get(spaceId);
+			ObjectNode building = tempAllMap.get(buildingId);
+			// 获取楼层的信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SP2BD_ARCHFORARCH.getGraphCode(), 
+					RelCodeEnum.Sp2Fl.name(), spaceId, null);
+			
+			// 这里最后一个参数,写为空间,和ADM保持一致
+			AdmRelationObject convertObject = this.convertObject(space, "空间", building, "空间");
+			String buildingName = building.get("localName") == null ? AdmCommonConstant.EMPTY : building.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setMasterFloorName(floorName);
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setMasterBelong(buildingName);
+			} else {
+				convertObject.setMasterBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 97 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sp2FlForRelationObject.java

@@ -0,0 +1,97 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SP2FL_ARCHFORARCH)
+public class Sp2FlForRelationObject extends AbstractQueryRelationObject {
+
+	public Sp2FlForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SPACE.getIndex()).add(AdmObjectType.FLOOR.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SP2FL_ARCHFORARCH.getGraphCode(), AdmRelationTypeEnum.SP2FL_ARCHFORARCH.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String spaceId = objectRelation.getObjFrom();
+			String floorId = objectRelation.getObjTo();
+			if (!allKeys.contains(spaceId) || !allKeys.contains(floorId)) {
+				continue;
+			}
+			ObjectNode space = tempAllMap.get(spaceId);
+			ObjectNode floor = tempAllMap.get(floorId);
+			// 获取建筑的信息
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SP2FL_ARCHFORARCH.getGraphCode(), 
+					RelCodeEnum.Sp2Bd.name(), spaceId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(space, "空间", floor, "楼层");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			String floorName = floor.get("localName") == null ? AdmCommonConstant.EMPTY : floor.get("localName").asText();
+			convertObject.setMasterBuildingName(buildingName);
+			convertObject.setMasterFloorName(floorName);
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveBelong(buildingName);
+			
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setMasterBelong(buildingName);
+			} else {
+				convertObject.setMasterBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 77 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2BdForRelationObject.java

@@ -0,0 +1,77 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SY2BD_FOR)
+public class Sy2BdForRelationObject extends AbstractQueryRelationObject {
+
+	public Sy2BdForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SYSTEM.getIndex()).add(AdmObjectType.BUILDING.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SY2BD_FOR.getGraphCode(), AdmRelationTypeEnum.SY2BD_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String systemId = objectRelation.getObjFrom();
+			String buildingId = objectRelation.getObjTo();
+			if (!allKeys.contains(systemId) || !allKeys.contains(buildingId)) {
+				continue;
+			}
+			ObjectNode system = tempAllMap.get(systemId);
+			ObjectNode building = tempAllMap.get(buildingId);
+			
+			AdmRelationObject convertObject = this.convertObject(system, "系统", building, "建筑");
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 86 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2FlForRelationObject.java

@@ -0,0 +1,86 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SY2FL_FOR)
+public class Sy2FlForRelationObject extends AbstractQueryRelationObject {
+
+	public Sy2FlForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SYSTEM.getIndex()).add(AdmObjectType.FLOOR.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SY2FL_FOR.getGraphCode(), AdmRelationTypeEnum.SY2FL_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String systemId = objectRelation.getObjFrom();
+			String floorId = objectRelation.getObjTo();
+			if (!allKeys.contains(systemId) || !allKeys.contains(floorId)) {
+				continue;
+			}
+			ObjectNode system = tempAllMap.get(systemId);
+			ObjectNode floor = tempAllMap.get(floorId);
+			
+			// 获取楼层信息
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SY2FL_FOR.getGraphCode(), 
+					RelCodeEnum.Sy2Bd.name(), systemId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(system, "系统", floor, "楼层");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveBelong(buildingName);
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 77 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2ShForRelationObject.java

@@ -0,0 +1,77 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SY2SH_FOR)
+public class Sy2ShForRelationObject extends AbstractQueryRelationObject {
+
+	public Sy2ShForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SYSTEM.getIndex()).add(AdmObjectType.SHAFT.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SY2SH_FOR.getGraphCode(), AdmRelationTypeEnum.SY2SH_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String systemId = objectRelation.getObjFrom();
+			String shaftId = objectRelation.getObjTo();
+			if (!allKeys.contains(systemId) || !allKeys.contains(shaftId)) {
+				continue;
+			}
+			ObjectNode system = tempAllMap.get(systemId);
+			ObjectNode shaft = tempAllMap.get(shaftId);
+			
+			AdmRelationObject convertObject = this.convertObject(system, "系统", shaft, "竖井");
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 98 - 0
src/main/java/com/persagy/proxy/adm/strategy/relationdata/Sy2SpForRelationObject.java

@@ -0,0 +1,98 @@
+package com.persagy.proxy.adm.strategy.relationdata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.stereotype.Component;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.digital.entity.ObjectRelation;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmObjectType;
+import com.persagy.proxy.adm.constant.AdmRelationType;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.AdmRelationObject;
+import com.persagy.proxy.adm.service.IReportDownloadService;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年9月3日 上午9:42:46
+ */
+@Component(value = AdmRelationType.SY2SP_FOR)
+public class Sy2SpForRelationObject extends AbstractQueryRelationObject {
+
+	public Sy2SpForRelationObject(IReportDownloadService reportDownloadService) {
+		super(reportDownloadService);
+	}
+
+	@Override
+	protected List<AdmRelationObject> findRelationObject(String relType) {
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria queryCriteria = new QueryCriteria();
+		ObjectNode criteria = objectMapper.createObjectNode();
+		// 参数条件
+		ObjectNode objType = objectMapper.createObjectNode();
+		ArrayNode objTypes = objType.putArray(WHERE_IN);
+		objTypes.add(AdmObjectType.SYSTEM.getIndex()).add(AdmObjectType.SPACE.getIndex());
+		
+		criteria.set(OBJ_TYPE, objType);
+		queryCriteria.setCriteria(criteria);
+		queryCriteria.setPage(1L);
+		queryCriteria.setSize(1000L);
+		
+		return this.queryAllObjectInfo(queryCriteria, relType);
+	}
+
+	@Override
+	protected List<AdmRelationObject> handleObjectDigital(Map<String, ObjectNode> tempAllMap, String relType) {
+		Set<String> allKeys = tempAllMap.keySet();
+		List<AdmRelationObject> resultList = new ArrayList<AdmRelationObject>();
+		
+		List<ObjectRelation> relationList = this.reportDownloadService.findObjectRelationList(groupCode, projectId, 
+				AdmRelationTypeEnum.SY2SP_FOR.getGraphCode(), AdmRelationTypeEnum.SY2SP_FOR.getRelCode());
+		for (ObjectRelation objectRelation : relationList) {
+			String systemId = objectRelation.getObjFrom();
+			String spaceId = objectRelation.getObjTo();
+			if (!allKeys.contains(systemId) || !allKeys.contains(spaceId)) {
+				continue;
+			}
+			ObjectNode system = tempAllMap.get(systemId);
+			ObjectNode space = tempAllMap.get(spaceId);
+			
+			// 获取楼层信息
+			ObjectNode floorInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SY2SP_FOR.getGraphCode(), 
+					RelCodeEnum.Sy2Bd.name(), systemId, null);
+			ObjectNode buildingInfo = this.reportDownloadService.getObjectByCodeAndId(groupCode, projectId, AdmRelationTypeEnum.SY2SP_FOR.getGraphCode(), 
+					RelCodeEnum.Sy2Fl.name(), systemId, null);
+			
+			AdmRelationObject convertObject = this.convertObject(system, "系统", space, "空间");
+			String buildingName = buildingInfo.get("localName") == null ? AdmCommonConstant.EMPTY : buildingInfo.get("localName").asText();
+			String floorName = floorInfo.get("localName") == null ? AdmCommonConstant.EMPTY : floorInfo.get("localName").asText();
+			convertObject.setSlaveBuildingName(buildingName);
+			convertObject.setSlaveFloorName(floorName);
+			if (StrUtil.isBlank(floorName)) {
+				convertObject.setSlaveBelong(buildingName);
+			} else {
+				convertObject.setSlaveBelong((StrUtil.isBlank(buildingName) ? AdmCommonConstant.EMPTY 
+						: StrUtil.join(AdmCommonConstant.LINE_THROUGH, buildingName, floorName)));
+			}
+			
+			resultList.add(convertObject);
+		}
+		
+		return resultList;
+	}
+
+}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java

@@ -131,7 +131,7 @@ public class AdmEntityTransferUtil {
             }
         } else {
             // 返回全部时,去掉不需要属性
-            List<String> removeList = CollUtil.newArrayList("creator", "groupCode", "valid", "createApp", "virtualCodes", "updateApp");
+            List<String> removeList = CollUtil.newArrayList("creator", "groupCode", "valid", "createApp", "virtualCodes", "updateApp", "grouping", "modifier");
             for(String removeField:removeList) {
                 dmpData.remove(removeField);
             }

+ 3 - 3
src/main/java/com/persagy/proxy/adm/utils/AdmQueryCriteriaHelper.java

@@ -76,7 +76,7 @@ public class AdmQueryCriteriaHelper {
      * @param admCriteria
      * @param dmpCriteria
      */
-    private static void copyPageInfo(AdmQueryCriteria admCriteria, QueryCriteria dmpCriteria) {
+    public static void copyPageInfo(AdmQueryCriteria admCriteria, QueryCriteria dmpCriteria) {
         // 页码
         Integer pageNumber = admCriteria.getPageNumber();
         if(pageNumber == null || pageNumber < 1) {
@@ -95,7 +95,7 @@ public class AdmQueryCriteriaHelper {
      * 排序字符串转换为对象
      * @param orderStr
      */
-    private static List<OrderItem> toOrderItem(String orderStr) {
+    public static List<OrderItem> toOrderItem(String orderStr) {
         if(StrUtil.isBlank(orderStr)) {
             return null;
         }
@@ -126,7 +126,7 @@ public class AdmQueryCriteriaHelper {
      * @param filters
      * @return
      */
-    private static ObjectNode toCriteria(String name, String filters) {
+    public static ObjectNode toCriteria(String name, String filters) {
         ObjectNode criteria = JsonNodeFactory.instance.objectNode();
         // filters格式参考:http://doc.sagacloud.cn/doc/service/dev/lib/web/filters.html#%E8%BF%87%E6%BB%A4%E6%9D%A1%E4%BB%B6
         if(StrUtil.isBlank(filters)) {

+ 36 - 0
src/main/java/com/persagy/proxy/common/client/DmpDicClient.java

@@ -0,0 +1,36 @@
+package com.persagy.proxy.common.client;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.persagy.dmp.basic.config.DigitalFeignConfig;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.proxy.common.constant.DmpUrlConstant;
+import com.persagy.proxy.common.entity.DmpResult;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.common.entity.ObjRelationDTO;
+import com.persagy.proxy.common.entity.RelationDTO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+/**
+ *@description:数据中台dmp-dic 数据字典 接口feign
+ *@author:lgy
+ *@data:2021/8/11 14:56
+ */
+@FeignClient(name = "dmp-dic", configuration = DigitalFeignConfig.class)
+public interface DmpDicClient {
+
+     /**
+     * @description: 查询字典数据
+     * @param: objectUrlParam 对象请求url通用参数
+     * @param: criteria post请求参数
+     * @return: com.persagy.dmp.common.DmpResult
+     */
+    @PostMapping(DmpUrlConstant.DIC_DATA_QUERY)
+    DmpResult<JSONArray> queryDictData(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONObject criteria);
+
+}

+ 37 - 0
src/main/java/com/persagy/proxy/common/client/DmpRwdClient.java

@@ -92,4 +92,41 @@ public interface DmpRwdClient {
      */
     @PostMapping(DmpUrlConstant.RELATION_CREATE)
     DmpResult createRelation(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody List<RelationDTO> createRelationList);
+
+    /**
+     * @description: 查询对象类型
+     * @param: objectUrlParam 对象请求url通用参数
+     * @param: criteria post请求参数
+     * @return: com.persagy.dmp.common.DmpResult
+     */
+    @PostMapping(DmpUrlConstant.DEF_CLASS)
+    DmpResult<JSONArray> queryObjectType(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONObject criteria);
+
+    /**
+     * @description: 查询信息点
+     * @param: objectUrlParam 对象请求url通用参数
+     * @param: criteria post请求参数
+     * @return: com.persagy.dmp.common.DmpResult
+     */
+    @PostMapping(DmpUrlConstant.DEF_FUNCID)
+    DmpResult<JSONArray> queryObjectInfo(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONObject criteria);
+
+    /**
+     * @description: 批量修改信息点
+     * @param: objectUrlParam 对象请求url通用参数
+     * @param: criteria post请求参数
+     * @return: com.persagy.dmp.common.DmpResult
+     */
+    @PostMapping(DmpUrlConstant.DEF_FUNCID_UPDATE_BATCH)
+    DmpResult batchUpdateObjectInfo(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONArray objectArr);
+
+    /**
+     * @description: 批量删除信息点
+     * @param: objectUrlParam 对象请求url通用参数
+     * @param: criteria post请求参数
+     * @return: com.persagy.dmp.common.DmpResult
+     */
+    @PostMapping(DmpUrlConstant.DEF_FUNCID_DEL_BATCH)
+    DmpResult<JSONArray> batchDeleteObjectInfo(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody List<String> objectIdList);
+
 }

+ 18 - 0
src/main/java/com/persagy/proxy/common/constant/DmpUrlConstant.java

@@ -76,6 +76,17 @@ public class DmpUrlConstant {
     public final static String DEF_FUNCID_CREATE = "/rwd/def/funcid/create";
 
     /**
+     * 批量修改信息点
+     */
+    public final static String DEF_FUNCID_UPDATE_BATCH = "/rwd/def/funcid/updateBatch";
+
+
+    /**
+     * 批量删除信息点
+     */
+    public final static String DEF_FUNCID_DEL_BATCH = "/rwd/def/funcid/deleteBatch";
+
+    /**
      * 类型查询
      */
     public final static String DEF_CLASS = "/rwd/def/class";
@@ -100,4 +111,11 @@ public class DmpUrlConstant {
     /**批量查询项目接口URI*/
     public static final  String OBJECT_BATCH_QUERY_PROJECT_BY_IDS = "/rwd/instance/object/batchQueryProjectByIds";
 
+    // ==================中台知识库=========================================================================
+
+    /**
+     * 字典数据查询
+     */
+    public static final String DIC_DATA_QUERY = "/dic/dt/data/query";
+
 }

BIN
src/main/resources/template/relation-template.xlsx