From 5b66efa3cc8d54121e66c6cf51b53ac7399874f5 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 10 Mar 2025 16:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E5=A2=9E=E5=87=8F=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/SIAccountServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 824e6cf74..da3072762 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -6906,10 +6906,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { validIds.addAll(emp2); validIds.addAll(emp3); List finalValidIds = validIds.stream().distinct().collect(Collectors.toList()); - List conNotAddEmpIds = empIds.stream().filter(empId -> !finalValidIds.contains(empId)).collect(Collectors.toList()); + List conNotAddEmpIds = param.getIncludes().stream().filter(empId -> !finalValidIds.contains(empId)).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(conNotAddEmpIds)) { - String canNotAddName = getSalaryEmployeeService(user).listByIds(canAccountIds).stream().map(DataCollectionEmployee::getUsername).collect(Collectors.joining(",")); - throw new SalaryRunTimeException("添加失败,员工:" +canNotAddName + ",社保、公积金、其他福利需至少有一种在当前账单月需缴纳"); + String canNotAddName = getSalaryEmployeeService(user).listByIds(conNotAddEmpIds).stream().map(DataCollectionEmployee::getUsername).collect(Collectors.joining(",")); + throw new SalaryRunTimeException("添加失败,员工:" +canNotAddName + ",社保、公积金、其他福利需至少有一种在当前账单月需缴纳,并且社保档案需为在缴员工"); } addCommonEmpAndAccount(param.getBillMonth(), empIds, param.getPaymentOrganization());