Browse Source

fix bug:调整代码,解决循环依赖问题

lijie 3 years ago
parent
commit
74d279a4f7

+ 233 - 3
src/main/java/com/persagy/proxy/dictionary/controller/AdmDictController.java

@@ -13,14 +13,22 @@ import com.persagy.proxy.dictionary.model.*;
 import com.persagy.proxy.dictionary.service.IAdmDictService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
-import com.persagy.proxy.object.model.AdmObjectInfo;
+import com.persagy.proxy.object.model.*;
+import com.persagy.proxy.object.service.IAdmEquipmentService;
+import com.persagy.proxy.object.service.IAdmShaftService;
+import com.persagy.proxy.object.service.IAdmSpaceService;
+import com.persagy.proxy.object.service.IAdmSystemService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @ClassName AdmDictController
@@ -36,6 +44,14 @@ public class AdmDictController {
 
     @Autowired
     private IAdmDictService service;
+    @Autowired
+    private IAdmEquipmentService equipmentService;
+    @Autowired
+    private IAdmSpaceService spaceService;
+    @Autowired
+    private IAdmShaftService shaftService;
+    @Autowired
+    private IAdmSystemService systemService;
 
     /**
      * 字典类型查询:所有设备类型、部件类型、系统类型、专业类型
@@ -156,7 +172,7 @@ public class AdmDictController {
     @PostMapping("/system/equip/category")
     @Deprecated
     public AdmResponse querySystemEquipTree(@RequestBody AdmDictQueryCriteria request) throws Exception {
-        return service.querySystemEquipTree(AdmContextUtil.toDmpContext(),request,AdmObjectType.class);
+        return querySystemEquipTree(AdmContextUtil.toDmpContext(),request,AdmObjectType.class);
     }
 
     /**
@@ -214,7 +230,221 @@ public class AdmDictController {
         if(StringUtils.isEmpty(request.getClassCode())){
             return AdmResponse.success("类型不可以为空");
         }
-        return service.queryDictDeliveredInfos(AdmContextUtil.toDmpContext(),request,AdmObjectInfo.class);
+        Map<String, AdmObjectInfo> admObjectInfoMap = service.queryDictDeliveredInfos(AdmContextUtil.toDmpContext(), request, AdmObjectInfo.class);
+
+        //初始化待交付的信息点,id,name,localId,localName 无论是否有值默认展示,兼容历史逻辑
+        List<AdmObjectInfo> deliveredInfos = new ArrayList<>();
+        List<String> deliveredCodes = new ArrayList<>();
+        service.initDeliveredInfos(admObjectInfoMap, deliveredInfos, deliveredCodes);
+        String objType = request.getObjType();
+        if("equipment".equals(objType)){
+            //查询已交付的设备信息点
+            return getAdmEquipDeliveredInfo(AdmContextUtil.toDmpContext(),request, admObjectInfoMap,deliveredInfos,deliveredCodes);
+        }
+        if("space".equals(objType)){
+            //查询已交付的空间信息点
+            return getAdmSpaceDeliveredInfo(AdmContextUtil.toDmpContext(),request, admObjectInfoMap,deliveredInfos,deliveredCodes);
+        }
+        if("system".equals(objType)){
+            //查询已交付的系统信息点
+            return getAdmSystemDeliveredInfo(AdmContextUtil.toDmpContext(),request, admObjectInfoMap,deliveredInfos,deliveredCodes);
+        }
+        if("shaft".equals(objType)){
+            //查询已交付的竖井信息点
+            return getAdmShaftDeliveredInfo(AdmContextUtil.toDmpContext(),request, admObjectInfoMap,deliveredInfos,deliveredCodes);
+        }
+        return AdmResponse.success(new ArrayList<>());
+    }
+
+    /**
+     * 查询项目下已有的系统设备类型树
+     * @param context
+     * @param request
+     * @param clazz
+     * @return
+     * @throws Exception
+     */
+    private <T> AdmResponse querySystemEquipTree(InstanceUrlParam context, AdmDictQueryCriteria request, Class<T> clazz) throws Exception {
+        //查询项目下已有的设备类型
+        request.setName("equipment");
+        AdmResponse dictResponse = equipmentService.queryEquipClassCode(context, request, AdmEquipment.class);
+        List<String> classCodes = (List<String>)dictResponse.getContent();
+        if(CollUtil.isEmpty(classCodes)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        Map<String, List<String>> classCodeMap = classCodes.stream().collect(Collectors.groupingBy(item->item.substring(0,4),Collectors.toList()));
+        //查询系统设备类树
+        AdmDict admDict = new AdmDict();
+        admDict.setType(AdmDictCategoryEnum.SYSTEM_EQUIP.getValue());
+        AdmResponse categoryResponse = service.queryCategory(context, admDict, clazz);
+        List<AdmObjectType> objectTypes = (List<AdmObjectType>) categoryResponse.getContent();
+        if(CollUtil.isEmpty(objectTypes)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        //过滤设备实体中不存在的类型
+        Iterator<AdmObjectType> it = objectTypes.iterator();
+        while(it.hasNext()){
+            //过滤系统
+            AdmObjectType objectType = it.next();
+            List<String> objTypes = classCodeMap.get(objectType.getCode());
+            if(CollUtil.isEmpty(objTypes)){
+                it.remove();
+                continue;
+            }
+            //过滤子级:设备类型
+            List<AdmObjectType> children = objectType.getChildren();
+            if(CollUtil.isEmpty(children)){
+                it.remove();
+                continue;
+            }
+            Iterator<AdmObjectType> chidIterator = children.iterator();
+            while (chidIterator.hasNext()){
+                AdmObjectType next = chidIterator.next();
+                if(!objTypes.contains(next.getCode())){
+                    chidIterator.remove();
+                }
+            }
+        }
+        return AdmResponse.success(objectTypes);
+    }
+
+    /**
+     * 查询已交付的设备信息点
+     * @param context
+     * @param request
+     */
+    private AdmResponse getAdmEquipDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
+        AdmQueryCriteria admQueryCriteria = service.commbineObjectQueryCriteria(request);
+        AdmResponse response = equipmentService.query(admQueryCriteria);
+        List<AdmEquipment> content = (List<AdmEquipment>)response.getContent();
+        if(CollUtil.isEmpty(content)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        //统计有值的信息点
+        for (AdmEquipment admEquipment : content) {
+            Map<String, Object> infos = admEquipment.getInfos();
+            if(CollUtil.isEmpty(infos)){
+                continue;
+            }
+            for (Map.Entry<String, Object> info : infos.entrySet()) {
+                Object value = info.getValue();
+                if(deliveredCodes.contains(info.getKey()) || value == null){
+                    continue;
+                }
+                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
+                if(admObjectInfo == null){
+                    continue;
+                }
+                deliveredCodes.add(info.getKey());
+                deliveredInfos.add(admObjectInfo);
+            }
+        }
+        return AdmResponse.success(deliveredInfos);
+    }
+
+    /**
+     * 查询已交付的空间信息点
+     * @param context
+     * @param request
+     */
+    private AdmResponse getAdmSpaceDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
+        AdmQueryCriteria admQueryCriteria = service.commbineObjectQueryCriteria(request);
+        AdmResponse response = spaceService.query(admQueryCriteria);
+        List<AdmSpace> content = (List<AdmSpace>)response.getContent();
+        if(CollUtil.isEmpty(content)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        //统计有值的信息点
+        for (AdmSpace admSpace : content) {
+            Map<String, Object> infos = admSpace.getInfos();
+            if(CollUtil.isEmpty(infos)){
+                continue;
+            }
+            for (Map.Entry<String, Object> info : infos.entrySet()) {
+                Object value = info.getValue();
+                if(deliveredCodes.contains(info.getKey()) || value == null){
+                    continue;
+                }
+                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
+                if(admObjectInfo == null){
+                    continue;
+                }
+                deliveredCodes.add(info.getKey());
+                deliveredInfos.add(admObjectInfo);
+            }
+
+        }
+        return AdmResponse.success(deliveredInfos);
+    }
+
+    /**
+     * 查询已交付的竖井信息点
+     * @param context
+     * @param request
+     */
+    private AdmResponse getAdmShaftDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
+        AdmQueryCriteria admQueryCriteria = service.commbineObjectQueryCriteria(request);
+        AdmResponse response = shaftService.doQuery(context,admQueryCriteria, AdmShaft.class);
+        List<AdmShaft> content = (List<AdmShaft>)response.getContent();
+        if(CollUtil.isEmpty(content)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        //统计有值的信息点
+        for (AdmShaft admShaft : content) {
+            Map<String, Object> infos = admShaft.getInfos();
+            if(CollUtil.isEmpty(infos)){
+                continue;
+            }
+            for (Map.Entry<String, Object> info : infos.entrySet()) {
+                Object value = info.getValue();
+                if(deliveredCodes.contains(info.getKey()) || value == null){
+                    continue;
+                }
+                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
+                if(admObjectInfo == null){
+                    continue;
+                }
+                deliveredCodes.add(info.getKey());
+                deliveredInfos.add(admObjectInfo);
+            }
+
+        }
+        return AdmResponse.success(deliveredInfos);
+    }
+
+    /**
+     * 查询已交付的系统信息点
+     * @param context
+     * @param request
+     */
+    private AdmResponse getAdmSystemDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
+        AdmQueryCriteria admQueryCriteria = service.commbineObjectQueryCriteria(request);
+        AdmResponse response = systemService.query(admQueryCriteria);
+        List<AdmSystem> content = (List<AdmSystem>)response.getContent();
+        if(CollUtil.isEmpty(content)){
+            return AdmResponse.success(new ArrayList<>());
+        }
+        //统计有值的信息点
+        for (AdmSystem admSystem : content) {
+            Map<String, Object> infos = admSystem.getInfos();
+            if(CollUtil.isEmpty(infos)){
+                continue;
+            }
+            for (Map.Entry<String, Object> info : infos.entrySet()) {
+                Object value = info.getValue();
+                if(deliveredCodes.contains(info.getKey()) || value == null){
+                    continue;
+                }
+                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
+                if(admObjectInfo == null){
+                    continue;
+                }
+                deliveredCodes.add(info.getKey());
+                deliveredInfos.add(admObjectInfo);
+            }
+
+        }
+        return AdmResponse.success(deliveredInfos);
     }
 
 }

+ 13 - 8
src/main/java/com/persagy/proxy/dictionary/service/IAdmDictService.java

@@ -1,5 +1,6 @@
 package com.persagy.proxy.dictionary.service;
 
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
 import com.persagy.proxy.dictionary.model.AdmDefFuncIdGather;
 import com.persagy.proxy.dictionary.model.AdmDict;
 import com.persagy.proxy.adm.request.AdmDictQueryCriteria;
@@ -8,8 +9,10 @@ import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.dictionary.model.AdmDictDeliverieInfosRequest;
 import com.persagy.proxy.dictionary.model.AdmEquipDictInfos;
+import com.persagy.proxy.object.model.AdmObjectInfo;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @ClassName IAdmDictService
@@ -74,17 +77,19 @@ public interface IAdmDictService<T> extends IAdmDictBaseService<T>{
      * @param request
      * @return
      */
-    AdmResponse queryDictDeliveredInfos(InstanceUrlParam context, AdmDictDeliverieInfosRequest request, Class<T> clazz);
-
+    Map<String, AdmObjectInfo> queryDictDeliveredInfos(InstanceUrlParam context, AdmDictDeliverieInfosRequest request, Class<T> clazz);
 
     /**
-     * 查询项目下已有的系统设备类型树
-     * @param context
+     * 组装通用对象查询条件
      * @param request
      * @return
-     * @throws Exception
      */
-    AdmResponse querySystemEquipTree(InstanceUrlParam context , AdmDictQueryCriteria request, Class<T> clazz) throws Exception;
-
-
+    AdmQueryCriteria commbineObjectQueryCriteria(AdmDictDeliverieInfosRequest request);
+    /**
+     * 初始化待交付的信息点
+     * @param admObjectInfoMap
+     * @param deliveredInfos
+     * @param deliveredCodes
+     */
+    void initDeliveredInfos(Map<String, AdmObjectInfo> admObjectInfoMap, List<AdmObjectInfo> deliveredInfos, List<String> deliveredCodes);
 }

+ 7 - 238
src/main/java/com/persagy/proxy/dictionary/service/impl/AdmDictServiceImpl.java

@@ -43,19 +43,6 @@ import java.util.stream.Collectors;
 @EqualsAndHashCode(callSuper=true)
 public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> implements IAdmDictService<T> {
 
-    @Autowired
-    private IAdmEquipmentService equipmentService;
-
-    @Autowired
-    private IAdmSpaceService spaceService;
-
-    @Autowired
-    private IAdmSystemService systemService;
-
-    @Autowired
-    private IAdmShaftService shaftService;
-
-
     /**
      * 字典类型查询:所有设备类型、部件类型、系统类型、专业类型
      * 查询类型:输入设备类型:equipment,输入部件类型:component,输入系统类型:system,输入专业类型:major,业务空间类型 space ,资产 property,
@@ -711,101 +698,25 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
      * @return
      */
     @Override
-    public AdmResponse queryDictDeliveredInfos(InstanceUrlParam context, AdmDictDeliverieInfosRequest request, Class<T> clazz) {
+    public Map<String, AdmObjectInfo> queryDictDeliveredInfos(InstanceUrlParam context, AdmDictDeliverieInfosRequest request, Class<T> clazz) {
         String classCode = request.getClassCode();
         String objType = request.getObjType();
         //根据类型查询信息点
         List<AdmObjectInfo> admObjectInfos = queryObjectInfoByType(context, objType, classCode, clazz);
         if(CollUtil.isEmpty(admObjectInfos)){
             log.info("此类型下无信息点:{}{}"+objType +","+classCode);
-            return AdmResponse.success(new ArrayList<>());
-        }
-        Map<String, AdmObjectInfo> admObjectInfoMap = admObjectInfos.stream().collect(Collectors.toMap(AdmObjectInfo::getCode, Function.identity(),(v1,v2) -> v2));
-
-        //初始化待交付的信息点,id,name,localId,localName 无论是否有值默认展示,兼容历史逻辑
-        List<AdmObjectInfo> deliveredInfos = new ArrayList<>();
-        List<String> deliveredCodes = new ArrayList<>();
-        initDeliveredInfos( admObjectInfoMap, deliveredInfos, deliveredCodes);
-
-        if("equipment".equals(objType)){
-            //查询已交付的设备信息点
-            return getAdmEquipDeliveredInfo(context,request, admObjectInfoMap,deliveredInfos,deliveredCodes);
-        }
-        if("space".equals(objType)){
-            //查询已交付的空间信息点
-            return getAdmSpaceDeliveredInfo(context,request, admObjectInfoMap,deliveredInfos,deliveredCodes);
-        }
-        if("system".equals(objType)){
-            //查询已交付的系统信息点
-            return getAdmSystemDeliveredInfo(context,request, admObjectInfoMap,deliveredInfos,deliveredCodes);
-        }
-        if("shaft".equals(objType)){
-            //查询已交付的竖井信息点
-            return getAdmShaftDeliveredInfo(context,request, admObjectInfoMap,deliveredInfos,deliveredCodes);
-        }
-        return AdmResponse.success(deliveredInfos);
-    }
-
-    /**
-     * 查询项目下已有的系统设备类型树
-     * @param context
-     * @param request
-     * @param clazz
-     * @return
-     * @throws Exception
-     */
-    @Override
-    public AdmResponse querySystemEquipTree(InstanceUrlParam context, AdmDictQueryCriteria request, Class<T> clazz) throws Exception {
-        //查询项目下已有的设备类型
-        request.setName("equipment");
-        AdmResponse dictResponse = equipmentService.queryEquipClassCode(context, request, AdmEquipment.class);
-        List<String> classCodes = (List<String>)dictResponse.getContent();
-        if(CollUtil.isEmpty(classCodes)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        Map<String, List<String>> classCodeMap = classCodes.stream().collect(Collectors.groupingBy(item->item.substring(0,4),Collectors.toList()));
-        //查询系统设备类树
-        AdmDict admDict = new AdmDict();
-        admDict.setType(AdmDictCategoryEnum.SYSTEM_EQUIP.getValue());
-        AdmResponse categoryResponse = queryCategory(context, admDict, clazz);
-        List<AdmObjectType> objectTypes = (List<AdmObjectType>) categoryResponse.getContent();
-        if(CollUtil.isEmpty(objectTypes)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        //过滤设备实体中不存在的类型
-        Iterator<AdmObjectType> it = objectTypes.iterator();
-        while(it.hasNext()){
-            //过滤系统
-            AdmObjectType objectType = it.next();
-            List<String> objTypes = classCodeMap.get(objectType.getCode());
-            if(CollUtil.isEmpty(objTypes)){
-               it.remove();
-               continue;
-            }
-            //过滤子级:设备类型
-            List<AdmObjectType> children = objectType.getChildren();
-            if(CollUtil.isEmpty(children)){
-                it.remove();
-                continue;
-            }
-            Iterator<AdmObjectType> chidIterator = children.iterator();
-            while (chidIterator.hasNext()){
-                AdmObjectType next = chidIterator.next();
-                if(!objTypes.contains(next.getCode())){
-                    chidIterator.remove();
-                }
-            }
+            return new HashMap<>();
         }
-        return AdmResponse.success(objectTypes);
+        return admObjectInfos.stream().collect(Collectors.toMap(AdmObjectInfo::getCode, Function.identity(),(v1,v2) -> v2));
     }
 
-
     /**
      * 组装通用对象查询条件
      * @param request
      * @return
      */
-    private AdmQueryCriteria commbineObjectQueryCriteria(AdmDictDeliverieInfosRequest request){
+    @Override
+    public AdmQueryCriteria commbineObjectQueryCriteria(AdmDictDeliverieInfosRequest request){
         //增加过滤条件
         StringBuilder filters = new StringBuilder();
         if(StringUtils.isNotEmpty(request.getBuildingId())){
@@ -833,156 +744,14 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         return equipQueryCriteria;
     }
 
-
-    /**
-     * 查询已交付的设备信息点
-     * @param context
-     * @param request
-     */
-    private AdmResponse getAdmEquipDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
-        AdmQueryCriteria admQueryCriteria = commbineObjectQueryCriteria(request);
-        AdmResponse response = equipmentService.query(admQueryCriteria);
-        List<AdmEquipment> content = (List<AdmEquipment>)response.getContent();
-        if(CollUtil.isEmpty(content)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        //统计有值的信息点
-        for (AdmEquipment admEquipment : content) {
-            Map<String, Object> infos = admEquipment.getInfos();
-            if(CollUtil.isEmpty(infos)){
-                continue;
-            }
-            for (Map.Entry<String, Object> info : infos.entrySet()) {
-                Object value = info.getValue();
-                if(deliveredCodes.contains(info.getKey()) || value == null){
-                    continue;
-                }
-                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
-                if(admObjectInfo == null){
-                    continue;
-                }
-                deliveredCodes.add(info.getKey());
-                deliveredInfos.add(admObjectInfo);
-            }
-
-        }
-        return AdmResponse.success(deliveredInfos);
-    }
-
-
-    /**
-     * 查询已交付的空间信息点
-     * @param context
-     * @param request
-     */
-    private AdmResponse getAdmSpaceDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
-        AdmQueryCriteria admQueryCriteria = commbineObjectQueryCriteria(request);
-        AdmResponse response = spaceService.query(admQueryCriteria);
-        List<AdmSpace> content = (List<AdmSpace>)response.getContent();
-        if(CollUtil.isEmpty(content)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        //统计有值的信息点
-        for (AdmSpace admSpace : content) {
-            Map<String, Object> infos = admSpace.getInfos();
-            if(CollUtil.isEmpty(infos)){
-                continue;
-            }
-            for (Map.Entry<String, Object> info : infos.entrySet()) {
-                Object value = info.getValue();
-                if(deliveredCodes.contains(info.getKey()) || value == null){
-                    continue;
-                }
-                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
-                if(admObjectInfo == null){
-                    continue;
-                }
-                deliveredCodes.add(info.getKey());
-                deliveredInfos.add(admObjectInfo);
-            }
-
-        }
-        return AdmResponse.success(deliveredInfos);
-    }
-
-
-    /**
-     * 查询已交付的竖井信息点
-     * @param context
-     * @param request
-     */
-    private AdmResponse getAdmShaftDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
-        AdmQueryCriteria admQueryCriteria = commbineObjectQueryCriteria(request);
-        AdmResponse response = shaftService.doQuery(context,admQueryCriteria, AdmShaft.class);
-        List<AdmShaft> content = (List<AdmShaft>)response.getContent();
-        if(CollUtil.isEmpty(content)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        //统计有值的信息点
-        for (AdmShaft admShaft : content) {
-            Map<String, Object> infos = admShaft.getInfos();
-            if(CollUtil.isEmpty(infos)){
-                continue;
-            }
-            for (Map.Entry<String, Object> info : infos.entrySet()) {
-                Object value = info.getValue();
-                if(deliveredCodes.contains(info.getKey()) || value == null){
-                    continue;
-                }
-                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
-                if(admObjectInfo == null){
-                    continue;
-                }
-                deliveredCodes.add(info.getKey());
-                deliveredInfos.add(admObjectInfo);
-            }
-
-        }
-        return AdmResponse.success(deliveredInfos);
-    }
-
-    /**
-     * 查询已交付的系统信息点
-     * @param context
-     * @param request
-     */
-    private AdmResponse getAdmSystemDeliveredInfo(InstanceUrlParam context,AdmDictDeliverieInfosRequest request, Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
-        AdmQueryCriteria admQueryCriteria = commbineObjectQueryCriteria(request);
-        AdmResponse response = systemService.query(admQueryCriteria);
-        List<AdmSystem> content = (List<AdmSystem>)response.getContent();
-        if(CollUtil.isEmpty(content)){
-            return AdmResponse.success(new ArrayList<>());
-        }
-        //统计有值的信息点
-        for (AdmSystem admSystem : content) {
-            Map<String, Object> infos = admSystem.getInfos();
-            if(CollUtil.isEmpty(infos)){
-                continue;
-            }
-            for (Map.Entry<String, Object> info : infos.entrySet()) {
-                Object value = info.getValue();
-                if(deliveredCodes.contains(info.getKey()) || value == null){
-                    continue;
-                }
-                AdmObjectInfo admObjectInfo = admObjectInfoMap.get(info.getKey());
-                if(admObjectInfo == null){
-                    continue;
-                }
-                deliveredCodes.add(info.getKey());
-                deliveredInfos.add(admObjectInfo);
-            }
-
-        }
-        return AdmResponse.success(deliveredInfos);
-    }
-
     /**
      * 初始化待交付的信息点
      * @param admObjectInfoMap
      * @param deliveredInfos
      * @param deliveredCodes
      */
-    private void initDeliveredInfos(Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
+    @Override
+    public void initDeliveredInfos(Map<String, AdmObjectInfo> admObjectInfoMap,List<AdmObjectInfo> deliveredInfos,List<String> deliveredCodes){
         deliveredCodes.add("id");
         deliveredCodes.add("name");
         deliveredCodes.add("localId");

+ 3 - 0
src/main/java/com/persagy/proxy/object/service/IAdmSystemService.java

@@ -5,9 +5,12 @@ import com.persagy.proxy.adm.request.AdmQueryCriteria;
 import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmBaseService;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.dictionary.model.AdmDictDeliverieInfosRequest;
+import com.persagy.proxy.object.model.AdmObjectInfo;
 import com.persagy.proxy.object.model.AdmSystem;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * ADM 系统 接口

+ 3 - 0
src/main/java/com/persagy/proxy/object/service/impl/AdmSpaceServiceImpl.java

@@ -36,9 +36,12 @@ import com.persagy.proxy.common.client.DmpRwdClient;
 import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.common.entity.RelationDTO;
+import com.persagy.proxy.dictionary.model.AdmDict;
+import com.persagy.proxy.dictionary.model.AdmObjectType;
 import com.persagy.proxy.object.model.AdmEquipment;
 import com.persagy.proxy.object.model.AdmSpace;
 import com.persagy.proxy.object.model.AdmSystem;
+import com.persagy.proxy.object.model.AdmSystemCategory;
 import com.persagy.proxy.object.service.IAdmEquipmentService;
 import com.persagy.proxy.object.service.IAdmSpaceService;
 import com.persagy.proxy.object.service.IAdmSystemService;

+ 1 - 0
src/main/java/com/persagy/proxy/object/service/impl/AdmSystemServiceImpl.java

@@ -22,6 +22,7 @@ import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
 import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.dictionary.model.AdmDict;
+import com.persagy.proxy.dictionary.model.AdmDictDeliverieInfosRequest;
 import com.persagy.proxy.dictionary.model.AdmObjectType;
 import com.persagy.proxy.dictionary.service.IAdmDictService;
 import com.persagy.proxy.object.model.*;