zhaops пре 4 година
родитељ
комит
36d5e080e3

+ 10 - 1
src/main/java/com/diagbot/dto/StaticKnowledgeIndexDTO.java

@@ -31,10 +31,15 @@ public class StaticKnowledgeIndexDTO {
      * 同义词
      */
     private String retrievalName;
+
     /**
      * 是否有静态知识
      */
-    private Integer hasInfomation = 0;
+    private Integer hasInfo = 0;
+    /**
+     * 是否有基本静态知识
+     */
+    private Integer hasStaticKnowledge = 0;
     /**
      * 是否有临床路径
      */
@@ -43,4 +48,8 @@ public class StaticKnowledgeIndexDTO {
      * 是否有注意事项
      */
     private Integer hasNotice = 0;
+    /**
+     * 是否有治疗方案静态知识
+     */
+    private Integer hasTreatInfo = 0;
 }

+ 45 - 1
src/main/java/com/diagbot/facade/MedRetrievalFacade.java

@@ -6,11 +6,13 @@ import com.diagbot.dto.IndexDTO;
 import com.diagbot.dto.LisDetailDTO;
 import com.diagbot.dto.OperationInfoDTO;
 import com.diagbot.dto.RetrievalDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.MedRetrievalVO;
 import com.diagbot.vo.RetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -137,4 +139,46 @@ public class MedRetrievalFacade {
         }
         return retrievalDTO;
     }
-}
+
+    /**
+     * 医学知识(静态信息)检索
+     *
+     * @param staticKnowledgeIndexVO
+     * @return
+     */
+    public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        staticKnowledgeIndexVO.setTypeIds(new ArrayList<>());
+        if (staticKnowledgeIndexVO.getSize() == null) {
+            staticKnowledgeIndexVO.setSize(100);
+        }
+
+        List<Integer> types = staticKnowledgeIndexVO.getTypes();
+
+        //检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、5-手术和操作
+        if (ListUtil.isEmpty(types)
+                || (ListUtil.isNotEmpty(types) && types.contains(0))) {
+            staticKnowledgeIndexVO.getTypeIds().addAll(Arrays.asList(new Long[] { 100L, 101L, 106L, 107L, 108L, 109L, 110L }));
+        } else {
+            if (types.contains(1)) {
+                staticKnowledgeIndexVO.getTypeIds().add(100L);
+            }
+            if (types.contains(2)) {
+                staticKnowledgeIndexVO.getTypeIds().add(101L);
+            }
+            if (types.contains(3)) {
+                staticKnowledgeIndexVO.getTypeIds().add(107L);
+                staticKnowledgeIndexVO.getTypeIds().add(108L);
+            }
+            if (types.contains(5)) {
+                staticKnowledgeIndexVO.getTypeIds().add(109L);
+                staticKnowledgeIndexVO.getTypeIds().add(110L);
+            }
+            if (types.contains(6)) {
+                staticKnowledgeIndexVO.getTypeIds().add(106L);
+            }
+        }
+
+        List<StaticKnowledgeIndexDTO> retList = klConceptFacade.staticIndex(staticKnowledgeIndexVO);
+        return retList;
+    }
+}

+ 4 - 0
src/main/java/com/diagbot/mapper/KlConceptMapper.java

@@ -2,8 +2,10 @@ package com.diagbot.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.diagbot.dto.IndexDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.entity.KlConcept;
 import com.diagbot.vo.MedRetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 
 import java.util.List;
 
@@ -18,4 +20,6 @@ import java.util.List;
 public interface KlConceptMapper extends BaseMapper<KlConcept> {
 
     List<IndexDTO> index(MedRetrievalVO medRetrievalVO);
+
+    List<StaticKnowledgeIndexDTO> staticIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO);
 }

+ 5 - 0
src/main/java/com/diagbot/service/KlConceptService.java

@@ -2,9 +2,11 @@ package com.diagbot.service;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.diagbot.dto.IndexDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.entity.KlConcept;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.diagbot.vo.MedRetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 
 import java.util.List;
 
@@ -18,5 +20,8 @@ import java.util.List;
  */
 @DS("med")
 public interface KlConceptService extends IService<KlConcept> {
+
     List<IndexDTO> index(MedRetrievalVO medRetrievalVO);
+
+    List<StaticKnowledgeIndexDTO> staticIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO);
 }

+ 7 - 0
src/main/java/com/diagbot/service/impl/KlConceptServiceImpl.java

@@ -2,10 +2,12 @@ package com.diagbot.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.dto.IndexDTO;
+import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.entity.KlConcept;
 import com.diagbot.mapper.KlConceptMapper;
 import com.diagbot.service.KlConceptService;
 import com.diagbot.vo.MedRetrievalVO;
