|
@@ -68,6 +68,13 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
|
|
List<CostAccountShare> costAccountShareList = pages.getRecords();
|
|
List<CostAccountShare> costAccountShareList = pages.getRecords();
|
|
|
|
|
|
List<CostAccountShareVO> costAccountShareVOList = BeanUtil.convertList(costAccountShareList, CostAccountShareVO.class);
|
|
List<CostAccountShareVO> costAccountShareVOList = BeanUtil.convertList(costAccountShareList, CostAccountShareVO.class);
|
|
|
|
+ costAccountShareVOList.forEach(i->{
|
|
|
|
+ String accountingIds = i.getAccountingIds();
|
|
|
|
+ if (StrUtil.isNotBlank(accountingIds)){
|
|
|
|
+ List<String> list = Arrays.asList(accountingIds.split(StrUtil.COMMA));
|
|
|
|
+ i.setAccountingIdList(list);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// getMessage(hospId, costAccountShareVOList);
|
|
// getMessage(hospId, costAccountShareVOList);
|
|
PageUtils pageUtils = new PageUtils(pages);
|
|
PageUtils pageUtils = new PageUtils(pages);
|
|
pageUtils.setList(costAccountShareVOList);
|
|
pageUtils.setList(costAccountShareVOList);
|
|
@@ -144,7 +151,7 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
|
|
costAccountShareSaveDto.setShareLevel(responsibility.getShareLevel());
|
|
costAccountShareSaveDto.setShareLevel(responsibility.getShareLevel());
|
|
if (!StringUtils.isEmpty(costAccountShareSaveDto.getAccountingIds())){
|
|
if (!StringUtils.isEmpty(costAccountShareSaveDto.getAccountingIds())){
|
|
// 这个责任中心允许输入会计科目
|
|
// 这个责任中心允许输入会计科目
|
|
- List<String> accountIdList = Arrays.asList(costAccountShareSaveDto.getAccountingIds().split(StrUtil.COMMA));
|
|
|
|
|
|
+ List<Long> accountIdList = Arrays.stream(costAccountShareSaveDto.getAccountingIds().split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
|
|
List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId).in(Accounting::getId, accountIdList).orderByDesc(Accounting::getCreateTime));
|
|
List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId).in(Accounting::getId, accountIdList).orderByDesc(Accounting::getCreateTime));
|
|
if (CollectionUtils.isEmpty(accountingList)){
|
|
if (CollectionUtils.isEmpty(accountingList)){
|
|
throw new CostException(500,"输入的会计科目不存在");
|
|
throw new CostException(500,"输入的会计科目不存在");
|
|
@@ -162,7 +169,7 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
|
|
List<CostAccountShare> list = costAccountMap.get(costAccountShareSaveDto.getResponsibilityCode());
|
|
List<CostAccountShare> list = costAccountMap.get(costAccountShareSaveDto.getResponsibilityCode());
|
|
if (!CollectionUtils.isEmpty(list)){
|
|
if (!CollectionUtils.isEmpty(list)){
|
|
String accountingIds = list.get(0).getAccountingIds();
|
|
String accountingIds = list.get(0).getAccountingIds();
|
|
- List<String> accountIdListRequest = Arrays.asList(accountingIds.split(StrUtil.COMMA));
|
|
|
|
|
|
+ List<Long> accountIdListRequest = Arrays.stream(accountingIds.split(StrUtil.COMMA)).map(Long::valueOf).collect(Collectors.toList());
|
|
if (!Collections.disjoint(accountIdListRequest,accountIdList)){
|
|
if (!Collections.disjoint(accountIdListRequest,accountIdList)){
|
|
throw new CostException(500,"存在重复的数据");
|
|
throw new CostException(500,"存在重复的数据");
|
|
}
|
|
}
|