From ae53e7e1bd4eaa301c2ec877e796308c76ecb2f4 Mon Sep 17 00:00:00 2001 From: liuxy Date: Tue, 6 Aug 2024 16:24:02 +0800 Subject: [PATCH] =?UTF-8?q?rev=EF=BC=9A=E4=B8=80=E6=9C=9F=E6=88=90?= =?UTF-8?q?=E5=93=81=E5=BA=93=E5=AD=98=E5=AF=BC=E5=87=BAexcel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/basedata/st/wql/QST_STRUCTIVT001.wql | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql index 170793a81..8baf701e4 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/QST_STRUCTIVT001.wql @@ -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,