From 33aa8ea50768ad1681d2069a4c14b00a4a61bcf5 Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 2 Dec 2022 17:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E6=A1=A3=E6=A1=88=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=80=9A=E8=BF=87=E5=AF=BC=E5=85=A5excel=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=89=8D=EF=BC=8C=E6=A0=B9=E6=8D=AE=E4=BA=BA=E5=91=98?= =?UTF-8?q?id=E5=92=8C=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4=E4=B9=89?= =?UTF-8?q?=E5=8A=A1=E4=BA=BA=E8=BF=9B=E8=A1=8C=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/impl/SISchemeServiceImpl.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java index e8c454de5..56c6a6b17 100644 --- a/src/com/engine/salary/service/impl/SISchemeServiceImpl.java +++ b/src/com/engine/salary/service/impl/SISchemeServiceImpl.java @@ -1226,6 +1226,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { // List socialEmployeeIds = socialSchemePOS.stream().map(InsuranceArchivesSocialSchemePO::getEmployeeId).collect(Collectors.toList()); // List> socialEmployeeIdPartition = Lists.partition(socialEmployeeIds, 100); // socialEmployeeIdPartition.forEach(getSocialSchemeMapper()::batchDeleteByEmployeeIds); + //去除员工id+个税扣缴义务人下重复的数据 + socialSchemePOS = socialSchemePOS.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); + List insuranceArchivesSocialSchemePOS = InsuranceArchivesSocialSchemePOEncrypt.encryptList(socialSchemePOS); List> partition = Lists.partition(insuranceArchivesSocialSchemePOS, 100); partition.forEach(getSocialSchemeMapper()::batchSave); @@ -1239,6 +1243,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { // List fundEmployeeIds = fundSchemePOS.stream().map(InsuranceArchivesFundSchemePO::getEmployeeId).collect(Collectors.toList()); // List> fundEmployeeIdsPartition = Lists.partition(fundEmployeeIds, 100); // fundEmployeeIdsPartition.forEach(getFundSchemeMapper()::batchDeleteByEmployeeIds); + //去除员工id+个税扣缴义务人下重复的数据 + fundSchemePOS = fundSchemePOS.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); + List insuranceArchivesFundSchemePOS = InsuranceArchivesFundSchemePOEncrypt.encryptList(fundSchemePOS); List> partition = Lists.partition(insuranceArchivesFundSchemePOS, 100); partition.forEach(getFundSchemeMapper()::batchSave); @@ -1252,6 +1260,10 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { // List otherEmployeeIds = otherSchemePOS.stream().map(InsuranceArchivesOtherSchemePO::getEmployeeId).collect(Collectors.toList()); // List> otherEmployeeIdsPartition = Lists.partition(otherEmployeeIds, 100); // otherEmployeeIdsPartition.forEach(getOtherSchemeMapper()::batchDeleteByEmployeeIds); + //去除员工id+个税扣缴义务人下重复的数据 + otherSchemePOS = otherSchemePOS.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); + List insuranceArchivesOtherSchemePOS = InsuranceArchivesOtherSchemePOEncrypt.encryptList(otherSchemePOS); List> partition = Lists.partition(insuranceArchivesOtherSchemePOS, 100); partition.forEach(getOtherSchemeMapper()::batchSave); @@ -1260,6 +1272,9 @@ public class SISchemeServiceImpl extends Service implements SISchemeService { List baseInfoPOS = insuranceArchivesAccountPOS.stream().filter(Objects::nonNull).map(InsuranceArchivesAccountPO::getBaseInfo).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(baseInfoPOS)) { // baseInfoPOS = baseInfoPOS.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InsuranceArchivesBaseInfoPO::getEmployeeId))), ArrayList::new)); + //去除员工id+个税扣缴义务人下重复的数据 + baseInfoPOS = baseInfoPOS.stream() + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new)); //根据人员id和个税扣缴义务人id删除对应档案 baseInfoPOS.forEach(getInsuranceBaseInfoMapper()::deleteByEmployeeIdAndPayOrg); //分批批量删除