ソースを参照

Merge branch 'master' of huangrui/CostAccount into role_test

lijiaxi 4 年 前
コミット
df8cd034da

+ 0 - 1
src/main/java/com/imed/costaccount/CostAccountApplication.java

@@ -2,7 +2,6 @@ package com.imed.costaccount;
 
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @MapperScan(basePackages = {"com.imed.costaccount.mapper"})

+ 2 - 2
src/main/java/com/imed/costaccount/service/ReportRelationService.java

@@ -25,12 +25,12 @@ public interface ReportRelationService extends IService<ReportRelation> {
     List<RelationVO> getAccountRelation(Long reportId, Long hospId);
 
     /**
-     * 报表项目关联的分摊参数对象
+     * 报表项目关联的分摊层级对象
      * @param reportId 报表项目id
      * @param hospId 医院id
      * @return {@link RelationVO}
      */
-    List<RelationVO> getShareParam(Long reportId, Long hospId);
+    List<RelationVO> getShareLevel(Long reportId, Long hospId);
 
     /**
      * 根据关系类型,获取可绑定的关系数据(包含回显)

+ 1 - 1
src/main/java/com/imed/costaccount/service/impl/ReportFormServiceImpl.java

@@ -99,7 +99,7 @@ public class ReportFormServiceImpl extends ServiceImpl<ReportFormMapper, ReportF
             reportFormVO.setReportRelations(list);
             return;
         } else if (showAddRelation == 2) {
-            List<RelationVO> list = reportRelationService.getShareParam(reportFormVO.getId(), hospId);
+            List<RelationVO> list = reportRelationService.getShareLevel(reportFormVO.getId(), hospId);
             reportFormVO.setReportRelations(list);
             return;
         }

+ 4 - 10
src/main/java/com/imed/costaccount/service/impl/ReportRelationServiceImpl.java

@@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.imed.costaccount.common.exception.CostException;
 import com.imed.costaccount.mapper.ReportFormMapper;
 import com.imed.costaccount.mapper.ReportRelationMapper;
-import com.imed.costaccount.model.Accounting;
-import com.imed.costaccount.model.CostShareParam;
 import com.imed.costaccount.model.ReportForm;
 import com.imed.costaccount.model.ReportRelation;
 import com.imed.costaccount.model.dto.ReportRelationDTO;
@@ -31,13 +29,9 @@ import java.util.stream.Collectors;
 @Service("reportRelationService")
 public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper, ReportRelation> implements ReportRelationService {
 
-    private final AccountingService accountingService;
-    private final CostShareParamService shareParamService;
     private final ReportFormMapper reportFormMapper;
 
-    public ReportRelationServiceImpl(AccountingService accountingService, CostShareParamService shareParamService, ReportFormMapper reportFormMapper) {
-        this.accountingService = accountingService;
-        this.shareParamService = shareParamService;
+    public ReportRelationServiceImpl(ReportFormMapper reportFormMapper) {
         this.reportFormMapper = reportFormMapper;
     }
 
@@ -54,14 +48,14 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
     }
 
     /**
-     * 报表项目关联的分摊参数对象
+     * 报表项目关联的分摊层级对象
      *
      * @param reportId 报表项目id
      * @param hospId   医院id
      * @return {@link RelationVO}
      */
     @Override
-    public List<RelationVO> getShareParam(Long reportId, Long hospId) {
+    public List<RelationVO> getShareLevel(Long reportId, Long hospId) {
         return baseMapper.getShareParam(reportId, hospId);
     }
 
@@ -99,7 +93,7 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
 //            }
 
         } else if (relation == 2) {
-            list = this.getShareParam(reportId, hospId);
+            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;

+ 1 - 1
src/main/java/com/imed/costaccount/web/ReportFormController.java

@@ -102,7 +102,7 @@ public class ReportFormController extends AbstractController {
             list = reportRelationService.getAccountRelation(reportId, hospId);
         }
         if (relation == 2) {
-            list = reportRelationService.getShareParam(reportId, hospId);
+            list = reportRelationService.getShareLevel(reportId, hospId);
         }
         return Result.ok(list);
     }

+ 4 - 4
src/main/resources/mapper/ReportRelationMapper.xml

@@ -25,13 +25,13 @@
     </select>
 
     <select id="getShareParam" resultType="com.imed.costaccount.model.vo.RelationVO">
-        select chp.share_param_code as code, chp.share_param_name as name, 2 as relation
+        select csl.id as code, csl.share_name as name, 2 as relation
         from cost_report_relation crr
-                 left join cost_share_param chp on crr.relation_code = chp.share_param_code
+                 left join cost_share_level csl on crr.relation_code = csl.id
         where crr.delete_time = 0
-          and chp.delete_time = 0
+          and csl.delete_time = 0
           and crr.hosp_id = #{hospId}
-          and chp.hosp_id = #{hospId}
+          and csl.hosp_id = #{hospId}
           and crr.report_id = #{reportId}
 
     </select>