From 46189fce3464291935ccf6befc904ddec35acd04 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Wed, 30 Nov 2022 14:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E4=BA=BA=E5=91=98=E5=AF=BC?= =?UTF-8?q?=E5=85=A5----=E6=8E=92=E9=99=A4=E8=AF=81=E4=BB=B6=E5=8F=B7?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ChangeWelfareServiceImpl.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java index 288cfa8cc6..351df86396 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java @@ -262,6 +262,7 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl errorInfo.size()){ -// Map 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 groupByIdCard = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getIdCard, Collectors.counting())); + groupByIdCard.forEach((idCard,count) -> { + if (!"10110".equals(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> groupByStatus = list.stream().collect(Collectors.groupingBy(ChangeWelfareImportExcel::getAddStatus)); List needInsert = groupByStatus.get(false);