| | |
| | | sum(aa.cancelNum) as cancelNum, |
| | | sum(aa.onlinePay) as onlinePay, |
| | | sum(aa.offlinePay) as offlinePay, |
| | | sum(aa.money) as money, |
| | | ROUND(sum(aa.money), 2) as money, |
| | | sum(aa.complaint) as complaint |
| | | from ( |
| | | select DATE_FORMAT(insertTime, '%Y-%m-%d') as time, count(id) as register, 0 as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint |
| | |
| | | </if> |
| | | group by DATE_FORMAT(a.startTime, '%Y-%m-%d') |
| | | union all |
| | | <if test="1 == type"> |
| | | <if test="null == type or 1 == type"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_private_car where isDelete = 1 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="2 == type"> |
| | | <if test="null == type or 2 == type"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_taxi where isDelete = 1 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="3 == type"> |
| | | <if test="null == type or 3 == type"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_cross_city where isDelete = 1 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="4 == type"> |
| | | <if test="null == type or 4 == type"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_logistics where isDelete = 1 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 1"> |
| | | <if test="null == type or type == 1"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, count(id), 0, 0, 0, 0 from t_order_private_car where isDelete = 1 and state in (10, 12) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 2"> |
| | | <if test="null == type or type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, count(id), 0, 0, 0, 0 from t_order_taxi where isDelete = 1 and state in (10, 12) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 3"> |
| | | <if test="null == type or type == 3"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, count(id), 0, 0, 0, 0 from t_order_cross_city where isDelete = 1 and state in (10, 12) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 4"> |
| | | <if test="null == type or type == 4"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, count(id), 0, 0, 0, 0 from t_order_logistics where isDelete = 1 and state in (10, 12) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 1"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_private_car where isDelete = 1 and payManner = 1 |
| | | <if test="null == type or type == 1"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_private_car where isDelete = 1 and payType in (1, 2, 3) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | |
| | | select DATE_FORMAT(insertTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(money), 0 from t_order_cancel where orderType = 1 |
| | | <if test="null != companyId"> |
| | | and orderId in (select id from t_order_private_car where isDelete = 1 and companyId = #{companyId} and state = 10) |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(insertTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(insertTime, '%Y-%m-%d') |
| | | union all |
| | | |
| | | </if> |
| | | <if test="null == type or type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_taxi where isDelete = 1 and payType in (1, 2, 3) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_taxi where isDelete = 1 and payManner = 1 |
| | | <if test="null == type or type == 3"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_cross_city where isDelete = 1 and payType in (1, 2, 3) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 3"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_cross_city where isDelete = 1 and payManner = 1 |
| | | <if test="null == type or type == 4"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_logistics where isDelete = 1 and payType in (1, 2, 3) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | select DATE_FORMAT(insertTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(money), 0 from t_order_cancel where orderType = 4 |
| | | <if test="null != companyId"> |
| | | and orderId in (select id from t_order_logistics where isDelete = 1 and companyId = #{companyId} and state = 10) |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(insertTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(insertTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="null == type or type == 1"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), sum(payMoney), 0 from t_order_private_car where isDelete = 1 and payType in (4) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 4"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, count(id), 0, sum(payMoney), 0 from t_order_logistics where isDelete = 1 and payManner = 1 |
| | | <if test="null == type or type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), sum(payMoney), 0 from t_order_taxi where isDelete = 1 and payType in (4) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 1"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), 0, 0 from t_order_private_car where isDelete = 1 and payManner = 2 |
| | | <if test="null == type or type == 3"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), sum(payMoney), 0 from t_order_cross_city where isDelete = 1 and payType in (4) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 2"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), 0, 0 from t_order_taxi where isDelete = 1 and payManner = 2 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 3"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), 0, 0 from t_order_cross_city where isDelete = 1 and payManner = 2 |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(travelTime, '%Y-%m-%d') |
| | | union all |
| | | </if> |
| | | <if test="type == 4"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), 0, 0 from t_order_logistics where isDelete = 1 and payManner = 2 |
| | | <if test="null == type or type == 4"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, 0, 0, 0, count(id), sum(payMoney), 0 from t_order_logistics where isDelete = 1 and payType in (4) |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | </if> |