Merge branch 'fix/230802-添加非系统人员时误删除taxagentEmp数据' into release/2.9.4.2308.02
This commit is contained in:
commit
c2ae65ff79
|
|
@ -172,7 +172,7 @@ public class TaxAgentEmpServiceImpl extends Service implements TaxAgentEmpServic
|
|||
return;
|
||||
}
|
||||
List<Long> taxAgentIds = taxAgentEmpSaveParamList.stream().map(TaxAgentEmpSaveParam::getTaxAgentId).collect(Collectors.toList());
|
||||
List<TaxAgentEmpPO> taxAgentEmployeeExistList = this.listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.ORG);
|
||||
List<TaxAgentEmpPO> taxAgentEmployeeExistList = this.listByTaxAgentIds(taxAgentIds, UseEmployeeTypeEnum.EXT);
|
||||
Date now = new Date();
|
||||
// 关联表
|
||||
List<TaxAgentEmpPO> taxAgentEmployeeAddList = Lists.newArrayList();
|
||||
|
|
|
|||
|
|
@ -429,6 +429,10 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
|
||||
getTaxAgentExtRangeMapper().insertIgnoreNull(po);
|
||||
});
|
||||
List<DataCollectionEmployee> oldEmpList = getExtEmpService(user).getEmployeeByIds(oldIds);
|
||||
employees.addAll(oldEmpList);
|
||||
// 去重
|
||||
employees = employees.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(e -> e.getEmployeeId()))), ArrayList::new));
|
||||
|
||||
|
||||
/* 同步本地人员范围的关联人员=========================== */
|
||||
|
|
@ -436,8 +440,9 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
|
|||
//同步执行
|
||||
syncLocalExtEmp(taxAgentId, employees);
|
||||
} else {
|
||||
List<DataCollectionEmployee> finalEmployees = employees;
|
||||
taskExecutor.execute(() -> {
|
||||
syncLocalExtEmp(taxAgentId, employees);
|
||||
syncLocalExtEmp(taxAgentId, finalEmployees);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue