Browse Source

fix: 大屏修复

master
李永德 1 year ago
parent
commit
ae497594fc
  1. 13
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java
  2. 6
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MIX_AND_TRAP.wql
  3. 2
      lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql

13
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/service/impl/BigScreenServiceImpl.java

@ -182,7 +182,7 @@ public class BigScreenServiceImpl implements BigScreenService {
map.put("LastMonthFailureList", result); map.put("LastMonthFailureList", result);
}).exceptionally((e) -> { }).exceptionally((e) -> {
log.error("近一个月故障次数前5台设备: {}", e.getMessage(), e); log.error("近一个月故障次数前5台设备: {}", e.getMessage(), e);
map.put("LastMonthFailureList", null); map.put("LastMonthFailureList", e.getMessage());
return null; return null;
}); });
// TODO: 6、最近10次设备故障 // TODO: 6、最近10次设备故障
@ -197,7 +197,7 @@ public class BigScreenServiceImpl implements BigScreenService {
map.put("LastTenFailureList", result); map.put("LastTenFailureList", result);
}).exceptionally((e) -> { }).exceptionally((e) -> {
log.error("最近10次设备故障: {}", e.getMessage(), e); log.error("最近10次设备故障: {}", e.getMessage(), e);
map.put("LastTenFailureList", null); map.put("LastTenFailureList", e.getMessage());
return null; return null;
}); });
// 7、压制码垛位情况显示 // 7、压制码垛位情况显示
@ -208,8 +208,7 @@ public class BigScreenServiceImpl implements BigScreenService {
.getResultJSONArray(0); .getResultJSONArray(0);
JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res); JSONObject devicesStatus = PointUpdateUtil.getDevicesStatus(res);
// JSONObject devicesStatus = null; // JSONObject devicesStatus = null;
JSONArray data = ObjectUtil.isNotEmpty( JSONArray data = ObjectUtil.isNotEmpty(devicesStatus) ? devicesStatus.getJSONArray("data") : res;
devicesStatus.getJSONArray("data")) ? devicesStatus.getJSONArray("data") : res;
for (int i = 0; i < data.size(); i++) { for (int i = 0; i < data.size(); i++) {
JSONObject jsonObject = data.getJSONObject(i); JSONObject jsonObject = data.getJSONObject(i);
if (jsonObject.getInteger("move") == 1 if (jsonObject.getInteger("move") == 1
@ -235,7 +234,7 @@ public class BigScreenServiceImpl implements BigScreenService {
map.put("StackingPositionList", result); map.put("StackingPositionList", result);
}).exceptionally((e) -> { }).exceptionally((e) -> {
log.error("码垛位情况显示: {}", e.getMessage(), e); log.error("码垛位情况显示: {}", e.getMessage(), e);
map.put("StackingPositionList", null); map.put("StackingPositionList", e);
return null; return null;
}); });
// 8、压机信息显示 // 8、压机信息显示
@ -253,7 +252,7 @@ public class BigScreenServiceImpl implements BigScreenService {
map.put("PressMachineList", result); map.put("PressMachineList", result);
}).exceptionally((e) -> { }).exceptionally((e) -> {
log.error("压机信息显示: {}", e.getMessage(), e); log.error("压机信息显示: {}", e.getMessage(), e);
map.put("PressMachineList", null); map.put("PressMachineList", e.getMessage());
return null; return null;
}); });
// 9、混料机信息显示 // 9、混料机信息显示
@ -373,7 +372,7 @@ public class BigScreenServiceImpl implements BigScreenService {
map.put("SortAndPalletizingList", result); map.put("SortAndPalletizingList", result);
}).exceptionally((e) -> { }).exceptionally((e) -> {
log.error("分拣拆码垛: {}", e.getMessage(), e); log.error("分拣拆码垛: {}", e.getMessage(), e);
map.put("SortAndPalletizingList", null); map.put("SortAndPalletizingList", e);
return null; return null;
}); });
// 15、机械手状态 // 15、机械手状态

6
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_MIX_AND_TRAP.wql

