薪资核算导入,选择表单字段获取未分类

This commit is contained in:
Harryxzy 2023-06-01 10:30:33 +08:00
parent 0ec6e740d3
commit 4e04b6e268
1 changed files with 16 additions and 0 deletions

View File

@ -410,6 +410,22 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
.salaryItems(items)
.sortedIndex(groupPO.getSortedIndex()).build() );
}
// 未分类
List<SalarySobItemPO> noGroupItems = salarySobItemPOMap.getOrDefault(0L, Collections.emptyList());
if(CollectionUtils.isNotEmpty(noGroupItems)){
List<SalaryAcctImportFieldDTO.ImportFieldDTO> items = noGroupItems.stream()
.map(salarySobItemPO ->SalaryAcctImportFieldDTO.ImportFieldDTO.builder()
.salaryItemId(salarySobItemPO.getSalaryItemId())
.salaryItemName(Optional.ofNullable(salaryItemMap.get(salarySobItemPO.getSalaryItemId())).map(SalaryItemPO::getName).orElse(StringUtils.EMPTY))
.build())
.collect(Collectors.toList());
itemsByGroup.add(SalaryAcctImportFieldDTO.ImportFieldByGroupDTO.builder()
.salarySobItemGroupId(0L)
.salarySobItemGroupName("未分类")
.salaryItems(items)
.sortedIndex(itemsByGroup.size()).build());
}
// // 薪资项目中的公式项
// List<SalaryAcctImportFieldDTO.ImportFieldDTO> formulaItems = salaryItems.stream()