Browse Source

全等参数

wangfeng 4 years ago
parent
commit
8cc29f3d2a

+ 2 - 0
src/main/java/com/diagbot/vo/KlScaleByIdVO.java

@@ -12,6 +12,8 @@ import lombok.Setter;
 @Getter
 public class KlScaleByIdVO {
     private Long id;
+    private String name;//全等参数
     private String conceptName;
     private Integer status;
+
 }

+ 24 - 18
src/main/resources/mapper/KlConceptStaticMapper.xml

@@ -4,16 +4,16 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.KlConceptStatic">
-        <id column="id" property="id" />
-        <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_create" property="gmtCreate" />
-        <result column="gmt_modified" property="gmtModified" />
-        <result column="creator" property="creator" />
-        <result column="modifier" property="modifier" />
-        <result column="concept_id" property="conceptId" />
-        <result column="status" property="status" />
-        <result column="clinical_pathway_name" property="clinicalPathwayName" />
-        <result column="notice_name" property="noticeName" />
+        <id column="id" property="id"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="gmt_create" property="gmtCreate"/>
+        <result column="gmt_modified" property="gmtModified"/>
+        <result column="creator" property="creator"/>
+        <result column="modifier" property="modifier"/>
+        <result column="concept_id" property="conceptId"/>
+        <result column="status" property="status"/>
+        <result column="clinical_pathway_name" property="clinicalPathwayName"/>
+        <result column="notice_name" property="noticeName"/>
     </resultMap>
 
     <!-- 分页查询 -->
@@ -115,7 +115,7 @@
         AND b.lib_type = c.code
         AND b.`status` = 1
         <if test="staticKnowledgeIndexPageVO.typeIds != null and staticKnowledgeIndexPageVO.typeIds.size > 0">
-            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")" >
+            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")">
                 a.type_id =#{typeId}
             </foreach>
         </if>
@@ -157,7 +157,7 @@
         AND b.lib_type = c.code
         AND b.`status` = 1
         <if test="staticKnowledgeIndexPageVO.typeIds != null and staticKnowledgeIndexPageVO.typeIds.size > 0">
-            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")" >
+            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")">
                 a.type_id =#{typeId}
             </foreach>
         </if>
@@ -199,7 +199,7 @@
         AND b.lib_type = c.code
         AND b.`status` = 1
         <if test="staticKnowledgeIndexPageVO.typeIds != null and staticKnowledgeIndexPageVO.typeIds.size > 0">
-            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")" >
+            <foreach item="typeId" collection="staticKnowledgeIndexPageVO.typeIds" open="and(" separator="or" close=")">
                 a.type_id =#{typeId}
             </foreach>
         </if>
@@ -240,7 +240,8 @@
             AND d.relation_id = 600
             AND b.`status` = 1
             <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
-                AND ( a.name = #{staticKnowledgeIndexPageVO.inputStr} OR LOWER(a.spell) = LOWER(#{staticKnowledgeIndexPageVO.inputStr}))
+                AND ( a.name = #{staticKnowledgeIndexPageVO.inputStr} OR LOWER(a.spell) =
+                LOWER(#{staticKnowledgeIndexPageVO.inputStr}))
             </if>
             UNION
             SELECT DISTINCT
@@ -273,7 +274,8 @@
             AND d.relation_id = 600
             AND b.`status` = 1
             <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
-                AND ( a.name LIKE concat(#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER( concat(#{staticKnowledgeIndexPageVO.inputStr},'%')))
+                AND ( a.name LIKE concat(#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
+                concat(#{staticKnowledgeIndexPageVO.inputStr},'%')))
             </if>
             UNION
             SELECT DISTINCT
@@ -306,7 +308,8 @@
             AND d.relation_id = 600
             AND b.`status` = 1
             <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
-                AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER( concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
+                AND ( a.name LIKE concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%') OR LOWER(a.spell) LIKE LOWER(
+                concat('%',#{staticKnowledgeIndexPageVO.inputStr},'%')))
             </if>
         </if>
         <if test="staticKnowledgeIndexPageVO.typeIds.contains(100) ">
@@ -349,7 +352,7 @@
             WHERE
             1=1
             <if test="staticKnowledgeIndexPageVO.inputStr!=null and staticKnowledgeIndexPageVO.inputStr!=''">
-                AND  LOWER(l1.icd10_code) = LOWER(#{staticKnowledgeIndexPageVO.inputStr})
+                AND LOWER(l1.icd10_code) = LOWER(#{staticKnowledgeIndexPageVO.inputStr})
             </if>
             UNION
             SELECT
@@ -467,7 +470,7 @@
             AND a.status = #{status}
         </if>
     </select>
-    <select id="getklScaleInfo"  resultType="com.diagbot.dto.KlScaleByIdDTO">
+    <select id="getklScaleInfo" resultType="com.diagbot.dto.KlScaleByIdDTO">
         SELECT
         a.`id` AS id,
         a.`gmt_modified` AS gmtModified,
@@ -488,6 +491,9 @@
         <if test="conceptName!=null and conceptName!=''">
             AND UPPER(b.lib_name) LIKE CONCAT('%', UPPER(trim(#{conceptName})), '%')
         </if>
+        <if test="name!=null and name!=''">
+            AND b.lib_name=#{name}
+        </if>
         <if test="status != null">
             AND a.status = #{status}
         </if>