Forráskód Böngészése

标准术语维护

zhaops 4 éve
szülő
commit
29b6b74f3d

+ 6 - 6
src/main/java/com/diagbot/repository/EntityInfoRepository.java

@@ -18,7 +18,7 @@ import java.util.List;
 public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Long> {
     @Query(value = "match(n)\n" +
             "where " +
-            //"any(label in labels(n) where label in nlabels)\n" +
+            //"any(label in labels(n) where label in {labels})\n" +
             "(case when {label} is not null and {label} <> '' then\n" +
             "(case {label}\n" +
             "when '医保疾病名称' then n:医保疾病名称 \n " +
@@ -58,9 +58,9 @@ public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Lon
             "when '过敏原' then n:过敏原 \n" +
             "when '食物过敏原' then n:食物过敏原 \n" +
             "when '输血提醒指标' then n:输血提醒指标 \n" +
-            "else 1 = 1 " +
+            "else any(label in labels(n) where label in {labels}) " +
             "end)" +
-            "else 1 = 1 " +
+            "else any(label in labels(n) where label in {labels}) " +
             "end)" +
             "and (case when {name} is not null and {name} <> '' " +
             "then " +
@@ -84,7 +84,7 @@ public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Lon
             "order by n.状态 desc, id(n) desc",
             countQuery = "match(n)\n" +
                     "where " +
-                    //"any(label in labels(n) where label in nlabels)\n" +
+                    //"any(label in labels(n) where label in {labels})\n" +
                     "(case when {label} is not null and {label} <> '' then\n" +
                     "(case {label}\n" +
                     "when '医保疾病名称' then n:医保疾病名称 \n " +
@@ -124,9 +124,9 @@ public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Lon
                     "when '过敏原' then n:过敏原 \n" +
                     "when '食物过敏原' then n:食物过敏原 \n" +
                     "when '输血提醒指标' then n:输血提醒指标 \n" +
-                    "else 1 = 1 " +
+                    "else any(label in labels(n) where label in {labels}) " +
                     "end)" +
-                    "else 1 = 1 " +
+                    "else any(label in labels(n) where label in {labels}) " +
                     "end)" +
                     "and (case when {name} is not null and {name} <> '' " +
                     "then " +