zhaoyk 3 лет назад
Родитель
Сommit
a5112161d5

+ 5 - 0
src/main/java/com/persagy/bdtp/adm/controller/ToolController.java

@@ -48,6 +48,11 @@ public class ToolController {
 	@Autowired
 	private IConfigService configService;
 
+	@GetMapping("/hello")
+	public AdmResult<Integer> hello(){
+		return AdmResult.success(configService.queryCommonConfig(null).size());
+	}
+
 	@RequestMapping("/dict")
 	public AdmResult<Dict> dict(@RequestBody AdmRequest req, @RequestParam(required = false) String module){
 		Dict map = syncApp.queryDict(req.getGroupCode(), req.getProjectId(), req.getUserId(), !"infos".equals(module), false);

+ 1 - 1
src/main/java/com/persagy/bdtp/adm/entity/db/AdmJobSpace.java

@@ -21,7 +21,7 @@ public class AdmJobSpace extends BaseAdmDataEntity {
 
     private String spaceId;
 
-    private String bimId;
+//    private String bimId; 业务空间没有bimId
 
     private String spaceType;
 

+ 5 - 11
src/main/java/com/persagy/bdtp/adm/service/impl/SyncSpaceImpl.java

@@ -14,7 +14,6 @@ import com.persagy.bdtp.adm.common.AdmConst;
 import com.persagy.bdtp.adm.dao.AdmJobSpaceMapper;
 import com.persagy.bdtp.adm.entity.Pagination;
 import com.persagy.bdtp.adm.entity.db.AdmJobSpace;
-import com.persagy.bdtp.adm.entity.db.AdmObject;
 import com.persagy.bdtp.adm.service.ISyncSpace;
 import com.persagy.bdtp.adm.service.ServiceUtil;
 import com.persagy.bdtp.adm.util.GeomUtil;
@@ -106,12 +105,11 @@ public class SyncSpaceImpl implements ISyncSpace {
 		List<AdmJobSpace> jobSpaceList = jobSpaceMapper.selectList(wrapper);
 
 		HashMap<String, AdmJobSpace> jobMap = new HashMap<>(jobSpaceList.size());
-		jobSpaceList.forEach(job -> jobMap.put(job.getBimId() != null ? job.getBimId() : job.getSpaceId(), job));
+		jobSpaceList.forEach(job -> jobMap.put(job.getSpaceId(), job));
 
 		//同步操作
 		for(ObjectNode sp : spList){
 			String spId = sp.get("id").asText();
-			String bimId = sp.get("bimId") != null ? sp.get("bimId").asText() : null;
 
 			ArrayNode spOutline = null;
 			Object o1 = sp.get("outline");
@@ -125,7 +123,7 @@ public class SyncSpaceImpl implements ISyncSpace {
 			if(!GeomUtil.checkPolygon(spOutline))
 				continue;
 
-			AdmJobSpace job = jobMap.remove(bimId != null ? bimId : spId);
+			AdmJobSpace job = jobMap.remove(spId);
 			if(job != null) { //id匹配
 				boolean change = false;
 
@@ -138,8 +136,7 @@ public class SyncSpaceImpl implements ISyncSpace {
 				}
 
 				//重置空间id
-				if(!Objects.equals(spId, job.getSpaceId()) || !Objects.equals(bimId, job.getBimId())) {
-					job.setBimId(bimId);
+				if(!Objects.equals(spId, job.getSpaceId())) {
 					job.setSpaceId(spId);
 					change = true;
 				}
@@ -147,11 +144,9 @@ public class SyncSpaceImpl implements ISyncSpace {
 				//轮廓和空间id都一致的,不需要做处理
 				if(change)
 					toModify.add(job);
-			} else { //bimId未匹配
+			} else { //id未匹配
 				job = matchByOutline(jobMap, sp);
-				if(job != null) { //轮廓完全一致的任务空间,重新设置bimId和spaceId
-					job.setBimId(bimId);
-
+				if(job != null) { //轮廓完全一致的任务空间,重新设置spaceId
 					job.setSpaceId(spId);
 					toModify.add(job);
 				}
@@ -161,7 +156,6 @@ public class SyncSpaceImpl implements ISyncSpace {
 				job = new AdmJobSpace();
 				job.setId(IdUtil.fastSimpleUUID());
 				job.setSpaceId(spId);
-				job.setBimId(bimId);
 				job.setOutline(spOutline);
 				job.setArchState(AdmConst.JOB_STATE_PROCESSING);
 				job.setEquipState(AdmConst.JOB_STATE_PROCESSING);