caozixuan 1 жил өмнө
parent
commit
7ba677b077

+ 3 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/ServiceAnalyseServiceImpl.java

@@ -285,7 +285,9 @@ public class ServiceAnalyseServiceImpl extends ServiceImpl<ServiceAnalyseMapper,
                 .eq(TBCrm::getEnable, true)
                 .eq(TBCrm::getEnable, true)
                 .eq(TBCrm::getStatus, CrmStatusEnum.PUBLISH));
                 .eq(TBCrm::getStatus, CrmStatusEnum.PUBLISH));
 
 
-        Set<Long> regionIdSet = publishCrmList.stream().map(TBCrm::getRegionId).collect(Collectors.toSet());
+        Set<Long> regionIdSet = publishCrmList.stream()
+                .filter(e -> e.getRegionId() != null && e.getRegionId() > 0)
+                .map(TBCrm::getRegionId).collect(Collectors.toSet());
 
 
         List<RegionPersonnel> regionPersonnelList = new ArrayList<>();
         List<RegionPersonnel> regionPersonnelList = new ArrayList<>();
 
 

+ 2 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/SopAnalyseServiceImpl.java

@@ -90,7 +90,8 @@ public class SopAnalyseServiceImpl extends ServiceImpl<SopAnalyseMapper, TBSopIn
                 }
                 }
                 break;
                 break;
             case SUPPLIER:
             case SUPPLIER:
-                Set<Long> supplierIdSet = sopMonitorList.stream().map(SopMonitor::getSupplierId).collect(Collectors.toSet());
+                // 由大区经理兼任不显示
+                Set<Long> supplierIdSet = sopMonitorList.stream().filter(e -> e.getSupplierId() != null && e.getSupplierId() > 0).map(SopMonitor::getSupplierId).collect(Collectors.toSet());
                 for (Long supplierId : supplierIdSet) {
                 for (Long supplierId : supplierIdSet) {
                     List<SopMonitor> dataCell = sopMonitorList.stream().filter(e -> supplierId.equals(e.getSupplierId())).collect(Collectors.toList());
                     List<SopMonitor> dataCell = sopMonitorList.stream().filter(e -> supplierId.equals(e.getSupplierId())).collect(Collectors.toList());
                     SopWarnOverview supplierOverview = buildSopOverviewStatistic(dataCell);
                     SopWarnOverview supplierOverview = buildSopOverviewStatistic(dataCell);