Browse Source

1、烟酒、特殊嗜好阴性属性增加

louhr 5 years ago
parent
commit
8d78c1aa11

+ 6 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcessPersonal.java

@@ -53,6 +53,8 @@ public class EntityProcessPersonal extends EntityProcess {
         for (Lemma lemma :specialHobbyLemmas) {
             SpecialHobby specialHobby = new SpecialHobby();
             specialHobby.setName(lemma.getText());
+            //阴性
+            specialHobby.setNegative(findNegative(lemma));
             personalLabel.setSpecialHobby(specialHobby);
         }
         //吸烟史
@@ -60,6 +62,8 @@ public class EntityProcessPersonal extends EntityProcess {
         for (Lemma lemma :smokingLemmas) {
             Smoking smoking = new Smoking();
             smoking.setName(lemma.getText());
+            //阴性
+            smoking.setNegative(findNegative(lemma));
             if (lemma.isHaveChildren()) {
                 for (Lemma relationLemma : lemma.getRelationLemmas()) {
                     if (relationLemma.getProperty().equals(EntityEnum.TIME.toString())) {
@@ -77,6 +81,8 @@ public class EntityProcessPersonal extends EntityProcess {
         for (Lemma lemma :drinkingLemmas) {
             Drinking drinking = new Drinking();
             drinking.setName(lemma.getText());
+            //阴性
+            drinking.setNegative(findNegative(lemma));
             if (lemma.isHaveChildren()) {
                 for (Lemma relationLemma : lemma.getRelationLemmas()) {
                     if (relationLemma.getProperty().equals(EntityEnum.TIME.toString())) {

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

@@ -58,14 +58,14 @@ public class QCTestController {
             }
             textSql = textSql + " order by id limit 0, " + length;
             //更新pass状态
-            mysqlJdbc.update("update qc_inputcases_mapping qim, " +
+            mysqlJdbc.update("update qc_inputcases_mapping_all qim, " +
                     "(" + textSql + ") qi\n" +
                     "set qim.pass = 0 where qim.text_id = qi.id");
 
             st = conn.createStatement();
             //测试数据查询
             String sql = "SELECT qmap.id, qi.id text_id, qi.text, ca.name, entry.code FROM " +
-                    "qc_inputcases_mapping qmap, (" + textSql + ") qi, qc_cases_entry entry, qc_cases ca " +
+                    "qc_inputcases_mapping_all qmap, (" + textSql + ") qi, qc_cases_entry entry, qc_cases ca " +
                     "where qmap.text_id = qi.id and qmap.cases_entry_id = entry.id and entry.cases_id = ca.id";
 
             if (StringUtils.isNotEmpty(caseIds)) {
@@ -78,7 +78,7 @@ public class QCTestController {
             rs = st.executeQuery(sql);
             //条目数据结构, Key = 条目Code value = 条目属性{"precode":"BEH0002,BEH0003","title":"症状缺少时间描述"}
             Map<String, Map<String, String>> catalogueMap = new HashMap<>();
-            //测试条目编码和qc_inputcases_mapping 的id,为了更新每个条目是否验证通过
+            //测试条目编码和qc_inputcases_mapping_all 的id,为了更新每个条目是否验证通过
             Map<String, String> updateMap = new HashMap<>();
 
             List<Map<String, Map<String, String>>> catalogueList = new ArrayList<>();
@@ -161,7 +161,7 @@ public class QCTestController {
             }
 
 
-            mysqlJdbc.update("qc_inputcases_mapping", updates, wheres);
+            mysqlJdbc.update("qc_inputcases_mapping_all", updates, wheres);
 
         } catch (SQLException sqle) {
             sqle.printStackTrace();