Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1

This commit is contained in:
xzb 2022-10-17 16:04:33 +08:00
commit 44e1c38a74
5 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,2 @@
alter table `joylink`.`project_view`
drop index `mark_key`;

View File

@ -413,4 +413,12 @@ public class MapController {
public Map<Simulation.Type, List<MapMemberVO>> queryMemberMap(@PathVariable long id) {
return iMapService.queryMemberMap(id);
}
/**
* 获取地图下所有车站
*/
@GetMapping("/{id}/stations")
public List<MapStationNewVO> getMapStations(@PathVariable long id) {
return iMapService.getMapStations(id);
}
}

View File

@ -357,4 +357,9 @@ public interface IMapService {
* 查询地图成员Map
*/
Map<Simulation.Type, List<MapMemberVO>> queryMemberMap(long mapId);
/**
* 获取地图下所有车站
*/
List<MapStationNewVO> getMapStations(long mapId);
}

View File

@ -869,6 +869,13 @@ public class MapService implements IMapService {
return memberMap == null ? new HashMap<>() : memberMap;
}
@Override
public List<MapStationNewVO> getMapStations(long mapId) {
MapVO mapDetail = getMapDetail(mapId);
List<MapStationNewVO> stationList = mapDetail.getGraphDataNew().getStationList();
return stationList == null ? new ArrayList<>() : stationList;
}
/**
* 该版本的地图数据是否存在
*/

View File

@ -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);
}