|
@@ -129,7 +129,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
c.msg
|
|
@@ -155,7 +158,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
) t2
|
|
|
)
|
|
@@ -193,7 +199,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -220,7 +229,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
) t2
|
|
|
)
|
|
@@ -247,7 +259,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
c.msg
|
|
@@ -280,7 +295,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -309,7 +327,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.behospital_date >= #{startDate}]]>
|
|
|
+ <![CDATA[ and a.behospital_date >= DATE(#{startDate})]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|