Jelajahi Sumber

1、入参中输血记录修改为List结构
2、修改测试类,状态属性名称修改为check_label

louhr 5 tahun lalu
induk
melakukan
f5bb4f63f5

+ 9 - 6
kernel/src/main/java/com/lantone/qc/kernel/web/controller/QCTestController.java

@@ -40,7 +40,7 @@ public class QCTestController {
 
     @ApiOperation(value = "质控测试接口,无需token信息", notes = "")
     @PostMapping("rec_test")
-    public Response<OutputInfo> extract(String caseIds, int length, String cid, String txtId) {
+    public Response<OutputInfo> extract(String caseIds, int length, String cid, String txtId, String hospitalId) {
         Response response = new Response();
         PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
 
@@ -54,15 +54,18 @@ public class QCTestController {
         List<Map<String, Object>> updates = new ArrayList<>();
         List<Map<String, Object>> wheres = new ArrayList<>();
         try {
-            String textSql = "select id, text from qc_inputcases ";
+            String textSql = "select id, text from qc_inputcases where 1 = 1 ";
             if (StringUtils.isNotEmpty(txtId)) {
-                textSql = textSql + " where id >= " + txtId;
+                textSql = textSql + " and id >= " + txtId;
+            }
+            if (StringUtils.isNotEmpty(hospitalId)) {
+                textSql = textSql + " and hospital_id = " + hospitalId;
             }
             textSql = textSql + " order by id limit 0, " + length;
             //更新pass状态
             mysqlJdbc.update("update qc_inputcases_mapping_all qim, " +
                     "(" + textSql + ") qi\n" +
-                    "set qim.pass = 0 where qim.text_id = qi.id");
+                    "set qim.check_label = 0 where qim.text_id = qi.id");
 
             st = conn.createStatement();
             //测试数据查询
@@ -151,9 +154,9 @@ public class QCTestController {
                     Map<String, Object> m = new HashMap<>();
                     Map<String, Object> w = new HashMap<>();
                     if (outputInfo.getResult().get(entry.getKey()) == null) {
-                        m.put("pass", "-2");
+                        m.put("check_label", "-2");
                     } else {
-                        m.put("pass", outputInfo.getResult().get(entry.getKey()).get("status"));
+                        m.put("check_label", outputInfo.getResult().get(entry.getKey()).get("status"));
                     }
                     w.put("id", catalogue_map.get(entry.getKey()));
 

+ 1 - 1
public/src/main/java/com/lantone/qc/pub/model/InputInfo.java

@@ -27,7 +27,7 @@ public class InputInfo {
     //入院病历
     private BeHospitalizedDoc beHospitalizedDoc;
     //输血/血制品病程记录
-    private ClinicalBloodDoc clinicalBloodDoc;
+    private List<ClinicalBloodDoc> clinicalBloodDoc = new ArrayList<>();
     //会诊记录
     private List<ConsultationDoc> consultationDocs = new ArrayList<>();
     //死亡病例讨论记录