Browse Source

fix bug:6.输入关键词搜索功能无效(只读和编辑模式均无效)

lijie 3 years ago
parent
commit
ab3e877e98

+ 8 - 3
src/main/java/com/persagy/proxy/object/controller/AdmShaftController.java

@@ -5,12 +5,14 @@ import cn.hutool.core.comparator.CompareUtil;
 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;
 import com.persagy.dmp.basic.dto.RequestData;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
+import com.persagy.dmp.common.helper.SpringHelper;
 import com.persagy.dmp.common.model.entity.BaseEntity;
 import com.persagy.dmp.define.client.DigitalObjectInfoFacade;
 import com.persagy.dmp.define.entity.ObjectInfoDefine;
@@ -285,15 +287,18 @@ public class AdmShaftController {
      * @throws Exception
      */
     @PostMapping("/shaft-zoneSpaceBaseTable")
-    public AdmResponse queryZoneSp(@QueryParam("ShaftId") String ShaftId, @RequestBody AdmQueryCriteria request) throws Exception {
+    public AdmResponse queryZoneSp(@RequestParam("ShaftId") String ShaftId, @RequestBody AdmQueryCriteria request) throws Exception {
         // 组装条件
         request.setName(AdmSpace.OBJ_TYPE);
         QueryCriteria queryCriteria = AdmQueryCriteriaHelper.toDmpCriteria(request);
         if(!StrUtil.isNotEmpty(ShaftId)) {
             return AdmResponse.failure("必填项:shaftId(竖井id)");
         }
-
-        ObjectNode criteria = JsonNodeFactory.instance.objectNode();
+        ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
+        ObjectNode criteria = queryCriteria.getCriteria();
+        if (null==criteria){
+            criteria = objectMapper.createObjectNode();
+        }
         ObjectNode relationTO = JsonNodeFactory.instance.objectNode();
         relationTO.put("relCode", "Sh2Sp");
         relationTO.put("graphCode","ArchSubset");