Kaynağa Gözat

大屏每小时更新全部数据

qin 1 yıl önce
ebeveyn
işleme
36a7803859

+ 2 - 2
src/main/java/com/poteviohealth/cgp/statistics/service/impl/OrderServiceImpl.java

@@ -956,7 +956,7 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
             List<SubsidyCustomerJsonFace> jsonFaceList = Lists.newArrayList();
             if(source.equals(1)){
                 //按区域分组
-                Map<Integer,List<CustomerSubsidyDTO>> countryMaps = csList.stream().collect(Collectors.groupingBy(CustomerSubsidyDTO::getNowCountryId));
+                Map<Integer,List<CustomerSubsidyDTO>> countryMaps = csList.stream().filter(c->c.getNowCountryId() != null).collect(Collectors.groupingBy(CustomerSubsidyDTO::getNowCountryId));
                 for (Integer key : countryMaps.keySet()) {
                     List<CustomerSubsidyDTO> keyList = countryMaps.get(key);
                     SubsidyCustomerJsonFace jsonFace = new SubsidyCustomerJsonFace();
@@ -968,7 +968,7 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
                 }
             }else{
                 //按老人类型分组
-                Map<String,List<CustomerSubsidyDTO>> typeMaps = csList.stream().collect(Collectors.groupingBy(CustomerSubsidyDTO::getCustomerTypeId));
+                Map<String,List<CustomerSubsidyDTO>> typeMaps = csList.stream().filter(c->StringUtils.isNotEmpty(c.getCustomerTypeId())).collect(Collectors.groupingBy(CustomerSubsidyDTO::getCustomerTypeId));
                 Map<String,SubsidyCustomerJsonFace> faceMap = new HashMap<>();
                 for (String key : typeMaps.keySet()) {
                     List<CustomerSubsidyDTO> keyList = typeMaps.get(key);