소스 검색

设置返回allParent

ljx 4 년 전
부모
커밋
744afaf024

+ 2 - 0
src/main/java/com/imed/costaccount/model/vo/CostAccountShareVO.java

@@ -42,4 +42,6 @@ public class CostAccountShareVO {
 
     @ApiModelProperty(name = "costNode",value = "备注")
     private String costNode;
+
+    private String allParentIds;
 }

+ 5 - 2
src/main/java/com/imed/costaccount/service/impl/CostAccountShareServiceImpl.java

@@ -65,15 +65,16 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
                 .like(!StringUtils.isEmpty(name), CostAccountShare::getResponsibilityName, name)
                 .orderByAsc(CostAccountShare::getShareLevel));
         List<CostAccountShare> costAccountShareList = pages.getRecords();
+
         List<CostAccountShareVO> costAccountShareVOList = BeanUtil.convertList(costAccountShareList, CostAccountShareVO.class);
-        getMessage(hospId, costAccountShareList);
+        getMessage(hospId, costAccountShareVOList);
         //
         PageUtils pageUtils = new PageUtils(pages);
         pageUtils.setList(costAccountShareVOList);
         return pageUtils;
     }
 
-    private void getMessage(Integer hospId, List<CostAccountShare> costAccountShareList) {
+    private void getMessage(Integer hospId, List<CostAccountShareVO> costAccountShareList) {
         // 设置责任中心的数据 与 会计科目的数据从对应的id里面获取
         List<Responsibility> list = responsibilityService.list(new QueryWrapper<Responsibility>().lambda().eq(Responsibility::getHospId, hospId));
         List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId));
@@ -86,6 +87,7 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
                 i.setResponsibilityId(id);
                 i.setResponsibilityName(responsibilities.get(0).getResponsibilityName());
                 i.setResponsibilityCode(responsibilities.get(0).getResponsibilityCode());
+
             }
             Integer accountingId = i.getAccountingId();
             if (accountingId>0){
@@ -94,6 +96,7 @@ public class CostAccountShareServiceImpl extends ServiceImpl<CostAccountShareMap
                     i.setAccountingId(accountingId);
                     i.setAccountingName(accountingList1.get(0).getAccountingName());
                     i.setAccountingCode(accountingList1.get(0).getAccountingCode());
+                    i.setAllParentIds(accountingList1.get(0).getAllParentIds());
                 }
             }
         });