【根据地图ID获取客户端信息】

This commit is contained in:
weizhihong 2023-05-04 11:02:02 +08:00
parent f51abb1865
commit 1844a69c69
5 changed files with 31 additions and 1 deletions

View File

@ -429,4 +429,13 @@ public class MapController {
public List<MapVO> listMapsOfUser(@RequestAttribute LoginUserInfoVO loginInfo) {
return iMapService.listMapsOfUser(loginInfo);
}
/**
* 获取地图配置的客户端信息
* @return 客户端信息
*/
@GetMapping("/{id}/mapClientMap")
public Map<Simulation.Type, List<MapClientVO>> queryMapClientMap(@PathVariable long id) {
return iMapService.queryMapClientMap(id);
}
}

View File

@ -374,4 +374,11 @@ public interface IMapService {
* @return 地图ID列表
*/
List<Long> getMapIdByProjectList(List<String> projectCodes);
/**
* 获取地图配置的客户端信息
* @param mapId 地图ID
* @return 客户端列表
*/
Map<Simulation.Type, List<MapClientVO>> queryMapClientMap(long mapId);
}

View File

@ -952,6 +952,12 @@ public class MapService implements IMapService, ApplicationRunner {
return mapInfoDAO.selectByExample(example).stream().map(MapInfo::getId).collect(Collectors.toList());
}
@Override
public Map<Simulation.Type, List<MapClientVO>> queryMapClientMap(long mapId) {
MapVO mapDetail = getMapDetail(mapId);
return mapDetail.getGraphDataNew().getMapClientVOMap();
}
/**
* 该版本的地图数据是否存在
*/

View File

@ -252,7 +252,7 @@ public class MapGraphDataNewVO {
/**
* 客户端列表
*/
private List<MapClientVO> mapClientVOList = new ArrayList<>();
private Map<Simulation.Type, List<MapClientVO>> mapClientVOMap = new HashMap<>();
public MapGraphDataNewVO() {
this.bigScreenConfig = new BigScreenConfig();

View File

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