zhaops 5 anni fa
parent
commit
111e8d362d

+ 2 - 2
src/main/java/com/diagbot/aggregate/ResultStatisticsAggregate.java

@@ -196,8 +196,8 @@ public class ResultStatisticsAggregate {
      * @param filterVO
      * @return
      */
-    @DataProvider("getResultDept")
-    public List<NumDTO> getResultDept(@InvokeParameter("filterVO") FilterVO filterVO) {
+    @DataProvider("entryByDept")
+    public List<NumDTO> entryByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
         List<NumDTO> numDTOList = behospitalInfoFacade.resultStatisticsByDept2(filterVO);
         if (ListUtil.isNotEmpty(numDTOList)) {
             int totle = numDTOList

+ 28 - 7
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -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>