Browse Source

bug修改

zhaops 5 years ago
parent
commit
6f34a7d5a9
1 changed files with 25 additions and 0 deletions
  1. 25 0
      zzcx-service/src/main/resources/mapper/OptInfoMapper.xml

+ 25 - 0
zzcx-service/src/main/resources/mapper/OptInfoMapper.xml

@@ -366,6 +366,12 @@
                     zzcx_opt_info
                     WHERE
                     opt_type = 1
+                    <if test="startDate!=null">
+                        AND gmt_create &gt;= #{startDate}
+                    </if>
+                    <if test="endDate!=null">
+                        AND gmt_create &lt;= #{endDate}
+                    </if>
             --         AND hospital_code !='朗通通用'
                     ) t1 where t1.hospitalCode = a.hospitalCode
                     GROUP BY
@@ -385,6 +391,12 @@
                     zzcx_opt_info
                     WHERE
                     opt_type = 2
+                    <if test="startDate!=null">
+                        AND gmt_create &gt;= #{startDate}
+                    </if>
+                    <if test="endDate!=null">
+                        AND gmt_create &lt;= #{endDate}
+                    </if>
                     ) t2 where t2.hospitalCode = a.hospitalCode
                     GROUP BY
                     hospitalCode
@@ -435,8 +447,15 @@
             zzcx_opt_info
             WHERE
             opt_type = 1
+            <if test="startDate!=null">
+                AND gmt_create &gt;= #{startDate}
+            </if>
+            <if test="endDate!=null">
+                AND gmt_create &lt;= #{endDate}
+            </if>
             --         AND hospital_code !='朗通通用'
             ) t1 where t1.hospitalCode = a.hospitalCode
+
             GROUP BY
             hospitalCode
             )  AS uvSum,
@@ -454,6 +473,12 @@
             zzcx_opt_info
             WHERE
             opt_type = 2
+            <if test="startDate!=null">
+                AND gmt_create &gt;= #{startDate}
+            </if>
+            <if test="endDate!=null">
+                AND gmt_create &lt;= #{endDate}
+            </if>
             ) t2 where t2.hospitalCode = a.hospitalCode
             GROUP BY
             hospitalCode