| | |
| | | </if> |
| | | and id in |
| | | ( |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | select driverId from t_driver_work |
| | | where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | and carId in (select carId from t_car_service where `type` = #{type} |
| | |
| | | ( |
| | | (select count(id) from t_order_private_car where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) + |
| | | (select count(id) from t_order_taxi where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) + |
| | | (select count(id) from t_order_cross_city where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) |
| | | ) = 0, 2, 3)) as state, |
| | | (select count(id) from t_order_cross_city where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) + |
| | | (select count(id) from t_order_transfer where state not in (6, 7, 8, 9, 10, 12) and driverId = a.id) |
| | | ) = 0, 2, 3)) as state, |
| | | ( |
| | | (select count(id) from t_order_private_car where state in (7, 8, 9) and driverId = a.id) + |
| | | (select count(id) from t_order_taxi where state in (7, 8, 9) and driverId = a.id) + |
| | | (select count(id) from t_order_cross_city where state in (6, 8, 9) and driverId = a.id) |
| | | ) as orderNum, |
| | | (select count(id) from t_order_cross_city where state in (6, 8, 9) and driverId = a.id) + |
| | | (select count(id) from t_order_transfer where state in (7, 8, 9) and driverId = a.id) |
| | | ) as orderNum, |
| | | ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(id) from t_order_evaluate where driverId = a.id)) as fraction |
| | | from t_driver a |
| | | left join t_car b on (a.carId = b.id) |