| | |
| | | a.networkCarlssueImg as networkCarlssueImg, |
| | | a.placeOfEmployment as placeOfEmployment, |
| | | (select id from t_city where chineseName = a.placeOfPractice or englishName = a.placeOfPractice or frenchName = a.placeOfPractice)placeOfPracticeId, |
| | | (select `name` from t_company where 1 = 1 and if(a.companyId is null or a.companyId = 0, id = 1, if(a.franchiseeId is null or a.franchiseeId = 0, id = a.companyId, id = a.franchiseeId))) as company, |
| | | (select `name` from t_company where 1 = 1 and if(a.companyId is null or a.companyId = 0, id = 1, id = a.companyId)) as company, |
| | | b.carLicensePlate as licensePlate, |
| | | b.carColor as carColor, |
| | | b.vehicleId, |
| | |
| | | from t_driver where flag != 3 and authState = 2 |
| | | <choose> |
| | | <when test="companyId == 1"> |
| | | and (companyId = 1 or companyId is null or companyId = 0) and (franchiseeId = 0 or franchiseeId is null) |
| | | and (companyId = 1 or companyId is null or companyId = 0) |
| | | </when> |
| | | <otherwise> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and companyId = #{companyId} |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | |
| | | <if test="null != companyId"> |
| | | <choose> |
| | | <when test="companyId != 1"> |
| | | and companyId = #{companyId} or franchiseeId = #{companyId} |
| | | and companyId = #{companyId} |
| | | </when> |
| | | <otherwise> |
| | | and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0 |
| | | and companyId is null or companyId = 0 or companyId = 1 |
| | | </otherwise> |
| | | </choose> |
| | | |