Ver Fonte

添加医院服务单元病种成本构成明细表相关代码

JammeyJiang há 2 meses atrás
pai
commit
5ad11f5e67

+ 19 - 3
src/main/java/com/kcim/dao/mapper/ComputePatientCostAccountMapper.java

@@ -1,8 +1,8 @@
 package com.kcim.dao.mapper;
 
-import com.kcim.dao.model.ComputePatientCostAccount;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.kcim.vo.HospitalServiceProjectCostVO;
+import com.kcim.dao.model.ComputePatientCostAccount;
+import com.kcim.vo.DiseaseCostDetailVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -24,5 +24,21 @@ public interface ComputePatientCostAccountMapper extends BaseMapper<ComputePatie
      * @param hospId
      * @return
      */
-    List<HospitalServiceProjectCostVO> getDiseaseCostDetailList(@Param("computeDate") String computeDate, @Param("hospId") Long hospId);
+    List<DiseaseCostDetailVO> getDiseaseCostDetailList(@Param("computeDate") String computeDate, @Param("hospId") Long hospId);
+
+    /**
+     * 获取疾病成本构成明细
+     * @param computeDate
+     * @param hospId
+     * @return
+     */
+    List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(@Param("computeDate") String computeDate, @Param("hospId") Long hospId);
+
+    /**
+     * 获取服务单元疾病成本构成明细
+     * @param computeDate
+     * @param hospId
+     * @return
+     */
+    List<DiseaseCostDetailVO> getDeptDiseaseCostCompositionDetail(@Param("computeDate") String computeDate, @Param("hospId") Long hospId);
 }

+ 10 - 2
src/main/java/com/kcim/dao/repository/ComputePatientCostAccountRepository.java

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.kcim.common.util.UserContext;
 import com.kcim.dao.mapper.ComputePatientCostAccountMapper;
 import com.kcim.dao.model.ComputePatientCostAccount;
-import com.kcim.vo.HospitalServiceProjectCostVO;
+import com.kcim.vo.DiseaseCostDetailVO;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -25,7 +25,15 @@ public class ComputePatientCostAccountRepository extends ServiceImpl<ComputePati
         return this.list(queryWrapper);
     }
 
-    public List<HospitalServiceProjectCostVO> getDiseaseCostDetailList(String computeDate) {
+    public List<DiseaseCostDetailVO> getDiseaseCostDetailList(String computeDate) {
         return this.baseMapper.getDiseaseCostDetailList(computeDate, UserContext.getHospId());
     }
+
+    public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate) {
+        return this.baseMapper.getDiseaseCostCompositionDetail(computeDate, UserContext.getHospId());
+    }
+
+    public List<DiseaseCostDetailVO> getDeptDiseaseCostCompositionDetail(String computeDate) {
+        return this.baseMapper.getDeptDiseaseCostCompositionDetail(computeDate, UserContext.getHospId());
+    }
 }

+ 15 - 1
src/main/java/com/kcim/service/StandardReportService.java

@@ -91,5 +91,19 @@ public interface StandardReportService {
      * 获取疾病成本明细表数据
      * @return
      */
-    List<HospitalServiceProjectCostVO> getDiseaseCostDetail(String computeDate);
+    List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate);
+
+    /**
+     * 获取病种成本构成明细表数据
+     * @param computeDate
+     * @return
+     */
+    List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate);
+
+    /**
+     * 获取服务单元病种成本构成明细表数据
+     * @param computeDate
+     * @return
+     */
+    ComputeProfitCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate);
 }

+ 181 - 10
src/main/java/com/kcim/service/impl/StandardReportServiceImpl.java

