Browse Source

疾病检索

zhaops 2 years ago
parent
commit
6bcdee67e2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main/java/com/diagbot/facade/KlConceptFacade.java

+ 3 - 3
src/main/java/com/diagbot/facade/KlConceptFacade.java

@@ -508,6 +508,8 @@ public class KlConceptFacade extends KlConceptServiceImpl {
                     .eq("lib_type", libType)
                     .eq("status", StatusEnum.Enable.getKey())
                     .notIn(ListUtil.isNotEmpty(excludedConceptIds), "id", excludedConceptIds)
+                    .orderByAsc("position('" + name.trim() + "' in lib_name)")
+                    .orderByAsc("length(lib_name)")
                     .last("limit 100"));
             if (ListUtil.isNotEmpty(conceptList)) {
                 getAllForRelationDTOS = conceptList.stream().map(x -> {
@@ -519,8 +521,6 @@ public class KlConceptFacade extends KlConceptServiceImpl {
                     return getAllForRelationDTO;
                 }).collect(Collectors.toList());
             }
-
-
         }
         return getAllForRelationDTOS;
     }
@@ -569,4 +569,4 @@ public class KlConceptFacade extends KlConceptServiceImpl {
         }
         return retList;
     }
-}
+}