select p.region_code as WhaCode,p.point_code as WhlCode,p.vehicle_code as ParentPalletSN,p.vehicle_code2 as PalletSN,v.material_id as ProductName,v.material_weight as Qty,DATE_FORMAT(v.update_time, '%Y-%m-%d') as WorkDate,v.remark as CustomerName
from sch_base_point p
LEFT JOIN sch_base_vehiclematerialgroup v
on p.vehicle_code2=v.vehicle_code
where p.region_code in('YL','YLHC','HW','HWK');
SELECT
p.region_code AS WhaCode,
p.point_code AS WhlCode,
p.vehicle_code AS ParentPalletSN,
p.vehicle_code2 AS PalletSN,
p.material_weight AS Qty,
DATE_FORMAT( p.update_time, '%Y-%m-%d' ) AS WorkDate