@@ -908,25 +908,25 @@ public class StandardReportServiceImpl implements StandardReportService {
      * @return 病种成本明细列表
      */
     @Override
-    public List<HospitalServiceProjectCostVO> getDiseaseCostDetail(String computeDate) {
-        List<HospitalServiceProjectCostVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostDetailList(computeDate);
+    public List<DiseaseCostDetailVO> getDiseaseCostDetail(String computeDate) {
+        List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostDetailList(computeDate);
         if(CollectionUtils.isEmpty(projectCostAccountList)){
             throw new CostException("请先计算患者成本");
         }
         // 获取所有的标准字典数据
         StandCostDictMapVO standCostDictMaps = getStandCostDictMaps();
         // 记录项目类别对象
-        Map<String, HospitalServiceProjectCostVO> projectCostMap = new HashMap<>();
-        for (HospitalServiceProjectCostVO projectCostAccount : projectCostAccountList) {
+        Map<String, DiseaseCostDetailVO> diseaseCostMap = new HashMap<>();
+        for (DiseaseCostDetailVO projectCostAccount : projectCostAccountList) {
             //按项目类型累加数据
             DictDataVo costType = standCostDictMaps.getCostTypeMap().get(projectCostAccount.getCostTypeCode());
-            HospitalServiceProjectCostVO vo = new HospitalServiceProjectCostVO();
+            DiseaseCostDetailVO vo = new DiseaseCostDetailVO();
             //已有的项目类别
-            if (projectCostMap.containsKey(projectCostAccount.getItemCode())) {
-                vo = projectCostMap.get(projectCostAccount.getItemCode());
+            if (diseaseCostMap.containsKey(projectCostAccount.getDiseaseCode())) {
+                vo = diseaseCostMap.get(projectCostAccount.getDiseaseCode());
             } else {
                 //新建一个项目类别对象
-                projectCostMap.put(projectCostAccount.getItemCode(), projectCostAccount);
+                diseaseCostMap.put(projectCostAccount.getDiseaseCode(), projectCostAccount);
             }
             // 医疗成本
             if ("1".equals(costType.getExpandOne())) {
@@ -938,11 +938,182 @@ public class StandardReportServiceImpl implements StandardReportService {
             }
             // 医院全成本
             vo.setHospitalFullCost(vo.getHospitalFullCost().add(projectCostAccount.getHospitalFullCost()));
-        }
-        List<HospitalServiceProjectCostVO> medServiceCostDetailList =new ArrayList<>(projectCostMap.values());
+            // 服务量
+            vo.setServiceVolume(projectCostAccount.getServiceVolume());
+        }
+        List<DiseaseCostDetailVO> medServiceCostDetailList =new ArrayList<>(diseaseCostMap.values());
+        //计算单个病种的成本
+        medServiceCostDetailList.forEach(vo -> {
+            vo.setMedicalCost(getPercent(vo.getServiceVolume(),vo.getMedicalCost()));
+            vo.setMedicalFullCost(getPercent(vo.getServiceVolume(),vo.getMedicalFullCost()));
+            vo.setHospitalFullCost(getPercent(vo.getServiceVolume(),vo.getHospitalFullCost()));
+        });
         return medServiceCostDetailList;
     }
 
+
+    /**
+     * 获取病种成本构成明细表数据
+     *
+     * @return 病种成本明细列表,包含各病种的成本明细及总计行
+     */
+    @Override
+    public List<DiseaseCostDetailVO> getDiseaseCostCompositionDetail(String computeDate) {
+
+        List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDiseaseCostCompositionDetail(computeDate);
+        if(CollectionUtils.isEmpty(projectCostAccountList)){
+            throw new CostException("请先计算患者成本");
+        }
+        // 获取所有的标准字典数据
+        StandCostDictMapVO standCostDictMaps = getStandCostDictMaps();
+        // 记录项目类别对象
+        Map<String, DiseaseCostDetailVO> diseaseCostMap = new HashMap<>();
+        for (DiseaseCostDetailVO projectCostAccount : projectCostAccountList) {
+            //按项目类型累加数据
+            DictDataVo accountType = standCostDictMaps.getAccountingTypeMap().get(projectCostAccount.getCostTypeCode());
+            DiseaseCostDetailVO vo = new DiseaseCostDetailVO();
+            //已有的项目类别
+            if (diseaseCostMap.containsKey(projectCostAccount.getDiseaseCode())) {
+                vo = diseaseCostMap.get(projectCostAccount.getDiseaseCode());
+            } else {
+                vo.setDiseaseCode(projectCostAccount.getDiseaseCode());
+                vo.setDiseaseName(projectCostAccount.getDiseaseName());
+                //新建一个项目类别对象
+                diseaseCostMap.put(projectCostAccount.getDiseaseCode(), vo);
+            }
+            //按会计科目类型累加费用
+            addAccountTypeExpense(accountType.getExpandOne(), projectCostAccount.getHospitalFullCost(), vo);
+            //累加数量
+            vo.setServiceVolume(vo.getServiceVolume().add(projectCostAccount.getServiceVolume()));
+        }
+        List<DiseaseCostDetailVO> diseaseCostDetailList =new ArrayList<>(diseaseCostMap.values());
+        //按会计科目类型计算占比
+        diseaseCostDetailList.forEach(vo -> setAccountTypeExpenseRatio(vo));
+        return diseaseCostDetailList;
+    }
+
+    /**
+     * 获取服务单元病种成本构成明细表数据
+     * @param computeDate
+     * @return
+     */
+    @Override
+    public ComputeProfitCollectResponse getDeptDiseaseCostCompositionDetail(String computeDate) {
+        List<DiseaseCostDetailVO> projectCostAccountList = computePatientCostAccountRepository.getDeptDiseaseCostCompositionDetail(computeDate);
+        if(CollectionUtils.isEmpty(projectCostAccountList)){
+            throw new CostException("请先计算患者成本");
+        }
+        // 获取所有的标准字典数据
+        StandCostDictMapVO standCostDictMaps = getStandCostDictMaps();
+        List<CommonResponsibilityReportVo> titleList = new ArrayList<>();
+        // 提取科室名称作为列标题
+        for (Responsibility dept : standCostDictMaps.getResponsibilityDict()) {
+            CommonResponsibilityReportVo title = new CommonResponsibilityReportVo();
+            title.setResponsibilityName(dept.getResponsibilityName());
+            title.setResponsibilityCode(dept.getResponsibilityCode());
+            title.setSort(dept.getSort());
+            //添加子级标题
+            addCommonResponsibilityChild(title);
+            titleList.add(title);
+        }
+        // 记录项目类别对象
+        Map<String, ReportFormCustomVo> diseaseCostMap = new HashMap<>();
+        // 遍历每个项目生成科室金额
+        for (DiseaseCostDetailVO costItem : projectCostAccountList) {
+            ReportFormCustomVo itemVo = new ReportFormCustomVo();
+            if(diseaseCostMap.containsKey(costItem.getDiseaseCode())){
+                itemVo=diseaseCostMap.get(costItem.getDiseaseCode());
+            }else{
+                itemVo.setReportName(costItem.getDiseaseName());
+                itemVo.setData(new ArrayList<>());
+                itemVo.setTotalValue(BigDecimal.ZERO);
+            }
+            //金额对象
+            ReportVo amountReportVo = new ReportVo();
+            amountReportVo.setCode(getResponsibilityAmountCode(costItem.getDepartmentCode()));
+            // 设置金额
+            amountReportVo.setValue(costItem.getHospitalFullCost());
+            // 添加金额
+            itemVo.getData().add(amountReportVo);
+            //计算总额
+            itemVo.setTotalValue(itemVo.getTotalValue().add(costItem.getHospitalFullCost()));
+        }
+
+        List<ReportFormCustomVo> diseaseCostDetailList =new ArrayList<>(diseaseCostMap.values());
+
+        // 遍历每个成本项目(列转行)
+        for (ReportFormCustomVo costItem : diseaseCostDetailList) {
+            if(CollectionUtils.isEmpty(costItem.getData())){
+                continue;
+            }
+            for (ReportVo amountReportVo : costItem.getData()) {
+                //占比对象
+                ReportVo percentReportVo = new ReportVo();
+                percentReportVo.setCode(amountReportVo.getCode());
+                //计算百分比
+                BigDecimal percent = getPercent((BigDecimal)amountReportVo.getValue() , costItem.getTotalValue());
+                percentReportVo.setValue(percent);
+                // 添加百分比
+                costItem.getData().add(percentReportVo);
+            }
+        }
+        ComputeProfitCollectResponse response = new ComputeProfitCollectResponse();
+        response.setTitle(titleList);
+        response.setData(diseaseCostDetailList);
+
+        return response;
+    }
+
+    /**
+     * 按会计科目类型计算占比
+     * @param vo
+     */
+    public void setAccountTypeExpenseRatio(DiseaseCostDetailVO vo){
+        vo.setPersonnelExpenseRatio(getPercent(vo.getPersonnelExpense(),vo.getTotalCost()));
+        vo.setDrugExpenseRatio(getPercent(vo.getDrugExpense(),vo.getTotalCost()));
+        vo.setMedicalMaterialExpenseRatio(getPercent(vo.getMedicalMaterialExpense(),vo.getTotalCost()));
+        vo.setFixedAssetDepreciationRatio(getPercent(vo.getFixedAssetDepreciation(),vo.getTotalCost()));
+        vo.setIntangibleAssetAmortizationRatio(getPercent(vo.getIntangibleAssetAmortization(),vo.getTotalCost()));
+        vo.setMedicalRiskFundRatio(getPercent(vo.getMedicalRiskFund(),vo.getTotalCost()));
+        vo.setOtherMedicalExpensesRatio(getPercent(vo.getOtherMedicalExpenses(),vo.getTotalCost()));
+    }
+
+    /**
+     * 按会计科目类型累加费用
+     * @param accountType
+     * @param expense
+     * @param vo
+     */
+    public void addAccountTypeExpense(String accountType, BigDecimal expense,DiseaseCostDetailVO vo) {
+        // 根据费用类型累加到对应字段
+        switch (accountType) {
+            case "1":
+                vo.setPersonnelExpense(vo.getPersonnelExpense().add(expense));
+                break;
+            case "2":
+                vo.setMedicalMaterialExpense(vo.getMedicalMaterialExpense().add(expense));
+                break;
+            case "3":
+                vo.setDrugExpense(vo.getDrugExpense().add(expense));
+                break;
+            case "4":
+                vo.setFixedAssetDepreciation(vo.getFixedAssetDepreciation().add(expense));
+                break;
+            case "5":
+                vo.setIntangibleAssetAmortization(vo.getIntangibleAssetAmortization().add(expense));
+                break;
+            case "6":
+                vo.setMedicalRiskFund(vo.getMedicalRiskFund().add(expense));
+                break;
+            case "7":
+                vo.setOtherMedicalExpenses(vo.getOtherMedicalExpenses().add(expense));
+                break;
+            default:
+                break;
+        }
+        vo.setTotalCost(vo.getTotalCost().add(expense));
+    }
+
     /**
      * 获取项目归属的项目类型
      * @param standItemCode

+ 151 - 6
src/main/java/com/kcim/vo/DiseaseCostDetailVO.java

@@ -6,37 +6,182 @@ import java.math.BigDecimal;
 
 /**
  * 医院病种成本明细表 VO 类
- * 用于封装病种成本明细数据
+ * <p>
+ * 用于封装病种成本明细数据,包括病种的基础信息和各项费用明细
+ * 该类主要用于医院病种成本构成明细表的展示
+ * </p>
+ * 
+ * @author system
+ * @since 1.0.0
  */
 @Data
 public class DiseaseCostDetailVO {
     /**
      * 病种编码
+     * <p>
+     * 病种的唯一标识编码,用于区分不同的病种类型
+     * </p>
      */
     private String diseaseCode;
 
     /**
      * 病种名称
+     * <p>
+     * 病种的中文名称描述
+     * </p>
      */
     private String diseaseName;
 
+    /**
+     * 科室代码
+     */
+    private String departmentCode;
+
+    /**
+     * 科室名称
+     */
+    private String departmentName;
+
+    /**
+     * 成本类型代码
+     */
+    private String costTypeCode;
+
     /**
      * 服务量
+     * <p>
+     * 该病种的服务次数或数量统计
+     * </p>
      */
     private BigDecimal serviceVolume;
 
     /**
-     * 医疗成本
+     * 每诊次医疗成本金额
      */
     private BigDecimal medicalCost;
 
+
+    /**
+     * 每诊次医疗全成本金额
+     */
+    private BigDecimal medicalFullCost;
+
+    /**
+     * 每诊次医院全成本金额
+     */
+    private BigDecimal hospitalFullCost;
+    
+    /**
+     * 总费用
+     * <p>
+     * 该病种产生的所有费用总和
+     * </p>
+     */
+    private BigDecimal totalCost;
+
+    /**
+     * 人员经费
+     * <p>
+     * 用于支付医务人员工资、奖金、津贴等的费用
+     * </p>
+     */
+    private BigDecimal personnelExpense;
+    
+    /**
+     * 人员经费占比
+     * <p>
+     * 人员经费占总费用的比例
+     * </p>
+     */
+    private BigDecimal personnelExpenseRatio;
+
+    /**
+     * 药品费
+     */
+    private BigDecimal drugExpense;
+
+    /**
+     * 药品费占比
+     */
+    private BigDecimal drugExpenseRatio;
+
+    /**
+     * 卫生材料费
+     * <p>
+     * 消耗性医疗用品、一次性医疗器材等材料费用
+     * </p>
+     */
+    private BigDecimal medicalMaterialExpense;
+    
+    /**
+     * 卫生材料费占比
+     * <p>
+     * 卫生材料费占总费用的比例
+     * </p>
+     */
+    private BigDecimal medicalMaterialExpenseRatio;
+
+    /**
+     * 固定资产折旧
+     * <p>
+     * 医疗设备、房屋建筑等固定资产的折旧费用
+     * </p>
+     */
+    private BigDecimal fixedAssetDepreciation;
+    
+    /**
+     * 固定资产折旧占比
+     * <p>
+     * 固定资产折旧占总费用的比例
+     * </p>
+     */
+    private BigDecimal fixedAssetDepreciationRatio;
+
+    /**
+     * 无形资产摊销
+     * <p>
+     * 软件、专利权等无形资产的摊销费用
+     * </p>
+     */
+    private BigDecimal intangibleAssetAmortization;
+    
+    /**
+     * 无形资产摊销占比
+     * <p>
+     * 无形资产摊销占总费用的比例
+     * </p>
+     */
+    private BigDecimal intangibleAssetAmortizationRatio;
+
+    /**
+     * 医疗风险基金
+     * <p>
+     * 为应对医疗风险而提取的专项基金
+     * </p>
+     */
+    private BigDecimal medicalRiskFund;
+    
     /**
-     * 医疗全成本
+     * 医疗风险基金占比
+     * <p>
+     * 医疗风险基金占总费用的比例
+     * </p>
      */
-    private BigDecimal totalMedicalCost;
+    private BigDecimal medicalRiskFundRatio;
 
     /**
-     * 医院全成本
+     * 其他医疗费用
+     * <p>
+     * 除上述费用外的其他医疗相关费用
+     * </p>
+     */
+    private BigDecimal otherMedicalExpenses;
+    
+    /**
+     * 其他医疗费用占比
+     * <p>
+     * 其他医疗费用占总费用的比例
+     * </p>
      */
-    private BigDecimal hospitalTotalCost;
+    private BigDecimal otherMedicalExpensesRatio;
 }

+ 3 - 0
src/main/java/com/kcim/vo/ReportFormCustomVo.java

@@ -3,6 +3,7 @@ package com.kcim.vo;
 import com.kcim.dao.model.ReportForm;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -18,4 +19,6 @@ public class ReportFormCustomVo extends ReportForm {
 
     private List<ReportFormCustomVo> children;
 
+    private BigDecimal totalValue ;
+
 }

+ 12 - 0
src/main/java/com/kcim/web/StandardReportController.java

@@ -100,4 +100,16 @@ public class StandardReportController extends AbstractController {
     public Result getDiseaseCostDetail(@RequestParam String computeDate) {
         return Result.ok(standardReportService.getDiseaseCostDetail(computeDate));
     }
+
+    @ApiOperation("医院病种成本构成明细表")
+    @GetMapping("/getDiseaseCostCompositionDetail")
+    public Result getDiseaseCostCompositionDetail(@RequestParam String computeDate) {
+        return Result.ok(standardReportService.getDiseaseCostCompositionDetail(computeDate));
+    }
+
+    @ApiOperation("医院服务单元病种成本构成明细表")
+    @GetMapping("/getDeptDiseaseCostCompositionDetail")
+    public Result getDeptDiseaseCostCompositionDetail(@RequestParam String computeDate) {
+        return Result.ok(standardReportService.getDeptDiseaseCostCompositionDetail(computeDate));
+    }
 }

+ 53 - 4
src/main/resources/mapper/ComputePatientCostAccountMapper.xml

@@ -22,13 +22,13 @@
         <result property="delFlag" column="del_flag"/>
     </resultMap>
 
-    <select id="getDiseaseCostDetailList" resultType="com.kcim.vo.HospitalServiceProjectCostVO">
+    <select id="getDiseaseCostDetailList" resultType="com.kcim.vo.DiseaseCostDetailVO">
         SELECT
-            a.`primary_diag_code` as itemCode,
-            a.`primary_diag_name` as itemName ,
+            a.`primary_diag_code` as diseaseCode,
+            a.`primary_diag_name` as diseaseName ,
             b.cost_type as costTypeCode,
             SUM( b.quantity ) AS serviceVolume,
-            SUM( b.compute_result ) AS hospitalFullCost
+            SUM( b.compute_result ) AS hospitalTotalCost
         FROM
             compute_patient_cost a
                 INNER JOIN compute_patient_cost_account b ON a.id = b.patient_cost_id
@@ -46,4 +46,53 @@
             c.`primary_diag_code`,
             b.cost_type
     </select>
+    <select id="getDiseaseCostCompositionDetail" resultType="com.kcim.vo.DiseaseCostDetailVO">
+        SELECT
+            a.`primary_diag_code` as diseaseCode,
+            a.`primary_diag_name` as diseaseName ,
+            b.account_type as costTypeCode,
+            SUM( b.quantity ) AS serviceVolume,
+            SUM( b.compute_result ) AS hospitalTotalCost
+        FROM
+            compute_patient_cost a
+                INNER JOIN compute_patient_cost_account b ON a.id = b.patient_cost_id
+                AND b.del_flag = 0
+                AND b.hosp_id = #{hospId,jdbcType=BIGINT}
+                INNER JOIN import_patient_info c on a.visit_no=c.visit_no
+                AND c.hosp_id = #{hospId,jdbcType=BIGINT}
+                AND c.del_flag = 0
+                AND c.compute_date = #{computeDate,jdbcType=VARCHAR}
+        WHERE
+            a.del_flag = 0
+          AND a.hosp_id = #{hospId,jdbcType=BIGINT}
+          AND a.compute_date = #{computeDate,jdbcType=VARCHAR}
+        GROUP BY
+            c.`primary_diag_code`,
+            b.account_type
+    </select>
+    <select id="getDeptDiseaseCostCompositionDetail" resultType="com.kcim.vo.DiseaseCostDetailVO">
+        SELECT
+            a.`primary_diag_code` as diseaseCode,
+            a.`primary_diag_name` as diseaseName ,
+            a.department_code as departmentCode,
+            a.department_name as departmentName,
+            SUM( b.quantity ) AS serviceVolume,
+            SUM( b.compute_result ) AS hospitalTotalCost
+        FROM
+            compute_patient_cost a
+                INNER JOIN compute_patient_cost_account b ON a.id = b.patient_cost_id
+                AND b.del_flag = 0
+                AND b.hosp_id = #{hospId,jdbcType=BIGINT}
+                INNER JOIN import_patient_info c on a.visit_no=c.visit_no
+                AND c.hosp_id = #{hospId,jdbcType=BIGINT}
+                AND c.del_flag = 0
+                AND c.compute_date = #{computeDate,jdbcType=VARCHAR}
+        WHERE
+            a.del_flag = 0
+          AND a.hosp_id = #{hospId,jdbcType=BIGINT}
+          AND a.compute_date = #{computeDate,jdbcType=VARCHAR}
+        GROUP BY
+            c.`primary_diag_code`,
+            a.department_code
+    </select>
 </mapper>