默认展示所有薪资明细列

This commit is contained in:
钱涛 2024-10-11 18:02:52 +08:00
parent 3a224170f1
commit 265ca2a54e
1 changed files with 14 additions and 12 deletions

View File

@ -345,18 +345,6 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
@Override
public SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResultByAcctEmp(List<SalaryAcctEmployeePO> salaryAcctEmployeeList) {
if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
return SalaryStatisticsEmployeeDetailResultDTO.builder()
.salaryAcctEmployeeList(Collections.emptyList())
.salaryAcctResultValueList(Collections.emptyList())
.salaryItemList(Collections.emptyList())
.build();
}
// 获取核算结果数据
List<Long> salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
List<SalaryAcctResultPO> salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
// 3.获取薪资项目
List<SalaryItemPO> 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<Long> salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
List<SalaryAcctResultPO> salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
return SalaryStatisticsEmployeeDetailResultDTO.builder()
.salaryAcctEmployeeList(salaryAcctEmployeeList)
.salaryAcctResultValueList(salaryAcctResultValues)