Browse Source

履职代码优化

gaoxiong 1 year ago
parent
commit
3110577c49

+ 5 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/gx/service/ResumptionServiceImpl.java

@@ -297,7 +297,7 @@ public class ResumptionServiceImpl implements ResumptionService {
                 ResumptionStatus.OUT_DATE.getCode().equals(resumption.getStatus())){
             //待履职时,需要对所有标签进行筛选
             List<ResumptionNFCVo> news = new ArrayList<>();
-            Set<Long> areaIds = new HashSet<>();
+            Set<String> areaIds = new HashSet<>();
             Set<String> acs = new HashSet<>();
             Map<String,Integer> scans = new HashMap<>();
             for (ResumptionPlanVo vo : resumptionPlanVos) {
@@ -306,7 +306,7 @@ public class ResumptionServiceImpl implements ResumptionService {
                 Integer pointScan = vo.getPointScan();
 
                 if(areaId != null && checkId == null){
-                    areaIds.add(areaId);
+                    areaIds.add(areaId.toString());
                     scans.put(areaId.toString(),pointScan);
                 }
 
@@ -319,8 +319,8 @@ public class ResumptionServiceImpl implements ResumptionService {
 
             for (ResumptionNFCVo nfc : nfcs) {
                 nfc.setStatus(0);
-                if(areaIds.contains(nfc.getAreaId())){
-                    Integer scan = scans.get(nfc.getAreaId());
+                if(areaIds.contains(nfc.getAreaId().toString())){
+                    Integer scan = scans.get(nfc.getAreaId().toString());
                     nfc.setPointScan(scan);
                     news.add(nfc);
                 }
@@ -334,6 +334,7 @@ public class ResumptionServiceImpl implements ResumptionService {
             nfcs.clear();;
             nfcs.addAll(news);
         }
+        nfcs =  nfcs.stream().distinct().collect(Collectors.toList());
         return nfcs;
     }