浏览代码

bug修改

zhaops 5 年之前
父节点
当前提交
6f34a7d5a9
共有 1 个文件被更改,包括 25 次插入0 次删除
  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
                     zzcx_opt_info
                     WHERE
                     WHERE
                     opt_type = 1
                     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 !='朗通通用'
             --         AND hospital_code !='朗通通用'
                     ) t1 where t1.hospitalCode = a.hospitalCode
                     ) t1 where t1.hospitalCode = a.hospitalCode
                     GROUP BY
                     GROUP BY
@@ -385,6 +391,12 @@
                     zzcx_opt_info
                     zzcx_opt_info
                     WHERE
                     WHERE
                     opt_type = 2
                     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
                     ) t2 where t2.hospitalCode = a.hospitalCode
                     GROUP BY
                     GROUP BY
                     hospitalCode
                     hospitalCode
@@ -435,8 +447,15 @@
             zzcx_opt_info
             zzcx_opt_info
             WHERE
             WHERE
             opt_type = 1
             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 !='朗通通用'
             --         AND hospital_code !='朗通通用'
             ) t1 where t1.hospitalCode = a.hospitalCode
             ) t1 where t1.hospitalCode = a.hospitalCode
+
             GROUP BY
             GROUP BY
             hospitalCode
             hospitalCode
             )  AS uvSum,
             )  AS uvSum,
@@ -454,6 +473,12 @@
             zzcx_opt_info
             zzcx_opt_info
             WHERE
             WHERE
             opt_type = 2
             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
             ) t2 where t2.hospitalCode = a.hospitalCode
             GROUP BY
             GROUP BY
             hospitalCode
             hospitalCode