|
@@ -262,21 +262,16 @@ public class CostIncomeGroupSetServiceImpl extends ServiceImpl<CostIncomeGroupSe
|
|
|
if (Objects.isNull(incomeGroupSet)){
|
|
|
throw new CostException(500,"收入归集设置不存在");
|
|
|
}
|
|
|
- List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda()
|
|
|
- .eq(Accounting::getHospId, hospId));
|
|
|
- List<AccountIncomeSetVO> accountIncomeSetVOS = new ArrayList<>();
|
|
|
- List<AccountIncomeSetVO> accountIncomeSetVOList = BeanUtil.convertList(accountingList, AccountIncomeSetVO.class);
|
|
|
String accountCode = incomeGroupSet.getAccountCode();
|
|
|
+ List<AccountIncomeSetVO> accountIncomeSetVOList = null;
|
|
|
if (StrUtil.isNotBlank(accountCode)){
|
|
|
List<String> accountCodList = Arrays.asList(accountCode.split(StrUtil.COMMA));
|
|
|
- Map<String, List<String>> map = accountCodList.stream().collect(Collectors.groupingBy(String::valueOf));
|
|
|
- accountIncomeSetVOList.forEach(i->{
|
|
|
- if (!CollectionUtils.isEmpty(map.get(i.getAccountingCode()))){
|
|
|
- accountIncomeSetVOS.add(i);
|
|
|
- }
|
|
|
- });
|
|
|
+ List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda()
|
|
|
+ .eq(Accounting::getHospId, hospId)
|
|
|
+ .in(Accounting::getAccountingCode,accountCodList));
|
|
|
+ accountIncomeSetVOList = BeanUtil.convertList(accountingList, AccountIncomeSetVO.class);
|
|
|
}
|
|
|
- return accountIncomeSetVOS;
|
|
|
+ return accountIncomeSetVOList;
|
|
|
}
|
|
|
|
|
|
}
|