|
@@ -1,14 +1,27 @@
|
|
|
package com.persagy.proxy.adm.controller;
|
|
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import javax.ws.rs.QueryParam;
|
|
|
+
|
|
|
+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 com.alibaba.fastjson.JSONObject;
|
|
|
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.basic.utils.JsonNodeUtils;
|
|
|
-import com.persagy.proxy.adm.model.*;
|
|
|
+import com.persagy.proxy.adm.handler.SpaceRelationInfoHandler;
|
|
|
+import com.persagy.proxy.adm.model.AdmBuilding;
|
|
|
+import com.persagy.proxy.adm.model.AdmDCSQueryRequest;
|
|
|
+import com.persagy.proxy.adm.model.AdmFloor;
|
|
|
+import com.persagy.proxy.adm.model.AdmSpace;
|
|
|
+import com.persagy.proxy.adm.model.AdmUpDataFloorAndBuildingRequests;
|
|
|
import com.persagy.proxy.adm.request.AdmCreateRequest;
|
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
@@ -19,15 +32,10 @@ import com.persagy.proxy.adm.service.IAdmSpaceService;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
import com.persagy.proxy.adm.utils.ObjectNameUtil;
|
|
|
import com.persagy.proxy.common.entity.RelationDTO;
|
|
|
-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 java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
|
|
|
/**
|
|
|
* Adm 空间 API
|
|
@@ -46,6 +54,8 @@ public class AdmSpaceController {
|
|
|
private IAdmRelationService relationService;
|
|
|
@Autowired
|
|
|
private IAdmFloorService floorService;
|
|
|
+ @Autowired
|
|
|
+ private SpaceRelationInfoHandler spaceRelationInfoHandler;
|
|
|
|
|
|
/**
|
|
|
* 统计
|
|
@@ -127,13 +137,14 @@ public class AdmSpaceController {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
@PostMapping("/query")
|
|
|
- public ObjectNode query(@RequestBody AdmDCSQueryRequest request) throws Exception {
|
|
|
- AdmResponse response = service.doQuerySpaces( AdmContextUtil.toDmpContext(), request);
|
|
|
+ public JSONObject query(@RequestBody AdmDCSQueryRequest request) throws Exception {
|
|
|
+ /*AdmResponse response = service.doQuerySpaces( AdmContextUtil.toDmpContext(), request);
|
|
|
ObjectNode objectNode = JsonNodeUtils.toObjectNode(response, null, null);
|
|
|
if(StrUtil.isNotEmpty(request.getZoneType())){
|
|
|
objectNode.put("zoneType", request.getZoneType());
|
|
|
}
|
|
|
- return objectNode;
|
|
|
+ return objectNode;*/
|
|
|
+ return this.spaceRelationInfoHandler.querySpaceInfo(request);
|
|
|
}
|
|
|
|
|
|
/**
|