chengyao %!s(int64=3) %!d(string=hai) anos
pai
achega
545e2f0b45
Modificáronse 1 ficheiros con 14 adicións e 16 borrados
  1. 14 16
      src/main/resources/mapper/MedClickInfoMapper.xml

+ 14 - 16
src/main/resources/mapper/MedClickInfoMapper.xml

@@ -543,18 +543,17 @@
         <if test="level != null and level != ''">
             and p.level = #{level}
         </if>
-        <if test="checkStatus != null ">
-            and j.check_status = #{checkStatus}
+        <if test="checkStatus != null and checkStatus != ''">
+            and j.status = #{checkStatus}
         </if>
-
         <if test="chName != null and chName !=''">
-            AND j.ch_name like CONCAT('%',#{chName},'%')
+            and j.check_name like CONCAT('%',#{chName},'%')
         </if>
-        <if test="chTimeStart != null">
-            <![CDATA[ and j.ch_time >= #{chTimeStart}]]>
+        <if test="chTimeStart != null and chTimeStart !=''">
+            <![CDATA[ and j.check_time >= #{chTimeStart}]]>
         </if>
-        <if test="chTimeEnd != null">
-            <![CDATA[ and j.ch_time < #{chTimeEnd}]]>
+        <if test="chTimeEnd != null and chTimeEnd !=''">
+            <![CDATA[ and j.check_time < #{chTimeEnd}]]>
         </if>
         ) h ON g.hospital_id = h.hospitalId
         AND g.behospital_code = h.behospitalCode
@@ -891,18 +890,17 @@
         <if test="level != null and level != ''">
             and p.level = #{level}
         </if>
-        <if test="checkStatus != null ">
-            and j.check_status = #{checkStatus}
+        <if test="checkStatus != null and checkStatus != ''">
+            and j.status = #{checkStatus}
         </if>
-
         <if test="chName != null and chName !=''">
-            AND j.ch_name like CONCAT('%',#{chName},'%')
+            and j.check_name like CONCAT('%',#{chName},'%')
         </if>
-        <if test="chTimeStart != null">
-            <![CDATA[ and j.ch_time >= #{chTimeStart}]]>
+        <if test="chTimeStart != null and chTimeStart !=''">
+            <![CDATA[ and j.check_time >= #{chTimeStart}]]>
         </if>
-        <if test="chTimeEnd != null">
-            <![CDATA[ and j.ch_time < #{chTimeEnd}]]>
+        <if test="chTimeEnd != null and chTimeEnd !=''">
+            <![CDATA[ and j.check_time < #{chTimeEnd}]]>
         </if>
         ) h ON g.hospital_id = h.hospitalId
         AND g.behospital_code = h.behospitalCode