Browse Source

交付范围信息点查询bug修复

linhuili 2 years ago
parent
commit
f048dc1526

+ 14 - 12
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/controller/ObjectInfoCollectController.java

@@ -3,6 +3,7 @@ package com.persagy.dmp.rwd.delivery.controller;
 import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.QueryCriteriaHelper;
@@ -192,18 +193,19 @@ public class ObjectInfoCollectController {
         if(CollUtil.isEmpty(queryCriteria)){
             return;
         }
-        String jsonNode = queryCriteria.get("deliveryType").toString();
-        if(jsonNode!=null){
-            String deliveryType = jsonNode.toString();
-            criteria.getCriteria().remove("deliveryType");
-            if("0".equals(deliveryType)){
-                //查询项目交付范围下的信息点
-                criteria.getCriteria().withArray("deliveryType").add(0).add(2);
-            }
-            if("1".equals(deliveryType)){
-                //查询现场交付范围信息点
-                criteria.getCriteria().withArray("deliveryType").add(1).add(2);
-            }
+        JsonNode jsonNode = queryCriteria.get("deliveryType");
+        if(CollUtil.isEmpty(jsonNode)){
+            return;
+        }
+        String deliveryType = jsonNode.toString();
+        criteria.getCriteria().remove("deliveryType");
+        if("0".equals(deliveryType)){
+            //查询项目交付范围下的信息点
+            criteria.getCriteria().withArray("deliveryType").add(0).add(2);
+        }
+        if("1".equals(deliveryType)){
+            //查询现场交付范围信息点
+            criteria.getCriteria().withArray("deliveryType").add(1).add(2);
         }
     }