薪酬系统-福利档案,取消停缴功能,添加人员是否在对应的个税扣缴义务人下的判断

This commit is contained in:
sy 2022-12-19 10:01:32 +08:00
parent 69e0d7e441
commit 8157cafc98
1 changed files with 9 additions and 0 deletions

View File

@ -605,6 +605,15 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
List<Long> stayAddIds = new ArrayList<>();
List<Long> stayDelIds = new ArrayList<>();
List<TaxAgentEmployeeDTO> taxAgentManageRangeEmployees = getTaxAgentService(user).listTaxAgentAndEmployee((long) user.getUID());
List<InsuranceArchivesBaseInfoPO> oldStayAddList = pos.stream().filter(f -> f.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())).collect(Collectors.toList());
boolean isNotExist = oldStayAddList.stream().anyMatch(te -> taxAgentManageRangeEmployees.stream().noneMatch(p -> p.getEmployeeId() != null && p.getEmployeeId().equals(te.getEmployeeId()) && p.getTaxAgentId().equals(te.getPaymentOrganization())));
if (isNotExist) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(116196, "不在当前个税扣缴义人的人员范围中,不可取消停缴"));
}
for(InsuranceArchivesBaseInfoPO po : pos) {
if (po.getRunStatus().equals(EmployeeStatusEnum.STOP_PAYMENT_FROM_ADD.getValue())) {