Procházet zdrojové kódy

添加字段html_text,xml_text

zhoutg před 5 roky
rodič
revize
7437e854c2

+ 2 - 0
doc/001.20200417第一版本/qc_init.sql

@@ -457,6 +457,8 @@ CREATE TABLE `med_medical_record_content` (
   `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
   `content_blob` longblob COMMENT '文书内容(blob)',
   `content_text` longtext COMMENT '病历文本(文本)',
+  `html_text` longtext COMMENT 'html文本信息',
+  `xml_text` longtext COMMENT 'xml文本信息',
   `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
   `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
   `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',

+ 9 - 0
src/main/java/com/diagbot/dto/RecordContentDTO.java

@@ -27,6 +27,15 @@ public class RecordContentDTO implements Serializable {
      */
     private String contentText;
 
+    /**
+     * html内容
+     */
+    private String htmlText;
+    /**
+     * xml内容
+     */
+    private String xmlText;
+
     /**
      * 加密信息
      */

+ 10 - 0
src/main/java/com/diagbot/entity/MedicalRecordContent.java

@@ -41,6 +41,16 @@ public class MedicalRecordContent implements Serializable {
      */
     private String contentText;
 
+    /**
+     * html文本信息
+     */
+    private String htmlText;
+
+    /**
+     * xml文本信息
+     */
+    private String xmlText;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */

+ 4 - 4
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -213,7 +213,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 EncrypDES encrypDES = new EncrypDES();
                 for (RecordContentDTO recordContentDTO : recordContentDTOList) {
                     recTitle = recordContentDTO.getRecTitle();
-                    recordContentDTO.setContentText(encrypDES.decryptor(recordContentDTO.getContentText()));
+                    recordContentDTO.setXmlText(encrypDES.decryptor(recordContentDTO.getXmlText()));
                 }
             } catch (Exception e) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
@@ -365,7 +365,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             MedrecVo medrecVo = new MedrecVo();
             medrecVo.setTitle(key);
             Map<String, Object> content = new HashMap<>();
-            content.put("content", list.stream().map(r -> r.getContentText()).collect(Collectors.toList()));
+            content.put("content", list.stream().map(r -> r.getXmlText()).collect(Collectors.toList()));
             medrecVo.setContent(content);
             medrecVoList.add(medrecVo);
         }
@@ -388,7 +388,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         Boolean flag = false;
         for (String k : keyList) {
             if (ListUtil.isNotEmpty(recMap.get(k))) {
-                listMap.put(k, recMap.get(k).stream().map(r -> r.getContentText()).collect(Collectors.toList()));
+                listMap.put(k, recMap.get(k).stream().map(r -> r.getXmlText()).collect(Collectors.toList()));
                 flag = true;
             }
         }
@@ -424,7 +424,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             Set<String> keyList = keyMap.keySet();
             for (String k : keyList) {
                 if (ListUtil.isNotEmpty(keyMap.get(k))) {
-                    listMap.put(k, keyMap.get(k).stream().map(r -> r.getContentText()).collect(Collectors.toList()));
+                    listMap.put(k, keyMap.get(k).stream().map(r -> r.getXmlText()).collect(Collectors.toList()));
                 }
             }
             content.put("content", listMap);

+ 1 - 1
src/main/resources/mapper/MedicalRecordMapper.xml

@@ -19,7 +19,7 @@
     </resultMap>
 
     <select id="getRecordContent"  resultType="com.diagbot.dto.RecordContentDTO">
-        select t1.rec_id, t1.rec_title, t2.name stand_model_name, t3.content_text
+        select t1.rec_id, t1.rec_title, t2.name stand_model_name, t3.content_text, t3.html_text, t3.xml_text
         from med_medical_record t1, qc_mode t2, med_medical_record_content t3
         where
              t1.is_deleted = 'N'