Browse Source

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

lijie 3 years ago
parent
commit
d47889c6d2
37 changed files with 693 additions and 310 deletions
  1. 8 0
      src/main/java/com/persagy/proxy/adm/controller/AdmModelRelController.java
  2. 18 0
      src/main/java/com/persagy/proxy/adm/controller/AdmReportEquipController.java
  3. 52 6
      src/main/java/com/persagy/proxy/adm/controller/RelationReportController.java
  4. 180 0
      src/main/java/com/persagy/proxy/adm/handler/RelationReportHandler.java
  5. 6 1
      src/main/java/com/persagy/proxy/adm/model/AdmEquipment.java
  6. 5 2
      src/main/java/com/persagy/proxy/adm/model/AdmObjectInfo.java
  7. 1 1
      src/main/java/com/persagy/proxy/adm/model/AdmShaft.java
  8. 5 0
      src/main/java/com/persagy/proxy/adm/model/AdmSystem.java
  9. 5 5
      src/main/java/com/persagy/proxy/adm/model/EquipmentExcel.java
  10. 96 0
      src/main/java/com/persagy/proxy/adm/model/EquipmentExcel2.java
  11. 18 0
      src/main/java/com/persagy/proxy/adm/service/IAdmBaseService.java
  12. 30 0
      src/main/java/com/persagy/proxy/adm/service/IAdmObjectRelationCalService.java
  13. 0 9
      src/main/java/com/persagy/proxy/adm/service/IRelationReportService.java
  14. 50 0
      src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmBaseServiceImpl.java
  15. 2 51
      src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmDictBaseServiceImpl.java
  16. 85 6
      src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java
  17. 47 35
      src/main/java/com/persagy/proxy/adm/service/impl/AdmModelRelServiceImpl.java
  18. 55 0
      src/main/java/com/persagy/proxy/adm/service/impl/AdmObjectRelationCalServiceImpl.java
  19. 1 126
      src/main/java/com/persagy/proxy/adm/service/impl/RelationReportService.java
  20. 12 51
      src/main/java/com/persagy/proxy/adm/strategy/RelationObjectContext.java
  21. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2BdRelationObject.java
  22. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2FlRelationObject.java
  23. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2ShRelationObject.java
  24. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2SpRelationObject.java
  25. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSp2BdRelationObject.java
  26. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSp2FlRelationObject.java
  27. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2BdRelationObject.java
  28. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2FlRelationObject.java
  29. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2ShRelationObject.java
  30. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2BdRelationObject.java
  31. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2FlRelationObject.java
  32. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2ShRelationObject.java
  33. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2SpRelationObject.java
  34. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2BdRelationObject.java
  35. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2FlRelationObject.java
  36. 1 1
      src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2SpRelationObject.java
  37. 1 1
      src/main/java/com/persagy/proxy/common/client/DmpRwdClient.java

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

@@ -1,10 +1,12 @@
 package com.persagy.proxy.adm.controller;
 
+import com.persagy.dmp.common.exception.BusinessException;
 import com.persagy.proxy.adm.model.AdmModelRel;
 import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmModelRelService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 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;
@@ -41,6 +43,12 @@ public class AdmModelRelController {
      */
     @PostMapping("/equip-ispace")
     public AdmResponse update(@RequestBody AdmModelRel admModelRel) throws Exception {
+        if(StringUtils.isEmpty(admModelRel.getModelId())){
+            throw new BusinessException("模型ID不能为空");
+        }
+        if(StringUtils.isEmpty(admModelRel.getFloorId())){
+            throw new BusinessException("楼层ID不能为空");
+        }
         List<AdmModelRel> vos = service.doUpdateModelInfo(AdmContextUtil.toDmpContext(), AdmModelRel.class,admModelRel);
         return AdmResponse.success(vos);
     }

+ 18 - 0
src/main/java/com/persagy/proxy/adm/controller/AdmReportEquipController.java

@@ -20,6 +20,7 @@ import com.persagy.dmp.digital.client.DigitalRelationFacade;
 import com.persagy.dmp.digital.entity.ObjectRelation;
 import com.persagy.dmp.simple.client.DigitalObjectSimpleFacade;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.enums.AdmDictCategoryEnum;
 import com.persagy.proxy.adm.model.*;
 import com.persagy.proxy.adm.model.equip.EquipUpDateEnclosure;
 import com.persagy.proxy.adm.request.AdmCreateRequest;
@@ -32,6 +33,7 @@ import com.persagy.proxy.adm.service.IAdmSystemService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
 import com.persagy.proxy.common.entity.DmpResult;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
@@ -814,6 +816,20 @@ public class AdmReportEquipController {
         }
     }
 
+    /**
+     * 查询系统-设备类树
+     * @return
+     * @throws Exception
+     */
+    @GetMapping("/type/tree")
+    public AdmResponse querySystemEquipCategory() throws Exception {
+        // 组装上下文条件
+        AdmDict request = new AdmDict();
+        InstanceUrlParam context = AdmContextUtil.toDmpContext();
+        request.setType(AdmDictCategoryEnum.SYSTEM_EQUIP.getValue());
+        return dictService.queryCategory(context,request,AdmObjectType.class);
+    }
+
 
     /**
      * 计算动态、静态信息点
@@ -1024,4 +1040,6 @@ public class AdmReportEquipController {
             infos.put(attribute, upTarget);
         }
     }
+
+
 }

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

@@ -33,6 +33,8 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.collect.Lists;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
+import com.persagy.proxy.adm.handler.RelationReportHandler;
 import com.persagy.proxy.adm.model.AdmRelationObject;
 import com.persagy.proxy.adm.model.EquipmentExcel;
 import com.persagy.proxy.adm.request.AdmQueryCriteria;
@@ -63,6 +65,8 @@ public class RelationReportController {
 	@Value("${middleware.group.code}")
 	private String defaultCode;
 	
+	private final RelationReportHandler relationReportHandler;
+	
 	private final RelationObjectContext relationObjectContext;
 	
 	private final IRelationReportService relationReportService;
@@ -143,8 +147,9 @@ public class RelationReportController {
 	 * 下载报告-设备-未关联空间的设备
 	 * 设备.xlsx 是个空模板,所以这里未使用 
 	 * 
-	 * @param queryCriteria
+	 * @param projectId
 	 * @param request
+	 * @param response
 	 * @return
 	 */
 	@RequestMapping("/graphic/downloads/eq/not/sp")
