|
@@ -666,13 +666,13 @@
|
|
|
|
|
|
<if test="order.startDate != null and order.endDate != null">
|
|
|
<if test="order.orderStatus == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create <= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 DAY)
|
|
|
+ and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create <= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d'),INTERVAL 1 DAY)
|
|
|
order by t1.date_create desc
|
|
|
</if>
|
|
|
<if test="order.orderStatus != 0">
|
|
|
- and t1.send_time >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.send_time <= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 DAY)
|
|
|
+ and t1.send_time >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.send_time <= DATE_ADD(date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d'),INTERVAL 1 DAY)
|
|
|
order by t1.send_time desc
|
|
|
</if>
|
|
|
</if>
|
|
@@ -877,14 +877,8 @@
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
t1.order_status != 0
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|
|
@@ -923,17 +917,11 @@
|
|
|
<select id="eventMonthStatistics" resultType="map">
|
|
|
select 数量,日期 from
|
|
|
(
|
|
|
- select count(1) 数量,date_format(date_create,'%Y-%c-%d') 日期
|
|
|
+ select count(1) 数量,date_format(date_create,'%Y-%m-%d') 日期
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|
|
@@ -965,7 +953,7 @@
|
|
|
</if>
|
|
|
</if>
|
|
|
</where>
|
|
|
- group by date_format(date_create,'%Y-%c-%d')
|
|
|
+ group by date_format(date_create,'%Y-%m-%d')
|
|
|
) a
|
|
|
order by 日期
|
|
|
</select>
|
|
@@ -977,14 +965,8 @@
|
|
|
select count(1) 数量,date_format(date_create,'%Y-%c') 日期
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|
|
@@ -1027,14 +1009,8 @@
|
|
|
count(*) statistics_value
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|
|
@@ -1077,14 +1053,8 @@
|
|
|
when t1.order_status=2 then '已完成' when t1.order_status=3 then '终止' end 工单状态,count(*) 数量
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|
|
@@ -1131,14 +1101,8 @@
|
|
|
from sc_work_order_manage t1
|
|
|
<where>
|
|
|
t1.order_type_id>=1
|
|
|
- <if test="order.statsType == 0">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 MONTH)
|
|
|
- </if>
|
|
|
- <if test="order.statsType == 1">
|
|
|
- and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d')
|
|
|
- and t1.date_create < DATE_ADD(date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 YEAR)
|
|
|
- </if>
|
|
|
+ and t1.date_create >= date_format(#{order.startDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
+ and t1.date_create < date_format(#{order.endDate,jdbcType=VARCHAR},'%Y-%m-%d')
|
|
|
<if test="order.tenantId != null and order.tenantId != ''">
|
|
|
and t1.tenant_id = #{order.tenantId}
|
|
|
</if>
|