diff --git a/src/main/java/com/xkrs/helper/FirePointQueryManager.java b/src/main/java/com/xkrs/helper/FirePointQueryManager.java index 49ba411..8810138 100644 --- a/src/main/java/com/xkrs/helper/FirePointQueryManager.java +++ b/src/main/java/com/xkrs/helper/FirePointQueryManager.java @@ -134,6 +134,13 @@ public class FirePointQueryManager { //查询未审核的普通火点 Specification specificationOrdinary = (root, criteriaQuery, criteriaBuilder) -> { List predicateList = new ArrayList<>(); + //非空判断 + predicateList.add(criteriaBuilder.isNotNull(root.get("proCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("proName").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("cityCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("cityName").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("countyCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("countyName").as(String.class))); //添加区划编码的过滤 if (!TextUtils.isEmpty(noRedundantUserCode)) { predicateList.add(criteriaBuilder.like(root.get("townCode").as(String.class), noRedundantUserCode + "%")); @@ -182,6 +189,13 @@ public class FirePointQueryManager { //查询审核通过的精准火点 Specification specificationPrecise = (root, criteriaQuery, criteriaBuilder) -> { List predicateList = new ArrayList<>(); + //非空判断 + predicateList.add(criteriaBuilder.isNotNull(root.get("proCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("proName").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("cityCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("cityName").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("countyCode").as(String.class))); + predicateList.add(criteriaBuilder.isNotNull(root.get("countyName").as(String.class))); //添加区划编码的过滤 if (!TextUtils.isEmpty(noRedundantUserCode)) { predicateList.add(criteriaBuilder.like(root.get("townCode").as(String.class), noRedundantUserCode + "%"));