@ -128,6 +128,7 @@
p.point_code, p.point_code,
p.point_name, p.point_name,
p.point_status, p.point_status,
IF(d.device_name IS NULL,'-',d.device_name) AS device_name,
IF(LENGTH(p.vehicle_code)>0,p.vehicle_code,'-') AS vehicle_code, IF(LENGTH(p.vehicle_code)>0,p.vehicle_code,'-') AS vehicle_code,
IF(LENGTH(SUBSTRING(m.material_code, 6, 6))>0,SUBSTRING(m.material_code, 6, 6),'-') AS bom, IF(LENGTH(SUBSTRING(m.material_code, 6, 6))>0,SUBSTRING(m.material_code, 6, 6),'-') AS bom,
IF(LENGTH(LEFT(m.material_code, 11))>0,LEFT(m.material_code, 11),'-') AS material_code, IF(LENGTH(LEFT(m.material_code, 11))>0,LEFT(m.material_code, 11),'-') AS material_code,
@ -154,6 +155,8 @@
AND vd.vehicle_type = p.vehicle_type AND vd.vehicle_type = p.vehicle_type
AND vd.is_delete = '0' AND vd.is_delete = '0'
LEFT JOIN md_me_materialbase m ON m.material_id = vd.material_id LEFT JOIN md_me_materialbase m ON m.material_id = vd.material_id
LEFT JOIN pdm_bd_workorder w ON w.workorder_id = vd.workorder_id
LEFT JOIN pdm_bi_device d ON d.device_code = w.device_code
WHERE p.region_code = 'KLHJ' WHERE p.region_code = 'KLHJ'
AND p.point_type IN ('1','2') AND p.point_type IN ('1','2')
ORDER BY p.point_code ORDER BY p.point_code
@ -169,6 +172,7 @@
LEFT(m.material_code, 11) AS material_code, LEFT(m.material_code, 11) AS material_code,
IF(LENGTH(vd.weight)>0,vd.weight,'-') AS weight, IF(LENGTH(vd.weight)>0,vd.weight,'-') AS weight,
ta.vehicle_code, ta.vehicle_code,
IF(d.device_name IS NULL,'-',d.device_name) AS device_name,
IF(LENGTH(mix_num)>0,CONCAT(DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'),LPAD(mix_num, 3, '0')),'-') AS mix_num, 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, IF(ta.task_type = '1',ta.point_code2,ta.point_code1) AS point_code,
ta.create_time ta.create_time
@ -178,6 +182,8 @@
LEFT JOIN st_ivt_vehicle_detail vd ON vd.vehicle_code = ta.vehicle_code LEFT JOIN st_ivt_vehicle_detail vd ON vd.vehicle_code = ta.vehicle_code
AND vd.vehicle_type = ta.vehicle_type AND vd.vehicle_type = ta.vehicle_type
AND vd.is_delete = '0' AND vd.is_delete = '0'
LEFT JOIN pdm_bd_workorder w ON w.workorder_id = vd.workorder_id
LEFT JOIN pdm_bi_device d ON d.device_code = w.device_code
WHERE WHERE
ta.handle_class IN ('org.nl.wms.sch.task.send.material.HLSendMaterialTask', 'org.nl.wms.sch.task.call.material.YZCallMaterialTask') ta.handle_class IN ('org.nl.wms.sch.task.send.material.HLSendMaterialTask', 'org.nl.wms.sch.task.call.material.YZCallMaterialTask')
AND ta.task_status = '7' AND ta.task_status = '7'

2
lms/nladmin-system/src/main/java/org/nl/wms/cockpit/wql/COCKPIT_PROCESS_PRODUCTION.wql

@ -324,7 +324,7 @@
p.region_code p.region_code
FROM FROM
`sch_base_point` p `sch_base_point` p
WHERE p.point_type IN ('1', '2') AND p.region_code = 'FJ' WHERE p.point_type IN ('1', '2') AND p.region_code = 'FJ' AND p.point_code NOT IN ('FJCD02DJ01', 'FJCD02DJ02', 'FJMD02DJ01', 'FJMD02DJ02')
ORDER BY p.point_code ORDER BY p.point_code
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY

Loading…
Cancel
Save