From 5c06c0105bfb5dbb539872d31081fc9a69397401 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Mon, 17 Oct 2022 14:52:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E8=BD=A6=E7=AB=99=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9B=E4=BF=AE=E6=94=B9=E4=BB=BF=E7=9C=9F=E6=88=90?= =?UTF-8?q?=E5=91=98=E8=AE=BE=E5=A4=87=E6=9F=A5=E6=89=BE=E9=80=BB=E8=BE=91?= =?UTF-8?q?bug=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../joylink/rtss/controller/publish/MapController.java | 8 ++++++++ src/main/java/club/joylink/rtss/services/IMapService.java | 5 +++++ src/main/java/club/joylink/rtss/services/MapService.java | 7 +++++++ .../cbtc/work/SimulationWorkServiceManager.java | 5 ++++- 4 files changed, 24 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 6e96aa4f7..11c34d39f 100644 --- a/src/main/java/club/joylink/rtss/controller/publish/MapController.java +++ b/src/main/java/club/joylink/rtss/controller/publish/MapController.java @@ -413,4 +413,12 @@ public class MapController { public Map> queryMemberMap(@PathVariable long id) { return iMapService.queryMemberMap(id); } + + /** + * 获取地图下所有车站 + */ + @GetMapping("/{id}/stations") + public List getMapStations(@PathVariable long id) { + return iMapService.getMapStations(id); + } } diff --git a/src/main/java/club/joylink/rtss/services/IMapService.java b/src/main/java/club/joylink/rtss/services/IMapService.java index eaa996180..1b126c781 100644 --- a/src/main/java/club/joylink/rtss/services/IMapService.java +++ b/src/main/java/club/joylink/rtss/services/IMapService.java @@ -357,4 +357,9 @@ public interface IMapService { * 查询地图成员Map */ Map> queryMemberMap(long mapId); + + /** + * 获取地图下所有车站 + */ + List getMapStations(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 a2e8d0dbe..80ec6fe39 100644 --- a/src/main/java/club/joylink/rtss/services/MapService.java +++ b/src/main/java/club/joylink/rtss/services/MapService.java @@ -869,6 +869,13 @@ public class MapService implements IMapService { return memberMap == null ? new HashMap<>() : memberMap; } + @Override + public List getMapStations(long mapId) { + MapVO mapDetail = getMapDetail(mapId); + List stationList = mapDetail.getGraphDataNew().getStationList(); + return stationList == null ? new ArrayList<>() : stationList; + } + /** * 该版本的地图数据是否存在 */ diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/work/SimulationWorkServiceManager.java b/src/main/java/club/joylink/rtss/simulation/cbtc/work/SimulationWorkServiceManager.java index dc6bf43bb..71de5d620 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/work/SimulationWorkServiceManager.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/work/SimulationWorkServiceManager.java @@ -63,7 +63,10 @@ public class SimulationWorkServiceManager implements ApplicationContextAware { } MapElement mapElement = null; if (StringUtils.hasText(memberVO.getDeviceCode())) { - mapElement = repository.getByCode(memberVO.getDeviceCode()); + mapElement = repository.findByCode(memberVO.getDeviceCode()); + if (mapElement == null) { + mapElement = repository.getVRByCode(memberVO.getDeviceCode()); + } } memberManager.addRole(simulation, memberVO.getType(), memberVO.getName(), mapElement); } From 933a73d131fc5eabea3e952166b3e91ac3b1b69c Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 17 Oct 2022 15:01:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=8E=BB=E9=99=A4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=89=8D=E7=AB=AF=E5=94=AF=E4=B8=80=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/20221017-wei-project_view.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/20221017-wei-project_view.sql diff --git a/sql/20221017-wei-project_view.sql b/sql/20221017-wei-project_view.sql new file mode 100644 index 000000000..740cb55b9 --- /dev/null +++ b/sql/20221017-wei-project_view.sql @@ -0,0 +1,2 @@ +alter table `joylink`.`project_view` +drop index `mark_key`; \ No newline at end of file