|
@ -83,11 +83,11 @@ |
|
|
p.point_code, |
|
|
p.point_code, |
|
|
p.point_name, |
|
|
p.point_name, |
|
|
p.point_status, |
|
|
p.point_status, |
|
|
vd.qty, |
|
|
IF(LENGTH(vd.qty)>0,vd.qty,'-') AS qty, |
|
|
IF(LENGTH(p.vehicle_code)>0,p.vehicle_code,'-') AS vehicle_code, |
|
|
IF(LENGTH(p.vehicle_code)>0,p.vehicle_code,'-') AS vehicle_code, |
|
|
IF(LENGTH(LEFT(m.material_code, 11))>0,LEFT(m.material_code, 11),'-') AS material_code, |
|
|
IF(LENGTH(LEFT(m.material_code, 11))>0,LEFT(m.material_code, 11),'-') AS material_code, |
|
|
IF(LENGTH(CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')))>0,CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')),'-') AS mix_num, |
|
|
IF(LENGTH(CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')))>0,CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')),'-') AS mix_num, |
|
|
vd.create_time |
|
|
IF(LENGTH(vd.create_time)>0,vd.create_time,'-') AS create_time |
|
|
FROM |
|
|
FROM |
|
|
`sch_base_point` p |
|
|
`sch_base_point` p |
|
|
LEFT JOIN st_ivt_vehicle_detail vd ON vd.vehicle_code = p.vehicle_code |
|
|
LEFT JOIN st_ivt_vehicle_detail vd ON vd.vehicle_code = p.vehicle_code |
|
@ -106,11 +106,11 @@ |
|
|
IF(ta.task_type = '1','入库','出库') AS io_type, |
|
|
IF(ta.task_type = '1','入库','出库') AS io_type, |
|
|
SUBSTRING(m.material_code, 6, 6) AS bom, |
|
|
SUBSTRING(m.material_code, 6, 6) AS bom, |
|
|
LEFT(m.material_code, 11) AS material_code, |
|
|
LEFT(m.material_code, 11) AS material_code, |
|
|
IF(LENGTH(vd.weight)>0,vd.weight,'-') AS weight, |
|
|
IF(LENGTH(vd.qty)>0,vd.qty,'-') AS qty, |
|
|
ta.vehicle_code, |
|
|
ta.vehicle_code, |
|
|
IF(LENGTH(mix_num)>0,CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')),'-') AS mix_num, |
|
|
IF(LENGTH(mix_num)>0,CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')),'-') AS mix_num, |
|
|
IF(ta.task_type = '1',ta.point_code2,ta.point_code1) AS point_code, |
|
|
IF(ta.task_type = '1',ta.point_code2,ta.point_code1) AS point_code, |
|
|
ta.create_time |
|
|
IF(LENGTH(ta.create_time)>0,ta.create_time,'-') AS create_time |
|
|
FROM |
|
|
FROM |
|
|
`sch_base_task` ta |
|
|
`sch_base_task` ta |
|
|
LEFT JOIN md_me_materialbase m ON m.material_id = ta.material_id |
|
|
LEFT JOIN md_me_materialbase m ON m.material_id = ta.material_id |
|
|