Browse Source

代码统一调整:Lists和Sets改为使用CollUtil;HeaderParam改为使用RequestHead。

yucheng 3 years ago
parent
commit
a0f4a0c4ef
28 changed files with 222 additions and 268 deletions
  1. 14 18
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/handler/RelationReportHandler.java
  2. 19 20
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/handler/SpaceRelationInfoHandler.java
  3. 7 17
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/strategy/RelationObjectContext.java
  4. 10 13
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/utils/AdmExcelUtil.java
  5. 13 22
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/utils/JSONEntityUtil.java
  6. 3 6
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/calculation/controller/AdmMepSystemCalcController.java
  7. 3 7
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/controller/AdmLabslController.java
  8. 7 13
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/controller/AdmPlanarController.java
  9. 28 13
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java
  10. 3 8
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmBuildingController.java
  11. 9 9
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmComponentController.java
  12. 11 12
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmLocationPointController.java
  13. 3 7
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmProjectController.java
  14. 3 6
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmPropertyController.java
  15. 5 6
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmShaftController.java
  16. 5 7
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java
  17. 5 7
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmTenantController.java
  18. 9 11
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmVirtualWallController.java
  19. 9 10
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmWindowController.java
  20. 12 9
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/service/impl/AdmSpaceServiceImpl.java
  21. 1 2
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/relation/controller/RelationShContainSpBaseController.java
  22. 3 5
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmRelationController.java
  23. 2 3
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmRelationObjectController.java
  24. 7 4
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmReportEquipController.java
  25. 18 11
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmSpaceInfoController.java
  26. 4 6
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/ComponentStatisticsController.java
  27. 3 8
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/RelationReportController.java
  28. 6 8
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/service/impl/RelationReportService.java

+ 14 - 18
adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/handler/RelationReportHandler.java

@@ -6,8 +6,6 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.OrderItem;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.define.entity.ObjectInfoDefine;
 import com.persagy.dmp.define.entity.ObjectTypeDefine;
 import com.persagy.dmp.digital.entity.ObjectDigital;
