浏览代码

修改因空值导致的返回错误

LAPTOP-BJJ3IV5R\SIWEI 11 月之前
父节点
当前提交
0af4ed4cbe

+ 4 - 4
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/table/TableDataSelectServiceImpl.java

@@ -64,7 +64,7 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
                     }
                     if (StringUtils.isNotEmpty(geomEWKT)) {
                         Map v_childMap = dataSelectByPoint(geomEWKT, tableResRuleDTO.getId());
-                        if (v_childMap != null) {
+                        if (StringUtils.isNotEmpty(v_childMap)) {
                             v_data.addAll((List<Map>) v_childMap.get("data"));
                             v_child.addAll((List<Map>) v_childMap.get("child"));
                         }
@@ -179,10 +179,10 @@ public class TableDataSelectServiceImpl implements TableDataSelectService {
             outputColumn.add(v_data.getFiledName());
         }
         List<Map> from_jg = intersectionTableWkt(tableName, 4326, from_kj_ids, eWkt, 4525, outputColumn);
-        if (from_jg == null || from_jg.size() == 0) {
-            return dataMapTransFormZh(from_jg, list);
+        if (from_jg == null || from_jg.size() <= 0) {
+            return retList;
         }
-        return retList;
+        return dataMapTransFormZh(from_jg, list);
     }
 
     public List<List<TableDataVo>> dataMapTransFormZh(List<Map> from_jg, List<TableFiledDTO> filedList) {