+import com.diagbot.vo.StaticKnowledgeIndexVO;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -20,7 +22,12 @@ import java.util.List;
  */
 @Service
 public class KlConceptServiceImpl extends ServiceImpl<KlConceptMapper, KlConcept> implements KlConceptService {
+
     public List<IndexDTO> index(MedRetrievalVO medRetrievalVO) {
         return baseMapper.index(medRetrievalVO);
     }
+
+    public List<StaticKnowledgeIndexDTO> staticIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
+        return baseMapper.staticIndex(staticKnowledgeIndexVO);
+    }
 }

+ 16 - 9
src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -1,8 +1,12 @@
 package com.diagbot.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
 /**
  * @Description:
  * @Author:zhaops
@@ -12,23 +16,26 @@ import lombok.Setter;
 @Setter
 public class RetrievalVO {
     /**
-     * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作
+     * 类型:1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作、7-科室、8-输血、9-症状
      */
+    @NotNull(message = "请输入检索类型")
     private Integer type;
     /**
      * 检索内容
      */
+    @NotBlank(message = "请输入检索内容")
     private String inputStr;
-//    /**
-//     * 性别:1-男、2-女、3-通用
-//     */
-//    private Integer sex;
-//    /**
-//     * 年龄
-//     */
-//    private Integer age;
+    //    /**
+    //     * 性别:1-男、2-女、3-通用
+    //     */
+    //    private Integer sex;
+    //    /**
+    //     * 年龄
+    //     */
+    //    private Integer age;
     /**
      * 术语返回数量
      */
+    @ApiModelProperty(hidden = true)
     private Integer size;
 }

+ 7 - 0
src/main/java/com/diagbot/vo/StaticKnowledgeIndexVO.java

@@ -1,5 +1,6 @@
 package com.diagbot.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -31,4 +32,10 @@ public class StaticKnowledgeIndexVO {
      */
     @NotNull(message = "请输入是否有静态知识")
     private Integer hasInfo;
+
+    @ApiModelProperty(hidden = true)
+    private List<Long> typeIds;
+
+    @ApiModelProperty(hidden = true)
+    private Integer size;
 }

+ 2 - 1
src/main/java/com/diagbot/web/RetrievalController.java

@@ -64,7 +64,8 @@ public class RetrievalController {
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticKnowledgeIndex")
     public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
-        List<StaticKnowledgeIndexDTO> data = retrievalFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        //List<StaticKnowledgeIndexDTO> data = retrievalFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
+        List<StaticKnowledgeIndexDTO> data=medRetrievalFacade.staticKnowledgeIndex(staticKnowledgeIndexVO);
         return RespDTO.onSuc(data);
     }
 

+ 271 - 99
src/main/resources/mapper/KlConceptMapper.xml

@@ -20,10 +20,10 @@
 		SELECT DISTINCT
 		t.id as id,
 		t.lib_name as name
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			,t.icd10Code as icd10Code
 		</if>
-		<if test="typeId!=null and typeId=108">
+		<if test="typeId!=null and typeId==108">
 			,
 			t1.max_value as `maxValue`,
 			t1.min_value as minValue,
