|
|
|
|
@ -171,7 +171,7 @@ public class CarInfoTask { |
|
|
|
|
nextSite = preSite; |
|
|
|
|
} |
|
|
|
|
BusLine busLine = BusLineCache.getBusLine(info.getUpordown(), nextSite.getSname(), nextSite.getWeizhi()); |
|
|
|
|
log.info("================BusLineCache.getBusLine(Upordown(), Sname(), Weizhi())" ); |
|
|
|
|
log.info("================BusLineCache.getBusLine(Upordown(), Sname(), Weizhi())"); |
|
|
|
|
|
|
|
|
|
// 组织返回数据
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>(); |
|
|
|
|
@ -192,7 +192,7 @@ public class CarInfoTask { |
|
|
|
|
resultMap.put("scenicData", busLine.getScenic()); |
|
|
|
|
resultMap.put("busNo", info.getBusno()); |
|
|
|
|
resultMap.put("speed", info.getSpeed()); |
|
|
|
|
BusLine busLineByName = stationHintService.getBusLineByName(nextSite.getSname(),nextSite.getWeizhi()); |
|
|
|
|
BusLine busLineByName = stationHintService.getBusLineByName(nextSite.getSname(), nextSite.getWeizhi()); |
|
|
|
|
Long busLineId = busLineByName.getId(); |
|
|
|
|
List<imgVo> imgList = proBusLineImgService.getImgByid(busLineId); |
|
|
|
|
resultMap.put("imgData", imgList); |
|
|
|
|
@ -212,6 +212,9 @@ public class CarInfoTask { |
|
|
|
|
websocketService.broadcast(message); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 每秒向web推送当前推流车辆的车速和推流状态信息 |
|
|
|
|
*/ |
|
|
|
|
@Scheduled(cron = "0/1 * * * * ?") |
|
|
|
|
public void getCarSpeed() { |
|
|
|
|
String carNo = CarInfoCache.getPushCarNo(); |
|
|
|
|
@ -222,6 +225,7 @@ public class CarInfoTask { |
|
|
|
|
|
|
|
|
|
Map<String, String> speedMap = new HashMap<>(); |
|
|
|
|
speedMap.put("speed", info.getSpeed()); |
|
|
|
|
speedMap.put("status", CarInfoCache.getPushStatus()); |
|
|
|
|
|
|
|
|
|
Map<String, Object> dataMap = new HashMap<>(); |
|
|
|
|
dataMap.put("msgType", SPEED); |
|
|
|
|
|