From 265ca2a54ec063a0d8e2b383ed865522d3f455cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 11 Oct 2024 18:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=B1=95=E7=A4=BA=E6=89=80?= =?UTF-8?q?=E6=9C=89=E8=96=AA=E8=B5=84=E6=98=8E=E7=BB=86=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SalaryStatisticsEmployeeServiceImpl.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) 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)