From 1844a69c6961d329913024ab8532185a55d4b1c6 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 4 May 2023 11:02:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=A0=B9=E6=8D=AE=E5=9C=B0=E5=9B=BEID?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../joylink/rtss/controller/publish/MapController.java | 9 +++++++++ .../java/club/joylink/rtss/services/IMapService.java | 7 +++++++ src/main/java/club/joylink/rtss/services/MapService.java | 6 ++++++ .../java/club/joylink/rtss/vo/map/MapGraphDataNewVO.java | 2 +- .../java/club/joylink/rtss/vo/map/graph/MapClientVO.java | 8 ++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/controller/publish/MapController.java b/src/main/java/club/joylink/rtss/controller/publish/MapController.java index 929d4122d..4193c9164 100644 --- a/src/main/java/club/joylink/rtss/controller/publish/MapController.java +++ b/src/main/java/club/joylink/rtss/controller/publish/MapController.java @@ -429,4 +429,13 @@ public class MapController { public List listMapsOfUser(@RequestAttribute LoginUserInfoVO loginInfo) { return iMapService.listMapsOfUser(loginInfo); } + + /** + * 获取地图配置的客户端信息 + * @return 客户端信息 + */ + @GetMapping("/{id}/mapClientMap") + public Map> queryMapClientMap(@PathVariable long id) { + return iMapService.queryMapClientMap(id); + } } diff --git a/src/main/java/club/joylink/rtss/services/IMapService.java b/src/main/java/club/joylink/rtss/services/IMapService.java index c49a6978d..dfb4bb9aa 100644 --- a/src/main/java/club/joylink/rtss/services/IMapService.java +++ b/src/main/java/club/joylink/rtss/services/IMapService.java @@ -374,4 +374,11 @@ public interface IMapService { * @return 地图ID列表 */ List getMapIdByProjectList(List projectCodes); + + /** + * 获取地图配置的客户端信息 + * @param mapId 地图ID + * @return 客户端列表 + */ + Map> queryMapClientMap(long mapId); } diff --git a/src/main/java/club/joylink/rtss/services/MapService.java b/src/main/java/club/joylink/rtss/services/MapService.java index 02c656a0c..885c9d766 100644 --- a/src/main/java/club/joylink/rtss/services/MapService.java +++ b/src/main/java/club/joylink/rtss/services/MapService.java @@ -952,6 +952,12 @@ public class MapService implements IMapService, ApplicationRunner { return mapInfoDAO.selectByExample(example).stream().map(MapInfo::getId).collect(Collectors.toList()); } + @Override + public Map> queryMapClientMap(long mapId) { + MapVO mapDetail = getMapDetail(mapId); + return mapDetail.getGraphDataNew().getMapClientVOMap(); + } + /** * 该版本的地图数据是否存在 */ diff --git a/src/main/java/club/joylink/rtss/vo/map/MapGraphDataNewVO.java b/src/main/java/club/joylink/rtss/vo/map/MapGraphDataNewVO.java index ccde1de3a..580ce3d3d 100644 --- a/src/main/java/club/joylink/rtss/vo/map/MapGraphDataNewVO.java +++ b/src/main/java/club/joylink/rtss/vo/map/MapGraphDataNewVO.java @@ -252,7 +252,7 @@ public class MapGraphDataNewVO { /** * 客户端列表 */ - private List mapClientVOList = new ArrayList<>(); + private Map> mapClientVOMap = new HashMap<>(); public MapGraphDataNewVO() { this.bigScreenConfig = new BigScreenConfig(); diff --git a/src/main/java/club/joylink/rtss/vo/map/graph/MapClientVO.java b/src/main/java/club/joylink/rtss/vo/map/graph/MapClientVO.java index 34227d300..f50771dce 100644 --- a/src/main/java/club/joylink/rtss/vo/map/graph/MapClientVO.java +++ b/src/main/java/club/joylink/rtss/vo/map/graph/MapClientVO.java @@ -1,5 +1,6 @@ package club.joylink.rtss.vo.map.graph; +import club.joylink.rtss.simulation.cbtc.message.SimulationSubscribeTopic; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -35,4 +36,11 @@ public class MapClientVO { * 客户端关联设备编码 */ private String deviceCode; + + private SimulationSubscribeTopic topic; + + /** + * 客户端订阅路径 + */ + private String subscribeTopic; }