去除无用代码
This commit is contained in:
parent
b54d754c4b
commit
5c75b3cf8e
|
|
@ -406,23 +406,22 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
if (taxAgentIds.size() > 1) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(110159, "一次只能删一个个税个税扣缴义务人的范围"));
|
||||
}
|
||||
Collection<Long> finalIds = ids;
|
||||
taxAgentManageRanges = this.listByTaxAgentIds(taxAgentIds);
|
||||
List<TaxAgentManageRangePO> allManageRanges = taxAgentManageRanges.stream().filter(f -> !finalIds.contains(f.getId())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> allManageRanges = taxAgentManageRanges.stream().filter(f -> !ids.contains(f.getId())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> allRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.TAXAGENT.getValue())).collect(Collectors.toList());
|
||||
List<TaxAgentManageRangePO> allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList());
|
||||
// List<TaxAgentManageRangePO> allSubAdminRanges = allManageRanges.stream().filter(f -> f.getRangeType().equals(TaxAgentRangeTypeEnum.SUBADMIN.getValue())).collect(Collectors.toList());
|
||||
Long taxAgentId = taxAgentIds.get(0);
|
||||
|
||||
List<DataCollectionEmployee> salaryEmployees = getEmployMapper().listAll();
|
||||
List<DataCollectionEmployee> allSalaryEmployees = this.getManageRangeSalaryEmployees(taxAgentId, allRanges, salaryEmployees);
|
||||
|
||||
List<DataCollectionEmployee> 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<DataCollectionEmployee> 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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue