| | |
| | | <select id="getCanSelectPrivateCarDriverList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT dd.*,c1.name as companyName,c2.name as franchiseeName from t_driver AS dd |
| | | LEFT JOIN t_company as c1 on c1.id = dd.companyId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.companyId |
| | | <where> |
| | | dd.id != #{driverId} and dd.authState = 2 and dd.state = 2 |
| | | and dd.id in |
| | |
| | | <select id="getCanSelectSmallDriverList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT dd.*,c1.name as companyName,c2.name as franchiseeName from t_driver AS dd |
| | | LEFT JOIN t_company as c1 on c1.id = dd.companyId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.franchiseeId |
| | | LEFT JOIN t_company as c2 on c2.id = dd.companyId |
| | | <where> |
| | | dd.id != #{driverId} and dd.authState = 2 and dd.state = 2 |
| | | and dd.id in |
| | |
| | | left join t_driver_line f on (a.id = f.driverId) |
| | | left join t_line_shift g on (f.lineId = g.lineId) |
| | | left join t_company as h on (h.id = a.companyId) |
| | | left join t_company as i on (i.id = a.franchiseeId) |
| | | where a.authState = 2 and a.state != 1 and a.flag != 3 and if(a.franchiseeId is null or a.franchiseeId = 0, a.companyId = #{companyId}, a.franchiseeId = #{companyId}) |
| | | left join t_company as i on (i.id = a.companyId) |
| | | where a.authState = 2 and a.state != 1 and a.flag != 3 and a.companyId = #{companyId} |
| | | and a.id in (select driverId from t_driver_work where state = 1 and type like '%3%') |
| | | and b.type = 3 and c.type = 3 and e.type = 3 and e.serverCarModelId = #{serverCarModelId} and f.lineId = #{lineId} and g.id = #{lineShiftId} |
| | | and a.id in (select driverId from t_line_shift_driver where lineShiftId = #{lineShiftId} and DATE_FORMAT(`day`, '%Y-%m-%d') = DATE_FORMAT(#{time}, '%Y-%m-%d') and laveSeat >= #{num}) |