| | |
| | | and b.type = 1 and c.type = 1 and e.type = 1 and e.serverCarModelId = #{serverCarModelId} |
| | | </select> |
| | | |
| | | <select id="queryReassignOrderTransferCar" resultType="map"> |
| | | select |
| | | a.id as id, |
| | | CONCAT(a.`name`, '-', d.carLicensePlate) as `name` |
| | | from t_driver a |
| | | left join t_driver_service b on (a.id = b.driverId) |
| | | left join t_driver_orders c on (a.id = c.driverId) |
| | | left join t_car d on (a.carId = d.id) |
| | | left join t_car_service e on (d.id = e.carId) |
| | | where a.authState = 2 and a.state = 2 and a.flag != 3 and if(a.franchiseeId is null or a.franchiseeId = 0, a.companyId = #{companyId}, a.franchiseeId = #{companyId}) |
| | | and a.id in (select driverId from t_driver_work where state = 1 and type like '%1%') |
| | | and b.type = 7 and c.type = 7 and e.type = 7 and e.serverCarModelId = #{serverCarModelId} |
| | | </select> |
| | | |
| | | <select id="queryReassignDriverCrossCity" resultType="map"> |
| | | select |