|
|
@ -292,17 +292,17 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl<ChangeWelfareDao, |
|
|
|
|
|
|
|
} |
|
|
|
if (list.size() > errorInfo.size()){ |
|
|
|
Map<String, Long> groupByIdCard = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getIdCard, Collectors.counting())); |
|
|
|
groupByIdCard.forEach((idCard,count) -> { |
|
|
|
if (StringUtils.isNotBlank(idCard) && Integer.valueOf(count.toString()).compareTo(1) != 0){ |
|
|
|
for (ChangeWelfareImportExcel i : list) { |
|
|
|
if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){ |
|
|
|
errorInfo.add(getErrorInfo(i,"数据重复",i.getNum())); |
|
|
|
i.setAddStatus(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
// Map<String, Long> groupByIdCard = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getIdCard, Collectors.counting()));
|
|
|
|
// groupByIdCard.forEach((idCard,count) -> {
|
|
|
|
// if (StringUtils.isNotBlank(idCard) && Integer.valueOf(count.toString()).compareTo(1) != 0){
|
|
|
|
// for (ChangeWelfareImportExcel i : list) {
|
|
|
|
// if (idCard.equals(i.getIdCard()) && !i.getAddStatus()){
|
|
|
|
// errorInfo.add(getErrorInfo(i,"数据重复",i.getNum()));
|
|
|
|
// i.setAddStatus(true);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
} |
|
|
|
Map<Boolean, List<ChangeWelfareImportExcel>> groupByStatus = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getAddStatus)); |
|
|
|
List<ChangeWelfareImportExcel> needInsert = groupByStatus.get(false); |
|
|
|