社保福利台账增减人员

This commit is contained in:
Harryxzy 2025-03-11 15:18:05 +08:00
parent 5b66efa3cc
commit 25723af00a
1 changed files with 1 additions and 1 deletions

View File

@ -4926,7 +4926,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
if (!param.isFlag()) {
// 不是首次创建核算 还需要添加历史核算人员
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = getInsuranceAccountDetailMapper().selectList(param.getBillMonth(), param.getPaymentOrganization());
List<Long> historyEmpIds = insuranceAccountDetailPOS.stream().map(InsuranceAccountDetailPO::getEmployeeId).collect(Collectors.toList());
List<Long> historyEmpIds = insuranceAccountDetailPOS.stream().filter(po -> po.getPaymentStatus().equals(PaymentStatusEnum.COMMON.getValue())).map(InsuranceAccountDetailPO::getEmployeeId).collect(Collectors.toList());
validIds.addAll(historyEmpIds);
List<Long> finalEmpIds = empIds;
empIds.addAll(historyEmpIds.stream().filter(empId -> !finalEmpIds.contains(empId)).collect(Collectors.toList()));