diff --git a/src/com/engine/salary/report/service/impl/SalaryStatisticsEmployeeServiceImpl.java b/src/com/engine/salary/report/service/impl/SalaryStatisticsEmployeeServiceImpl.java index 5728f0886..93a369d7a 100644 --- a/src/com/engine/salary/report/service/impl/SalaryStatisticsEmployeeServiceImpl.java +++ b/src/com/engine/salary/report/service/impl/SalaryStatisticsEmployeeServiceImpl.java @@ -345,18 +345,6 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala @Override public SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResultByAcctEmp(List salaryAcctEmployeeList) { - if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) { - return SalaryStatisticsEmployeeDetailResultDTO.builder() - .salaryAcctEmployeeList(Collections.emptyList()) - .salaryAcctResultValueList(Collections.emptyList()) - .salaryItemList(Collections.emptyList()) - .build(); - } - - // 获取核算结果数据 - List salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList()); - List salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds); - // 3.获取薪资项目 List salaryItemList = getSalaryItemService(user).listAll(); salaryItemList = salaryItemList.stream() @@ -376,6 +364,20 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala }) .collect(Collectors.toList()); + if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) { + return SalaryStatisticsEmployeeDetailResultDTO.builder() + .salaryAcctEmployeeList(Collections.emptyList()) + .salaryAcctResultValueList(Collections.emptyList()) + .salaryItemList(salaryItemList) + .build(); + } + + // 获取核算结果数据 + List salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList()); + List salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds); + + + return SalaryStatisticsEmployeeDetailResultDTO.builder() .salaryAcctEmployeeList(salaryAcctEmployeeList) .salaryAcctResultValueList(salaryAcctResultValues)