@@ -49,13 +47,13 @@ public class RelationReportHandler {
 	 */
 	public List<EquipmentExcel> findEquipByNotSpace(String groupCode, String projectId) {
 		String equipment = AdmObjectType.EQUIPMENT.getIndex();
-		HashSet<String> equipments = Sets.newHashSet(equipment);
+		HashSet<String> equipments = CollUtil.newHashSet(equipment);
 		
 		// 1.获取所有的设备对象数据
 		List<OrderItem> classCodeAsc = Arrays.asList(OrderItem.asc("classCode"));
 		List<ObjectNode> equipList = this.relationReportService.queryObjects(null, groupCode, projectId, null, null, equipments, classCodeAsc);
 		if (CollectionUtil.isEmpty(equipList)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 				
 		// 2.获取所有的设备类定义的className
@@ -91,20 +89,20 @@ public class RelationReportHandler {
 		List<OrderItem> classCodeAsc = Arrays.asList(OrderItem.asc("classCode"));
 		
 		// 1.获取项目名称
-		List<ObjectNode> projects = this.relationReportService.queryObjects(null, groupCode, projectId, Sets.newHashSet(projectId), Sets.newHashSet(AdmObjectType.PROJECT.getIndex()), null, null);
+		List<ObjectNode> projects = this.relationReportService.queryObjects(null, groupCode, projectId, CollUtil.newHashSet(projectId), CollUtil.newHashSet(AdmObjectType.PROJECT.getIndex()), null, null);
 		if (CollectionUtil.isEmpty(projects)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 		String projectName = projects.get(0).has("localName") ? projects.get(0).get("localName").asText() : null;
 		
 		// 2.获取所有的设备对象数据
-		List<ObjectNode> equipList = this.relationReportService.queryObjects(null, groupCode, projectId, null, null, Sets.newHashSet(equipment), classCodeAsc);
+		List<ObjectNode> equipList = this.relationReportService.queryObjects(null, groupCode, projectId, null, null, CollUtil.newHashSet(equipment), classCodeAsc);
 		if (CollectionUtil.isEmpty(equipList)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 		
 		// 3.获取所有的设备、系统类定义信息
-		List<ObjectTypeDefine> classInfo = this.relationReportService.queryClassList(groupCode, projectId, null, Sets.newHashSet(equipment, AdmObjectType.SYSTEM.getIndex()), null);
+		List<ObjectTypeDefine> classInfo = this.relationReportService.queryClassList(groupCode, projectId, null, CollUtil.newHashSet(equipment, AdmObjectType.SYSTEM.getIndex()), null);
 		/** key-equipCode, value-equipName */
 		Map<String, String> equipTemp = new HashMap<String, String>();
 		/** key-systemCode, value-systemName */
@@ -131,28 +129,26 @@ public class RelationReportHandler {
 	 * @return
 	 */
 	public List<EquipmentCountExcel> countClassCodeEquip(String groupCode, String projectId) {
-		String equipment = AdmObjectType.EQUIPMENT.getIndex();
-		
 		List<OrderItem> classCodeAsc = Collections.singletonList(OrderItem.asc("classCode"));
 		
 		// 1.获取项目名称
 		List<ObjectNode> projects = this.relationReportService.queryObjects(null, groupCode, projectId,
-				Sets.newHashSet(projectId), Sets.newHashSet(AdmObjectType.PROJECT.getIndex()), null, null);
+				CollUtil.newHashSet(projectId), CollUtil.newHashSet(AdmObjectType.PROJECT.getIndex()), null, null);
 		if (CollectionUtil.isEmpty(projects)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 		String projectName = projects.get(0).has("localName") ? projects.get(0).get("localName").asText() : null;
 		
 		// 2.获取所有的设备对象数据
 		List<ObjectNode> equipList = this.relationReportService.queryObjects(null, groupCode, projectId,
-				null, null, Sets.newHashSet(equipment), classCodeAsc);
+				null, null, CollUtil.newHashSet(AdmObjectType.EQUIPMENT.getIndex()), classCodeAsc);
 		if (CollectionUtil.isEmpty(equipList)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 		
 		// 3.获取所有的设备、系统类定义信息
 		List<ObjectTypeDefine> classInfo = this.relationReportService.queryClassList(groupCode, projectId,
-				null, Sets.newHashSet(equipment, AdmObjectType.SYSTEM.getIndex()), null);
+				null, CollUtil.newHashSet(AdmObjectType.EQUIPMENT.getIndex(), AdmObjectType.SYSTEM.getIndex()), null);
 		/** key-equipCode, value-equipName */
 		Map<String, String> equipTemp = new HashMap<String, String>();
 		/** key-systemCode, value-systemName */
@@ -266,7 +262,7 @@ public class RelationReportHandler {
 			if (infoCodes.containsKey(classCode)) {
 				infoCodes.get(classCode).add(infoDefine.getCode());
 			} else {
-				infoCodes.put(classCode, Sets.newHashSet(infoDefine.getCode()));
+				infoCodes.put(classCode, CollUtil.newHashSet(infoDefine.getCode()));
 			}
 		}
 		
@@ -367,7 +363,7 @@ public class RelationReportHandler {
 			if (infoCodes.containsKey(classCode)) {
 				infoCodes.get(classCode).add(infoDefine.getCode());
 			} else {
-				infoCodes.put(classCode, Sets.newHashSet(infoDefine.getCode()));
+				infoCodes.put(classCode, CollUtil.newHashSet(infoDefine.getCode()));
 			}
 		}
 		funidList.clear(); 	//即时清空

+ 19 - 20
adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/handler/SpaceRelationInfoHandler.java

@@ -1,5 +1,6 @@
 package com.persagy.proxy.adm.handler;
 
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.util.StrUtil;
@@ -7,8 +8,6 @@ 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.google.common.collect.Sets;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.helper.SpringHelper;
 import com.persagy.dmp.digital.entity.ObjectDigital;
@@ -60,13 +59,13 @@ public class SpaceRelationInfoHandler {
 		
 		String floorId = request.getFloorId();
 		String buildingId = request.getBuildingId();
-		Set<String> zoneTypeList = StrUtil.isNotEmpty(request.getZoneType()) ? Sets.newHashSet(request.getZoneType()) 
-				: (request.getZoneTypeList() == null ? Sets.newHashSet() : request.getZoneTypeList());
+		Set<String> zoneTypeList = StrUtil.isNotEmpty(request.getZoneType()) ? CollUtil.newHashSet(request.getZoneType())
+				: (request.getZoneTypeList() == null ? CollUtil.newHashSet() : request.getZoneTypeList());
 		
 		if (StrUtil.isNotBlank(buildingId) && StrUtil.isNotBlank(floorId) && !"isnull".equals(floorId)) {
 			// 当建筑ID不为空、楼层ID不为空时
 			String graphAndRelKey = GraphCodeEnum.ArchForArch.name() + AdmCommonConstant.UNDERLINE + RelCodeEnum.Sp2Fl.name();
-			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, Sets.newHashSet(buildingId), null);
+			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, CollUtil.newHashSet(buildingId), null);
 			if (CollectionUtil.isNotEmpty(allRelations)) {
 				resultList = this.transferSpaceInfo(allRelations, buildingId, floorId);
 			}
@@ -78,7 +77,7 @@ public class SpaceRelationInfoHandler {
 		} else if (StrUtil.isNotBlank(buildingId) && StrUtil.isBlank(floorId) && !"isnull".equals(buildingId)) {
 			// 当建筑ID不为空、楼层ID为空时
 			String graphAndRelKey = GraphCodeEnum.ArchForArch.name() + AdmCommonConstant.UNDERLINE + RelCodeEnum.Sp2Bd.name();
-			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, Sets.newHashSet(buildingId), null);
+			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, CollUtil.newHashSet(buildingId), null);
 			if (CollectionUtil.isNotEmpty(allRelations)) {
 				resultList = this.transferSpaceInfo(allRelations, buildingId, null);
 			}
@@ -89,15 +88,15 @@ public class SpaceRelationInfoHandler {
 			
 		} else if (StrUtil.isBlank(buildingId) && StrUtil.isBlank(floorId)) {
 			// 直接获取所有的空间数据
-			List<ObjectNode> spacelist = this.relationReportService.queryObjects(criteria, groupCode, projectId, null, zoneTypeList, 
-					Sets.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
+			List<ObjectNode> spacelist = this.relationReportService.queryObjects(criteria, groupCode, projectId, null, zoneTypeList,
+					CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
 			resultList = this.fillSpaceInfo(spacelist, null, null);
 		}
 		
 		result.put("zoneType", request.getZoneType());
 		result.put("floorId", request.getFloorId());
 		result.put("total", CollectionUtil.isEmpty(resultList) ? 0 : resultList.size());
-		result.put("content", CollectionUtil.isEmpty(resultList) ? Lists.newArrayList() : resultList);
+		result.put("content", CollectionUtil.isEmpty(resultList) ? CollUtil.newArrayList() : resultList);
 		return result;
 	}
 	
@@ -118,7 +117,7 @@ public class SpaceRelationInfoHandler {
 		Set<String> floorIds = new HashSet<String>();
 		Set<String> notBuildSpace = new HashSet<String>();
 		// 获取所有的楼层ID集合
-		List<ObjectRelation> relationObjects = this.queryObjectRelation(groupCode, projectId, GraphCodeEnum.ArchForArch.name(), RelCodeEnum.Fl2Bd.name(), null, Sets.newHashSet(buildingId));
+		List<ObjectRelation> relationObjects = this.queryObjectRelation(groupCode, projectId, GraphCodeEnum.ArchForArch.name(), RelCodeEnum.Fl2Bd.name(), null, CollUtil.newHashSet(buildingId));
 		
 		// 获取所有楼层下的空间数据
 		if (CollectionUtil.isNotEmpty(relationObjects)) {
@@ -132,7 +131,7 @@ public class SpaceRelationInfoHandler {
 				spaceIds.add(objectRelation.getObjFrom());
 			}
 			// 再获取此建筑下,不是这些空间的空间
-			relationObjects = this.queryObjectRelation(groupCode, projectId, GraphCodeEnum.ArchForArch.name(), RelCodeEnum.Sp2Bd.name(), null, Sets.newHashSet(buildingId));
+			relationObjects = this.queryObjectRelation(groupCode, projectId, GraphCodeEnum.ArchForArch.name(), RelCodeEnum.Sp2Bd.name(), null, CollUtil.newHashSet(buildingId));
 			for (ObjectRelation objectRelation : relationObjects) {
 				if (!spaceIds.contains(objectRelation.getObjFrom())) {
 					notBuildSpace.add(objectRelation.getObjFrom());
@@ -141,14 +140,14 @@ public class SpaceRelationInfoHandler {
 			
 			if (CollectionUtil.isNotEmpty(notBuildSpace)){
 				// 获取所有的对象数据
-				resultList = this.relationReportService.queryObjects(null, groupCode, projectId, notBuildSpace, zoneTypeList, 
-    					Sets.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
+				resultList = this.relationReportService.queryObjects(null, groupCode, projectId, notBuildSpace, zoneTypeList,
+						CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
     			this.fillSpaceInfo(resultList, buildingId, null);
             }
 		} else {
 			// 获取所有的空间数据
 			String graphAndRelKey = GraphCodeEnum.MechInArch.name() + AdmCommonConstant.UNDERLINE + RelCodeEnum.Eq2Fl.name();
-			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, Sets.newHashSet(buildingId), null);
+			List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, CollUtil.newHashSet(buildingId), null);
 			if (CollectionUtil.isNotEmpty(allRelations)) {
 				resultList = this.transferSpaceInfo(allRelations, buildingId, null);
 			}
@@ -172,14 +171,14 @@ public class SpaceRelationInfoHandler {
 			Set<String> zoneTypeList, List<OrderItem> orderItem) {
 		List<ObjectNode> resultList = null;
 		// 获取所有的建筑ID集合
-		List<ObjectNode> buildList = this.relationReportService.queryObjects(null, groupCode, projectId, null, null, 
-				Sets.newHashSet(AdmObjectType.BUILDING.getIndex()), orderItem);
+		List<ObjectNode> buildList = this.relationReportService.queryObjects(null, groupCode, projectId, null, null,
+				CollUtil.newHashSet(AdmObjectType.BUILDING.getIndex()), orderItem);
 		if (CollectionUtil.isNotEmpty(buildList)) {
 			for (ObjectNode objectNode : buildList) {
 				String buildingId = objectNode.get("id").asText();
 				// 获取所有的空间数据
 				String graphAndRelKey = GraphCodeEnum.MechInArch.name() + AdmCommonConstant.UNDERLINE + RelCodeEnum.Eq2Fl.name();
-				List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, Sets.newHashSet(buildingId), null);
+				List<ObjectDigital> allRelations = this.relationObjectContext.queryAllRelations(groupCode, projectId, graphAndRelKey, null, CollUtil.newHashSet(buildingId), null);
 				if (CollectionUtil.isNotEmpty(allRelations)) {
 					// 获取所有的对象数据
 					resultList = this.transferSpaceInfo(allRelations, buildingId, null);
@@ -187,8 +186,8 @@ public class SpaceRelationInfoHandler {
 			}
 		} else {
 			// 获取所有的空间数据
-			List<ObjectNode> spacelist = this.relationReportService.queryObjects(criteria, groupCode, projectId, null, zoneTypeList, 
-					Sets.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
+			List<ObjectNode> spacelist = this.relationReportService.queryObjects(criteria, groupCode, projectId, null, zoneTypeList,
+					CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), orderItem);
 			resultList = this.fillSpaceInfo(spacelist, null, null);
 		}
 		
@@ -299,7 +298,7 @@ public class SpaceRelationInfoHandler {
 	 */
 	private List<ObjectRelation> queryObjectRelation(String groupCode, String projectId, String graphCode, String relCode, Set<String> objFroms, Set<String> objTos) {
 		List<ObjectRelation> relationObjects = this.relationReportService.findRelationObjects(groupCode, projectId, graphCode, relCode, objFroms, objTos);
-		return CollectionUtil.isEmpty(relationObjects) ? Lists.newArrayList() : relationObjects;
+		return CollectionUtil.isEmpty(relationObjects) ? CollUtil.newArrayList() : relationObjects;
 	}
 
 }

+ 7 - 17
adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/strategy/RelationObjectContext.java

@@ -1,20 +1,18 @@
 package com.persagy.proxy.adm.strategy;
 
-import java.util.*;
-
-import javax.annotation.Resource;
-
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
-import org.springframework.stereotype.Component;
-
 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.AdmRelationType;
 import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
 import com.persagy.proxy.adm.strategy.relationdata.RelationObjectStrategy;
 import com.persagy.proxy.report.model.AdmRelationObject;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.*;
 
 /**
  * 获取关系对象的上下文类
@@ -50,7 +48,7 @@ public class RelationObjectContext {
 	 */
 	public List<AdmRelationObject> exportRelationObject(String groupCode, String projectId, String relType) {
 		RelationObjectStrategy strategy = this.relationObjectStrategyMap.get(relType);
-		return strategy == null ? Lists.newArrayList() : strategy.exportRelationObject(groupCode, projectId);
+		return strategy == null ? CollUtil.newArrayList() : strategy.exportRelationObject(groupCode, projectId);
 	}
 	
 	/**
@@ -61,7 +59,6 @@ public class RelationObjectContext {
 	 * @param projectId
 	 * @param relType graphCode_relCode
 	 * @param code 获取对象的依据
-	 * @param admRelType ADM定义的类型
 	 * @return String - 校验失败的原因, ObjectNode -- BDTP接口的参数,不会返回null,请用instanceOf 判断返回值
 	 */
 	public Object checkRelationObject(AdmRelationObject relationObject, String groupCode, String projectId, String relType, String code, AdmRelationTypeEnum typeEnum) {
@@ -101,8 +98,6 @@ public class RelationObjectContext {
 
 	/**
 	 * 批量保存对象之间的关系
-	 * 
-	 * @param admRelationObject
 	 * @param groupCode
 	 * @param projectId
 	 * @param relType graphCode_relCode
@@ -134,9 +129,6 @@ public class RelationObjectContext {
 
 	/**
 	 * 查询全部的关系对象数据
-	 * 
-	 * @param masterObjs 查询的数据集存储地方
-	 * @param requestData 请求参数
 	 * @param groupCode 集团编码
 	 * @param projectId 项目ID
 	 * @param relType  graphCode_relCode
@@ -148,13 +140,11 @@ public class RelationObjectContext {
 		if (strategy == null && typeEnum != null) {
 			strategy = this.relationObjectStrategyMap.get(AdmRelationType.DEFAULT_RELATION_OBJECT);
 		}
-		return strategy == null ? Lists.newArrayList() : strategy.queryAllRelations(groupCode, projectId, mainContent, slaveContent, typeEnum);
+		return strategy == null ? CollUtil.newArrayList() : strategy.queryAllRelations(groupCode, projectId, mainContent, slaveContent, typeEnum);
 	}
 	
 	/**
 	 * 分页查询关系对象数据
-	 * 
-	 * @param masterObjs 查询的数据集存储地方
 	 * @param requestData 请求参数
 	 * @param groupCode 集团编码
 	 * @param projectId 项目ID

+ 10 - 13
adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/utils/AdmExcelUtil.java

@@ -1,5 +1,13 @@
 package com.persagy.proxy.adm.utils;
 
+import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.request.AdmResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.util.ResourceUtils;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
@@ -7,17 +15,6 @@ import java.io.IOException;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.util.ResourceUtils;
-
-import com.alibaba.fastjson.JSONObject;
-import com.google.common.collect.Lists;
-import com.persagy.proxy.adm.constant.AdmCommonConstant;
-import com.persagy.proxy.adm.request.AdmResponse;
-
-import lombok.extern.slf4j.Slf4j;
-
 /**
  * 
  * @version 1.0.0
@@ -142,7 +139,7 @@ public class AdmExcelUtil {
 		content.put("failCount", failCount);
 		
 		AdmResponse failure = AdmResponse.failure(message);
-		failure.setContent(Lists.newArrayList(content));
+		failure.setContent(CollUtil.newArrayList(content));
 		return failure;
 	}
 	
@@ -159,7 +156,7 @@ public class AdmExcelUtil {
 		content.put("state", getState(successCount, failCount));
 		content.put("successCount", successCount);
 		content.put("failCount", failCount);
-		AdmResponse success = AdmResponse.success(Lists.newArrayList(content));
+		AdmResponse success = AdmResponse.success(CollUtil.newArrayList(content));
 		success.setMessage(message);
 		return success;
 	}

+ 13 - 22
adm-business/adm-middleware/src/main/java/com/persagy/proxy/adm/utils/JSONEntityUtil.java

@@ -1,32 +1,23 @@
 package com.persagy.proxy.adm.utils;
 
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.lang.Filter;
+import cn.hutool.core.map.MapUtil;
+import cn.hutool.core.util.ReflectUtil;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.*;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.common.constant.ResponseCode;
 import com.persagy.dmp.common.exception.BusinessException;
 import com.persagy.proxy.object.model.AdmSpace;
 
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.lang.Filter;
-import cn.hutool.core.map.MapUtil;
-import cn.hutool.core.util.ReflectUtil;
-import cn.hutool.core.util.StrUtil;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.*;
 
 /**
  * 
@@ -49,13 +40,13 @@ public class JSONEntityUtil {
 		
 		JsonNode readTree = objectMapper.readTree(temp);
 		ObjectNode objectNode = (ObjectNode)readTree;
-		AdmSpace entity = toEntity(objectNode, AdmSpace.class, Sets.newHashSet("infos"), null);
+		AdmSpace entity = toEntity(objectNode, AdmSpace.class, CollUtil.newHashSet("infos"), null);
 		System.out.println(entity.getBuildingId());
 		
 		temp = "[{\"id\":\"Sp120901020301e9cc2ebdb24afeb89e3048153342d0\",\"projectId\":\"Pj1209010203\",\"name\":\"空间-M8Z77\",\"localId\":\"45343555\",\"localName\":\"12.11.43413.\",\"classCode\":\"DomesticWaterSupplyZone\",\"groupCode\":\"QKZZ\",\"infos\":{\"floorId\":\"Fl1209010203008c60dd3fcf45d5bc361d46989f1dab\",\"zoneType\":\"DomesticWaterSupplyZone\",\"buildingId\":\"Bd120901020324de2bf7c9b4442d907c6f5400945894\",\"height\":1.0},\"createTime\":1634983298000,\"objectType\":\"space\"}]";
 		readTree = objectMapper.readTree(temp);
 		ArrayNode arrayNode = (ArrayNode)readTree;
-		List<AdmSpace> list = toEntity(arrayNode, AdmSpace.class, Sets.newHashSet("infos"));
+		List<AdmSpace> list = toEntity(arrayNode, AdmSpace.class, CollUtil.newHashSet("infos"));
 		System.out.println(list.get(0).getBuildingId());
 	}
 	
@@ -108,7 +99,7 @@ public class JSONEntityUtil {
      * @throws IOException
      */
     public static <T> List<T> toEntity(ArrayNode array, Class<T> clazz, String extraColumn) throws JsonParseException, JsonMappingException, IOException {
-        return toEntity(array, clazz, Sets.newHashSet(extraColumn));
+        return toEntity(array, clazz, CollUtil.newHashSet(extraColumn));
     }
     
 	/**

+ 3 - 6
adm-business/adm-middleware/src/main/java/com/persagy/proxy/calculation/controller/AdmMepSystemCalcController.java

@@ -1,16 +1,13 @@
 package com.persagy.proxy.calculation.controller;
 
-import com.persagy.proxy.calculation.model.AdmMepSourceTypeEntity;
 import com.persagy.proxy.adm.request.AdmCreateRequest;
 import com.persagy.proxy.adm.request.AdmResponse;
-import com.persagy.proxy.calculation.service.AdmMepSystemCalcService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
+import com.persagy.proxy.calculation.model.AdmMepSourceTypeEntity;
+import com.persagy.proxy.calculation.service.AdmMepSystemCalcService;
 import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
-
 /***
  * Description: 机电管网系统关系计算
  * @author : lijie
@@ -45,7 +42,7 @@ public class AdmMepSystemCalcController {
      * Update By lijie 2021/9/14 23:20
      */
     @GetMapping("query")
-    public AdmResponse query(@QueryParam("calcName") String calcName) {
+    public AdmResponse query(@RequestParam(value = "calcName") String calcName) {
         return admMepSystemCalcService.query(AdmContextUtil.toDmpContext(), calcName);
     }
 

+ 3 - 7
adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/controller/AdmLabslController.java

@@ -19,12 +19,8 @@ import com.persagy.proxy.report.service.IAdmLabslService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -82,7 +78,7 @@ public class AdmLabslController {
      * @throws Exception
      */
     @PostMapping("/building/floor")
-    public AdmResponse queryBuildFloor(@QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse queryBuildFloor(@RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         return service.queryBuildFloor(context, AdmObjectInfo.class);
     }
@@ -203,7 +199,7 @@ public class AdmLabslController {
      * @throws Exception
      */
     @PostMapping("/major/category")
-    public AdmResponse queryMajorCategory(@QueryParam("projectId") String projectId,
+    public AdmResponse queryMajorCategory(@RequestParam(value = "projectId",required = false) String projectId,
                                           @RequestBody List<String> ids) throws Exception {
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         if(CollUtil.isEmpty(ids)){

+ 7 - 13
adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/controller/AdmPlanarController.java

@@ -1,21 +1,15 @@
 package com.persagy.proxy.dictionary.controller;
 
-import com.persagy.proxy.object.model.AdmEquipment;
-import com.persagy.proxy.dictionary.model.AdmPlanarEquipRequests;
-import com.persagy.proxy.object.model.AdmSpace;
 import com.persagy.proxy.adm.request.AdmResponse;
-import com.persagy.proxy.dictionary.service.IAdmPlanarService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.dictionary.model.AdmPlanarEquipRequests;
+import com.persagy.proxy.dictionary.service.IAdmPlanarService;
+import com.persagy.proxy.object.model.AdmEquipment;
+import com.persagy.proxy.object.model.AdmSpace;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.ws.rs.QueryParam;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @ClassName AdmLabslController
@@ -38,7 +32,7 @@ public class AdmPlanarController {
      * @throws Exception
      */
     @PostMapping("/equip")
-    public AdmResponse queryPlanarEquip(@QueryParam("projectId") String projectId,
+    public AdmResponse queryPlanarEquip(@RequestParam(value = "projectId",required = false) String projectId,
                                           @RequestBody AdmPlanarEquipRequests requests) throws Exception {
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         if(requests == null){
@@ -53,7 +47,7 @@ public class AdmPlanarController {
      * @throws Exception
      */
     @PostMapping("/space")
-    public AdmResponse queryPlanarSpace(@QueryParam("projectId") String projectId,
+    public AdmResponse queryPlanarSpace(@RequestParam(value = "projectId",required = false) String projectId,
                                   @RequestBody AdmPlanarEquipRequests requests) throws Exception {
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         if(requests == null){

+ 28 - 13
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java

@@ -7,7 +7,6 @@ import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONUtil;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
 import com.persagy.dmp.common.constant.ResponseCode;
@@ -56,7 +55,7 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         if(CollUtil.isEmpty(from) || CollUtil.isEmpty(to)){
             return null;
         }
-        Sets.SetView<String> intersection = Sets.intersection(from.keySet(), to.keySet());
+        Set<String> intersection = CollUtil.intersectionDistinct(from.keySet(), to.keySet());
         if(CollUtil.isEmpty(intersection)){
             return null;
         }
@@ -75,13 +74,10 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
      */
     @Override
     public Map<String, Object> doIntersectionGetTo(Map<String, Object> from, Map<String, Object> to) {
-        if(CollUtil.isEmpty(from)){
-            return null;
-        }
-        if(CollUtil.isEmpty(to)){
+        if(CollUtil.isEmpty(from) || CollUtil.isEmpty(to)){
             return null;
         }
-        Sets.SetView<String> intersection = Sets.intersection(from.keySet(), to.keySet());
+        Set<String> intersection = CollUtil.intersectionDistinct(from.keySet(), to.keySet());
         if(CollUtil.isEmpty(intersection)){
             return null;
         }
@@ -107,8 +103,8 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         if(CollUtil.isEmpty(to)){
             return from;
         }
-        Sets.SetView<String> diffA = Sets.difference(from.keySet(), to.keySet());
-        return getValueForMapByKeys(diffA, from);
+        Set<String> diff = difference(from.keySet(), to.keySet());
+        return getValueForMapByKeys(diff, from);
     }
 
     /**
@@ -130,8 +126,28 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         if(CollUtil.isEmpty(to)){
             return null;
         }
-        Sets.SetView<String> diffB = Sets.difference(to.keySet(), from.keySet());
-        return getValueForMapByKeys(diffB, to);
+        Set<String> diff = difference(from.keySet(), to.keySet());
+        return getValueForMapByKeys(diff, to);
+    }
+
+    /**
+     * 筛选出所有不同的元素
+     * @param from
+     * @param to
+     * @return
+     */
+    private Set<String> difference(Set<String> from, Set<String> to) {
+        if(CollUtil.isEmpty(from)){
+            return to;
+        }
+        if(CollUtil.isEmpty(to)){
+            return from;
+        }
+        Set<String> all = CollUtil.newHashSet(from);
+        all.addAll(to);
+        Set<String> intersection = CollUtil.intersectionDistinct(from, to);
+        Collection<String> diff = CollUtil.subtract(all, intersection);
+        return CollUtil.isEmpty(diff)?CollUtil.newHashSet():CollUtil.newHashSet(diff);
     }
 
     /**
@@ -329,8 +345,7 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         Set<String> formSets = from.entrySet().stream().map(en -> String.join(MigrationConstant.SPLITER_UNION,en.getKey(),en.getValue().toString())).collect(Collectors.toSet());
         Set<String> toSets = to.entrySet().stream().map(en -> String.join(MigrationConstant.SPLITER_UNION,en.getKey(),en.getValue().toString())).collect(Collectors.toSet());
 
-        Sets.SetView<String> difference = Sets.difference(formSets, toSets);
-
+        Set<String> difference = difference(formSets, toSets);
         if(CollUtil.isEmpty(difference)){
             return null;
         }

+ 3 - 8
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmBuildingController.java

@@ -14,12 +14,8 @@ import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.object.model.*;
 import com.persagy.proxy.object.service.*;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.List;
 import java.util.Map;
 
@@ -153,10 +149,9 @@ public class AdmBuildingController {
      * @throws Exception
      */
     @PostMapping("/query")
-    public AdmResponse query(@QueryParam("projectId") String projectId,
+    public AdmResponse query(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         request.setName(AdmBuilding.OBJ_TYPE);
-
         return service.doQuery(AdmContextUtil.toDmpContext(), request, AdmBuilding.class);
     }
 
@@ -168,7 +163,7 @@ public class AdmBuildingController {
      * @throws Exception
      */
     @PostMapping("/count")
-    public AdmResponse count(@QueryParam("projectId") String projectId,
+    public AdmResponse count(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         request.setName(AdmBuilding.OBJ_TYPE);
         request.setOnlyCount(true);

+ 9 - 9
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmComponentController.java

@@ -9,8 +9,10 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.common.constant.CommonConstant;
 import com.persagy.dmp.common.helper.SpringHelper;
 import com.persagy.dmp.digital.client.DigitalRelationFacade;
-import com.persagy.dmp.digital.entity.ObjectRelation;
-import com.persagy.proxy.adm.constant.*;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+import com.persagy.proxy.adm.constant.AdmDictCategoryEnum;
+import com.persagy.proxy.adm.constant.GraphCodeEnum;
+import com.persagy.proxy.adm.constant.RelCodeEnum;
 import com.persagy.proxy.adm.request.AdmCreateRequest;
 import com.persagy.proxy.adm.request.AdmCreateResponse;
 import com.persagy.proxy.adm.request.AdmQueryCriteria;
@@ -25,12 +27,8 @@ import com.persagy.proxy.object.model.AdmComponent;
 import com.persagy.proxy.object.service.IAdmComponentService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -69,7 +67,8 @@ public class AdmComponentController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmComponent> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmComponent> createRequest,
+                                    @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmComponent> vos = CollUtil.newArrayList(createRequest.getContent());
         if(CollUtil.isEmpty(vos)){
             return AdmCreateResponse.success();
@@ -165,7 +164,8 @@ public class AdmComponentController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmComponent> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmComponent> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmComponent> vos = CollUtil.newArrayList(createRequest.getContent());
         vos = service.doUpdate(AdmContextUtil.toDmpContext(), AdmComponent.class, vos);
         return AdmResponse.success(vos);

+ 11 - 12
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmLocationPointController.java

@@ -13,13 +13,8 @@ import com.persagy.proxy.object.model.AdmPointImage;
 import com.persagy.proxy.object.service.IAdmLocationPointService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -46,7 +41,7 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/count")
-    public AdmResponse count(@QueryParam("projectId") String projectId,
+    public AdmResponse count(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
@@ -63,7 +58,7 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/query")
-    public AdmResponse query(@QueryParam("projectId") String projectId,
+    public AdmResponse query(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
@@ -82,7 +77,8 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmLocationPoint> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmLocationPoint> createRequest,
+                                    @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmLocationPoint> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -99,7 +95,8 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmLocationPoint> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmLocationPoint> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmLocationPoint> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -115,7 +112,8 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/delete")
-    public AdmResponse delete(@QueryParam("projectId") String projectId, @RequestBody List<AdmLocationPoint> vos) throws Exception {
+    public AdmResponse delete(@RequestParam(value = "projectId",required = false) String projectId,
+                              @RequestBody List<AdmLocationPoint> vos) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         service.doDelete(context, vos);
@@ -129,7 +127,8 @@ public class AdmLocationPointController {
      * @throws Exception
      */
     @PostMapping("/delete-image")
-    public AdmResponse deleteImage(@QueryParam("projectId") String projectId, @RequestBody List<AdmPointImage> vos) throws Exception {
+    public AdmResponse deleteImage(@RequestParam(value = "projectId",required = false) String projectId,
+                                   @RequestBody List<AdmPointImage> vos) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         // 删除图片参数转换

+ 3 - 7
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmProjectController.java

@@ -6,12 +6,7 @@ import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.object.model.AdmProject;
 import com.persagy.proxy.object.service.IAdmProjectService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.ws.rs.QueryParam;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * ADM 项目 API
@@ -32,7 +27,8 @@ public class AdmProjectController {
      * @throws Exception
      */
     @PostMapping("/query")
-    public AdmResponse query(@QueryParam("projectId") String projectId, @RequestBody AdmQueryCriteria request) throws Exception {
+    public AdmResponse query(@RequestParam(value = "projectId",required = false) String projectId,
+                             @RequestBody AdmQueryCriteria request) throws Exception {
         request.setName(AdmProject.OBJ_TYPE);
         return service.doQuery(AdmContextUtil.toDmpContext(), request, AdmProject.class);
     }

+ 3 - 6
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmPropertyController.java

@@ -9,12 +9,8 @@ import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.object.model.AdmProperty;
 import com.persagy.proxy.object.service.IAdmPropertyService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.List;
 
 /**
@@ -62,7 +58,8 @@ public class AdmPropertyController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmProperty> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmProperty> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmProperty> vos = CollUtil.newArrayList(createRequest.getContent());
         vos = service.doUpdate(AdmContextUtil.toDmpContext(), AdmProperty.class, vos);
         return AdmResponse.success(vos);

+ 5 - 6
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmShaftController.java

@@ -35,7 +35,6 @@ import com.persagy.proxy.object.service.IAdmSpaceService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -213,10 +212,11 @@ public class AdmShaftController {
             failureList = spaceIds;
         }
 
-        if(CollUtil.isNotEmpty(failureList))
-            return AdmResponse.failure("元空间 " +failureList.stream().collect(Collectors.joining(","))+ " 不存在");
-        else
+        if(CollUtil.isNotEmpty(failureList)) {
+            return AdmResponse.failure("元空间 " + failureList.stream().collect(Collectors.joining(",")) + " 不存在");
+        } else {
             return AdmResponse.success();
+        }
     }
 
     /**
@@ -448,13 +448,12 @@ public class AdmShaftController {
     /**
      * 查询和当前竖井没有关联的业务空间
      * shaftId 为竖井id
-     * 
      * @param request
      * @return
      * @throws Exception
      */
     @PostMapping("/un-shaft-zoneSpaceBaseTable")
-    public AdmResponse queryUnZoneSp(@QueryParam("shaftId") String shaftId,
+    public AdmResponse queryUnZoneSp(@RequestParam(value = "shaftId") String shaftId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装条件
         if(!StrUtil.isNotEmpty(shaftId)) {

+ 5 - 7
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java

@@ -26,12 +26,8 @@ import com.persagy.proxy.object.service.IAdmBuildingService;
 import com.persagy.proxy.object.service.IAdmFloorService;
 import com.persagy.proxy.object.service.IAdmSpaceService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.lang.reflect.Field;
 import java.util.*;
 
@@ -124,7 +120,8 @@ public class AdmSpaceController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmSpace> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmSpace> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmSpace> vos = CollUtil.newArrayList(createRequest.getContent());
         // 特殊处理一下AdmSpace的infos
         if (CollUtil.isEmpty(vos)){
@@ -237,7 +234,8 @@ public class AdmSpaceController {
      * @throws Exception
      */
     @PostMapping("/update-fl-bd")
-    public AdmResponse updateFlBd(@RequestBody List<AdmUpDataFloorAndBuildingRequests> voList, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse updateFlBd(@RequestBody List<AdmUpDataFloorAndBuildingRequests> voList,
+                                  @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         if(CollUtil.isEmpty(voList)){
             return AdmResponse.failure("不可以传入空数据");
         }

+ 5 - 7
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmTenantController.java

@@ -11,12 +11,8 @@ import com.persagy.proxy.adm.utils.ObjectNameUtil;
 import com.persagy.proxy.object.model.AdmTenant;
 import com.persagy.proxy.object.service.IAdmTenantService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.List;
 
 /**
@@ -51,7 +47,8 @@ public class AdmTenantController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmTenant> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmTenant> createRequest,
+                                    @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmTenant> vos = CollUtil.newArrayList(createRequest.getContent());
         vos.stream().forEach(admTenant -> {
             if (StrUtil.isEmpty(admTenant.getName())){
@@ -81,7 +78,8 @@ public class AdmTenantController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmTenant> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmTenant> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         List<AdmTenant> vos = CollUtil.newArrayList(createRequest.getContent());
         vos = service.doUpdate(AdmContextUtil.toDmpContext(), AdmTenant.class, vos);
         return AdmResponse.success(vos);

+ 9 - 11
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmVirtualWallController.java

@@ -10,13 +10,8 @@ import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.object.model.AdmVirtualWall;
 import com.persagy.proxy.object.service.IAdmVirtualWallService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.List;
 
 /**
@@ -38,7 +33,8 @@ public class AdmVirtualWallController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmResponse create(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse create(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmVirtualWall> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -53,7 +49,8 @@ public class AdmVirtualWallController {
      * @throws Exception
      */
     @PostMapping("/create_ignore")
-    public AdmCreateResponse createIgnore(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmCreateResponse createIgnore(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest,
+                                          @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         createRequest.getContent().forEach(it->{
@@ -81,7 +78,8 @@ public class AdmVirtualWallController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmVirtualWall> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmVirtualWall> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -97,7 +95,7 @@ public class AdmVirtualWallController {
      * @throws Exception
      */
     @PostMapping("/query")
-    public AdmResponse query(@QueryParam("projectId") String projectId,
+    public AdmResponse query(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
@@ -114,7 +112,7 @@ public class AdmVirtualWallController {
      * @throws Exception
      */
     @PostMapping("/count")
-    public AdmResponse count(@QueryParam("projectId") String projectId,
+    public AdmResponse count(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();

+ 9 - 10
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmWindowController.java

@@ -10,12 +10,8 @@ import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.object.model.AdmWindow;
 import com.persagy.proxy.object.service.IAdmWindowService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.util.List;
 
 /**
@@ -37,7 +33,8 @@ public class AdmWindowController {
      * @throws Exception
      */
     @PostMapping("/create")
-    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmWindow> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmCreateResponse create(@RequestBody AdmCreateRequest<AdmWindow> createRequest,
+                                    @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmWindow> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -52,7 +49,8 @@ public class AdmWindowController {
      * @throws Exception
      */
     @PostMapping("/create_ignore")
-    public AdmResponse createIgnore(@RequestBody AdmCreateRequest<AdmWindow> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse createIgnore(@RequestBody AdmCreateRequest<AdmWindow> createRequest,
+                                    @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         createRequest.getContent().forEach(request->{
@@ -80,7 +78,8 @@ public class AdmWindowController {
      * @throws Exception
      */
     @PostMapping("/update")
-    public AdmResponse update(@RequestBody AdmCreateRequest<AdmWindow> createRequest, @QueryParam("projectId") String projectId) throws Exception {
+    public AdmResponse update(@RequestBody AdmCreateRequest<AdmWindow> createRequest,
+                              @RequestParam(value = "projectId",required = false) String projectId) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         List<AdmWindow> vos = CollUtil.newArrayList(createRequest.getContent());
@@ -96,7 +95,7 @@ public class AdmWindowController {
      * @throws Exception
      */
     @PostMapping("/query")
-    public AdmResponse query(@QueryParam("projectId") String projectId,
+    public AdmResponse query(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
@@ -113,7 +112,7 @@ public class AdmWindowController {
      * @throws Exception
      */
     @PostMapping("/count")
-    public AdmResponse count(@QueryParam("projectId") String projectId,
+    public AdmResponse count(@RequestParam(value = "projectId",required = false) String projectId,
                              @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();

+ 12 - 9
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/service/impl/AdmSpaceServiceImpl.java

@@ -14,7 +14,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
 import com.persagy.dmp.common.constant.CommonConstant;
@@ -28,7 +27,10 @@ import com.persagy.dmp.digital.entity.ObjectDigital;
 import com.persagy.dmp.digital.entity.ObjectRelation;
 import com.persagy.dmp.simple.client.DigitalObjectSimpleFacade;
 import com.persagy.proxy.adm.annotations.CascadeColumn;
-import com.persagy.proxy.adm.constant.*;
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
+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.request.AdmDCSQueryRequest;
 import com.persagy.proxy.adm.request.AdmQueryCriteria;
 import com.persagy.proxy.adm.request.AdmResponse;
@@ -537,7 +539,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
     private AdmResponse query(AdmDCSQueryRequest request) {
     	String orders = request.getOrders();
     	List<OrderItem> orderItem = AdmQueryCriteriaHelper.toOrderItem(orders);
-    	Set<String> classCodes = StrUtil.isBlank(request.getZoneType()) ? request.getZoneTypeList() : Sets.newHashSet(request.getZoneType());
+    	Set<String> classCodes = StrUtil.isBlank(request.getZoneType()) ? request.getZoneTypeList() : CollUtil.newHashSet(request.getZoneType());
     	/*ObjectNode objectNode = objectMapper.createObjectNode();
     	ObjectNode condition = objectMapper.createObjectNode();
     	condition.put("$null", true);
@@ -545,7 +547,7 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
     	QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
     	ObjectNode criteria = queryCriteria.getCriteria();
     	List<ObjectNode> queryObjects = this.relationReportService.queryObjects(criteria, AppContext.getContext().getGroupCode(), AppContext.getContext().getProjectId(),
-    			null, classCodes, Sets.newHashSet("space"), orderItem);
+    			null, classCodes, CollUtil.newHashSet("space"), orderItem);
     	
         List<AdmSpace> admVOs = AdmEntityTransferUtil.toAdmMultiEntity(queryObjects, request.getProjection(), AdmSpace.class);
         // 级联查询
@@ -590,8 +592,9 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
                 relationTo.set("objFrom", criteria.get("floorId"));
                 criteria.set("relationTo", relationTo);
                 criteria.remove("floorId");
-                if (criteria.has("buildingId"))
+                if (criteria.has("buildingId")) {
                     criteria.remove("buildingId");
+                }
                 return;
             }
         }
@@ -623,11 +626,11 @@ public class AdmSpaceServiceImpl extends AbstractAdmBaseServiceImpl<AdmSpace> im
         ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
         ObjectNode objectNode = objectMapper.createObjectNode();
         if (StrUtil.isNotBlank(AppContext.getContext().getProjectId())){
-            objectNode.putPOJO("projectIds", Sets.newHashSet(AppContext.getContext().getProjectId()));
+            objectNode.putPOJO("projectIds", CollUtil.newHashSet(AppContext.getContext().getProjectId()));
         }
-        objectNode.putPOJO("graphCodes", Sets.newHashSet(GraphCodeEnum.ArchSubset.name()));
-        objectNode.putPOJO("relCodes", Sets.newHashSet(relCode));
-        objectNode.putPOJO("groups", Sets.newHashSet("objTo"));
+        objectNode.putPOJO("graphCodes", CollUtil.newHashSet(GraphCodeEnum.ArchSubset.name()));
+        objectNode.putPOJO("relCodes", CollUtil.newHashSet(relCode));
+        objectNode.putPOJO("groups", CollUtil.newHashSet("objTo"));
         return objectNode;
     }
 

+ 1 - 2
adm-business/adm-middleware/src/main/java/com/persagy/proxy/relation/controller/RelationShContainSpBaseController.java

@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.basic.dto.RequestData;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.context.AppContext;
@@ -295,7 +294,7 @@ public class RelationShContainSpBaseController {
 		String projectId = AppContext.getContext().getProjectId();
 		
         List<ObjectTypeDefine> classList = this.relationReportService.queryClassList(groupCode, projectId,
-                null, Sets.newHashSet(AdmObjectType.SPACE.getIndex()), null);
+                null, CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), null);
         if (CollectionUtil.isEmpty(classList)) {
         	return AdmResponse.success();
 		}

+ 3 - 5
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmRelationController.java

@@ -1,17 +1,15 @@
 package com.persagy.proxy.report.controller;
 
 import com.persagy.proxy.adm.request.AdmResponse;
-import com.persagy.proxy.dictionary.service.IAdmGraphicTypeService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
+import com.persagy.proxy.dictionary.service.IAdmGraphicTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.ws.rs.QueryParam;
-
 /**
  * ADM 窗户 API
  * @author xujiaheng
@@ -31,7 +29,7 @@ public class AdmRelationController {
      * @throws Exception
      */
     @PostMapping("/equip/category")
-    public AdmResponse equipRel(@QueryParam("projectId") String projectId) {
+    public AdmResponse equipRel(@RequestParam(value = "projectId",required = false) String projectId) {
         //组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         AdmResponse res = service.query(context);

+ 2 - 3
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmRelationObjectController.java

@@ -9,10 +9,9 @@ import com.persagy.proxy.relation.service.IAdmDtRelationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.ws.rs.QueryParam;
-
 /**
  * ADM 窗户 API
  * @author xujiaheng
@@ -32,7 +31,7 @@ public class AdmRelationObjectController {
      * @throws Exception
      */
     @PostMapping("/equip/query")
-    public AdmResponse equipRel(@QueryParam("projectId") String projectId) {
+    public AdmResponse equipRel(@RequestParam(value = "projectId",required = false) String projectId) {
         //组装上下文条件
         InstanceUrlParam context = AdmContextUtil.toDmpContext();
         AdmQueryCriteria criteria = new AdmQueryCriteria();

+ 7 - 4
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmReportEquipController.java

@@ -43,7 +43,6 @@ import com.persagy.proxy.report.model.AdmInfoPoint;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
 import java.lang.reflect.Field;
 import java.util.*;
 
@@ -196,7 +195,8 @@ public class AdmReportEquipController {
      * @param   category    分类
      */
     @GetMapping("/equip-compon")
-    public AdmResponse getEquipCompon(@QueryParam("id") String id, @QueryParam("category") String category){
+    public AdmResponse getEquipCompon(@RequestParam(value = "id") String id,
+                                      @RequestParam(value = "category") String category){
         //return  rEquipComponService.getEquipCompon(id,category)
         RequestData requestData = new RequestData();
         if(StrUtil.isNotEmpty(id)){
@@ -330,7 +330,8 @@ public class AdmReportEquipController {
      * 查询不在当前系统下的设备
      */
     @PostMapping("/equip-sys")
-    public AdmResponse pageQueryEquipSys(@RequestBody AdmQueryCriteria request,@QueryParam("sysId") String sysId){
+    public AdmResponse pageQueryEquipSys(@RequestBody AdmQueryCriteria request,
+                                         @RequestParam(value = "sysId") String sysId){
         //return EquipmentService.queryBeforeEquipSy(sysId,request)
         QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
         ObjectNode criteriaEquip = JsonNodeFactory.instance.objectNode();
@@ -435,7 +436,9 @@ public class AdmReportEquipController {
      *  TODO 资产相关功能暂时不提供,之后根据业务进行需求处理
      */
     @PostMapping("/equip-category-property")
-    public AdmResponse equipProperty(@QueryParam("category") String category, @RequestBody AdmQueryCriteria request, @RequestBody List<String>  spaceIdList, @QueryParam("spacrType") String spacrType){
+    public AdmResponse equipProperty(@RequestParam(value = "category") String category,
+                                     @RequestBody AdmQueryCriteria request, @RequestBody List<String>  spaceIdList,
+                                     @RequestParam(value = "spacrType") String spacrType){
         //return EquipmentComService.equipProperty(category, request, spaceIdList, spacrType)
         return null;
     }

+ 18 - 11
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/AdmSpaceInfoController.java

@@ -21,13 +21,9 @@ import com.persagy.proxy.object.model.AdmSpace;
 import com.persagy.proxy.object.model.AdmSystem;
 import com.persagy.proxy.object.service.*;
 import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.QueryParam;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -86,7 +82,9 @@ public class AdmSpaceInfoController {
 	 * @author lxy
 	 */
 	@RequestMapping("/unspace-in-sys")
-	public AdmResponse unSpaceSys(@QueryParam("type") String type, @QueryParam("spaceId") String spaceId, @RequestBody AdmQueryCriteria request){
+	public AdmResponse unSpaceSys(@RequestParam(value = "type") String type,
+								  @RequestParam("spaceId") String spaceId,
+								  @RequestBody AdmQueryCriteria request){
 		request.setName(AdmSystem.OBJ_TYPE);
 		// 设置关系条件
 		request.resetRelationCond(true, "MechInArch", "Sy2Sp", spaceId, false);
@@ -99,7 +97,9 @@ public class AdmSpaceInfoController {
 	 * @return
 	 */
 	@PostMapping("/unspace-in-eq")
-	public AdmResponse unSpaceEq(@QueryParam("type") String type, @QueryParam("spaceId") String spaceId, @RequestBody AdmQueryCriteria request) {
+	public AdmResponse unSpaceEq(@RequestParam(value = "type") String type,
+								 @RequestParam(value = "spaceId") String spaceId,
+								 @RequestBody AdmQueryCriteria request) {
 		return queryEquipmentUnSpaceDirectly(type, spaceId, "MechInArch", request);
 	}
 
@@ -111,14 +111,18 @@ public class AdmSpaceInfoController {
 	 * @return
 	 */
 	@PostMapping("/unspace-for-eq")
-	public AdmResponse unSpaceForEq(@QueryParam("type") String type, @QueryParam("spaceId") String spaceId, @RequestBody AdmQueryCriteria request) {
+	public AdmResponse unSpaceForEq(@RequestParam(value = "type") String type,
+									@RequestParam(value = "spaceId") String spaceId,
+									@RequestBody AdmQueryCriteria request) {
 		return queryEquipmentUnSpaceDirectly(type, spaceId, "MechForArch", request);
 	}
 	/**
 	 * 空间内没有服务于当前空间的设备
 	 */
 	@PostMapping("/unspace-for-eq-point")
-	public AdmResponse unSpaceForEqPoint(@QueryParam("type") String type, @QueryParam("spaceId") String spaceId, @RequestBody AdmQueryCriteria request) {
+	public AdmResponse unSpaceForEqPoint(@RequestParam(value = "type") String type,
+										 @RequestParam(value = "spaceId") String spaceId,
+										 @RequestBody AdmQueryCriteria request) {
 		return queryEquipmentUnSpacePolygon(type, spaceId, "MechForArch", request);
 	}
 
@@ -126,7 +130,9 @@ public class AdmSpaceInfoController {
 	 * 根据空间轮廓 计算设备的坐标是否在空间内
 	 */
 	@PostMapping("/unspace-fIn-eq-point")
-	public AdmResponse unSpaceInEqPoint(@QueryParam("type") String type, @QueryParam("spaceId") String spaceId, @RequestBody AdmQueryCriteria request) {
+	public AdmResponse unSpaceInEqPoint(@RequestParam(value = "type") String type,
+										@RequestParam(value = "spaceId") String spaceId,
+										@RequestBody AdmQueryCriteria request) {
 		return queryEquipmentUnSpacePolygon(type, spaceId, "MechInArch", request);
 	}
 
@@ -134,7 +140,8 @@ public class AdmSpaceInfoController {
 	 * 未关联业务空间的元空间  Sp2Si
 	 */
 	@PostMapping("/unspace-ispace")
-	public AdmResponse unSpaceIspace(@QueryParam("objectType") String objectType, @RequestBody AdmDCSQueryRequest request) {
+	public AdmResponse unSpaceIspace(@RequestParam(value = "objectType") String objectType,
+									 @RequestBody AdmDCSQueryRequest request) {
 		//因现有floor没有轮廓线,先不做元空间和floor的轮廓的判断,使用关系查询
 		request.setName(AdmISpace.OBJ_TYPE);
 		// 设置关系条件

+ 4 - 6
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/ComponentStatisticsController.java

@@ -2,8 +2,6 @@ package com.persagy.proxy.report.controller;
 
 import cn.hutool.core.collection.CollUtil;
 import com.alibaba.fastjson.JSONObject;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
 import com.persagy.proxy.adm.constant.AdmObjectType;
 import com.persagy.proxy.adm.constant.AdmRelationTypeEnum;
 import com.persagy.proxy.adm.constant.SpaceTypeEnum;
@@ -108,7 +106,7 @@ public class ComponentStatisticsController {
 	public AdmResponse spObjectTypeCount(HttpServletRequest request) {
 		InstanceUrlParam context = AdmContextUtil.toDmpContext();
 		List<Map<String,Object>> list = this.relationReportService.queryObjectCountByObjInfos(context.getGroupCode(), null,
-				Sets.newHashSet(AdmObjectType.SPACE.getIndex()), Lists.newArrayList("classCode"));
+				CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), CollUtil.newArrayList("classCode"));
 		for (Map<String, Object> map : list) {
 //			map.put("name", map.get("classCode"));
 			map.put("name", SpaceTypeEnum.valueOf((String)map.get("classCode")).getDesc());
@@ -125,8 +123,8 @@ public class ComponentStatisticsController {
 	public AdmResponse generalSpFunctypeCount(HttpServletRequest request) {
 		InstanceUrlParam context = AdmContextUtil.toDmpContext();
 		List<Map<String,Object>> list = this.relationReportService.queryObjectCountByObjInfos(context.getGroupCode(),
-				Sets.newHashSet(SpaceTypeEnum.GeneralZone.getCode()),
-				Sets.newHashSet(AdmObjectType.SPACE.getIndex()), Lists.newArrayList("roomFuncType"));
+				CollUtil.newHashSet(SpaceTypeEnum.GeneralZone.getCode()),
+				CollUtil.newHashSet(AdmObjectType.SPACE.getIndex()), CollUtil.newArrayList("roomFuncType"));
 		for (Map<String, Object> map : list) {
 			map.put("name", map.get("roomFuncType"));
 		}
@@ -170,7 +168,7 @@ public class ComponentStatisticsController {
 	public AdmResponse shaftFunctypeCount(HttpServletRequest request) {
 		InstanceUrlParam context = AdmContextUtil.toDmpContext();
 		List<Map<String,Object>> list = this.relationReportService.queryObjectCountByObjInfos(context.getGroupCode(), null,
-				Sets.newHashSet(AdmObjectType.SHAFT.getIndex()), Lists.newArrayList("shaftFuncType"));
+				CollUtil.newHashSet(AdmObjectType.SHAFT.getIndex()), CollUtil.newArrayList("shaftFuncType"));
 		for (Map<String, Object> map : list) {
 			map.put("name", map.get("shaftFuncType"));
 		}

+ 3 - 8
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/controller/RelationReportController.java

@@ -14,7 +14,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Lists;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.helper.SpringHelper;
@@ -40,10 +39,6 @@ import com.persagy.proxy.report.service.IRelationReportService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.xssf.usermodel.XSSFCell;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.util.ResourceUtils;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -105,7 +100,7 @@ public class RelationReportController {
 	public AdmResponse countRelationObjects(@RequestParam String type, HttpServletRequest request) {
 		InstanceUrlParam context = AdmContextUtil.toDmpContext();
 		JSONObject objectNode = this.relationReportService.getRelationProjectCal(context.getGroupCode(), context.getProjectId(), type);
- 		return AdmResponse.success(Lists.newArrayList(objectNode));
+ 		return AdmResponse.success(CollUtil.newArrayList(objectNode));
 	}
 	
 	/**
@@ -509,7 +504,7 @@ public class RelationReportController {
 			int rowCount = excelReader.getRowCount();
 			if (rowCount<=5){
 				// 没有数据,直接返回成功
-				return AdmResponse.success(Lists.newArrayList(AdmExcelUtil.getImportResult(graphId, successNum, failurNum)));
+				return AdmResponse.success(CollUtil.newArrayList(AdmExcelUtil.getImportResult(graphId, successNum, failurNum)));
 			}
 			String code = StrUtil.utf8Str(excelReader.readCellValue(1,2));
 			if (StrUtil.isBlank(code)){
@@ -575,7 +570,7 @@ public class RelationReportController {
 			} catch (Exception e) {
 				log.error("文件存储失败", e);
 			}
-        	return AdmResponse.success(Lists.newArrayList(AdmExcelUtil.getImportResult(graphId, successNum, failurNum)));
+        	return AdmResponse.success(CollUtil.newArrayList(AdmExcelUtil.getImportResult(graphId, successNum, failurNum)));
 		} catch (Exception e) {
 			log.error("文件导入失败", e);
 			failure = e.getMessage();

+ 6 - 8
adm-business/adm-middleware/src/main/java/com/persagy/proxy/report/service/impl/RelationReportService.java

@@ -14,8 +14,6 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
 import com.persagy.dmp.basic.dto.GraphParentMes;
 import com.persagy.dmp.basic.dto.RequestData;
 import com.persagy.dmp.basic.model.QueryCriteria;
@@ -95,7 +93,7 @@ public class RelationReportService implements IRelationReportService {
 		requestData.setObjTypes(objTypes);
 		requestData.setGroups(groups);
 		List<Map<String,Object>> list = DigitalObjectSimpleFacade.queryObjectCountByObjInfos(groupCode, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, requestData);
-		return CollectionUtil.isEmpty(list) ? Lists.newArrayList() : list;
+		return CollectionUtil.isEmpty(list) ? CollUtil.newArrayList() : list;
 	}
 	
 	@Override
@@ -134,9 +132,9 @@ public class RelationReportService implements IRelationReportService {
 		// 查询出对应项目关系计算数据
 		List<ObjectNode> projectList = DigitalRelationProjectCalFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, queryCriteria);
 		if (CollectionUtil.isEmpty(projectList)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
-		List<JSONObject> result = Lists.newArrayList();
+		List<JSONObject> result = CollUtil.newArrayList();
 		Map<String, AdmRelationTypeEnum> graphRelTypeMap = AdmCommonConstant.GRAPH_RELATION_TYPE_MAP;
 		Map<String, RelationDefine> relationDefineMap = queryAllRelationDefineMap(groupCode, projectId);
 		Map<String, Integer> relCountMap = queryAllRelationCountMap(groupCode,projectId);
@@ -188,7 +186,7 @@ public class RelationReportService implements IRelationReportService {
 		QueryCriteria secondCriteria = new QueryCriteria();
 		List<GraphDefine> secondList = DigitalGraphDefineFacade.query(groupCode, projectId, AdmCommonConstant.APP_ID, AdmCommonConstant.USER_ID, secondCriteria);
 		if (CollectionUtil.isEmpty(secondList)) {
-			return Lists.newArrayList();
+			return CollUtil.newArrayList();
 		}
 		// 获取此图类型对应项目计算数据
 		List<JSONObject> resultList = new ArrayList<>();
@@ -203,7 +201,7 @@ public class RelationReportService implements IRelationReportService {
 			// 查询出对应项目关系计算数据
 			List<ObjectNode> projectList = graphCodeMap.getOrDefault(graphCode,new ArrayList<>());
 			if (CollectionUtil.isEmpty(projectList)) {
-				graphObject.put("relationTypeProjectList", Lists.newArrayList());
+				graphObject.put("relationTypeProjectList", CollUtil.newArrayList());
 				continue;
 			}
 			// 再根据图类型、边类型,统计此类型下的数量
@@ -420,7 +418,7 @@ public class RelationReportService implements IRelationReportService {
 		// 获取关联对象的本地名称
 		ObjectRelation objectRelation = objectRelations.get(0);
 		String relationId = StrUtil.isBlank(objFrom) ? objectRelation.getObjFrom() : objectRelation.getObjTo();
-		List<ObjectNode> objectNodes = this.getObjectNode(null, groupCode, projectId, Sets.newHashSet(relationId));
+		List<ObjectNode> objectNodes = this.getObjectNode(null, groupCode, projectId, CollUtil.newHashSet(relationId));
 		return CollectionUtil.isEmpty(objectNodes) ? objectMapper.createObjectNode() : objectNodes.get(0);
 	}