Browse Source

Merge branch 'develop' into innerDevelop

rengb 3 years ago
parent
commit
8a907d587f

File diff suppressed because it is too large
+ 10 - 0
doc/040.20211228_2.1.5/qc_initv2.1.5.sql


+ 50 - 1
src/main/java/com/diagbot/facade/QcModuleInfoFacade.java

@@ -1,5 +1,6 @@
 package com.diagbot.facade;
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.GetModuleInfoOneDTO;
 import com.diagbot.dto.QcModuleDetailDTO;
@@ -13,6 +14,7 @@ import com.diagbot.service.impl.QcModuleInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
 import com.diagbot.vo.GetModuleInfoOneVO;
 import com.diagbot.vo.GetModuleMapVO;
 import com.diagbot.vo.QuestionIdsVO;
@@ -38,6 +40,8 @@ public class QcModuleInfoFacade extends QcModuleInfoServiceImpl {
     QcModuleDetailFacade qcModuleDetailFacade;
     @Autowired
     QcQuestionFacade qcQuestionFacade;
+    @Autowired
+    SysHospitalSetFacade sysHospitalSetFacade;
 
     /**
      * 根据id获取模板信息
@@ -95,10 +99,55 @@ public class QcModuleInfoFacade extends QcModuleInfoServiceImpl {
             return new HashMap<>();
         }
         GetModuleInfoOneVO getModuleInfoOneVO = new GetModuleInfoOneVO();
+        String pageShowFlag = sysHospitalSetFacade.getValue(getModuleMapVO.getHospitalId(), "page_show_flag");
+        String pageShowConfig = sysHospitalSetFacade.getValue(getModuleMapVO.getHospitalId(), "page_show_config");
         for (Long id : ids) {
             getModuleInfoOneVO.setModuleId(id);
-            res.put(id, getByIdFac(getModuleInfoOneVO));
+            GetModuleInfoOneDTO oneDTO = getByIdFac(getModuleInfoOneVO);
+            //原文书(超链接)配置
+            originalDocumentConfigure(oneDTO, pageShowFlag, pageShowConfig, getModuleMapVO.getHospitalId());
+            res.put(id, oneDTO);
         }
         return res;
     }
+
+    private void originalDocumentConfigure(GetModuleInfoOneDTO oneDTO, String pageShowFlag, String pageShowConfig, Long hospitalId) {
+        if (StringUtil.isNotEmpty(pageShowFlag) && StringUtil.isNotEmpty(pageShowConfig)) {
+            JSONObject pageShowFlagJSON = JSONObject.parseObject(pageShowFlag);
+            JSONObject pageShowConfigJSON = JSONObject.parseObject(pageShowConfig);
+            try {
+                if (pageShowFlagJSON.containsKey(oneDTO.getModeId().toString())) {
+                    if (pageShowFlagJSON.getBoolean(oneDTO.getModeId().toString())) {
+                        QcModuleDetailDTO qcModuleDetailDTO = createQcModuleDetailDTO(pageShowConfigJSON, hospitalId, oneDTO.getModeId());
+                        oneDTO.getModuleDetail().get(0).add(0,qcModuleDetailDTO);
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private QcModuleDetailDTO createQcModuleDetailDTO(JSONObject pageShowConfigJSON, Long hospitalId, Long modeId) {
+        QcModuleDetailDTO qcModuleDetailDTO = new QcModuleDetailDTO();
+        QuestionDTO questionDTO = new QuestionDTO();
+        qcModuleDetailDTO.setQuestionId(modeId*-1);
+        qcModuleDetailDTO.setGroupId(pageShowConfigJSON.getInteger("groupId"));
+
+        questionDTO.setId(modeId*-1);
+        questionDTO.setName("");
+        questionDTO.setVal(pageShowConfigJSON.getString("val"));
+        questionDTO.setTagName("");
+        questionDTO.setControlType(pageShowConfigJSON.getInteger("controlType"));
+        questionDTO.setTagType(pageShowConfigJSON.getInteger("tagType"));
+        questionDTO.setHospitalId(hospitalId);
+        questionDTO.setModeId(modeId);
+        questionDTO.setRetract(pageShowConfigJSON.getInteger("retract"));
+        questionDTO.setAddLine(pageShowConfigJSON.getInteger("addLine"));
+        questionDTO.setMonoLine(pageShowConfigJSON.getInteger("monoLine"));
+        questionDTO.setBold(pageShowConfigJSON.getInteger("bold"));
+        questionDTO.setPosition(pageShowConfigJSON.getInteger("position"));
+        qcModuleDetailDTO.setQuestionDTO(questionDTO);
+        return qcModuleDetailDTO;
+    }
 }

+ 1 - 1
src/main/resources/application-dev.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.237:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: lantone
       # 连接池的配置信息

+ 1 - 1
src/main/resources/application-local.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.237:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: lantone
       # 连接池的配置信息

+ 3 - 3
src/main/resources/application-pro.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.125:3308/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.129:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: LangT0ng@122lt
       # 连接池的配置信息
@@ -111,8 +111,8 @@ spring:
     database:
       cache: 8 # cache索引
       token: 8 # Token索引
-    host: 192.168.2.125  #Redis服务器地址
-    port: 63791 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
+    host: 192.168.2.129  #Redis服务器地址
+    port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)
     lettuce:
       pool:

+ 1 - 1
src/main/resources/application-test.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.126:3307/qc_xy?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.126:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: Lat0ne@tesT
       # 连接池的配置信息