|
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-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;
|
|
@@ -20,15 +19,15 @@ import com.persagy.dmp.simple.client.DigitalObjectSimpleFacade;
|
|
|
import com.persagy.proxy.adm.request.AdmCreateRequest;
|
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
-import com.persagy.proxy.object.service.IAdmBuildingService;
|
|
|
import com.persagy.proxy.adm.service.IAdmRelationService;
|
|
|
-import com.persagy.proxy.object.service.IAdmShaftService;
|
|
|
-import com.persagy.proxy.object.service.IAdmSpaceService;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
import com.persagy.proxy.adm.utils.AdmQueryCriteriaHelper;
|
|
|
import com.persagy.proxy.adm.utils.ObjectNameUtil;
|
|
|
import com.persagy.proxy.common.entity.RelationDTO;
|
|
|
import com.persagy.proxy.object.model.*;
|
|
|
+import com.persagy.proxy.object.service.IAdmBuildingService;
|
|
|
+import com.persagy.proxy.object.service.IAdmShaftService;
|
|
|
+import com.persagy.proxy.object.service.IAdmSpaceService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -53,8 +52,6 @@ public class AdmShaftController {
|
|
|
private IAdmBuildingService buildingService;
|
|
|
@Autowired
|
|
|
private IAdmSpaceService spaceService;
|
|
|
- @Autowired
|
|
|
- private ObjectMapper objectMapper;
|
|
|
|
|
|
/**
|
|
|
* 统计
|
|
@@ -353,10 +350,11 @@ public class AdmShaftController {
|
|
|
|
|
|
List<AdmSpace> vos = JSONUtil.toList(spaceList.toString(), AdmSpace.class);
|
|
|
Map<String, AdmSpace> admSpaceMap = CollUtil.fieldValueMap(vos, "buildingId");
|
|
|
- StringBuilder filter = new StringBuilder(" id in ['");
|
|
|
- admSpaceMap.keySet().stream().forEach(spaceId -> filter.append(spaceId).append("','"));
|
|
|
- String filters = StrUtil.sub(filter.toString(), 0,-2)+"]";
|
|
|
- queryCriteriaBd.setFilters(filters);
|
|
|
+ ObjectNode relationFrom = JsonNodeFactory.instance.objectNode();
|
|
|
+ relationFrom.put("relCode", "Bd2Sp");
|
|
|
+ relationFrom.put("graphCode","ArchSubset");
|
|
|
+ ArrayNode arrayNode = relationFrom.putObject("objTo").putArray("$in");
|
|
|
+ admSpaceMap.keySet().stream().forEach(spaceId -> arrayNode.add(spaceId));
|
|
|
AdmResponse response = buildingService.doQuery(AdmContextUtil.toDmpContext(), queryCriteriaBd, AdmBuilding.class);
|
|
|
return response;
|
|
|
}else{
|