Merge branch 'feature/250301_社保福利台账增减人员' into custom/中航富士达

This commit is contained in:
Harryxzy 2025-03-10 17:02:06 +08:00
commit bc10cfec26
2 changed files with 4 additions and 4 deletions

View File

@ -1607,7 +1607,7 @@
WHERE delete_type = 0
AND bill_month = #{billMonth}
AND payment_organization = #{paymentOrganization}
AND employee_id
AND employee_id in
<foreach collection="employeeIds" open="(" item="employeeId" separator="," close=")">
#{employeeId}
</foreach>

View File

@ -7085,10 +7085,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());