diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java index fcca3c925..b70fb2a91 100644 --- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java +++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java @@ -406,23 +406,22 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM if (taxAgentIds.size() > 1) { throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110159, "一次只能删一个个税个税扣缴义务人的范围")); } - Collection finalIds = ids; taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds); - List allManageRanges = taxAgentManageRanges.stream().filter(f -> !finalIds.contains(f.getId())).collect(Collectors.toList()); + List allManageRanges = taxAgentManageRanges.stream().filter(f -> !ids.contains(f.getId())).collect(Collectors.toList()); List allRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.TAXAGENT.getValue())).collect(Collectors.toList()); - List allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList()); +// List allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList()); Long taxAgentId = taxAgentIds.get(0); List salaryEmployees = getEmployMapper().listAll(); List allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees); - List allSubAdminSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allSubAdminRanges, salaryEmployees); - allSalaryEmployees.forEach(f -> { - allSubAdminSalaryEmployees.removeIf(a -> a.getEmployeeId().equals(f.getEmployeeId())); - }); - if (CollectionUtils.isNotEmpty(allSubAdminSalaryEmployees)) { - throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110160, "分管理员存在超出整体人员范围以外的人员,不可删除")); - } +// List allSubAdminSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allSubAdminRanges, salaryEmployees); +// allSalaryEmployees.forEach(f -> { +// allSubAdminSalaryEmployees.removeIf(a -> a.getEmployeeId().equals(f.getEmployeeId())); +// }); +// if (CollectionUtils.isNotEmpty(allSubAdminSalaryEmployees)) { +// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110160, "分管理员存在超出整体人员范围以外的人员,不可删除")); +// } // 删除管理范围 getTaxAgentManageRangeMapper().deleteByIds(ids);