From 04419e30ed2be12063a88883889bf1017591f3c4 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期四, 07 十一月 2024 09:07:01 +0800 Subject: [PATCH] # --- zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/MapDataDispatcher.java | 1 + zy-acs-flow/src/map/http.js | 5 ++++- zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/MapController.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js index 895a3b4..35203c1 100644 --- a/zy-acs-flow/src/map/http.js +++ b/zy-acs-flow/src/map/http.js @@ -24,7 +24,10 @@ const { code, msg, data: { rcsStatus, common, point } } = res.data; if (code === 200) { setRcsStatus(rcsStatus); - const mapItemList = [...eval(common), ...eval(point)]; + const commonList = common ? eval(common) : []; + const pointList = point ? eval(point) : []; + const mapItemList = [...commonList, ...pointList]; + mapItemList.forEach(item => { if (item.type !== DEVICE_TYPE.AGV) { const sprite = Tool.generateSprite(item.type); diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/MapDataDispatcher.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/MapDataDispatcher.java index ca395b0..683984a 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/MapDataDispatcher.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/astart/MapDataDispatcher.java @@ -380,6 +380,7 @@ for (Code code : codeList) { Double x = code.getX(); Double y = code.getY(); + if (null == x || null == y) { continue; } if (!xIdxList.contains(x)) { xIdxList.add(x); } diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/MapController.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/MapController.java index c0137c7..90921f4 100644 --- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/MapController.java +++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/controller/MapController.java @@ -96,7 +96,7 @@ return R.ok().add(Cools .add("rcsStatus", configService.getVal("TaskAssignMode", Boolean.class)) .add("point", GsonUtils.toJson(mapCodeItems)) - .add("common", activeNavMap.getData()) + .add("common", null != activeNavMap ? activeNavMap.getData() : null) ); } -- Gitblit v1.9.1