|
@@ -77,48 +77,48 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
|
|
|
public List<RelationVO> getRelationList(Long reportId, Integer relation, Long hospId) {
|
|
|
List<RelationVO> list = new ArrayList<>();
|
|
|
if (relation == 1) {
|
|
|
- List<RelationVO> accountRelation = 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);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ 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<RelationVO> accountRelation = this.getShareParam(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);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ list = this.getShareParam(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);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
return list;
|
|
|
}
|