|
@@ -70,51 +70,25 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
|
|
|
List<RelationVO> list = new ArrayList<>();
|
|
|
if (relation == 1) {
|
|
|
list = this.getAccountRelation(reportId, hospId);
|
|
|
-// List<Accounting> accounts = accountingService.list(new LambdaQueryWrapper<Accounting>().select(Accounting::getAccountingCode, Accounting::getAccountingName).eq(Accounting::getHospId, hospId));
|
|
|
-// if (accounts.isEmpty()) {
|
|
|
-// return list;
|
|
|
-// }
|
|
|
-// list = accounts.stream().map(i -> {
|
|
|
-// RelationVO relationVO = new RelationVO();
|
|
|
-// relationVO.setIsSelect(false);
|
|
|
-// relationVO.setRelation(1);
|
|
|
-// relationVO.setCode(i.getAccountingCode());
|
|
|
-// relationVO.setName(i.getAccountingName());
|
|
|
-// return relationVO;
|
|
|
-// }).collect(Collectors.toList());
|
|
|
-// for (RelationVO relationVO : accountRelation) {
|
|
|
-// for (RelationVO vo : list) {
|
|
|
-// if (vo.getCode().equals(relationVO.getCode())) {
|
|
|
-// vo.setIsSelect(true);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
} else if (relation == 2) {
|
|
|
list = this.getShareLevel(reportId, hospId);
|
|
|
-// List<CostShareParam> accounts = shareParamService.list(new LambdaQueryWrapper<CostShareParam>().select(CostShareParam::getShareParamCode, CostShareParam::getShareParamName).eq(CostShareParam::getHospId, hospId));
|
|
|
-// if (accounts.isEmpty()) {
|
|
|
-// return list;
|
|
|
-// }
|
|
|
-// list = accounts.stream().map(i -> {
|
|
|
-// RelationVO relationVO = new RelationVO();
|
|
|
-// relationVO.setIsSelect(false);
|
|
|
-// relationVO.setRelation(1);
|
|
|
-// relationVO.setCode(i.getShareParamCode());
|
|
|
-// relationVO.setName(i.getShareParamName());
|
|
|
-// return relationVO;
|
|
|
-// }).collect(Collectors.toList());
|
|
|
-// for (RelationVO relationVO : accountRelation) {
|
|
|
-// for (RelationVO vo : list) {
|
|
|
-// if (vo.getCode().equals(relationVO.getCode())) {
|
|
|
-// vo.setIsSelect(true);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ } else if (relation == 3) {
|
|
|
+ list = getResponsibilities(reportId, hospId);
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 报表项目关联的分摊层级对象
|
|
|
+ *
|
|
|
+ * @param reportId 报表项目id
|
|
|
+ * @param hospId 医院id
|
|
|
+ * @return {@link RelationVO}
|
|
|
+ */
|
|
|
+ public List<RelationVO> getResponsibilities(Long reportId, Long hospId) {
|
|
|
+ return baseMapper.getResponsibilities(reportId, hospId);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 编辑相关关系
|
|
|
*
|