| | |
| | | shellList.add("未支付订单数"); |
| | | shellList.add("取消订单数"); |
| | | shellList.add("订单总金额"); |
| | | shellList.add("未支付订金额"); |
| | | shellList.add("未支付订单金额"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String, Object> map : list) { |
| | |
| | | IFNULL(topc1.num, 0) as privateCarTotalNum, |
| | | IFNULL(topc2.num, 0) as privateCarNotPayNum, |
| | | IFNULL(topc3.num, 0) as privateCarcancelNum, |
| | | IFNULL(topc4.taxiMoney, 0) + IFNULL(topc11.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc5.taxiMoney, 0) as privateCarNotPayMoney, |
| | | IFNULL(topc4.taxiMoney, 0) + IFNULL(topc11.taxiMoney, 0) + IFNULL(topc13.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc5.taxiMoney, 0) + IFNULL(topc13.taxiMoney, 0) as privateCarNotPayMoney, |
| | | </if> |
| | | <if test="4 == type"> |
| | | IFNULL(topc6.num, 0) as privateCarTotalNum, |
| | | IFNULL(topc7.num, 0) as privateCarNotPayNum, |
| | | IFNULL(topc8.num, 0) as privateCarcancelNum, |
| | | IFNULL(topc9.taxiMoney, 0) + IFNULL(topc12.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc10.taxiMoney, 0) as privateCarNotPayMoney, |
| | | IFNULL(topc9.taxiMoney, 0) + IFNULL(topc12.taxiMoney, 0) + IFNULL(topc14.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc10.taxiMoney, 0) + IFNULL(topc14.taxiMoney, 0) as privateCarNotPayMoney, |
| | | </if> |
| | | <if test="null == type"> |
| | | IFNULL(topc1.num, 0) + IFNULL(topc6.num, 0) as privateCarTotalNum, |
| | | IFNULL(topc2.num, 0) + IFNULL(topc7.num, 0) as privateCarNotPayNum, |
| | | IFNULL(topc3.num, 0) + IFNULL(topc8.num, 0) as privateCarcancelNum, |
| | | IFNULL(topc4.taxiMoney, 0) + IFNULL(topc9.taxiMoney, 0) + IFNULL(topc11.taxiMoney, 0) + IFNULL(topc12.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc5.taxiMoney, 0) + IFNULL(topc10.taxiMoney, 0) as privateCarNotPayMoney, |
| | | IFNULL(topc4.taxiMoney, 0) + IFNULL(topc9.taxiMoney, 0) + IFNULL(topc11.taxiMoney, 0) + IFNULL(topc12.taxiMoney, 0) + IFNULL(topc13.taxiMoney, 0) + IFNULL(topc14.taxiMoney, 0) as privateCarTotalMoney, |
| | | IFNULL(topc5.taxiMoney, 0) + IFNULL(topc10.taxiMoney, 0) + IFNULL(topc13.taxiMoney, 0) + IFNULL(topc14.taxiMoney, 0) as privateCarNotPayMoney, |
| | | </if> |
| | | td.state as driverState, |
| | | td.phone as driverPhone |
| | |
| | | </if> |
| | | GROUP BY driverId |
| | | ) AS topc4 ON topc4.driverId = td.id |
| | | LEFT JOIN ( SELECT SUM(orderMoney) AS taxiMoney, driverId FROM t_order_private_car WHERE FIND_IN_SET(state, '7,12') |
| | | LEFT JOIN ( SELECT SUM(orderMoney) AS taxiMoney, driverId FROM t_order_private_car WHERE FIND_IN_SET(state, '7') |
| | | <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 driverId |
| | | ) AS topc5 ON topc5.driverId = td.id |
| | | LEFT JOIN ( SELECT SUM(money) AS taxiMoney, objectId as driverId FROM t_income WHERE type = 3 and userType = 2 and orderType = 1 |
| | | LEFT JOIN ( |
| | | SELECT SUM(a.money) AS taxiMoney, b.driverId FROM t_order_cancel a |
| | | left join t_order_private_car b on (a.orderId = b.id and a.orderType = 1) |
| | | where FIND_IN_SET(b.state, '10') |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(insertTime, '%Y-%m-%d') between #{start} and #{end} |
| | | and DATE_FORMAT(b.travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | GROUP BY objectId |
| | | group by b.driverId |
| | | ) AS topc11 ON topc11.driverId = td.id |
| | | LEFT JOIN ( |
| | | SELECT SUM(a.money) AS taxiMoney, b.driverId FROM t_order_cancel a |
| | | left join t_order_private_car b on (a.orderId = b.id and a.orderType = 1) |
| | | where FIND_IN_SET(b.state, '12') |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(b.travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by b.driverId |
| | | ) AS topc13 ON topc13.driverId = td.id |
| | | </if> |
| | | <if test="null == type or 4 == type"> |
| | | LEFT JOIN ( SELECT COUNT(id) AS num, driverId FROM t_order_logistics WHERE FIND_IN_SET(state, '7,8,9,10,12') |
| | |
| | | </if> |
| | | GROUP BY driverId |
| | | ) AS topc9 ON topc9.driverId = td.id |
| | | LEFT JOIN ( SELECT SUM(orderMoney) AS taxiMoney, driverId FROM t_order_logistics WHERE FIND_IN_SET(state, '7,12') |
| | | LEFT JOIN ( SELECT SUM(orderMoney) AS taxiMoney, driverId FROM t_order_logistics WHERE FIND_IN_SET(state, '7') |
| | | <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 driverId |
| | | ) AS topc10 ON topc10.driverId = td.id |
| | | LEFT JOIN ( SELECT SUM(money) AS taxiMoney, objectId as driverId FROM t_income WHERE type = 3 and userType = 2 and orderType = 4 |
| | | LEFT JOIN ( |
| | | SELECT SUM(a.money) AS taxiMoney, b.driverId FROM t_order_cancel a |
| | | left join t_order_logistics b on (a.orderId = b.id and a.orderType = 4) |
| | | where FIND_IN_SET(b.state, '10') |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(insertTime, '%Y-%m-%d') between #{start} and #{end} |
| | | and DATE_FORMAT(b.travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | GROUP BY objectId |
| | | group by b.driverId |
| | | ) AS topc12 ON topc12.driverId = td.id |
| | | LEFT JOIN ( |
| | | SELECT SUM(a.money) AS taxiMoney, b.driverId FROM t_order_cancel a |
| | | left join t_order_logistics b on (a.orderId = b.id and a.orderType = 4) |
| | | where FIND_IN_SET(b.state, '12') |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(b.travelTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by b.driverId |
| | | ) AS topc14 ON topc14.driverId = td.id |
| | | </if> |
| | | <where> |
| | | <if test="null!= companyId and '' != companyId"> |
| | |
| | | {title: '未支付订单数', field: 'privateCarNotPayNum', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'}, |
| | | {title: '取消订单数', field: 'privateCarcancelNum', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'}, |
| | | {title: '订单总金额', field: 'privateCarTotalMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'}, |
| | | {title: '未支付订金额', field: 'privateCarNotPayMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'}, |
| | | {title: '未支付订单金额', field: 'privateCarNotPayMoney', visible: true,sortable : true, align: 'center', valign: 'middle',width:'100px'}, |
| | | {title: '运营状态', field: 'driverState', visible: true, align: 'center', valign: 'middle',width:'100px',formatter: function (value,row) { |
| | | if(row.driverState=='3'){ |
| | | return '<span class="label label-primary">服务中</span>'; |