薪酬系统-福利档案,删除待办功能添加批量处理逻辑
This commit is contained in:
parent
1b376464c4
commit
1fb706b7da
|
|
@ -956,7 +956,11 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
}
|
||||
|
||||
if (insuranceArchivesBaseInfoPO.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())) {
|
||||
List<InsuranceArchivesBaseInfoPO> nowList = getInsuranceBaseInfoMapper().listByIds(insuranceArchivesBaseInfoPO.getIds());
|
||||
List<List<Long>> baseInfoIdsPartition = Lists.partition((List<Long>) insuranceArchivesBaseInfoPO.getIds(), 100);
|
||||
List<InsuranceArchivesBaseInfoPO> nowList = new ArrayList<>();
|
||||
baseInfoIdsPartition.forEach(part -> {
|
||||
nowList.addAll(getInsuranceBaseInfoMapper().listByIds(part));
|
||||
});
|
||||
//置空社保、公积金、其他福利档案的最后缴纳月信息,并将福利档案基础信息表的状态置为“正在缴纳”
|
||||
if (nowList.size() > 0) {
|
||||
List<Long> socialIds = nowList.stream()
|
||||
|
|
@ -966,12 +970,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
|||
List<Long> otherIds = nowList.stream()
|
||||
.map(InsuranceArchivesBaseInfoPO::getOtherArchivesId).collect(Collectors.toList());
|
||||
|
||||
getSocialSchemeMapper().batchUpdateEndTimeToNull(socialIds);
|
||||
getFundSchemeMapper().batchUpdateEndTimeToNull(fundIds);
|
||||
getOtherSchemeMapper().batchUpdateEndTimeToNull(otherIds);
|
||||
List<List<Long>> socialIdsPartition = Lists.partition(socialIds, 100);
|
||||
socialIdsPartition.forEach(getSocialSchemeMapper()::batchUpdateEndTimeToNull);
|
||||
|
||||
List<List<Long>> fundIdsPartition = Lists.partition(fundIds, 100);
|
||||
fundIdsPartition.forEach(getFundSchemeMapper()::batchUpdateEndTimeToNull);
|
||||
|
||||
List<List<Long>> 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue