社保福利台账增减人员

This commit is contained in:
Harryxzy 2025-03-10 16:47:48 +08:00
parent 7da3e9262a
commit 5b66efa3cc
1 changed files with 3 additions and 3 deletions

View File

@ -6906,10 +6906,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
validIds.addAll(emp2);
validIds.addAll(emp3);
List<Long> finalValidIds = validIds.stream().distinct().collect(Collectors.toList());
List<Long> conNotAddEmpIds = empIds.stream().filter(empId -> !finalValidIds.contains(empId)).collect(Collectors.toList());
List<Long> 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());