Browse Source

fix: 修复大屏数据不正确

master
李永德 1 year ago
parent
commit
b1bb89ec8a
  1. 8
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MOLDING_INFO.wql
  2. 7
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql

8
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

7
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

Loading…
Cancel
Save