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