@@ -161,7 +166,37 @@ public class RelationReportController {
             String fileName = URLEncoder.encode("equipment", encode);
             response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
             
-            List<EquipmentExcel> equipByNotSpace = this.relationReportService.findEquipByNotSpace(groupCode, projectId);
+            List<EquipmentExcel> equipByNotSpace = this.relationReportHandler.findEquipByNotSpace(groupCode, projectId);
+            EasyExcel.write(response.getOutputStream(), EquipmentExcel.class).sheet("设备").doWrite(equipByNotSpace);
+		} catch(Exception e) {
+			log.error("设备数据导出异常", e);
+		}
+	}
+	
+	/**
+	 * 下载报告-统计项目下已有的设备,信息点,每个设备
+	 * 设备.xlsx 是个空模板,所以这里未使用 
+	 * 
+	 * @param projectId
+	 * @param request
+	 * @param response
+	 * @return
+	 */
+	@RequestMapping("/graphic/downloads/project/binding/point")
+	public void downloadsProjectBindingPoint(@RequestParam(required = false) String projectId, HttpServletRequest request, HttpServletResponse response) {
+		String groupCode = request.getHeader(AdmCommonConstant.GROUP_CODE_HEADER);
+		if (StrUtil.isBlank(projectId)) {
+			projectId = request.getHeader(AdmCommonConstant.PROJECT_ID_HEADER);
+		}
+		try {
+            response.setContentType("application/vnd.ms-excel");
+            String encode = StandardCharsets.UTF_8.name();
+            response.setCharacterEncoding(encode);
+            // 防止中文乱码
+            String fileName = URLEncoder.encode("设备实例交付", encode);
+            response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+            
+            List<EquipmentExcel> equipByNotSpace = this.relationReportHandler.findEquipByNotSpace(groupCode, projectId);
             EasyExcel.write(response.getOutputStream(), EquipmentExcel.class).sheet(0).doWrite(equipByNotSpace);
 		} catch(Exception e) {
 			log.error("设备数据导出异常", e);
@@ -336,7 +371,13 @@ public class RelationReportController {
 			response.setHeader("Content-disposition", "attachment;filename=relation-template.xlsx");
 			
 			log.info("下载报表: groupCode[{}], projectId[{}], relType[{}], code[{}]", groupCode, projectId, relType, code);
-			List<AdmRelationObject> relationObjects = this.relationObjectContext.findRelationObject(groupCode, projectId, relType);
+			AdmRelationTypeEnum typeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
+			
+			List<AdmRelationObject> relationObjects = null;
+			if (typeEnum != null) {
+				String graphAndRelKey = typeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + typeEnum.getRelCode();
+				relationObjects = this.relationObjectContext.findRelationObject(groupCode, projectId, graphAndRelKey);
+			}
 			
 			File templateFile = this.getTemplateFile("relation-template.xlsx");
 			EasyExcel.write(response.getOutputStream()).withTemplate(templateFile).sheet(EXPORT_SHEET_NAME).needHead(false).doWrite(relationObjects);
@@ -371,6 +412,11 @@ public class RelationReportController {
 			if (file == null) {
 				return AdmResponse.failure("未选择文件");
 			}
+			AdmRelationTypeEnum typeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
+			if (typeEnum == null) {
+				return AdmResponse.failure("不支持的关系类型");
+			}
+			String graphAndRelKey = typeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + typeEnum.getRelCode();
 			
 			int failurNum = 0;
 			int successNum = 0;
@@ -406,7 +452,7 @@ public class RelationReportController {
 		    	relationObject.setSlaveId(slaveIdCell == null ? null : slaveIdCell.getStringCellValue());
 		    	
 		    	// 校验数据
-				Object result = this.relationObjectContext.checkRelationObject(relationObject, groupCode, projectId, relType, code);
+				Object result = this.relationObjectContext.checkRelationObject(relationObject, groupCode, projectId, graphAndRelKey, code);
 				if (result instanceof String) {
 					failurNum++;
 					xssfRow.createCell(16).setCellValue((String)result);
@@ -419,7 +465,7 @@ public class RelationReportController {
 				rowNums.add(i);
 				relationObjects.add(relation);
 				if (relationObjects.size() >= 1000) {
-					boolean objects = this.relationObjectContext.saveRelationObjects(relationObjects, groupCode, projectId, relType);
+					boolean objects = this.relationObjectContext.saveRelationObjects(relationObjects, groupCode, projectId, graphAndRelKey);
 					if (objects) {
 						successNum += relationObjects.size();
 					} else {
@@ -434,7 +480,7 @@ public class RelationReportController {
 			}
 		    // 最后一次遗留数据录入
 		    if (CollectionUtil.isNotEmpty(relationObjects)) {
-		    	boolean objects = this.relationObjectContext.saveRelationObjects(relationObjects, groupCode, projectId, relType);
+		    	boolean objects = this.relationObjectContext.saveRelationObjects(relationObjects, groupCode, projectId, graphAndRelKey);
 				if (objects) {
 					successNum += relationObjects.size();
 				} else {

+ 180 - 0
src/main/java/com/persagy/proxy/adm/handler/RelationReportHandler.java

@@ -0,0 +1,180 @@
+package com.persagy.proxy.adm.handler;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.Lists;
+import com.persagy.dmp.basic.dto.RequestData;
+import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.define.client.DigitalDefineFacade;
+import com.persagy.dmp.define.entity.ObjectTypeDefine;
+import com.persagy.dmp.digital.client.DigitalObjectFacade;
+import com.persagy.dmp.digital.client.DigitalRelationFacade;
+import com.persagy.dmp.digital.entity.ObjectDigital;
+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.GraphCodeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
+import com.persagy.proxy.adm.model.EquipmentExcel;
+import com.persagy.proxy.adm.service.IRelationReportService;
+import com.persagy.proxy.adm.strategy.RelationObjectContext;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
+import lombok.RequiredArgsConstructor;
+
+/**
+ * 
+ * @version 1.0.0
+ * @company persagy 
+ * @author zhangqiankun
+ * @date 2021年10月15日 下午3:09:10
+ */
+@Component
+@RequiredArgsConstructor
+public class RelationReportHandler {
+	
+	@Value("${middleware.group.code}")
+	private String defaultCode;
+
+	private final RelationObjectContext relationObjectContext;
+	
+	private final IRelationReportService relationReportService;
+
+	/**
+	 * 查询出不在空间内的设备数据
+	 * 
+	 * @param groupCode
+	 * @param projectId
+	 */
+	public List<EquipmentExcel> findEquipByNotSpace(String groupCode, String projectId) {
+		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
+		
+		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+		QueryCriteria objectCriteria = new QueryCriteria();
+		ObjectNode object = objectMapper.createObjectNode();
+		object.put("objType", AdmObjectType.EQUIPMENT.getIndex());
+		objectCriteria.setCriteria(object);
+		
+		// 1.获取所有的设备类定义的className
+		List<ObjectTypeDefine> classList = DigitalDefineFacade.queryObjectType(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
+		// key-classCode, value-className
+		Map<String, String> classDefine = new HashMap<String, String>();
+		if (CollectionUtil.isNotEmpty(classList)) {
+			for (ObjectTypeDefine objectTypeDefine : classList) {
+				classDefine.put(objectTypeDefine.getCode(), objectTypeDefine.getName());
+			}
+		}
+		// 2.获取所有的设备对象数据
+		objectCriteria.setOrders(Collections.singletonList(OrderItem.asc("classCode")));
+		List<ObjectNode> equipList = DigitalObjectFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
+		if (CollectionUtil.isEmpty(equipList)) {
+			return Lists.newArrayList();
+		}
+		
+		// 3.查询出所有的边类型为 Eq2Sp 的关系数据
+		QueryCriteria relationCriteria = new QueryCriteria();
+		ObjectNode relation = objectMapper.createObjectNode();
+		relation.put("relCode", RelCodeEnum.Eq2Sp.name());
+		relationCriteria.setCriteria(relation);
+		List<ObjectRelation> relationList = DigitalRelationFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, relationCriteria);
+		Set<String> equipIds = new HashSet<String>();
+		if (CollectionUtil.isNotEmpty(relationList)) {
+			for (ObjectRelation relationInfo : relationList) {
+				equipIds.add(relationInfo.getObjFrom());
+			}
+		}
+		
+		return this.exportEquipmentExcel(equipList, classDefine, equipIds, groupCode, projectId);
+	}
+	
+	/**
+	 * 构造 excel 设备数据
+	 * 
+	 * @param equipList 设备数据集合
+	 * @param classDefine 类定义信息
+	 * @param equipIds 需要剔除的设备ID集合
+	 * @param groupCode 
+	 * @param projectId 
+	 * @return
+	 */
+	private List<EquipmentExcel> exportEquipmentExcel(List<ObjectNode> equipList, Map<String, String> classDefine, Set<String> equipIds, String groupCode, String projectId) {
+		// key: 设备ID,value: 建筑名称
+		Map<String, String> buildTemp = new HashMap<String, String>();
+		// key: 设备ID,value: 楼层名称
+		Map<String, String> floorTemp = new HashMap<String, String>();
+		
+		// 获取建筑名称
+		//this.relationObjectContext.findRelationObject(groupCode, projectId, projectId);
+		RequestData requestData = new RequestData();
+		requestData.setGraphCode(GraphCodeEnum.MechInArch.name());
+		requestData.setRelCode(RelCodeEnum.Eq2Bd.name());
+		requestData.setPage(1L);
+		requestData.setSize(500L);
+		List<ObjectDigital> buildDigitals = DigitalObjectFacade.queryObjectListByGraphCodeAndRelCode(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, requestData);
+		if (CollectionUtil.isNotEmpty(buildDigitals)) {
+			for (ObjectDigital master : buildDigitals) {
+				List<ObjectDigital> slaveDigitals = master.getRelObjs();
+				ObjectDigital slave = CollectionUtil.isEmpty(slaveDigitals) ? null : slaveDigitals.get(0);
+				if (slave != null) {
+					buildTemp.put(master.getId(), slave.getLocalName());
+				}
+			}
+		}
+		// 楼层名称
+		requestData.setRelCode(RelCodeEnum.Eq2Fl.name());
+		List<ObjectDigital> floorDigitals = DigitalObjectFacade.queryObjectListByGraphCodeAndRelCode(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, requestData);
+		if (CollectionUtil.isNotEmpty(floorDigitals)) {
+			for (ObjectDigital master : floorDigitals) {
+				List<ObjectDigital> slaveDigitals = master.getRelObjs();
+				ObjectDigital slave = CollectionUtil.isEmpty(slaveDigitals) ? null : slaveDigitals.get(0);
+				if (slave != null) {
+					floorTemp.put(master.getId(), slave.getLocalName());
+				}
+			}
+		}
+		
+		// 结果封装
+		List<EquipmentExcel> excelList = new ArrayList<EquipmentExcel>();
+		for (ObjectNode equip : equipList) {
+			String id = equip.get("id") == null ? null : equip.get("id").asText();
+			if (id != null && !equipIds.contains(id)) {
+				EquipmentExcel excel = new EquipmentExcel();
+				excel.setId(id);
+				excel.setName(equip.get("name") == null ? null : equip.get("name").asText());
+				excel.setLocalId(equip.get("localId") == null ? null : equip.get("localId").asText());
+				excel.setLocalName(equip.get("localName") == null ? null : equip.get("localName").asText());
+				
+				String infos = equip.get("infos") == null ? null : equip.get("infos").asText();
+				if (StrUtil.isNotBlank(infos)) {
+					JSONObject parseObject = JSONObject.parseObject(infos);
+					excel.setBimId(parseObject.getString("bimId"));
+				}
+				
+				String classCode = equip.get("classCode") == null ? null : equip.get("classCode").asText();
+				excel.setClassCodeName(classCode == null ? null : classDefine.get(classCode));
+				
+				excel.setBuildName(buildTemp.get(id));
+				excel.setFloorName(floorTemp.get(id));
+				excel.setModelFileName("T1F10模型文件v18.rvt");	// 这里写死是不对的,需要后续再补充改变
+				excelList.add(excel);
+			}
+		}
+		return excelList;
+	}
+	
+}

+ 6 - 1
src/main/java/com/persagy/proxy/adm/model/AdmEquipment.java

@@ -2,6 +2,7 @@ package com.persagy.proxy.adm.model;
 
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.proxy.adm.annotations.CascadeColumn;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -109,7 +110,7 @@ public class AdmEquipment extends AdmSBaseEntity<AdmEquipment>{
     private String qrcodePic;
 
     /** 对象类型 */
-    private String objectType;
+    private String objectType = OBJ_TYPE;
 
     /** 资产信息实体类   资产对应设备设施关系 资产→设备设施*/
     @CascadeColumn(graphCode = "Property2Mech", relCode = "Pe2Eq", selectToObj = false)
@@ -187,4 +188,8 @@ public class AdmEquipment extends AdmSBaseEntity<AdmEquipment>{
     //@CascadeColumn(table="equipment", idColumn="class_code", childIdColumn="parent_id")
     private List<AdmObjectType> componentCategory;
 
+    /** 级联-设备分类 */
+    //@SCascade(table="equipment", idColumn="id", childIdColumn="class_code")
+    private ObjectNode equipCategory;
+
 }

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

@@ -101,12 +101,12 @@ public class AdmObjectInfo {
 
     /** 是否只读, 如果是则不允许对该信息点做变更 */
     private Boolean readonly;
-
     /** 排序 */
     private Integer sort;
 
     /** 是否显示 */
-   private Boolean visible;
+    private Boolean visible;
+
 
     /** 是否编辑 */
     private Boolean editable;
@@ -123,4 +123,7 @@ public class AdmObjectInfo {
 
     /** 字典内容 */
    private List<AdmObjectInfo> content;
+
+   /** 展示顺序 */
+   private Integer showOrder;
 }

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

@@ -44,7 +44,7 @@ public class AdmShaft extends AdmSBaseEntity<AdmShaft>{
     /** BIM模型中轮廓坐标 */
     private List<AdmPointPosition> outline;
     /** 对象类型 */
-    private String objectType;
+    private String objectType = OBJ_TYPE;
     /** 级联-竖井内的设备 */
     @CascadeColumn(graphCode = "MechInArch", relCode = "Eq2Sh", selectToObj = false)
     private List<AdmEquipment> equipmentList;

+ 5 - 0
src/main/java/com/persagy/proxy/adm/model/AdmSystem.java

@@ -49,6 +49,11 @@ public class AdmSystem extends AdmSBaseEntity<AdmSystem> {
     /** 级联-设备 */
     @CascadeColumn(graphCode = "MechSubset", relCode = "Sy2Eq")
     private List<AdmEquipment> equipmentList;
+
+    /** 级联-竖井*/
+    @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Sh")
+    private List<AdmShaft> shaftList;
+
     /** 级联-空间 */
     @CascadeColumn(graphCode = "MechInArch", relCode = "Sy2Sp")
     private List<AdmSpace> zoneSpaceBaseTableList;

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

@@ -25,15 +25,15 @@ public class EquipmentExcel {
 	@ExcelProperty(value = "设备id", index=0)
 	private String id;
 	
-	@ColumnWidth(25)
+	@ColumnWidth(20)
 	@ExcelProperty(value = "设备名称", index=1)
 	private String name;
 
-	@ColumnWidth(25)
+	@ColumnWidth(20)
 	@ExcelProperty(value = "设备本地名称", index=2)
 	private String localId;
 
-	@ColumnWidth(25)
+	@ColumnWidth(20)
 	@ExcelProperty(value = "设备本地编码", index=3)
 	private String localName;
 	
@@ -41,7 +41,7 @@ public class EquipmentExcel {
 	@ExcelProperty(value = "BIMID", index=4)
 	private String bimId;
 
-	@ColumnWidth(25)
+	@ColumnWidth(20)
 	@ExcelProperty(value = "设备类", index=5)
 	private String classCodeName;
 	
@@ -53,7 +53,7 @@ public class EquipmentExcel {
 	@ExcelProperty(value = "楼层", index=7)
 	private String floorName; 
 	
-	@ColumnWidth(30)
+	@ColumnWidth(20)
 	@ExcelProperty(value = "模型文件名", index=8)
 	private String modelFileName;
 	

+ 96 - 0
src/main/java/com/persagy/proxy/adm/model/EquipmentExcel2.java

@@ -0,0 +1,96 @@
+package com.persagy.proxy.adm.model;
+
+import org.apache.poi.ss.usermodel.Font;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.HeadFontStyle;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @version 
+ * @description 不在空间内的设备数据导出实体类
+ * @company persagy
+ * @author zhangqiankun
+ * @since 2020年11月26日:	下午12:30:39
+ */
+@Getter
+@Setter
+@HeadFontStyle(color = Font.COLOR_NORMAL)
+public class EquipmentExcel2 {
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "序号", index=0)
+	private String index;
+	
+	@ColumnWidth(25)
+	@ExcelProperty(value = "项目名称", index=1)
+	private String projectName;
+
+	@ColumnWidth(20)
+	@ExcelProperty(value = "建筑", index=2)
+	private String buildName;
+
+	@ColumnWidth(20)
+	@ExcelProperty(value = "楼层", index=3)
+	private String floorName;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "系统编码", index=4)
+	private String systemCode;
+
+	@ColumnWidth(20)
+	@ExcelProperty(value = "系统名称", index=5)
+	private String systemName;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "设备类型编码", index=6)
+	private String equipCode;
+	
+	@ColumnWidth(20)
+	@ExcelProperty(value = "设备类型名称", index=7)
+	private String equipName; 
+	
+	@ColumnWidth(50)
+	@ExcelProperty(value = "设备ID", index=8)
+	private String equipId;
+	
+	@ColumnWidth(50)
+	@ExcelProperty(value = "BIMID", index=9)
+	private String bimId;
+	
+	@ColumnWidth(20)
+	@ExcelProperty(value = "本地编码", index=10)
+	private String localId;
+	
+	@ColumnWidth(20)
+	@ExcelProperty(value = "本地名称", index=11)
+	private String localName;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】应绑点位总数", index=12)
+	private String needPointCount;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】已绑点位总数", index=13)
+	private String nowPointCount;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】静态应绑点", index=14)
+	private String needStaticPointCount;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】静态已绑点", index=15)
+	private String nowStaticPointCount;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】动态应绑点", index=16)
+	private String needDynamicPointCount;
+	
+	@ColumnWidth(10)
+	@ExcelProperty(value = "【信息点】动态已绑点", index=17)
+	private String nowDynamicPointCount;
+	
+}

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

@@ -55,4 +55,22 @@ public interface IAdmBaseService<T> {
      * @return
      */
     AdmResponse doQuery(InstanceUrlParam context, QueryCriteria request, Class<T> clazz);
+
+    /**
+     * 条件查询标记计算关系
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    AdmResponse doQueryRelationProjectCal(InstanceUrlParam context, QueryCriteria dmpRequest, Class<T> clazz);
+
+    /**
+     * 修改标记计算关系
+     * @param context
+     * @param clazz
+     * @param voList
+     * @return
+     */
+    List<T> doUpdateRelationProjectCal(InstanceUrlParam context, Class<T> clazz, List<T> voList);
 }

+ 30 - 0
src/main/java/com/persagy/proxy/adm/service/IAdmObjectRelationCalService.java

@@ -0,0 +1,30 @@
+package com.persagy.proxy.adm.service;
+
+import com.persagy.dmp.digital.entity.ObjectRelationProjectCal;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 标记关系计算
+ * @author:linhuili
+ * @date:2021/10/15
+ */
+public interface IAdmObjectRelationCalService extends IAdmBaseService<ObjectRelationProjectCal> {
+
+    /**
+     *  根据关系类型查询标记计算关系
+     * @param context
+     * @param relationType
+     * @return
+     */
+    List<ObjectRelationProjectCal> queryCalRelByRelationType(InstanceUrlParam context, Set<String> relationType);
+
+    /**
+     * 更新标记计算关系
+     * @param context
+     * @param objectRelationProjectCals
+     */
+    void updateObjectCalRel(InstanceUrlParam context, List<ObjectRelationProjectCal> objectRelationProjectCals);
+}

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

@@ -10,7 +10,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.define.entity.GraphDefine;
 import com.persagy.dmp.define.entity.RelationDefine;
 import com.persagy.dmp.digital.entity.ObjectRelation;
-import com.persagy.proxy.adm.model.EquipmentExcel;
 
 /**
  * 报表/模板下载
@@ -162,14 +161,6 @@ public interface IRelationReportService {
 	List<ObjectRelation> findObjectRelationList(String groupCode, String projectId, String graphCode, String relCode);
 
 	/**
-	 * 找到不在空间内的设备数据
-	 * 
-	 * @param groupCode
-	 * @param projectId
-	 */
-	List<EquipmentExcel> findEquipByNotSpace(String groupCode, String projectId);
-	
-	/**
 	 * 查询关系总览(空表,先插入)
 	 * @param content: 模糊查询卡片名称关键字
 	 */

+ 50 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmBaseServiceImpl.java

@@ -415,4 +415,54 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
         return response;
     }
 
+    /**
+     * 查询标记计算关系
+     * @param context
+     * @param dmpRequest
+     * @param clazz
+     * @return
+     */
+    @Override
+    public AdmResponse doQueryRelationProjectCal(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.queryRelationProjectCal(context, para);
+        List<T> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(dmpResult.getData(), null, clazz);
+        // 设置返回值
+        AdmResponse response = AdmResponse.success(admVOs);
+        Long total = dmpResult.getCount() == null ? null : dmpResult.getCount().longValue();
+        response.setTotal(total);
+        return response;
+    }
+
+
+    /**
+     * 修改
+     * @param context
+     * @param clazz
+     * @param voList
+     * @return
+     */
+    @Override
+    public List<T> doUpdateRelationProjectCal(InstanceUrlParam context, Class<T> clazz, List<T> voList) {
+        if(CollUtil.isEmpty(voList)) {
+            return null;
+        }
+        ArrayNode vos = AdmEntityTransferUtil.toDmpMultiEntity(voList);
+        // 调用中台修改
+        DmpResult<JSONArray> response = rwdClient.updateRelationProjectCal(context, JSONArray.parseArray(vos.toString()));
+        if(!DmpResult.SUCCESS.equals(response.getResult())) {
+            throw new RuntimeException("调用中台查询接口出错:" + response.getMessage());
+        }
+        // 转换为结果
+        return AdmEntityTransferUtil.toAdmMultiEntity(response.getData(), null, clazz);
+    }
+
 }

+ 2 - 51
src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmDictBaseServiceImpl.java

@@ -199,6 +199,7 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
             admVO.setMultiple(admVO.getIsMultiple());
             admVO.setRegion(admVO.getIsRegion());
             admVO.setGroupCode(groupCode);
+            admVO.setSort(admVO.getShowOrder());
 
             //path路径处理
             if(StringUtils.isEmpty(admVO.getFirstName()) || AdmDictConstant.FIRST_BASE_TAG.equals(admVO.getFirstName())
@@ -212,60 +213,10 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
             if(admVO.getVisible() == null){
                 admVO.setVisible(false);
             }
-            //信息点是否可编辑设置默认值
-            if(admVO.getEditable() == null){
-                List<String> unEditableList = checkoutDefInfoUnEditable();
-                if(unEditableList.contains(admVO.getCode())){
-                    admVO.setEditable(false);
-                }else {
-                    admVO.setEditable(true);
-                }
-            }
-            //是否禁止操作设置默认值
-            if(admVO.getUnDisabled() == null){
-                List<String> unDisableList = checkoutDefInfoUnDisable();
-                if(unDisableList.contains(admVO.getCode())){
-                    admVO.setUnDisabled(false);
-                }else {
-                    admVO.setUnDisabled(true);
-                }
-            }
         }
     }
 
-    /**
-     * 校验信息点是否可编辑
-     * @return
-     */
-    public List<String> checkoutDefInfoUnEditable(){
-        List<String> list = new ArrayList<>();
-        list.add("id");
-        list.add("name");
-        list.add("qRCodePic");
-        list.add("defaultQRCode");
-        list.add("bimId");
-        list.add("bimFamilyName");
-        list.add("bimFamilySymbol");
-        return list;
-    }
-    
-    /**
-     * 校验信息点是否禁止使用
-     * @return
-     */
-    public List<String> checkoutDefInfoUnDisable(){
-        List<String> list = new ArrayList<>();
-        list.add("id");
-        list.add("name");
-        list.add("localId");
-        list.add("localName");
-        list.add("qRCodePic");
-        list.add("defaultQRCode");
-        list.add("bimId");
-        list.add("bimFamilyName");
-        list.add("bimFamilySymbol");
-        return list;
-    }
+
 
     /**
      * 字典数据格式与ADM兼容

+ 85 - 6
src/main/java/com/persagy/proxy/adm/service/impl/AdmDictServiceImpl.java

@@ -354,9 +354,12 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
      */
     @Override
     public AdmResponse query(InstanceUrlParam context, AdmDictQueryCriteria request, String fieldName, Class<T> clazz) {
+        //转换排序字段
+        revertSortField(request);
         //查询类型下的所有信息点信息
         AdmResponse admResponse = doQueryObjectInfo(context, request, AdmDictConstant.CLASS_CODE, clazz);
         List<AdmObjectInfo> admObjectInfos = (List<AdmObjectInfo>) admResponse.getContent();
+        admObjectInfos = sortFuncidForEdit(admObjectInfos);
         //查询平台级信息点采集信息
         List<ObjectInfoCollect> commonObjectInfoCollect = queryObjectInfoCollect(context, "common", request.getType(), clazz);
         Map<String, Boolean> commonObjectInfoCollectMap = commonObjectInfoCollect.stream().filter(item -> StrUtil.isNotEmpty(item.getDefineInfoId())).collect(Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable));
@@ -366,7 +369,6 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         Map<String, Boolean> projectObjectInfoCollectMap = projectObjectInfoCollect.stream().filter(item -> StrUtil.isNotEmpty(item.getDefineInfoId())).collect(Collectors.toMap(ObjectInfoCollect::getDefineInfoId,ObjectInfoCollect::getVisiable));
 
         String dictType = request.getDictType();
-
         //采集值配置查询
         if(StringUtils.isNotEmpty(dictType)){
             //查询平台级、项目级信息点采集信息
@@ -379,7 +381,6 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
             admResponse.setContent(admObjectInfos);
             return admResponse;
         }
-
         //只查看采集值 todo
         if(CollUtil.isNotEmpty(projectObjectInfoCollectMap)){
             setOnlyQueryObjectInfoVisiable(admObjectInfos,projectObjectInfoCollectMap,dictType);
@@ -391,6 +392,14 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
     }
 
     /**
+     * 转换排序字段
+     * @param request
+     */
+    private void revertSortField(AdmDictQueryCriteria request){
+     request.setOrders("showOrder asc, name desc");
+    }
+
+    /**
      * 设置信息点是否可见
      * @param admObjectInfos
      * @param objectInfoCollectMap
@@ -416,6 +425,8 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
                 }
             }
             admObjectInfo.setVisible(visiable);
+            admObjectInfo.setEditable(true);
+            admObjectInfo.setUnDisabled(true);
         }
     }
 
@@ -432,20 +443,72 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         for (AdmObjectInfo admObjectInfo : admObjectInfos) {
             Boolean visiable = null;
             String id = admObjectInfo.getId();
+            //设置信息点是否可见
             if(CollUtil.isNotEmpty(objectInfoCollectMap)){
                 visiable = objectInfoCollectMap.get(id);
-            }else {
-                if(visiable == null && ("localId".equals(admObjectInfo.getCode()) || "localName".equals(admObjectInfo.getCode()))){
-                    visiable = true;
-                }
+            }
+            if(visiable == null && ("localId".equals(admObjectInfo.getCode()) || "localName".equals(admObjectInfo.getCode()))){
+                visiable = true;
             }
             if(visiable == null){
                 visiable = false;
             }
+            //信息点是否可编辑设置默认值
+            if(admObjectInfo.getEditable() == null){
+                List<String> unEditableList = checkoutDefInfoUnEditable();
+                if(unEditableList.contains(admObjectInfo.getCode())){
+                    admObjectInfo.setEditable(false);
+                }else {
+                    admObjectInfo.setEditable(true);
+                }
+            }
+            //是否禁止操作设置默认值
+            if(admObjectInfo.getUnDisabled() == null){
+                List<String> unDisableList = checkoutDefInfoUnDisable();
+                if(unDisableList.contains(admObjectInfo.getCode())){
+                    admObjectInfo.setUnDisabled(false);
+                }else {
+                    admObjectInfo.setUnDisabled(true);
+                }
+            }
             admObjectInfo.setVisible(visiable);
         }
     }
 
+
+    /**
+     * 校验信息点是否可编辑
+     * @return
+     */
+    public List<String> checkoutDefInfoUnEditable(){
+        List<String> list = new ArrayList<>();
+        list.add("id");
+        list.add("name");
+        list.add("qRCodePic");
+        list.add("defaultQRCode");
+        list.add("bimId");
+        list.add("bimFamilyName");
+        list.add("bimFamilySymbol");
+        return list;
+    }
+
+    /**
+     * 校验信息点是否禁止使用
+     * @return
+     */
+    public List<String> checkoutDefInfoUnDisable(){
+        List<String> list = new ArrayList<>();
+        list.add("id");
+        list.add("name");
+        list.add("localId");
+        list.add("localName");
+        list.add("qRCodePic");
+        list.add("defaultQRCode");
+        list.add("bimId");
+        list.add("bimFamilyName");
+        list.add("bimFamilySymbol");
+        return list;
+    }
     /**
      * 查询信息点采集信息
      * @param context
@@ -466,6 +529,22 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         return (List<ObjectInfoCollect>) admResponse.getContent();
     }
 
+    private List<AdmObjectInfo> sortFuncidForEdit(List<AdmObjectInfo> list) {
+        List<AdmObjectInfo> resultOrders = new ArrayList<>();
+        List<AdmObjectInfo> defaultOrders = new ArrayList<>();
+        for (AdmObjectInfo admObjectInfo : list) {
+            if(admObjectInfo.getSort()!=null){
+                resultOrders.add(admObjectInfo);
+            }else{
+                defaultOrders.add(admObjectInfo);
+            }
+        }
+        if(CollUtil.isNotEmpty(defaultOrders)){
+            resultOrders.addAll(defaultOrders);
+        }
+        return resultOrders;
+    }
+
     /**
      * 统计类型下的非静态信息点
      * @param context

+ 47 - 35
src/main/java/com/persagy/proxy/adm/service/impl/AdmModelRelServiceImpl.java

@@ -3,8 +3,12 @@ package com.persagy.proxy.adm.service.impl;
 import cn.hutool.core.collection.CollUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.JsonNode;
+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.dmp.digital.entity.ObjectRelationProjectCal;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
 import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
 import com.persagy.proxy.adm.model.*;
@@ -18,9 +22,8 @@ import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import javax.management.Query;
+import java.util.*;
 
 /**
  * @ClassName AdmModelRelServiceImpl
@@ -43,6 +46,9 @@ public class AdmModelRelServiceImpl extends AbstractAdmBaseServiceImpl<AdmModelR
     @Autowired
     private IAdmISpaceService iSpaceService;
 
+    @Autowired
+    private IAdmObjectRelationCalService iAdmObjectRelationCalService;
+
     /**
      * 模型修改设备元空间的建筑楼层信息
      * @param context
@@ -58,10 +64,15 @@ public class AdmModelRelServiceImpl extends AbstractAdmBaseServiceImpl<AdmModelR
         floorCriteria.setModelId(vo.getModelId());
         List<AdmFloor> floorList = queryFloorEntity(context,floorCriteria);
         if(CollUtil.isNotEmpty(floorList)){
-            List<String> floorQueryTypes = getFloorQueryTypes(floorList);
-            //根据类型查询relation_type_project
-            //更新边类型计算状态:computationalState为2
-
+            Set<String> floorQueryTypes = getFloorQueryTypes(floorList);
+            List<ObjectRelationProjectCal> relationProjectCals = iAdmObjectRelationCalService.queryCalRelByRelationType(context, floorQueryTypes);
+            if(CollUtil.isNotEmpty(relationProjectCals)){
+                //更新边类型计算状态:computationalState为2
+                relationProjectCals.forEach(item->{
+                    item.setComputationalState(2);
+                });
+                iAdmObjectRelationCalService.updateObjectCalRel(context,relationProjectCals);
+            }
         }
         //2.修改设备和元空间的建筑楼层信息
         String oldBimId = vo.getOldBimId();
@@ -315,6 +326,7 @@ public class AdmModelRelServiceImpl extends AbstractAdmBaseServiceImpl<AdmModelR
         if(StringUtils.isNotEmpty(vo.getFloorId())){
             criteria.setFilters("id = '"+vo.getFloorId()+"'");
         }
+        criteria.setName("floor");
         AdmResponse admResponse = floorService.doQuery(context, criteria, AdmFloor.class);
         return (List<AdmFloor>)admResponse.getContent();
     }
@@ -324,38 +336,38 @@ public class AdmModelRelServiceImpl extends AbstractAdmBaseServiceImpl<AdmModelR
      * 获取楼层查询类型
      * @param floorList
      */
-    private List<String> getFloorQueryTypes(List<AdmFloor> floorList){
-        List<String> types = new ArrayList<>();
+    private Set<String> getFloorQueryTypes(List<AdmFloor> floorList){
+        Set<String> types = new HashSet<>();
         for (AdmFloor admFloor : floorList) {
             if(CollUtil.isNotEmpty(admFloor.getOutline())){
-                types.add("eq2fl");
-                types.add("fl2sp");
-                types.add("bd2sp");
+                types.add(AdmRelationTypeEnum.EQ2FL.getRelCode());
+                types.add(AdmRelationTypeEnum.FL2SP.getRelCode());
+                types.add(AdmRelationTypeEnum.BD2SP.getRelCode());
             }
-            types.add(AdmRelationTypeEnum.EQ2SP_IN.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_2.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_CONDWATERNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_VENTNETWORK_2.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_3.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_4.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_DHWNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_RECYCLEWATERNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_FIREVENTNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_FIREWATERNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_VRFNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_CHILLWATERLOOP_2.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQFRESHAIRNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_CHILLWATERLOOP_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_DRINKINGWATERNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_COOLINGWATERLOOP_2.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_VENTNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_2.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_COOLINGWATERLOOP_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_SUPPLYWATERNETWORK_1.getRelCode());
-            types.add(AdmRelationTypeEnum.EQ2EQ_DRAININGWATERNETWORK_1.getRelCode());
         }
+        types.add(AdmRelationTypeEnum.EQ2SP_IN.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_2.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_CONDWATERNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_VENTNETWORK_2.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_3.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_4.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_DHWNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_RECYCLEWATERNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_FIREVENTNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_FIREWATERNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_VRFNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_CHILLWATERLOOP_2.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQFRESHAIRNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_CHILLWATERLOOP_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_DRINKINGWATERNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_COOLINGWATERLOOP_2.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_VENTNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_HEATWATERLOOP_2.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_COOLINGWATERLOOP_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_ACAIRNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_SUPPLYWATERNETWORK_1.getRelCode());
+        types.add(AdmRelationTypeEnum.EQ2EQ_DRAININGWATERNETWORK_1.getRelCode());
         return types;
     }
 }

+ 55 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AdmObjectRelationCalServiceImpl.java

@@ -0,0 +1,55 @@
+package com.persagy.proxy.adm.service.impl;
+
+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.dmp.digital.entity.ObjectRelationProjectCal;
+import com.persagy.proxy.adm.model.AdmModelRel;
+import com.persagy.proxy.adm.request.AdmResponse;
+import com.persagy.proxy.adm.service.IAdmObjectRelationCalService;
+import com.persagy.proxy.common.entity.InstanceUrlParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 标记关系计算
+ *
+ * @author:linhuili
+ * @date:2021/10/15
+ */
+@Service
+@Slf4j
+public class AdmObjectRelationCalServiceImpl extends AbstractAdmBaseServiceImpl<ObjectRelationProjectCal> implements IAdmObjectRelationCalService {
+
+    /**
+     * 根据关系类型查询标记计算关系
+     * @param context
+     * @param relationType
+     * @return
+     */
+    @Override
+    public List<ObjectRelationProjectCal> queryCalRelByRelationType(InstanceUrlParam context, Set<String> relationType){
+        //设置查询条件
+        QueryCriteria queryCriteria = new QueryCriteria();
+        ObjectNode criteria = JsonNodeFactory.instance.objectNode();
+        ArrayNode arrayNode = criteria.putObject("relCode").putArray("$in");
+        relationType.stream().forEach(relCode -> arrayNode.add(relCode));
+        queryCriteria.setCriteria(criteria);
+        //查询标记计算关系
+        AdmResponse admResponse = doQueryRelationProjectCal(context, queryCriteria, ObjectRelationProjectCal.class);
+        return (List<ObjectRelationProjectCal>)admResponse.getContent();
+    }
+
+    /**
+     * 更新标记计算关系
+     * @param objectRelationProjectCals
+     */
+    @Override
+    public void updateObjectCalRel(InstanceUrlParam context, List<ObjectRelationProjectCal> objectRelationProjectCals) {
+        doUpdateRelationProjectCal(context, ObjectRelationProjectCal.class, objectRelationProjectCals);
+    }
+}

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

@@ -6,7 +6,6 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.Date;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -28,25 +27,18 @@ import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.helper.SpringHelper;
 import com.persagy.dmp.common.model.response.CommonResult;
-import com.persagy.dmp.define.client.DigitalDefineFacade;
 import com.persagy.dmp.define.client.DigitalGraphDefineFacade;
 import com.persagy.dmp.define.client.DigitalRelationDefineFacade;
 import com.persagy.dmp.define.entity.GraphDefine;
-import com.persagy.dmp.define.entity.ObjectTypeDefine;
 import com.persagy.dmp.define.entity.RelationDefine;
 import com.persagy.dmp.digital.client.DigitalObjectFacade;
 import com.persagy.dmp.digital.client.DigitalRelationFacade;
 import com.persagy.dmp.digital.client.DigitalRelationProjectCalFacade;
-import com.persagy.dmp.digital.entity.ObjectDigital;
 import com.persagy.dmp.digital.entity.ObjectRelation;
 import com.persagy.dmp.digital.entity.ObjectRelationProjectCal;
 import com.persagy.dmp.simple.client.DigitalObjectSimpleFacade;
 import com.persagy.proxy.adm.constant.AdmCommonConstant;
-import com.persagy.proxy.adm.constant.AdmObjectType;
 import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
-import com.persagy.proxy.adm.constant.GraphCodeEnum;
-import com.persagy.proxy.adm.constant.RelCodeEnum;
-import com.persagy.proxy.adm.model.EquipmentExcel;
 import com.persagy.proxy.adm.service.IRelationReportService;
 import com.persagy.proxy.adm.strategy.relationdata.RelationObjectStrategy;
 
@@ -336,46 +328,6 @@ public class RelationReportService implements IRelationReportService {
 	}
 	
 	@Override
-	public List<EquipmentExcel> findEquipByNotSpace(String groupCode, String projectId) {
-		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
-		// 1.获取所有的设备对象数据
-		ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
-		QueryCriteria objectCriteria = new QueryCriteria();
-		ObjectNode object = objectMapper.createObjectNode();
-		object.put("objType", AdmObjectType.EQUIPMENT.getIndex());
-		objectCriteria.setCriteria(object);
-		List<ObjectNode> equipList = DigitalObjectFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
-		if (CollectionUtil.isEmpty(equipList)) {
-			return Lists.newArrayList();
-		}
-		
-		// 2.获取所有的设备类定义的className
-		List<ObjectTypeDefine> classList = DigitalDefineFacade.queryObjectType(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, objectCriteria);
-		// key-classCode, value-className
-		Map<String, String> classDefine = new HashMap<String, String>();
-		if (CollectionUtil.isNotEmpty(classList)) {
-			for (ObjectTypeDefine objectTypeDefine : classList) {
-				classDefine.put(objectTypeDefine.getCode(), objectTypeDefine.getName());
-			}
-		}
-		
-		// 3.查询出所有的边类型为 Eq2Sp 的关系数据
-		QueryCriteria relationCriteria = new QueryCriteria();
-		ObjectNode relation = objectMapper.createObjectNode();
-		relation.put("relCode", RelCodeEnum.Eq2Sp.name());
-		relationCriteria.setCriteria(relation);
-		List<ObjectRelation> relationList = DigitalRelationFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, relationCriteria);
-		Set<String> equipIds = new HashSet<String>();
-		if (CollectionUtil.isNotEmpty(relationList)) {
-			for (ObjectRelation relationInfo : relationList) {
-				equipIds.add(relationInfo.getObjFrom());
-			}
-		}
-		
-		return this.exportEquipmentExcel(equipList, classDefine, equipIds, groupCode, projectId);
-	}
-	
-	@Override
 	public boolean createRelationProjectCal(String groupCode, String projectId) throws JsonProcessingException {
 		groupCode = StrUtil.isBlank(groupCode) ? defaultCode : groupCode;
 		// 1.验证是否已经添加过
@@ -418,6 +370,7 @@ public class RelationReportService implements IRelationReportService {
 				AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, nodes);
 		return CollectionUtil.isNotEmpty(result);
 	}
+	
 	/***
 	 * Description: 创建存储的对象
 	 * @param groupCode : 集团编码
@@ -453,10 +406,6 @@ public class RelationReportService implements IRelationReportService {
 		return objectNode;
 	}
 
-	/**
-	 * 查询关系总览(空表,先插入)
-	 * @param content: 模糊查询卡片名称关键字
-	 */
 	@Override
 	public JSONObject overview(String content) throws JsonProcessingException {
 		JSONObject result = new JSONObject();
@@ -689,78 +638,4 @@ public class RelationReportService implements IRelationReportService {
 		return result;
 	}
 
-	/**
-	 * 构造 excel 设备数据
-	 * 
-	 * @param equipList 设备数据集合
-	 * @param classDefine 类定义信息
-	 * @param equipIds 需要剔除的设备ID集合
-	 * @param groupCode 
-	 * @param projectId 
-	 * @return
-	 */
-	private List<EquipmentExcel> exportEquipmentExcel(List<ObjectNode> equipList, Map<String, String> classDefine, Set<String> equipIds, String groupCode, String projectId) {
-		// key: 设备ID,value: 建筑名称
-		Map<String, String> buildTemp = new HashMap<String, String>();
-		// key: 设备ID,value: 楼层名称
-		Map<String, String> floorTemp = new HashMap<String, String>();
-		
-		// 建筑名称		
-		RequestData requestData = new RequestData();
-		requestData.setGraphCode(GraphCodeEnum.MechInArch.name());
-		requestData.setRelCode(RelCodeEnum.Eq2Bd.name());
-		requestData.setPage(1L);
-		requestData.setSize(10000000L);
-		List<ObjectDigital> buildDigitals = DigitalObjectFacade.queryObjectListByGraphCodeAndRelCode(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, requestData);
-		if (CollectionUtil.isNotEmpty(buildDigitals)) {
-			for (ObjectDigital master : buildDigitals) {
-				List<ObjectDigital> slaveDigitals = master.getRelObjs();
-				ObjectDigital slave = CollectionUtil.isEmpty(slaveDigitals) ? null : slaveDigitals.get(0);
-				if (slave != null) {
-					buildTemp.put(master.getId(), slave.getLocalName());
-				}
-			}
-		}
-		// 楼层名称
-		requestData.setRelCode(RelCodeEnum.Eq2Fl.name());
-		List<ObjectDigital> floorDigitals = DigitalObjectFacade.queryObjectListByGraphCodeAndRelCode(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, requestData);
-		if (CollectionUtil.isNotEmpty(floorDigitals)) {
-			for (ObjectDigital master : floorDigitals) {
-				List<ObjectDigital> slaveDigitals = master.getRelObjs();
-				ObjectDigital slave = CollectionUtil.isEmpty(slaveDigitals) ? null : slaveDigitals.get(0);
-				if (slave != null) {
-					floorTemp.put(master.getId(), slave.getLocalName());
-				}
-			}
-		}
-		
-		// 结果封装
-		List<EquipmentExcel> excelList = new ArrayList<EquipmentExcel>();
-		for (ObjectNode equip : equipList) {
-			String id = equip.get("id") == null ? null : equip.get("id").asText();
-			if (id != null && !equipIds.contains(id)) {
-				EquipmentExcel excel = new EquipmentExcel();
-				excel.setId(id);
-				excel.setName(equip.get("name") == null ? null : equip.get("name").asText());
-				excel.setLocalId(equip.get("localId") == null ? null : equip.get("localId").asText());
-				excel.setLocalName(equip.get("localName") == null ? null : equip.get("localName").asText());
-				
-				String infos = equip.get("infos") == null ? null : equip.get("infos").asText();
-				if (StrUtil.isNotBlank(infos)) {
-					JSONObject parseObject = JSONObject.parseObject(infos);
-					excel.setBimId(parseObject.getString("bimId"));
-				}
-				
-				String classCode = equip.get("classCode") == null ? null : equip.get("classCode").asText();
-				excel.setClassCodeName(classCode == null ? null : classDefine.get(classCode));
-				
-				excel.setBuildName(buildTemp.get(id));
-				excel.setFloorName(floorTemp.get(id));
-				excel.setModelFileName("T1F10模型文件v18.rvt");	// 这里写死是不对的,需要后续再补充改变
-				excelList.add(excel);
-			}
-		}
-		return excelList;
-	}
-	
 }

+ 12 - 51
src/main/java/com/persagy/proxy/adm/strategy/RelationObjectContext.java

@@ -12,8 +12,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.collect.Lists;
 import com.persagy.dmp.basic.dto.RequestData;
 import com.persagy.dmp.digital.entity.ObjectDigital;
-import com.persagy.proxy.adm.constant.AdmCommonConstant;
-import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
 import com.persagy.proxy.adm.model.AdmRelationObject;
 import com.persagy.proxy.adm.strategy.relationdata.RelationObjectStrategy;
 
@@ -46,16 +44,11 @@ public class RelationObjectContext {
 	 * 
 	 * @param groupCode
 	 * @param projectId
-	 * @param relType
+	 * @param relType graphCode_relCode
 	 * @return
 	 */
 	public List<AdmRelationObject> findRelationObject(String groupCode, String projectId, String relType) {
-		AdmRelationTypeEnum relationTypeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
-		if (relationTypeEnum == null) {
-			return Lists.newArrayList();
-		}
-		String className = relationTypeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + relationTypeEnum.getRelCode();
-		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(className);
+		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
 		return strategy == null ? Lists.newArrayList() : strategy.findRelationObject(groupCode, projectId);
 	}
 	
@@ -63,22 +56,13 @@ public class RelationObjectContext {
 	 * 检查关联对象的合法性
 	 * 
 	 * @param relationObject 当前需要校验的对象
-	 * @param relType ADM-类型
+	 * @param relType graphCode_relCode
 	 * @param code 获取对象的依据
 	 * @return String - 校验失败的原因, ObjectNode -- BDTP接口的参数,不会返回null,请用instanceOf 判断返回值
 	 */
 	public Object checkRelationObject(AdmRelationObject relationObject, String groupCode, String projectId, String relType, String code) {
-		AdmRelationTypeEnum relationTypeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
-		if (relationTypeEnum == null) {
-			return "未知类型";
-		}
-		String className = relationTypeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + relationTypeEnum.getRelCode();
-		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(className);
-		if (strategy == null) {
-			return "不存在此策略类";
-		}
-		
-		return strategy.beforeSaveRelationObject(relationObject, groupCode, projectId, code);
+		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
+		return strategy == null ? "不存在此策略类" : strategy.beforeSaveRelationObject(relationObject, groupCode, projectId, code);
 	}
 	
 	/**
@@ -87,21 +71,12 @@ public class RelationObjectContext {
 	 * @param admRelationObject
 	 * @param groupCode
 	 * @param projectId
-	 * @param relType ADM-传过来的边类型
+	 * @param relType graphCode_relCode
 	 * @return 
 	 */
 	public boolean saveRelationObjects(List<ObjectNode> relationObjects, String groupCode, String projectId, String relType) {
-		AdmRelationTypeEnum relationTypeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
-		if (relationTypeEnum == null) {
-			return false;
-		}
-		String className = relationTypeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + relationTypeEnum.getRelCode();
-		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(className);
-		if (strategy == null) {
-			return false;
-		}
-		
-		return strategy.saveRelationObjects(relationObjects, groupCode, projectId);
+		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
+		return strategy == null ? false : strategy.saveRelationObjects(relationObjects, groupCode, projectId);
 	}
 
 	/**
@@ -109,21 +84,12 @@ public class RelationObjectContext {
 	 * 
 	 * @param groupCode
 	 * @param projectId
-	 * @param relType ADM-传过来的边类型
+	 * @param relType graphCode_relCode
 	 * @return 
 	 */
 	public long countRelationObjects(String groupCode, String projectId, String relType) {
-		AdmRelationTypeEnum relationTypeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
-		if (relationTypeEnum == null) {
-			return 0;
-		}
-		String className = relationTypeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + relationTypeEnum.getRelCode();
-		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(className);
-		if (strategy == null) {
-			return 0;
-		}
-		
-		return strategy.countRelationObjects(groupCode, projectId);
+		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
+		return strategy == null ? 0 : strategy.countRelationObjects(groupCode, projectId);
 	}
 	
 	/**
@@ -133,15 +99,10 @@ public class RelationObjectContext {
 	 * @param requestData 请求参数
 	 * @param groupCode 集团编码
 	 * @param projectId 项目ID
-	 * @param relType  graphCode_relCode;
+	 * @param relType  graphCode_relCode
 	 */
 	public List<ObjectDigital> queryPageObjectInfo(RequestData requestData, String groupCode, String projectId, String relType) {
 		List<ObjectDigital> masterObjs = new ArrayList<ObjectDigital>();
-		/*AdmRelationTypeEnum relationTypeEnum = AdmCommonConstant.RELATION_TYPE_MAP.get(relType);
-		if (relationTypeEnum == null) {
-			return masterObjs;
-		}
-		String className = relationTypeEnum.getGraphCode() + AdmCommonConstant.UNDERLINE + relationTypeEnum.getRelCode();*/
 		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
 		if (strategy == null) {
 			return masterObjs;

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2BdRelationObject.java

@@ -52,7 +52,7 @@ public class ArchForArchSh2BdRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sh2Bd.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2FlRelationObject.java

@@ -52,7 +52,7 @@ public class ArchForArchSh2FlRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sh2Fl.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2ShRelationObject.java

@@ -52,7 +52,7 @@ public class ArchForArchSh2ShRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sh2Sh.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSh2SpRelationObject.java

@@ -54,7 +54,7 @@ public class ArchForArchSh2SpRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sh2Sp.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSp2BdRelationObject.java

@@ -54,7 +54,7 @@ public class ArchForArchSp2BdRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sp2Bd.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/ArchForArchSp2FlRelationObject.java

@@ -54,7 +54,7 @@ public class ArchForArchSp2FlRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.ArchForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sp2Fl.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2BdRelationObject.java

@@ -54,7 +54,7 @@ public class MechForArchEq2BdRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(AdmRelationTypeEnum.EQ2BD_FOR.getGraphCode());
 		requestData.setRelCode(AdmRelationTypeEnum.EQ2BD_FOR.getRelCode());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2FlRelationObject.java

@@ -54,7 +54,7 @@ public class MechForArchEq2FlRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Eq2Fl.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchEq2ShRelationObject.java

@@ -54,7 +54,7 @@ public class MechForArchEq2ShRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Eq2Sh.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2BdRelationObject.java

@@ -52,7 +52,7 @@ public class MechForArchSy2BdRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sy2Bd.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2FlRelationObject.java

@@ -52,7 +52,7 @@ public class MechForArchSy2FlRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sy2Fl.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2ShRelationObject.java

@@ -52,7 +52,7 @@ public class MechForArchSy2ShRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sy2Sh.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechForArchSy2SpRelationObject.java

@@ -54,7 +54,7 @@ public class MechForArchSy2SpRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechForArch.name());
 		requestData.setRelCode(RelCodeEnum.Sy2Sp.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2BdRelationObject.java

@@ -52,7 +52,7 @@ public class MechInArchEq2BdRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechInArch.name());
 		requestData.setRelCode(RelCodeEnum.Eq2Bd.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2FlRelationObject.java

@@ -52,7 +52,7 @@ public class MechInArchEq2FlRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechInArch.name());
 		requestData.setRelCode(RelCodeEnum.Eq2Fl.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

+ 1 - 1
src/main/java/com/persagy/proxy/adm/strategy/relationdata/MechInArchEq2SpRelationObject.java

@@ -52,7 +52,7 @@ public class MechInArchEq2SpRelationObject extends AbstractReportRelationObject
 		requestData.setGraphCode(GraphCodeEnum.MechInArch.name());
 		requestData.setRelCode(RelCodeEnum.Eq2Sp.name());
 		requestData.setPage(1L);
-		requestData.setSize(1000L);
+		requestData.setSize(500L);
 		
 		return this.queryAllObjectInfo(requestData, groupCode, projectId);
 	}

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

@@ -182,7 +182,7 @@ public interface DmpRwdClient {
      * @return: com.persagy.dmp.common.DmpResult
      */
     @PostMapping(DmpUrlConstant.RELATION_PROJECT_CAL_QUERY)
-    DmpResult<JSONArray> queryRelationProjectCal(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONArray objectArr);
+    DmpResult<JSONArray> queryRelationProjectCal(@SpringQueryMap InstanceUrlParam objectUrlParam, @RequestBody JSONObject criteria);
 
 
     /**