Commit b3f843c0 by jianan

导出运营报表2-经纪人日程管理,销售目标,活动量

parent e3dacb2f
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
AND year(t.created_at) = year(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')) AND year(t.created_at) = year(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'))
</if> </if>
<if test="type == 3"> <if test="type == 3">
AND DATE_FORMAT(t.created_at, '%Y-%m') = DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND t.seq_time = right(#{date,jdbcType=VARCHAR}, 2)+0
</if> </if>
</when> </when>
<when test="type != null and date == null"> <when test="type != null and date == null">
...@@ -162,8 +162,9 @@ ...@@ -162,8 +162,9 @@
</when> </when>
<otherwise> <otherwise>
<if test="date != null"> <if test="date != null">
AND date_format(t.created_at, '%Y-%m') &gt;= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND t.statistic_time_unit = 3
AND date_format(t.created_at, '%Y-%m') &lt;= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND year(t.created_at) = left(#{date,jdbcType=VARCHAR}, 4)+0
AND t.seq_time = right(#{date,jdbcType=VARCHAR}, 2)+0
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
AND year(t.created_at) = year(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m')) AND year(t.created_at) = year(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'))
</if> </if>
<if test="type == 3"> <if test="type == 3">
AND DATE_FORMAT(t.created_at, '%Y-%m') = DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND t.seq_time = right(#{date,jdbcType=VARCHAR}, 2)+0
</if> </if>
</when> </when>
<when test="type != null and date == null"> <when test="type != null and date == null">
...@@ -200,8 +201,9 @@ ...@@ -200,8 +201,9 @@
</when> </when>
<otherwise> <otherwise>
<if test="date != null"> <if test="date != null">
AND date_format(t.created_at, '%Y-%m') &gt;= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND t.statistic_time_unit = 3
AND date_format(t.created_at, '%Y-%m') &lt;= DATE_FORMAT(str_to_date(#{date,jdbcType=VARCHAR}, '%Y-%m'), '%Y-%m') AND year(t.created_at) = left(#{date,jdbcType=VARCHAR}, 4)+0
AND t.seq_time = right(#{date,jdbcType=VARCHAR}, 2)+0
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment