|
|
@ -58,17 +58,18 @@ |
|
|
|
t1.saleDate, |
|
|
|
t1.handoverState, |
|
|
|
t1.handoverDate, |
|
|
|
(@rank := @rank + 1) rankNo from (SELECT @rank := 0) t,(select bv.useOrgName, |
|
|
|
bvoa.orgName deptName, |
|
|
|
bvoa.staffName, |
|
|
|
bvoa.customerName, |
|
|
|
bvoa.contractNo, |
|
|
|
bv.modelName, |
|
|
|
bv.vinNo, |
|
|
|
bvoa.saleTypeValue saleType, |
|
|
|
bvoa.saleDate, |
|
|
|
if(length(bh.closingDate) > 0, '已交付', '未交付') as handoverState, |
|
|
|
DATE_FORMAT(bh.closingDate, '%Y-%m-%d') as handoverDate |
|
|
|
(@rank := @rank + 1) rankNo from (SELECT @rank := 0) t,(select distinct bv.vinNo, |
|
|
|
bv.useOrgName, |
|
|
|
bvoa.orgName deptName, |
|
|
|
bvoa.staffName, |
|
|
|
bvoa.customerName, |
|
|
|
bvoa.contractNo, |
|
|
|
bv.modelName, |
|
|
|
|
|
|
|
bvoa.saleTypeValue saleType, |
|
|
|
bvoa.saleDate, |
|
|
|
if(length(bh.closingDate) > 0, '已交付', '未交付') as handoverState, |
|
|
|
DATE_FORMAT(bh.closingDate, '%Y-%m-%d') as handoverDate |
|
|
|
from anrui_base.base_vehicle_out bvo |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
left join anrui_base.base_vehicle bv on bvo.vinSid = bv.sid |
|
|
|