薪酬系统-福利台账,补差新增数据时,过滤重复数据

This commit is contained in:
sy 2022-12-19 11:43:20 +08:00
parent 8157cafc98
commit 53d48d63b0
1 changed files with 4 additions and 0 deletions

View File

@ -2763,6 +2763,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
if (createInsuranceAccountDetailList.size() > 0) {
paymentOrganization = createInsuranceAccountDetailList.get(0).getPaymentOrganization();
//去除员工id+个税扣缴义务人下重复的数据
createInsuranceAccountDetailList = createInsuranceAccountDetailList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(()
-> new TreeSet<>(Comparator.comparing(f -> f.getPaymentOrganization() + "-" + f.getEmployeeId()))), ArrayList::new));
//将待新增列表加密
encryptUtil.encryptList(createInsuranceAccountDetailList, InsuranceAccountDetailPO.class);
//新增