| | |
| | | ,min('') sendmsg,min(a.shdw) shdw,min(a.status) status,min(a.vehicleId) vehicleId,min(a.bsNo) bussinessNo |
| | | ,min(a.status) sstatus,min('产品销售') name,min('') dcompany,min(a.shdw) rcompany |
| | | ,min('businesstype00002') businesstypeNo,min('') instanceID,min('') canedit,min(0) fdnum,min(0) fdweight |
| | | ,min(0) fdCnum,min(0) fdCweight, ('false') hasCard |
| | | from fd_bsheet a left join fd_company_vehicle v on a.vehicleId=v.vehicleId and a.sdepartNo=v.sdepartNo |
| | | <!-- <choose> |
| | | <when test=" companyNo !=null and companyNo !='' "> |
| | | left join fd_company_vehicle v on a.vehicleId=v.vehicleId and a.sdepartNo=v.sdepartNo |
| | | <if test="cqV !=null and cqV !='' " > |
| | | <choose> |
| | | <when test="cqV=='03' || cqV=='05' "> |
| | | and v.sdepartNo=#{cqV} |
| | | </when> |
| | | <otherwise> |
| | | and v.sdepartNo !='03' and v.sdepartNo !='05' |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | left join fd_company_vehicle v on a.vehicleId=v.vehicleId and a.sdepartNo=v.sdepartNo |
| | | <if test="cqV !=null and cqV !='' " > |
| | | <choose> |
| | | <when test="cqV=='03' || cqV=='05' "> |
| | | and v.sdepartNo=#{cqV} |
| | | </when> |
| | | <otherwise> |
| | | and v.sdepartNo !='03' and v.sdepartNo !='05' |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </otherwise> |
| | | </choose> --> |
| | | ,min(0) fdCnum,min(0) fdCweight, ('false') hasCard,max(vq.xspdindx) xspdindx |
| | | from fd_bsheet a left join fd_company_vehicle v on a.vehicleId=v.vehicleId and a.sdepartNo=v.sdepartNo |
| | | left join vehicle_queuing vq on vq.numberplates=a.vehicleId and (a.sdepartNo=vq.sdepartNo or vq.sdepartNO is null) |
| | | <where> |
| | | a.status='在办' |
| | | <if test="cqV !=null and cqV !='' "> |
| | | and a.sdepartNo=#{cqV} |
| | | </if> |
| | | <!-- <if test='cqV >= 0'> |
| | | <choose> |
| | | <when test="cqV==0"> |
| | | and a.sdepartNo!='03' |
| | | </when> |
| | | <otherwise> |
| | | and a.sdepartNo='03' |
| | | </otherwise> |
| | | </choose> |
| | | </if> --> |
| | | <if test="companyNo !=null and companyNo !='' "> |
| | | and v.companyNo=#{companyNo} and v.vehicleId !='' and v.vehicleId is not null |
| | | </if> |