|
@@ -0,0 +1,395 @@
|
|
|
+package com.persagy.proxy.adm.controller;
|
|
|
+
|
|
|
+
|
|
|
+import cn.hutool.core.text.TextSimilarity;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+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.ObjectRelation;
|
|
|
+import com.persagy.proxy.adm.constant.AdmCommonConstant;
|
|
|
+import com.persagy.proxy.adm.model.*;
|
|
|
+import com.persagy.proxy.adm.model.equip.ShaftSpaceVertical;
|
|
|
+import com.persagy.proxy.adm.model.equip.SpVerticalSp;
|
|
|
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
+import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
+import com.persagy.proxy.adm.service.*;
|
|
|
+import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.ws.rs.QueryParam;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.ThreadPoolExecutor;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zhangwencheng
|
|
|
+ * 竖井相关接口
|
|
|
+ */
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/shaft")
|
|
|
+public class AdmEquipShaftController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmSystemService systemService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmEquipmentService equipmentService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmShaftService shaftService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmBuildingService buildingService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmSpVerticalSpService spVerticalSpService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmSpaceService spaceService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmRelationService relationService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmFloorService floorService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdmDtRelationService dtRelationService;
|
|
|
+
|
|
|
+ @Value("${middleware.group.code}")
|
|
|
+ private String groupCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询没有和当前竖井绑定的系统
|
|
|
+ *
|
|
|
+ * @param param 竖井
|
|
|
+ */
|
|
|
+ @PostMapping("/unshaft-in-sys")
|
|
|
+ public AdmResponse unShaftSys(@RequestBody JSONObject param, @RequestParam("projectId") String projectId) {
|
|
|
+ //根据竖井Id,查询系统Id
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ QueryCriteria queryRequest = new QueryCriteria();
|
|
|
+ String shaftId = param.getString("shaftId");
|
|
|
+ ObjectNode criteriaRel = JsonNodeFactory.instance.objectNode();
|
|
|
+ criteriaRel.put("graphCode", "MechInArch");
|
|
|
+ criteriaRel.put("relCode", "Sy2Sh");
|
|
|
+ criteriaRel.put("objTo", shaftId);
|
|
|
+ queryRequest.setCriteria(criteriaRel);
|
|
|
+ List<ObjectRelation> objectRelations = relationService.queryByCondition(context, queryRequest);
|
|
|
+ List<String> sysIds = objectRelations.stream().map(ObjectRelation::getObjFrom).collect(Collectors.toList());
|
|
|
+// String filter = "id = '" + shaftId + "'";
|
|
|
+// //根据竖井Id查询竖井
|
|
|
+// JSONObject request = param.getJSONObject("request");
|
|
|
+// AdmQueryCriteria criteria = JSONObject.toJavaObject(request, AdmQueryCriteria.class);
|
|
|
+// criteria.setFilters(filter);
|
|
|
+// AdmResponse admResponse = shaftService.doQuery(context, criteria, AdmShaft.class);
|
|
|
+// List<AdmShaft> admShafts = (List<AdmShaft>) admResponse.getContent();
|
|
|
+// List<String> sysIds = new ArrayList<>();
|
|
|
+// //获取竖井下的系统
|
|
|
+// for (AdmShaft admShaft : admShafts) {
|
|
|
+// List<AdmSystem> systemList = admShaft.getSystemList();
|
|
|
+// if (!CollectionUtils.isEmpty(systemList)) {
|
|
|
+// for (AdmSystem admSystem : systemList) {
|
|
|
+// sysIds.add(admSystem.getId());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ JSONObject request = param.getJSONObject("request");
|
|
|
+ AdmQueryCriteria criteria = JSONObject.toJavaObject(request, AdmQueryCriteria.class);
|
|
|
+ //查询全量系统
|
|
|
+ String filter = null;
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ criteria.setName(AdmSystem.OBJ_TYPE);
|
|
|
+ AdmResponse admResponse = systemService.doQuery(context, criteria, AdmSystem.class);
|
|
|
+ List<AdmSystem> admSystems = (List<AdmSystem>) admResponse.getContent();
|
|
|
+ Iterator<AdmSystem> iterator = admSystems.iterator();
|
|
|
+ //去除竖井下的系统
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ AdmSystem next = iterator.next();
|
|
|
+ if (sysIds.contains(next.getId())) {
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ admResponse.setContent(admSystems);
|
|
|
+ return admResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询没有和当前竖井绑定的设备
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/unshaft-in-eq")
|
|
|
+ public AdmResponse unShaftEq(@RequestBody JSONObject param, @QueryParam("projectId") String projectId) {
|
|
|
+ String shaftId = param.getString("shaftId");
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ QueryCriteria queryRequest = new QueryCriteria();
|
|
|
+ ObjectNode criteriaRel = JsonNodeFactory.instance.objectNode();
|
|
|
+ criteriaRel.put("graphCode", "MechInArch");
|
|
|
+ criteriaRel.put("relCode", "Eq2Sh");
|
|
|
+ criteriaRel.put("objTo", shaftId);
|
|
|
+ queryRequest.setCriteria(criteriaRel);
|
|
|
+ List<ObjectRelation> objectRelations = relationService.queryByCondition(context, queryRequest);
|
|
|
+ List<String> equipIds = objectRelations.stream().map(ObjectRelation::getObjFrom).collect(Collectors.toList());
|
|
|
+
|
|
|
+// String filter = "id = '" + shaftId + "'";
|
|
|
+// //根据竖井Id查询
|
|
|
+// JSONObject request = param.getJSONObject("request");
|
|
|
+// AdmQueryCriteria criteria = JSONObject.toJavaObject(request, AdmQueryCriteria.class);
|
|
|
+// criteria.setFilters(filter);
|
|
|
+// AdmResponse admResponse = shaftService.doQuery(context, criteria, AdmShaft.class);
|
|
|
+// List<AdmShaft> admShafts = (List<AdmShaft>) admResponse.getContent();
|
|
|
+// List<String> equipIds = new ArrayList<>();
|
|
|
+// //获取竖井下的设备Id
|
|
|
+// for (AdmShaft admShaft : admShafts) {
|
|
|
+// List<AdmEquipment> equipmentList = admShaft.getEquipmentList();
|
|
|
+// if (!CollectionUtils.isEmpty(equipmentList)) {
|
|
|
+// for (AdmEquipment equipment : equipmentList) {
|
|
|
+// equipIds.add(equipment.getId());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ //查询所有设备
|
|
|
+ JSONObject request = param.getJSONObject("request");
|
|
|
+ AdmQueryCriteria criteria = JSONObject.toJavaObject(request, AdmQueryCriteria.class);
|
|
|
+ criteria.setFilters(null);
|
|
|
+ criteria.setName(AdmEquipment.OBJ_TYPE);
|
|
|
+ AdmResponse equipments = equipmentService.doQuery(context, criteria, AdmEquipment.class);
|
|
|
+ List<AdmEquipment> admEquipments = (List<AdmEquipment>) equipments.getContent();
|
|
|
+ //去除重复,竖井Id下的设备
|
|
|
+ Iterator<AdmEquipment> iterator = admEquipments.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ AdmEquipment next = iterator.next();
|
|
|
+ if (equipIds.contains(next.getId())) {
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ equipments.setContent(admEquipments);
|
|
|
+ return equipments;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询没有和当前竖井贯通的其它竖井
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/unshaft-through-shaft")
|
|
|
+ public AdmResponse unShaftThroughShaft(@RequestBody JSONObject param, @RequestParam("projectId") String projectId) {
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ String shaftId = param.getString("shaftId");
|
|
|
+ JSONObject request = param.getJSONObject("request");
|
|
|
+
|
|
|
+// (graphCode = "ThroughRelationship", relCode = "Sh2Sh")
|
|
|
+ QueryCriteria queryRequest = new QueryCriteria();
|
|
|
+ ObjectNode criteriaRel = JsonNodeFactory.instance.objectNode();
|
|
|
+ criteriaRel.put("graphCode", "ThroughRelationship");
|
|
|
+ criteriaRel.put("relCode", "Sh2Sh");
|
|
|
+ criteriaRel.put("objTo", shaftId);
|
|
|
+ queryRequest.setCriteria(criteriaRel);
|
|
|
+ List<ObjectRelation> objectRelations = relationService.queryByCondition(context, queryRequest);
|
|
|
+ List<String> shaftIds = objectRelations.stream().map(ObjectRelation::getObjFrom).collect(Collectors.toList());
|
|
|
+ queryRequest = new QueryCriteria();
|
|
|
+ criteriaRel = JsonNodeFactory.instance.objectNode();
|
|
|
+ criteriaRel.put("graphCode", "ThroughRelationship");
|
|
|
+ criteriaRel.put("relCode", "Sh2Sh");
|
|
|
+ criteriaRel.put("objFrom", shaftId);
|
|
|
+ queryRequest.setCriteria(criteriaRel);
|
|
|
+ List<ObjectRelation> objectRel = relationService.queryByCondition(context, queryRequest);
|
|
|
+ List<String> shaftIdTos = objectRel.stream().map(ObjectRelation::getObjTo).collect(Collectors.toList());
|
|
|
+ shaftIds.addAll(shaftIdTos);
|
|
|
+ shaftIds.add(shaftId);
|
|
|
+
|
|
|
+ AdmQueryCriteria criteria = JSONObject.toJavaObject(request, AdmQueryCriteria.class);
|
|
|
+ criteria.setName(AdmShaft.OBJ_TYPE);
|
|
|
+ AdmResponse admResponse = shaftService.doQuery(context, criteria, AdmShaft.class);
|
|
|
+ List<AdmShaft> admShafts = (List<AdmShaft>) admResponse.getContent();
|
|
|
+ Iterator<AdmShaft> iterator = admShafts.iterator();
|
|
|
+ //去除竖井和竖井Id相同的竖井,一部分是关联数据
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ AdmShaft admShaft = iterator.next();
|
|
|
+ List<AdmShaft> shaftThroughList = admShaft.getShaftThroughList();
|
|
|
+ if (shaftIds.contains(admShaft.getId())) {
|
|
|
+ iterator.remove();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+// for (AdmShaft shaft : shaftThroughList) {
|
|
|
+// if (shaft.getId().equals(shaftId)) {
|
|
|
+// iterator.remove();
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+ }
|
|
|
+ admResponse.setContent(admShafts);
|
|
|
+ return admResponse;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询竖井关联的空间垂直交通关系
|
|
|
+ */
|
|
|
+ @PostMapping("/shaft-vertical-space")
|
|
|
+ public AdmResponse shaftSpaceVertical(@RequestBody ShaftSpaceVertical shaftSpaceVertical, @RequestParam("projectId") String projectId) {
|
|
|
+ String buildingId = shaftSpaceVertical.getBuildingId();
|
|
|
+ String shaftId = shaftSpaceVertical.getShaftId();
|
|
|
+ String objectType = shaftSpaceVertical.getObjectType();
|
|
|
+ Boolean aiSwitch = shaftSpaceVertical.getAiSwitch();
|
|
|
+ if (StrUtil.isBlank(buildingId) || StrUtil.isBlank(shaftId)) {
|
|
|
+ return AdmResponse.failure("必填项:buildingId(建筑id)、shaftId(竖井Id)");
|
|
|
+ }
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ QueryCriteria queryRequest = new QueryCriteria();
|
|
|
+ ObjectNode criteriaRel = JsonNodeFactory.instance.objectNode();
|
|
|
+ criteriaRel.put("graphCode", "ArchSubset");
|
|
|
+ criteriaRel.put("relCode", "Bd2Fl");
|
|
|
+ criteriaRel.put("objFrom", buildingId);
|
|
|
+ queryRequest.setCriteria(criteriaRel);
|
|
|
+ List<ObjectRelation> objectRelations = relationService.queryByCondition(context, queryRequest);
|
|
|
+// putString(criteria, "graphCode", anno.graphCode());
|
|
|
+// putString(criteria, "relCode", anno.relCode());
|
|
|
+// putString(criteria, "relValue", anno.relValue());
|
|
|
+// ArrayNode array = criteria.putObject(isSelectTo?"objFrom":"objTo").putArray("$in");
|
|
|
+// idList.forEach(id -> array.add(id));
|
|
|
+ List<String> floorIds = objectRelations.stream().map(ObjectRelation::getObjTo).collect(Collectors.toList());
|
|
|
+ AdmQueryCriteria criteria = new AdmQueryCriteria();
|
|
|
+ String filter = " id in ('" + StrUtil.join("','", floorIds) + "') ";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ AdmResponse admBuild = floorService.doQuery(context, criteria, AdmFloor.class);
|
|
|
+ List<AdmFloor> floor = (List<AdmFloor>) admBuild.getContent();
|
|
|
+ //建筑下的楼层
|
|
|
+ AdmResponse admResult = new AdmResponse();
|
|
|
+ if (CollectionUtils.isEmpty(floor)) {
|
|
|
+ return admResult;
|
|
|
+ }
|
|
|
+ List<AdmSpace> spaceList = new ArrayList<>();
|
|
|
+ //3 如果开关为true
|
|
|
+ if (aiSwitch) {
|
|
|
+ //1.查询竖井下的空间
|
|
|
+// and relValue = " + objectType + "
|
|
|
+ filter = "graphCode = 'ArchSubset' and relCode = 'Sh2Sp' and projectId = " + projectId + " and objFrom =" + shaftId + " and valid = 1";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ AdmResponse admResponse = dtRelationService.doQuery(context, criteria, AdmDtRelation.class);
|
|
|
+ List<AdmDtRelation> dtRelations = (List<AdmDtRelation>) admResponse.getContent();
|
|
|
+ List<String> spaceIdss = dtRelations.stream().map(AdmDtRelation::getObj_to).collect(Collectors.toList());
|
|
|
+ filter = " id in ('" + StrUtil.join("','", spaceIdss) + "') ";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ admResponse= spaceService.doQuery(context,criteria,AdmSpace.class);
|
|
|
+ spaceList = (List<AdmSpace>) admResponse.getContent();
|
|
|
+ //2.排除不在buildingId下的
|
|
|
+ Iterator<AdmSpace> iterator = spaceList.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ AdmSpace admSpace = iterator.next();
|
|
|
+ if (!buildingId.equals(admSpace.getBuildingId())) {
|
|
|
+ iterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<AdmSpace> copy = spaceList.stream().collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<String> classCodes = spaceList.stream().map(AdmSpace::getClassCode).collect(Collectors.toList());
|
|
|
+ //查询建筑下所有指定类型空间
|
|
|
+ String classCodeStr = "('" + StrUtil.join("','", classCodes) + "') ";
|
|
|
+ //查询空间对象
|
|
|
+ filter = "projectId = " + projectId + " and buildingId = " + buildingId + " and classCode in " + classCodeStr + " and valid = 1";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ AdmResponse admSpaceRes = spaceService.doQuery(context, criteria, AdmSpace.class);
|
|
|
+ List<AdmSpace> spaces = (List<AdmSpace>) admSpaceRes.getContent();
|
|
|
+ for (AdmSpace space : spaces) {
|
|
|
+ boolean flag = false;
|
|
|
+ String localId = space.getLocalId();
|
|
|
+ String localName = space.getLocalName();
|
|
|
+ if (StrUtil.isBlank(localId) || StrUtil.isBlank(localName)) {
|
|
|
+ for (AdmSpace admSpace : copy) {
|
|
|
+ admSpace.getLocalId();
|
|
|
+ admSpace.getLocalName();
|
|
|
+ //如果名称或id匹配的大于90%
|
|
|
+ if (TextSimilarity.similar(admSpace.getLocalId(), localId) > 0.9 || TextSimilarity.similar(admSpace.getLocalName(), localName) > 0.9) {
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag) {
|
|
|
+ spaceList.add(space);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //4 查询交通关系
|
|
|
+ classCodes = spaceList.stream().map(AdmSpace::getClassCode).collect(Collectors.toList());
|
|
|
+ classCodeStr = "('" + StrUtil.join("','", classCodes) + "') ";
|
|
|
+ filter = "graphCode = TrafficNetwork and projectId = " + projectId + " and (objFrom in " + classCodeStr + " or objTo in " + classCodeStr + ") and valid = 1";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ AdmResponse admSp = spVerticalSpService.doQuery(context, criteria, SpVerticalSp.class);
|
|
|
+ List<SpVerticalSp> spVerticalSps = (List<SpVerticalSp>) admSp.getContent();
|
|
|
+ List<String> spaceIds = spVerticalSps.stream().map(SpVerticalSp::getSpaceId).collect(Collectors.toList());
|
|
|
+ String id = " id in ('" + StrUtil.join("','", spaceIds) + "') ";
|
|
|
+ criteria.setFilters(id);
|
|
|
+ admSpaceRes = spaceService.doQuery(context, criteria, AdmSpace.class);
|
|
|
+ spaces = (List<AdmSpace>) admSpaceRes.getContent();
|
|
|
+ spaceList.addAll(spaces);
|
|
|
+ Set<String> ids = new HashSet<>();
|
|
|
+ Iterator<AdmSpace> iter = spaceList.iterator();
|
|
|
+ while (iter.hasNext()) {
|
|
|
+ AdmSpace next = iter.next();
|
|
|
+ //去除重复
|
|
|
+ if (ids.contains(next.getId())) {
|
|
|
+ iter.remove();
|
|
|
+ }
|
|
|
+ ids.add(next.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //6将spaceList按照floor分组返回floor对象
|
|
|
+ if (!CollectionUtils.isEmpty(spaceList)) {
|
|
|
+ Map<String, List<AdmSpace>> map = new HashMap<>();
|
|
|
+ for (AdmSpace admSpace : spaceList) {
|
|
|
+ String floorId = admSpace.getFloorId();
|
|
|
+ List<AdmSpace> spaces = new ArrayList<>();
|
|
|
+ if (map.containsKey(floorId)) {
|
|
|
+ spaces = map.get(floorId);
|
|
|
+ }
|
|
|
+ spaces.add(admSpace);
|
|
|
+ map.put(floorId, spaces);
|
|
|
+ }
|
|
|
+ Iterator<AdmFloor> iterator = floor.iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ AdmFloor admFloor = iterator.next();
|
|
|
+ String id = admFloor.getId();
|
|
|
+ List<AdmSpace> spaces = map.get(id);
|
|
|
+ if (CollectionUtils.isEmpty(spaces)) {
|
|
|
+ iterator.remove();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ admFloor.setSpaceList(spaces);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ admResult.setContent(floor);
|
|
|
+ return admResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计算 和当前竖井有关联的空间的垂直交通关系
|
|
|
+ */
|
|
|
+ @PostMapping("/vertical-space")
|
|
|
+ public AdmResponse shaftVerticalSp(@RequestBody ShaftSpaceVertical shaftSpaceVertical, @RequestParam("projectId") String projectId) {
|
|
|
+ String buildingId = shaftSpaceVertical.getBuildingId();
|
|
|
+ String shaftId = shaftSpaceVertical.getShaftId();
|
|
|
+ String objectType = shaftSpaceVertical.getObjectType();
|
|
|
+ if (StrUtil.isBlank(buildingId) || StrUtil.isBlank(shaftId) || StrUtil.isBlank(objectType)) {
|
|
|
+ return AdmResponse.failure("必填项:buildingId(建筑id)、shaftId(竖井Id),objectType(空间类型)");
|
|
|
+ }
|
|
|
+ InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
|
|
|
+ AdmQueryCriteria criteria = new AdmQueryCriteria();
|
|
|
+ String filter = "graphCode = 'ArchSubset' and relCode = 'Sh2Sp' and projectId = " + projectId + " and objFrom =" + shaftId + " and valid = 1";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ AdmResponse admResponse = dtRelationService.doQuery(context, criteria, AdmDtRelation.class);
|
|
|
+ List<AdmDtRelation> dtRelations = (List<AdmDtRelation>) admResponse.getContent();
|
|
|
+ List<String> spaceIdss = dtRelations.stream().map(AdmDtRelation::getObj_to).collect(Collectors.toList());
|
|
|
+ filter = " id in ('" + StrUtil.join("','", spaceIdss) + "') ";
|
|
|
+ criteria.setFilters(filter);
|
|
|
+ admResponse= spaceService.doQuery(context,criteria,AdmSpace.class);
|
|
|
+ AdmResponse admResult = new AdmResponse();
|
|
|
+ return admResult;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|