fix刷新核算人员功能冲突

This commit is contained in:
钱涛 2024-09-29 10:52:04 +08:00
parent 541546f5c8
commit d54dd4e237
1 changed files with 3 additions and 4 deletions

View File

@ -580,15 +580,14 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
//查询账套对应的扣缴义务人
SalarySobPO salarySobPO = getSalarySobService(user).getById(salaryAcctRecordPO.getSalarySobId());
Long taxAgentId = salarySobPO.getTaxAgentId();
List<Long> taxAgentIds = salarySobPO.getTaxAgentIds();
// 查询薪资档案获取人员的个税扣缴义务人
List<Long> employeeIds = SalaryEntityUtil.properties(salaryEmployees, DataCollectionEmployee::getEmployeeId, Collectors.toList());
List<SalaryArchiveDataDTO> salaryArchiveDataDTOS = getSalaryArchiveService(user).getSalaryArchiveTaxAgentData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentId);
List<SalaryArchiveDataDTO> salaryArchiveDataDTOS = getSalaryArchiveService(user).getSalaryArchiveTaxAgentData(salarySobCycleDTO.getSalaryCycle(), employeeIds, taxAgentIds);
// 转换成薪资核算人员po
List<SalaryAcctEmployeePO> newEmps = SalaryAcctEmployeeBO.convert2Employee(salaryEmployees, salaryAcctRecordPO, salaryArchiveDataDTOS, (long) user.getUID());
//过滤掉不属于当前账套扣缴义务人的人员
newEmps = newEmps.stream().filter(po -> Objects.equals(taxAgentId, po.getTaxAgentId())).collect(Collectors.toList());
Map<String, SalaryAcctEmployeePO> newEmpMap = SalaryEntityUtil.convert2Map(newEmps, e -> e.getTaxAgentId() + "_" + e.getEmployeeId());