From 1fb706b7dae47d5d799e889e541c63a77144fcd6 Mon Sep 17 00:00:00 2001 From: sy Date: Mon, 12 Dec 2022 16:55:22 +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=E5=88=A0=E9=99=A4=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIArchivesServiceImpl.java | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java index f2e028d2e..2b209a277 100644 --- a/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIArchivesServiceImpl.java @@ -956,7 +956,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService } if (insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) { - List nowList = getInsuranceBaseInfoMapper().listByIds(insuranceArchivesBaseInfoPO.getIds()); + List> baseInfoIdsPartition = Lists.partition((List) insuranceArchivesBaseInfoPO.getIds(), 100); + List nowList = new ArrayList<>(); + baseInfoIdsPartition.forEach(part -> { + nowList.addAll(getInsuranceBaseInfoMapper().listByIds(part)); + }); //置空社保、公积金、其他福利档案的最后缴纳月信息,并将福利档案基础信息表的状态置为“正在缴纳” if (nowList.size() > 0) { List socialIds = nowList.stream() @@ -966,12 +970,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService List otherIds = nowList.stream() .map(InsuranceArchivesBaseInfoPO::getOtherArchivesId).collect(Collectors.toList()); - getSocialSchemeMapper().batchUpdateEndTimeToNull(socialIds); - getFundSchemeMapper().batchUpdateEndTimeToNull(fundIds); - getOtherSchemeMapper().batchUpdateEndTimeToNull(otherIds); + List> socialIdsPartition = Lists.partition(socialIds, 100); + socialIdsPartition.forEach(getSocialSchemeMapper()::batchUpdateEndTimeToNull); + + List> fundIdsPartition = Lists.partition(fundIds, 100); + fundIdsPartition.forEach(getFundSchemeMapper()::batchUpdateEndTimeToNull); + + List> otherIdsPartition = Lists.partition(otherIds, 100); + otherIdsPartition.forEach(getOtherSchemeMapper()::batchUpdateEndTimeToNull); + + baseInfoIdsPartition.forEach(part -> { + getInsuranceBaseInfoMapper().updateRunStatusByIds(InsuranceArchivesBaseInfoPO.builder() + .ids(part) + .runStatus(EmployeeStatusEnum.PAYING.getValue()) + .build()); + }); - insuranceArchivesBaseInfoPO.setRunStatus(EmployeeStatusEnum.PAYING.getValue()); - getInsuranceBaseInfoMapper().updateRunStatusByIds(insuranceArchivesBaseInfoPO); } }