|
|
@ -235,7 +235,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', CURDATE(), '%') |
|
|
|
and bvoa.saleTypeKey = '001' |
|
|
|
and bvoa.saleTypeKey = '001' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
@ -251,7 +251,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', CURDATE(), '%') |
|
|
|
and bvoa.saleTypeKey = '002' |
|
|
|
and bvoa.saleTypeKey = '002' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
@ -284,7 +284,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', DATE_FORMAT(CURDATE(), '%Y-%m'), '%') |
|
|
|
and bvoa.saleTypeKey = '001' |
|
|
|
and bvoa.saleTypeKey = '001' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
@ -300,7 +300,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', DATE_FORMAT(CURDATE(), '%Y-%m'), '%') |
|
|
|
and bvoa.saleTypeKey = '002' |
|
|
|
and bvoa.saleTypeKey = '002' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
@ -333,7 +333,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', DATE_FORMAT(CURDATE(), '%Y'), '%') |
|
|
|
and bvoa.saleTypeKey = '001' |
|
|
|
and bvoa.saleTypeKey = '001' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
@ -349,7 +349,7 @@ UPDATE daily_report r |
|
|
|
left join anrui_base.base_vehicle_out bvo on bv.sid = bvo.vinSid |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
where bv.salesDate like concat('%', DATE_FORMAT(CURDATE(), '%Y'), '%') |
|
|
|
and bvoa.saleTypeKey = '002' |
|
|
|
and bvoa.saleTypeKey = '002' and (bvo.materialTypeKey = '001' or bvo.materialTypeValue is null or length(bvo.materialTypeValue) = 0) |
|
|
|
group by bv.useOrgSid, bv.modelSid, bv.modelConfigSid) ss |
|
|
|
group by ss.useOrgSid, ss.modelSid, ss.modelConfigSid |
|
|
|
) AS s ON r.useOrgSid = s.useOrgSid |
|
|
|