Browse Source

添加2个菜单

zhoutg 5 years ago
parent
commit
2dd9190d14

+ 5 - 1
doc/005.20200528v1.2.x/qc_init.sql

@@ -5,4 +5,8 @@ ALTER TABLE `med_behospital_info` ADD COLUMN `is_placefile` varchar(2) NOT NULL
 ALTER TABLE `med_qcresult_detail` ADD COLUMN `grade_type` tinyint(4) DEFAULT '1' COMMENT '初始类型(1:机器,2:人工)' AFTER `is_reject`;
 ALTER TABLE `med_qcresult_detail` ADD COLUMN `opt_type` tinyint(4) DEFAULT '1' COMMENT '操作类型(1:新增,2:删除,3:修改)' AFTER `grade_type`;
 
-UPDATE `sys_permission` SET `is_deleted` = 'Y' WHERE `id` = '10';
+UPDATE `sys_permission` SET `is_deleted` = 'Y' WHERE `id` = '10';
+
+update `sys_dictionary_info` set is_deleted = 'N' where group_type = 12 and `name` = '病案首页';
+update `qc_mode` set order_no = 200 where id = 53;
+update `qc_mode` set order_no = 210 where id = 54;

+ 34 - 0
src/main/java/com/diagbot/dto/MedicalRecordDTO.java

@@ -0,0 +1,34 @@
+package com.diagbot.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-13
+ */
+@Data
+public class MedicalRecordDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 模块id
+     */
+    private Long modeId;
+
+    /**
+     * 病历标题
+     */
+    private String recTitle;
+
+    /**
+     * 病历日期
+     */
+    private String recDate;
+}

+ 4 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -27,6 +27,10 @@ public class MsgDTO {
     private String info;
     //标准提示信息
     private String standardMsg;
+    // 操作类型(1:新增,2:删除,3:修改)
+    private Integer optType;
+    // 初始类型(1:机器,2:人工)
+    private Integer gradeType;
     //单项否决
     private String isReject;
     //模块名称

+ 5 - 0
src/main/java/com/diagbot/entity/MedicalRecord.java

@@ -45,6 +45,11 @@ public class MedicalRecord implements Serializable {
      */
     private String recTypeId;
 
+    /**
+     * 模块id
+     */
+    private Long modeId;
+
     /**
      * 病历日期
      */

+ 15 - 0
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -10,6 +10,7 @@ import com.diagbot.dto.AnalyzeDTO;
 import com.diagbot.dto.AnalyzeRunDTO;
 import com.diagbot.dto.BehosDTO;
 import com.diagbot.dto.BehospitalInfoDTO;
+import com.diagbot.dto.MedicalRecordDTO;
 import com.diagbot.dto.MsgApiDTO;
 import com.diagbot.dto.MsgDTO;
 import com.diagbot.dto.OutputInfo;
@@ -25,6 +26,7 @@ import com.diagbot.entity.DoctorAdvice;
 import com.diagbot.entity.HomeDiagnoseInfo;
 import com.diagbot.entity.HomeOperationInfo;
 import com.diagbot.entity.HomePage;
+import com.diagbot.entity.MedicalRecord;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -372,6 +374,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
         //保存
         Map<String, Object> pageMap = outputInfo.getPageData();
+        // 手动拼接数据【知情同意书】【谈话告知书】
+        List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("behospital_code", analyzeVO.getBehospitalCode())
+                .eq("hospital_id", hospitalId)
+                .in("mode_id", Arrays.asList(53, 54))
+                .orderByAsc("rec_date")
+        );
+        List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
+        Map<Long, List<MedicalRecordDTO>> recordMap = EntityUtil.makeEntityListMap(medicalRecordDTOList, "modeId");
+        pageMap.put("知情同意书", recordMap.get(53L));
+        pageMap.put("谈话告知书", recordMap.get(54L));
+
         String pageData = JSON.toJSONString(pageMap);
         // 获取菜单信息
         List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);

+ 1 - 1
src/main/java/com/diagbot/facade/QcModeFacade.java

@@ -36,7 +36,7 @@ public class QcModeFacade extends QcModeServiceImpl {
 
         for (int i = 0; i < qcModeList.size(); i++) {
             String key = qcModeList.get(i).getName();
-            if (!pageData.containsKey(qcModeList.get(i).getName()) && !"病程信息".equals(key)) {
+            if (!pageData.containsKey(key) && !"病程信息".equals(key)) {
                 qcModeList.remove(i--);
             }
         }

+ 2 - 1
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -89,7 +89,8 @@
 
     <select id="getMsg" resultType="com.diagbot.dto.MsgDTO">
         SELECT b.`name` model_name,c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info,
-        a.cases_id cases_id, d.score cases_score,b.id model_id, a.name standard_msg
+        a.cases_id cases_id, d.score cases_score,b.id model_id, a.name standard_msg,
+        c.opt_type, c.grade_type
         FROM `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d
         where a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N' and d.is_deleted = 'N'
         and a.id = c.cases_entry_id