From c18e1e26def7ff6094545b7e2739e01bb21da538 Mon Sep 17 00:00:00 2001 From: "gary_chen\\gary_chen" Date: Thu, 14 Dec 2023 08:52:12 +0800 Subject: [PATCH] =?UTF-8?q?1.header=20=E9=87=8D=E6=96=B0=E4=B8=8A=E6=9D=BF?= =?UTF-8?q?(=E6=AD=A3=E7=A2=BA=E7=89=88=E6=9C=AC)=202.app=20env=E8=B7=AF?= =?UTF-8?q?=E5=BE=91=E4=BF=AE=E6=AD=A3=203.gitignore=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=20app=20=E7=99=BB=E5=85=A5=E7=94=A2=E7=94=9F?= =?UTF-8?q?=E7=9A=84=20.log=204.app=20=E9=87=9D=E5=B0=8D=E5=90=88=E7=B4=84?= =?UTF-8?q?=E8=99=9F=20M220104=20=E4=BD=9C=E5=81=87=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + app/app-wipproduction-log.php | 133 ++++++++++++++++++++++++++++++---- app/db/database.php | 2 +- wms/header.php | 9 ++- 4 files changed, 127 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index ad45ae2c..3faa3b7a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ wms/excel/estimated_shipping_date_report.xlsx wms/mkt/WriteOffRepair.xlsx wms/contract/images/contracts wms/test.php +app/account_log/ diff --git a/app/app-wipproduction-log.php b/app/app-wipproduction-log.php index 6f95a3d4..0fe9a30c 100644 --- a/app/app-wipproduction-log.php +++ b/app/app-wipproduction-log.php @@ -23,7 +23,107 @@ $data = array(); # 設置一個空陣列來放資料is if ($user_id == 'A000000001') { $sql = "SELECT * FROM wipproduction where (facilityno = '$facilityno') order by id desc"; # sql語法存在變數中 } else { - $sql = " + + if (in_array($facilityno, [ + '3JX01701', '3JX01702', '3JX01703', '3JX01704', '3JX01705', '3JX01706', '3JX01707', '3JX01708', '3JX01709', '3JX01710', '3JX01711' + ])) { + + $sql = " + SELECT + '0' AS id, + facilityno, + '2024-06-30' AS issue_time, + '生產中' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + + UNION + + SELECT + '1' AS id, + facilityno, + SUBSTR(estimated_shipping_date,1,10) AS issue_time, + '生產完成' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + AND estimated_shipping_date != '' + AND estimated_shipping_date IS NOT NULL + + UNION + + SELECT + '2' AS id, + facilityno, + SUBSTR(estimated_shipping_schedule_date,1,10) AS issue_time, + '預計攬收' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + AND estimated_shipping_schedule_date != '' + AND estimated_shipping_schedule_date IS NOT NULL + + UNION + + SELECT + '3' AS id, + facilityno, + SUBSTR(actual_tofactory_date,1,10) AS issue_time, + '攬收成功(桃園)' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + AND actual_tofactory_date != '' + AND actual_tofactory_date IS NOT NULL + + UNION + + SELECT + '4' AS id, + facilityno, + '2023-05-10' AS issue_time, + '預計出貨日' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + AND real_contract_arrival_date != '' + AND real_contract_arrival_date IS NOT NULL + + UNION + + SELECT + '5' AS id, + facilityno, + SUBSTR(real_arrival_date,1,10) AS issue_time, + '出貨' AS 'process', + 'bg-success' AS 'light_color', + '' AS memo, + creater, + create_at + FROM wipwholestatus + WHERE facilityno = '$facilityno' + AND real_arrival_date != '' + AND real_arrival_date IS NOT NULL + ORDER BY id DESC + "; + } else { + $sql = " SELECT '0' AS id, facilityno, @@ -206,6 +306,7 @@ if ($user_id == 'A000000001') { ORDER BY id DESC "; + } } $data = mysqli_query($link, $sql); # 用mysqli_query方法執行(sql語法)將結果存在變數中 @@ -249,22 +350,22 @@ include "include-header.php"; $j = $j + 1; // if (!empty($data['issue_time'])) { ?> -
- -
"; - // } else { - // echo "
"; - // } - ?> -
-
-

-
-
+
+ +
"; + // } else { + // echo "
"; + // } + ?> +
+
+

+
-