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); } }