rev:一期成品库存导出excel
This commit is contained in:
@@ -253,11 +253,20 @@
|
|||||||
sub.thickness_request,
|
sub.thickness_request,
|
||||||
sub.box_weight,
|
sub.box_weight,
|
||||||
cust.sales_owner,
|
cust.sales_owner,
|
||||||
CASE
|
CASE
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '60'
|
WHEN SUBSTRING( sub.container_name, 1, 1 ) = 'B' THEN
|
||||||
AND DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '2'
|
CASE
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '150' AND DATEDIFF( NOW(), sub.date_of_production ) <= '180' THEN '2'
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '180' THEN '1'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '180' THEN '3'
|
||||||
|
END
|
||||||
|
|
||||||
|
WHEN SUBSTRING( sub.container_name, 1, 1 ) <> 'B' THEN
|
||||||
|
CASE
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '60' AND DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '2'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
||||||
|
END
|
||||||
END AS sub_type,
|
END AS sub_type,
|
||||||
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age,
|
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age,
|
||||||
sub.joint_type,
|
sub.joint_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user