From b1bb89ec8a4aa2273e8ff502eb6ec6d089e1e6c6 Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Mon, 26 Jun 2023 15:47:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql | 8 ++++---- .../org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql index 2695c27..582ac10 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql @@ -83,11 +83,11 @@ p.point_code, p.point_name, 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(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, - vd.create_time + IF(LENGTH(vd.create_time)>0,vd.create_time,'-') AS create_time FROM `sch_base_point` p 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, SUBSTRING(m.material_code, 6, 6) AS bom, 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, 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, - ta.create_time + IF(LENGTH(ta.create_time)>0,ta.create_time,'-') AS create_time FROM `sch_base_task` ta LEFT JOIN md_me_materialbase m ON m.material_id = ta.material_id diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql index 75bd4c6..31c4f59 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql @@ -99,7 +99,7 @@ pdm_bd_workorder w LEFT JOIN pdm_bi_device d ON w.device_id = d.device_id LEFT JOIN md_me_materialbase m ON w.material_id = m.material_id - WHERE d.region_code = 'FJ' + WHERE d.region_code = 'FJ' AND DATE(w.plan_date) = CURDATE() GROUP BY w.material_id ENDSELECT ENDPAGEQUERY @@ -117,7 +117,10 @@ pdm_bd_workorder w LEFT JOIN pdm_bi_device d ON w.device_id = d.device_id LEFT JOIN md_me_materialbase m ON w.material_id = m.material_id - WHERE d.region_code = 'FJ' + WHERE WEEKDAY(w.plan_date) >= 0 + AND WEEKDAY(w.plan_date) <= 6 + AND YEARWEEK(w.plan_date) = YEARWEEK(CURDATE()) + AND d.region_code = 'FJ' GROUP BY w.material_id ENDSELECT ENDPAGEQUERY