|
@@ -117,9 +117,11 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
.filter(Objects::nonNull)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
- List<SysDept> sysDeptList = sysDeptService.listByIds(deptIdList);
|
|
|
- Map<Long, String> deptMap = sysDeptList.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
|
|
- records.forEach(item -> item.setDeptName(deptMap.get(item.getDepartmentId())));
|
|
|
+ if (ObjectUtil.isNotEmpty(deptIdList)) {
|
|
|
+ List<SysDept> sysDeptList = sysDeptService.listByIds(deptIdList);
|
|
|
+ Map<Long, String> deptMap = sysDeptList.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
|
|
+ records.forEach(item -> item.setDeptName(deptMap.get(item.getDepartmentId())));
|
|
|
+ }
|
|
|
DynamicDataSourceContextHolder.poll();
|
|
|
|
|
|
return page;
|