@@ -37,13 +37,13 @@
 		SELECT DISTINCT
 		b.id,
 		b.lib_name
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			,c.icd10_code as icd10Code
 		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			left join kl_disease c
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
@@ -55,7 +55,7 @@
 		AND a.id = b.lib_id
 		<if test="inputStr!=null and inputStr!=''">
 			AND ( a.`name` = #{inputStr} OR LOWER(a.spell) = LOWER(#{inputStr})
-			<if test="typeId!=null and typeId=100">
+			<if test="typeId!=null and typeId==100">
 				OR LOWER(c.icd10_code) = LOWER(#{inputStr})
 			</if>
 			)
@@ -69,13 +69,13 @@
 		SELECT DISTINCT
 		b.id,
 		b.lib_name
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			,c.icd10_code as icd10Code
 		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			left join kl_disease c
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
@@ -87,7 +87,7 @@
 		AND a.id = b.lib_id
 		<if test="inputStr!=null and inputStr!=''">
 			AND ( a.`name` LIKE concat(#{inputStr},'%') OR LOWER(a.spell) LIKE LOWER(concat(#{inputStr},'%'))
-			<if test="typeId!=null and typeId=100">
+			<if test="typeId!=null and typeId==100">
 				OR LOWER(c.icd10_code) LIKE LOWER(concat(#{inputStr},'%'))
 			</if>
 			)
@@ -101,13 +101,13 @@
 		SELECT DISTINCT
 		b.id,
 		b.lib_name
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			,c.icd10_code as icd10Code
 		</if>
 		FROM
 		kl_library_info a,
 		kl_concept b
-		<if test="typeId!=null and typeId=100">
+		<if test="typeId!=null and typeId==100">
 			left join kl_disease c
 			on c.is_deleted = 'N'
 			and b.id = c.concept_id
@@ -119,7 +119,7 @@
 		AND a.id = b.lib_id
 		<if test="inputStr!=null and inputStr!=''">
 			AND ( a.`name` LIKE concat('%',#{inputStr},'%') OR LOWER(a.spell) LIKE LOWER( concat('%',#{inputStr},'%'))
-			<if test="typeId!=null and typeId=100">
+			<if test="typeId!=null and typeId==100">
 				OR LOWER(c.icd10_code) LIKE LOWER( concat('%',#{inputStr},'%'))
 			</if>
 			)
@@ -130,7 +130,7 @@
 			</foreach>
 		</if>
 		) t
-		<if test="typeId!=null and typeId=108">
+		<if test="typeId!=null and typeId==108">
 			LEFT JOIN kl_lis t1 ON t.id = t1.concept_id
 			AND t1.is_deleted = 'N'
 			LEFT JOIN kl_relation t3 ON t.id = t3.end_id
@@ -146,92 +146,264 @@
     </select>
 
     <select id="staticIndex" resultType="com.diagbot.dto.StaticKnowledgeIndexDTO">
-        SELECT
-        f.*
-        FROM
-        (
-        SELECT
-        s.*,
-        s1.concept_id AS conceptId,
-        s1.clinical_pathway_name,
-        s1.notice_name,
-        s1.`status` AS STATUS
-        FROM
-        (
-        SELECT
-        t.id,
-        t.NAME,
-        l1.icd10_code AS icd10Code
-        FROM
-        (
-        SELECT
-        a.NAME AS libName,
-        a.spell AS spell,
-        b.id AS id,
-        b.lib_name AS NAME
-        FROM
-        kl_library_info a,
-        kl_concept b
-        WHERE
-        a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND a.id = b.lib_id
-        <if test="typeId!=null">
-            AND a.type_id= #{typeId}
-        </if>
-        ) t
-        LEFT JOIN kl_disease l1 ON t.id = l1.concept_id
-        AND l1.is_deleted = 'N'
-        WHERE
-        1=1
-        <if test="inputStr!=null and inputStr!=''">
-            AND ( t.libName = #{inputStr} OR LOWER(t.spell) = LOWER(#{inputStr})
-            <if test="typeId!=null and typeId=100">
-                OR LOWER(l1.icd10_code) = LOWER(#{inputStr})
-            </if>
-            )
-        </if>
-        <if test="">
-            UNION
-            SELECT DISTINCT
-            e.id AS id,
-            e.lib_name AS NAME,
-            NULL AS icd10Code
-            FROM
-            kl_library_info a,
-            kl_concept b,
-            kl_relation d,
-            kl_concept e
-            WHERE
-            a.is_deleted = 'N'
-            AND b.is_deleted = 'N'
-            AND d.is_deleted = 'N'
-            AND e.is_deleted = 'N'
-            AND a.id = b.lib_id
-            AND b.id = d.end_id
-            AND e.id = d.start_id
-            AND b.lib_type = 108
-            AND e.lib_type = 107
-            AND d.relation_id = 600
-            <if test="inputStr!=null and inputStr!=''">
-                AND ( a.name = #{inputStr} OR LOWER(a.spell) = LOWER(#{inputStr}))
-            </if>
-            <if test="typeId!=null">
-                AND a.type_id= #{typeId}
-            </if>
-        </if>
-        ) s
-        LEFT JOIN kl_concept_static s1 ON s.id = s1.concept_id
-        AND s1.is_deleted = 'N'
-        ) f
-        WHERE
-        1 = 1
-        <if test="hasInfo!=null and hasInfo=1">
-        AND f.STATUS = 1
-        AND f.conceptId IS NOT NULL
-        </if>
-        <if test="hasInfo==null or hasInfo=0">
-            AND f.conceptId IS NULL
-        </if>
+		SELECT
+		f.*
+		FROM
+		(
+		SELECT
+		distinct
+		s.*,
+		s1.concept_id AS conceptId,
+		s1.clinical_pathway_name,
+		s1.notice_name,
+		s1.`status` AS STATUS,
+		IF( count( s2.id )> 0, 1, 0 ) AS hasInfo ,
+		IF( sum( IF ( FIND_IN_SET( 1, s2.content_type )> 0, 1, 0 ))> 0, 1, 0 ) AS hasStaticKnowledge,
+		IF( sum( IF ( FIND_IN_SET( 2, s2.content_type )> 0, 1, 0 ))> 0, 1, 0 ) AS hasNotice,
+		IF( sum( IF ( FIND_IN_SET( 3, s2.content_type )> 0, 1, 0 ))> 0, 1, 0 ) AS hasClinicalPathway,
+		IF( sum( IF ( FIND_IN_SET( 4, s2.content_type )> 0, 1, 0 ))> 0, 1, 0 ) AS hasTreatInfo
+		FROM
+		(
+		SELECT
+		t.id,
+		t.NAME,
+		t.retrievalName,
+		t.type,
+		t.typeName,
+		l1.icd10_code AS code
+		FROM
+		(
+		SELECT
+		a.NAME AS retrievalName,
+		a.spell AS spell,
+		b.id AS id,
+		b.lib_name AS NAME,
+		b.lib_type AS type,
+		c.NAME AS typeName
+		FROM
+		kl_library_info a,
+		kl_concept b,
+		kl_lexicon c
+		WHERE
+		a.is_deleted = 'N'
+		AND b.is_deleted = 'N'
+		AND c.is_deleted = 'N'
+		AND a.id = b.lib_id
+		AND b.lib_type = c.code
+		<if test="typeIds != null and typeIds.size > 0">
+			<foreach item="typeId" collection="typeIds" open="and(" separator="or" close=")" >
+				a.type_id =#{typeId}
+			</foreach>
+		</if>
+		) t
+		LEFT JOIN kl_disease l1 ON t.id = l1.concept_id
+		AND l1.is_deleted = 'N'
+		WHERE
+		1=1
+		<if test="inputStr!=null and inputStr!=''">
+			AND ( t.name = #{inputStr}
+			OR LOWER(t.spell) = LOWER(#{inputStr})
+			OR LOWER(l1.icd10_code) = LOWER(#{inputStr}))
+		</if>
+		UNION
+		SELECT
+		t.id,
+		t.NAME,
+		t.retrievalName,
+		t.type,
+		t.typeName,
+		l1.icd10_code AS code
+		FROM
+		(
+		SELECT
+		a.NAME AS retrievalName,
+		a.spell AS spell,
+		b.id AS id,
+		b.lib_name AS NAME,
+		b.lib_type AS type,
+		c.NAME AS typeName
+		FROM
+		kl_library_info a,
+		kl_concept b,
+		kl_lexicon c
+		WHERE
+		a.is_deleted = 'N'
+		AND b.is_deleted = 'N'
+		AND c.is_deleted = 'N'
+		AND a.id = b.lib_id
+		AND b.lib_type = c.code
+		<if test="typeIds != null and typeIds.size > 0">
+			<foreach item="typeId" collection="typeIds" open="and(" separator="or" close=")" >
+				a.type_id =#{typeId}
+			</foreach>
+		</if>
+		) t
+		LEFT JOIN kl_disease l1 ON t.id = l1.concept_id
+		AND l1.is_deleted = 'N'
+		WHERE
+		1=1
+		<if test="inputStr!=null and inputStr!=''">
+			AND ( t.name LIKE concat(#{inputStr},'%')
+			OR LOWER(t.spell) LIKE LOWER( concat(#{inputStr},'%'))
+			OR LOWER(l1.icd10_code) LIKE LOWER( concat(#{inputStr},'%')))
+		</if>
+		UNION
+		SELECT
+		t.id,
+		t.NAME,
+		t.retrievalName,
+		t.type,
+		t.typeName,
+		l1.icd10_code AS code
+		FROM
+		(
+		SELECT
+		a.NAME AS retrievalName,
+		a.spell AS spell,
+		b.id AS id,
+		b.lib_name AS NAME,
+		b.lib_type AS type,
+		c.NAME AS typeName
+		FROM
+		kl_library_info a,
+		kl_concept b,
+		kl_lexicon c
+		WHERE
+		a.is_deleted = 'N'
+		AND b.is_deleted = 'N'
+		AND c.is_deleted = 'N'
+		AND a.id = b.lib_id
+		AND b.lib_type = c.code
+		<if test="typeIds != null and typeIds.size > 0">
+			<foreach item="typeId" collection="typeIds" open="and(" separator="or" close=")" >
+				a.type_id =#{typeId}
+			</foreach>
+		</if>
+		) t
+		LEFT JOIN kl_disease l1 ON t.id = l1.concept_id
+		AND l1.is_deleted = 'N'
+		WHERE
+		1=1
+		<if test="inputStr!=null and inputStr!=''">
+			AND ( t.name LIKE concat('%',#{inputStr},'%')
+			OR LOWER(t.spell) LIKE LOWER( concat('%',#{inputStr},'%'))
+			OR LOWER(l1.icd10_code) LIKE LOWER( concat('%',#{inputStr},'%')))
+		</if>
+		<if test="(types != null and types.size > 0 and (types.contains(0) or types.contains(3))) or types==null or types.size==0">
+			UNION
+			SELECT DISTINCT
+			e.id AS id,
+			e.lib_name AS NAME,
+			b.lib_name AS retrievalName,
+			e.lib_type AS type,
+			c.name AS typeName,
+			NULL AS code
+			FROM
+			kl_library_info a,
+			kl_concept b,
+			kl_lexicon c,
+			kl_relation d,
+			kl_concept e
+			WHERE
+			a.is_deleted = 'N'
+			AND b.is_deleted = 'N'
+			AND c.is_deleted = 'N'
+			AND d.is_deleted = 'N'
+			AND e.is_deleted = 'N'
+			AND a.id = b.lib_id
+			AND b.id = d.end_id
+			AND e.id = d.start_id
+			AND e.lib_type = c.code
+			AND b.lib_type = 108
+			AND e.lib_type = 107
+			AND d.relation_id = 600
+			<if test="inputStr!=null and inputStr!=''">
+				AND ( a.name = #{inputStr} OR LOWER(a.spell) = LOWER(#{inputStr}))
+			</if>
+			UNION
+			SELECT DISTINCT
+			e.id AS id,
+			e.lib_name AS NAME,
+			b.lib_name AS retrievalName,
+			e.lib_type AS type,
+			c.name AS typeName,
+			NULL AS code
+			FROM
+			kl_library_info a,
+			kl_concept b,
+			kl_lexicon c,
+			kl_relation d,
+			kl_concept e
+			WHERE
+			a.is_deleted = 'N'
+			AND b.is_deleted = 'N'
+			AND c.is_deleted = 'N'
+			AND d.is_deleted = 'N'
+			AND e.is_deleted = 'N'
+			AND a.id = b.lib_id
+			AND b.id = d.end_id
+			AND e.id = d.start_id
+			AND e.lib_type = c.code
+			AND b.lib_type = 108
+			AND e.lib_type = 107
+			AND d.relation_id = 600
+			<if test="inputStr!=null and inputStr!=''">
+				AND ( a.name LIKE concat(#{inputStr},'%') OR LOWER(a.spell) LIKE LOWER( concat(#{inputStr},'%')))
+			</if>
+			UNION
+			SELECT DISTINCT
+			e.id AS id,
+			e.lib_name AS NAME,
+			b.lib_name AS retrievalName,
+			e.lib_type AS type,
+			c.name AS typeName,
+			NULL AS code
+			FROM
+			kl_library_info a,
+			kl_concept b,
+			kl_lexicon c,
+			kl_relation d,
+			kl_concept e
+			WHERE
+			a.is_deleted = 'N'
+			AND b.is_deleted = 'N'
+			AND c.is_deleted = 'N'
+			AND d.is_deleted = 'N'
+			AND e.is_deleted = 'N'
+			AND a.id = b.lib_id
+			AND b.id = d.end_id
+			AND e.id = d.start_id
+			AND e.lib_type = c.code
+			AND b.lib_type = 108
+			AND e.lib_type = 107
+			AND d.relation_id = 600
+			<if test="inputStr!=null and inputStr!=''">
+				AND ( a.name LIKE concat('%',#{inputStr},'%') OR LOWER(a.spell) LIKE LOWER( concat('%',#{inputStr},'%')))
+			</if>
+		</if>
+		) s
+		LEFT JOIN kl_concept_static s1 ON s.id = s1.concept_id
+		AND s1.is_deleted = 'N'
+		LEFT JOIN kl_concept_detail s2 ON s.id = s2.concept_id
+		AND s2.is_deleted = 'N'
+		GROUP BY s.id
+		) f
+		WHERE
+		1 = 1
+		<if test="hasInfo!=null ">
+			<choose>
+				<when test="hasInfo==0">
+					AND f.conceptId IS NULL
+				</when>
+				<when test="hasInfo==1">
+					AND f.STATUS = 1
+					AND f.conceptId IS NOT NULL
+				</when>
+			</choose>
+		</if>
+		order  by f.type asc
+		<if test="size!=null">
+			LIMIT #{size}
+		</if>
     </select>
 </mapper>