[3.0.0] 司机端韩语
This commit is contained in:
@@ -8,6 +8,7 @@ package com.mogo.och.bus.bean;
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String nameKr;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
@@ -21,6 +22,10 @@ public class BusStationBean {
|
||||
private int status;
|
||||
private int ifStop = 1; // 是否需要停靠、1需要、0不需要 // TODO: 2021/10/19 原来站点里有设计是否需要停靠字段,现设计暂无,默认都需要停靠
|
||||
|
||||
public String getNameKr() {
|
||||
return nameKr;
|
||||
}
|
||||
|
||||
public double getGcjLon() {
|
||||
return gcjLon;
|
||||
}
|
||||
|
||||
@@ -581,11 +581,12 @@ public class OrderModel {
|
||||
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation, String nextStation) {
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation,
|
||||
String nextStation, String nextStationKr) {
|
||||
|
||||
onStartAutopilot(leaveIndex);
|
||||
|
||||
leaveTTSTips(nextStation);
|
||||
leaveTTSTips(nextStation,nextStationKr);
|
||||
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
@@ -657,6 +658,7 @@ public class OrderModel {
|
||||
}
|
||||
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
|
||||
String arriveStation = stationList.get(arrivedStationIndex).getName();
|
||||
String arriveStationKr = stationList.get(arrivedStationIndex).getNameKr();
|
||||
String departureStopName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "arriveSiteStation-currentStationIndex = " + arrivedStationIndex);
|
||||
|
||||
@@ -672,7 +674,8 @@ public class OrderModel {
|
||||
queryBusRoutes();
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr);
|
||||
}
|
||||
//5s轮询核销乘客
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
@@ -701,7 +704,8 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName, String arriveStation) {
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName,
|
||||
String arriveStation, String arriveStationKr) {
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
if (arrivedStationIndex == busRoutesResult.getSites().size() - 1) {
|
||||
@@ -714,7 +718,7 @@ public class OrderModel {
|
||||
, arriveStation
|
||||
, isLastStop);
|
||||
}
|
||||
VoiceManager.INSTANCE.arrivedStation(arriveStation);
|
||||
VoiceManager.INSTANCE.arrivedStation(arriveStation,arriveStationKr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -723,11 +727,14 @@ public class OrderModel {
|
||||
public void leaveStation() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "leaveStation-backgroundCurrentStationIndex = " + backgroundCurrentStationIndex);
|
||||
String nextStationName = "";
|
||||
String nextStationNameKr = "";
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
nextStationName = stationList.get(backgroundCurrentStationIndex + 1).getName();
|
||||
nextStationNameKr = stationList.get(backgroundCurrentStationIndex + 1).getNameKr();
|
||||
}
|
||||
final String currentStationName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
String finalNextStationName = nextStationName;
|
||||
String finalNextStationNameKr = nextStationNameKr;
|
||||
OrderServiceManager.leaveStation(mContext,
|
||||
stationList.get(backgroundCurrentStationIndex).getSeq(),
|
||||
stationList.get(backgroundCurrentStationIndex).getSiteId(),
|
||||
@@ -740,7 +747,8 @@ public class OrderModel {
|
||||
//需要更改当前站和下一站的状态 然后渲染
|
||||
//startOrStopQueryPassengerWriteOff(false);
|
||||
queryBusRoutes();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName, finalNextStationName);
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr);
|
||||
}
|
||||
|
||||
|
||||
@@ -765,12 +773,12 @@ public class OrderModel {
|
||||
}
|
||||
|
||||
//车站10s后播报
|
||||
private void leaveTTSTips(String nextStation) {
|
||||
private void leaveTTSTips(String nextStation,String nextStationKr) {
|
||||
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
VoiceManager.INSTANCE.leaveStation(nextStation);
|
||||
VoiceManager.INSTANCE.leaveStation(nextStation,nextStationKr);
|
||||
}
|
||||
},DELAY_10S);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package com.mogo.och.bus.bean;
|
||||
public class BusStationBean {
|
||||
private int siteId;
|
||||
private String name;
|
||||
private String nameKr;
|
||||
private int seq;
|
||||
private double gcjLon; //高德
|
||||
private double gcjLat; //高德
|
||||
@@ -16,6 +17,10 @@ public class BusStationBean {
|
||||
private int drivingStatus;//行驶信息,0初始值;1已经过;2当前站;3未到站
|
||||
private boolean leaving;
|
||||
|
||||
public String getNameKr() {
|
||||
return nameKr;
|
||||
}
|
||||
|
||||
public int getSiteId() {
|
||||
return siteId;
|
||||
}
|
||||
|
||||
@@ -568,11 +568,12 @@ public class OrderModel {
|
||||
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation, String nextStation) {
|
||||
private void leaveStationSuccess(int leaveIndex, String leaveStation,
|
||||
String nextStation,String nextStationKr) {
|
||||
|
||||
onStartAutopilot(leaveIndex);
|
||||
|
||||
leaveTTSTips(nextStation);
|
||||
leaveTTSTips(nextStation,nextStationKr);
|
||||
|
||||
sendStartStationToClient(nextStation);
|
||||
|
||||
@@ -646,6 +647,7 @@ public class OrderModel {
|
||||
}
|
||||
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
|
||||
String arriveStation = stationList.get(arrivedStationIndex).getName();
|
||||
String arriveStationKr = stationList.get(arrivedStationIndex).getNameKr();
|
||||
String departureStopName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "arriveSiteStation-currentStationIndex = " + arrivedStationIndex);
|
||||
|
||||
@@ -661,7 +663,8 @@ public class OrderModel {
|
||||
queryBusRoutes();
|
||||
isArrivedStation = true;
|
||||
isGoingToNextStation = false;
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName, arriveStation);
|
||||
arriveStationSuccess(arrivedStationIndex, departureStopName,
|
||||
arriveStation,arriveStationKr);
|
||||
}
|
||||
//5s轮询核销乘客
|
||||
// startOrStopQueryPassengerWriteOff(true);
|
||||
@@ -690,7 +693,8 @@ public class OrderModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName, String arriveStation) {
|
||||
private void arriveStationSuccess(int arrivedStationIndex, String departureStopName,
|
||||
String arriveStation,String arriveStationKr) {
|
||||
if (busRoutesResult != null) {
|
||||
boolean isLastStop = false;
|
||||
if (arrivedStationIndex == busRoutesResult.getSites().size() - 1) {
|
||||
@@ -704,7 +708,7 @@ public class OrderModel {
|
||||
, isLastStop);
|
||||
}
|
||||
|
||||
VoiceManager.INSTANCE.arrivedStation(arriveStation);
|
||||
VoiceManager.INSTANCE.arrivedStation(arriveStation,arriveStationKr);
|
||||
|
||||
sendArrivedStationToClient(arriveStation);
|
||||
}
|
||||
@@ -748,11 +752,14 @@ public class OrderModel {
|
||||
public void leaveStation() {
|
||||
CallerLogger.INSTANCE.d(M_BUS + TAG, "leaveStation-backgroundCurrentStationIndex = " + backgroundCurrentStationIndex);
|
||||
String nextStationName = "";
|
||||
String nextStationNameKr = "";
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
nextStationName = stationList.get(backgroundCurrentStationIndex + 1).getName();
|
||||
nextStationNameKr = stationList.get(backgroundCurrentStationIndex + 1).getNameKr();
|
||||
}
|
||||
final String currentStationName = stationList.get(backgroundCurrentStationIndex).getName();
|
||||
String finalNextStationName = nextStationName;
|
||||
String finalNextStationNameKr = nextStationNameKr;
|
||||
OrderServiceManager.leaveStation(mContext,
|
||||
stationList.get(backgroundCurrentStationIndex).getSeq(),
|
||||
stationList.get(backgroundCurrentStationIndex).getSiteId(),
|
||||
@@ -765,7 +772,8 @@ public class OrderModel {
|
||||
//需要更改当前站和下一站的状态 然后渲染
|
||||
//startOrStopQueryPassengerWriteOff(false);
|
||||
queryBusRoutes();
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName, finalNextStationName);
|
||||
leaveStationSuccess(backgroundCurrentStationIndex, currentStationName,
|
||||
finalNextStationName,finalNextStationNameKr);
|
||||
}
|
||||
|
||||
|
||||
@@ -790,11 +798,11 @@ public class OrderModel {
|
||||
}
|
||||
|
||||
//车站10s后播报
|
||||
private void leaveTTSTips(String nextStation) {
|
||||
private void leaveTTSTips(String nextStation,String nextStationKr) {
|
||||
UiThreadHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {//延迟10s播报
|
||||
VoiceManager.INSTANCE.leaveStation(nextStation);
|
||||
VoiceManager.INSTANCE.leaveStation(nextStation,nextStationKr);
|
||||
}
|
||||
},DELAY_10S);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user