| | |
| | | c.carColor as carColor, |
| | | CONCAT(f.`name`, d.`name`) as brand, |
| | | ((select sum(fraction) from t_order_evaluate where driverId = a.driverId) / (select count(id) from t_order_evaluate where driverId = a.driverId)) as score, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_taxi where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 9)) |
| | | ) as orderNum, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (6, 7, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 7, 8, 9)) |
| | | ) as orderNum, |
| | | b.phone as driverPhone, |
| | | if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = a.type and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = a.type and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney, |
| | | if(a.state = 10, (select id from t_order_cancel where orderId = a.id and orderType = a.type and state = 1 order by insertTime desc limit 0, 1), 0) as cancelId, |