|
|
@ -100,10 +100,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
Map<String, BigDecimal> scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId); |
|
|
|
|
|
|
|
//剔除垃圾数据
|
|
|
|
for(Iterator<ScreenPartyUserRankDataEntity> iter = registeredUsers.iterator(); |
|
|
|
iter.hasNext();){ |
|
|
|
if(null == gridMap.get(iter.next().getGridId())) iter.remove(); |
|
|
|
} |
|
|
|
registeredUsers.removeIf(user -> null == gridMap.get(user.getGridId())); |
|
|
|
|
|
|
|
//5.整合数据
|
|
|
|
if(!CollectionUtils.isEmpty(registeredUsers)){ |
|
|
@ -124,7 +121,6 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
|
|
|
|
user.setDataEndTime(finalDateId); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
screenPartyUserRankDataService.dataClean(registeredUsers, param.getCustomerId()); |
|
|
|
} |
|
|
@ -138,12 +134,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) { |
|
|
|
|
|
|
|
//查询难点赌点中有无已结案的项目,若有则保留
|
|
|
|
List<String> existed = screenDifficultyDataService.selectExistedInfo(param.getCustomerId()); |
|
|
|
|
|
|
|
//查询数据
|
|
|
|
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed)); |
|
|
|
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId())); |
|
|
|
if(CollectionUtils.isEmpty(difficulties)) return; |
|
|
|
|
|
|
|
//2.查询出客户下网格的相关信息
|
|
|
@ -151,24 +143,13 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
Map<String,GridInfoDTO> gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o)); |
|
|
|
|
|
|
|
//剔除垃圾数据(本次需要更新的数据集)
|
|
|
|
for(Iterator<ScreenDifficultyDataEntity> iter = difficulties.iterator(); iter.hasNext();){ |
|
|
|
ScreenDifficultyDataEntity pointer = iter.next(); |
|
|
|
if(null == gridMap.get(pointer.getOrgId())){ |
|
|
|
iter.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
//记录垃圾数(全量)
|
|
|
|
List<String> missing = new LinkedList<>(); |
|
|
|
List<ScreenDifficultyDataEntity> population = screenDifficultyDataService.getAllDifficultyByCustomerId(param.getCustomerId()); |
|
|
|
if(!CollectionUtils.isEmpty(population)){ |
|
|
|
for(Iterator<ScreenDifficultyDataEntity> iter = population.iterator(); iter.hasNext();){ |
|
|
|
ScreenDifficultyDataEntity pointer = iter.next(); |
|
|
|
if(null == gridMap.get(pointer.getOrgId())){ |
|
|
|
missing.add(pointer.getEventId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//for(Iterator<ScreenDifficultyDataEntity> iter = difficulties.iterator(); iter.hasNext();){
|
|
|
|
// ScreenDifficultyDataEntity pointer = iter.next();
|
|
|
|
// if(null == gridMap.get(pointer.getOrgId())){
|
|
|
|
// iter.remove();
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
difficulties.removeIf( diff -> null == gridMap.get(diff.getOrgId())); |
|
|
|
|
|
|
|
List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); |
|
|
|
//最近一次操作
|
|
|
@ -196,7 +177,6 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
diff.setEventTitle(oper.getTitle()); |
|
|
|
diff.setEventCostTime(oper.getCostTime()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); |
|
|
@ -204,6 +184,6 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr |
|
|
|
List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>(); |
|
|
|
imgMap.values().forEach(list -> {imgList.addAll(list);}); |
|
|
|
|
|
|
|
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList,missing); |
|
|
|
screenDifficultyDataService.dataClean(param.getCustomerId(),difficulties,imgList); |
|
|
|
} |
|
|
|
} |
|
|
|