瀏覽代碼

测试类开发,手术描述对象

louhr 5 年之前
父節點
當前提交
c2996959ed

+ 7 - 4
kernel/src/main/java/com/lantone/qc/kernel/util/CacheFileManager.java

@@ -38,10 +38,13 @@ public class CacheFileManager {
     public CacheFileManager() {
         try {
             PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
-            EncrypDES encrypDES = new EncrypDES();
-            user = encrypDES.decryptor(propertiesUtil.getProperty("mysql.user"));
-            password = encrypDES.decryptor(propertiesUtil.getProperty("mysql.password"));
-            url = encrypDES.decryptor(propertiesUtil.getProperty("mysql.url"));
+//            EncrypDES encrypDES = new EncrypDES();
+//            user = encrypDES.decryptor(propertiesUtil.getProperty("mysql.redis.user"));
+//            password = encrypDES.decryptor(propertiesUtil.getProperty("mysql.redis.password"));
+//            url = encrypDES.decryptor(propertiesUtil.getProperty("mysql.redis.url"));
+            user = propertiesUtil.getProperty("mysql.redis.user");
+            password = propertiesUtil.getProperty("mysql.redis.password");
+            url = propertiesUtil.getProperty("mysql.redis.url");
         } catch (Exception e) {
             logger.info("数据库连接信息出错...." + e.getMessage());
         }

+ 14 - 9
kernel/src/test/java/com/lantone/qc/kernel/QCTestController.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.kernel;
+package com.lantone.qc.kernel.web.controller;
 
 import com.lantone.qc.kernel.analysis.QCAnalysis;
 import com.lantone.qc.pub.jdbc.MysqlJdbc;
@@ -6,13 +6,12 @@ import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.vo.MedrecVo;
 import com.lantone.qc.pub.model.vo.QueryVo;
 import com.lantone.qc.pub.res.Response;
+import com.lantone.qc.pub.util.PropertiesUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.sql.Connection;
 import java.sql.ResultSet;
@@ -40,8 +39,11 @@ public class QCTestController {
     @PostMapping("rec_test")
     public Response<OutputInfo> extract(String caseIds) {
         Response response = new Response();
+        PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
 
-        MysqlJdbc mysqlJdbc = new MysqlJdbc("root", "lantone", "jdbc:mysql://192.168.2.236:3306/sys-mrqc?useUnicode=true&characterEncoding=UTF-8");
+        MysqlJdbc mysqlJdbc = new MysqlJdbc(propertiesUtil.getProperty("mysql.test.user"),
+                propertiesUtil.getProperty("mysql.test.password"),
+                propertiesUtil.getProperty("mysql.test.url"));
         Connection conn = mysqlJdbc.connect();
         Statement st = null;
         ResultSet rs = null;
@@ -56,12 +58,14 @@ public class QCTestController {
                     "where qmap.cases_id = qi.id and qmap.cases_entry_id = entry.id and entry.cases_id = ca.id ";
 
             if (!StringUtils.isNotEmpty(caseIds)) {
-                sql = sql + " and cases_id in (" + caseIds + ")";
+                sql = sql + " and entry.cases_id in (" + caseIds + ")";
             }
+            sql = sql + " order by qi.id";
             Map<String, String> map = new HashMap<>();
             rs = st.executeQuery(sql);
-
+            //条目数据结构, Key = 条目Code value = 条目属性{"precode":"BEH0002,BEH0003","title":"症状缺少时间描述"}
             Map<String, Map<String, String>> catalogueMap = new HashMap<>();
+            //测试条目编码和qc_inputcases_mapping 的id,为了更新每个条目是否验证通过
             Map<String, String> updateMap = new HashMap<>();
 
             List<Map<String, Map<String, String>>> catalogueList = new ArrayList<>();
@@ -75,7 +79,7 @@ public class QCTestController {
                 r3 = rs.getString(3);
                 r4 = rs.getString(4);
                 r5 = rs.getString(5);
-                if (!textId.equals(r1)) {
+                if (!textId.equals(r2)) {
                     if (StringUtils.isNotEmpty(textId)) {
                         catalogueList.add(catalogueMap);
                         updateList.add(updateMap);
@@ -96,6 +100,7 @@ public class QCTestController {
                 content.put("content", textList.get(i));
                 medrecVo.setContent(content);
 
+
                 List<MedrecVo> medrec = new ArrayList<>();
                 medrec.add(medrecVo);
 

+ 7 - 3
kernel/src/main/resources/kernel.properties

@@ -1,4 +1,8 @@
 ################################ database ###################################
-mysql.user = ujrcgl5RQqE=
-mysql.password = c+7qw+jN+HQ=
-mysql.url = nozAbYFgLmQxh0NOeCJ3+D1MSa7CmEuGIR0pNwPBcJj60CdmTflpxhSZ+f7k3Ld29v6BMAol0r+A+tVobz/zPoVdgRwl7dZPIXkSUxstZ+E=
+mysql.redis.user = root
+mysql.redis.password = lantone
+mysql.redis.url = jdbc:mysql://192.168.2.236:3306/qc?useUnicode=true&characterEncoding=UTF-8
+
+mysql.test.user = root
+mysql.test.password = lantone
+mysql.test.url = jdbc:mysql://192.168.2.236:3306/sys-mrqc?useUnicode=true&characterEncoding=UTF-8

+ 3 - 0
public/src/main/java/com/lantone/qc/pub/model/entity/Operation.java

@@ -12,4 +12,7 @@ import lombok.Setter;
 @Getter
 @Setter
 public class Operation extends General {
+    private PD pd;  //手术时间
+    private OperationResult operationResult;    //手术结果
+    private Diag diag;  //手术原因
 }