[Bus/Taxi driver v2.8.0]Bus/Taxi司机端增加路线轨迹调试信息(动态更新)
This commit is contained in:
@@ -74,7 +74,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
public boolean isOperationStatus;//false-收车,true-出车
|
||||
private FrameLayout flStationPanelContainer;
|
||||
private Group groupTestPanel;
|
||||
private View busTestBar;
|
||||
private FrameLayout flSpeed;
|
||||
// private BusArcView mouduleArc;
|
||||
private TrafficDataView mTrafficDataView;
|
||||
@@ -111,7 +110,6 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
@Override
|
||||
protected void initViews() {
|
||||
groupTestPanel = findViewById(R.id.groupTestPanel);
|
||||
busTestBar = findViewById(R.id.module_mogo_och_bus_test_bar);
|
||||
slidePanelView = findViewById(R.id.module_mogo_och_slide_panel);
|
||||
ctvAutopilotStatus = findViewById(R.id.module_mogo_och_autopilot_status);
|
||||
ctvAutopilotStatusIv = findViewById(R.id.bus_autopilot_btn_iv);
|
||||
@@ -518,22 +516,43 @@ public abstract class BaseBusTabFragment<V extends IView, P extends Presenter<V>
|
||||
}
|
||||
|
||||
/**
|
||||
* bus testBar开关
|
||||
* Bus调试信息:线路、轨迹等信息
|
||||
*
|
||||
* START
|
||||
*/
|
||||
private View busTestBar;
|
||||
private TextView lineIdTV;
|
||||
private TextView trajMd5TV;
|
||||
private TextView stopMd5TV;
|
||||
|
||||
public void showHideTestBar() {
|
||||
if (busTestBar == null) {
|
||||
busTestBar = findViewById(R.id.module_mogo_och_bus_test_bar);
|
||||
lineIdTV = findViewById(R.id.bus_test_bar_current_line_id);
|
||||
trajMd5TV = findViewById(R.id.bus_test_bar_current_traj_md5);
|
||||
stopMd5TV = findViewById(R.id.bus_test_bar_current_stop_md5);
|
||||
}
|
||||
|
||||
if (busTestBar.getVisibility() == View.VISIBLE) {
|
||||
busTestBar.setVisibility(View.GONE);
|
||||
} else {
|
||||
BusRoutesResult routesResult = BusOrderModel.getInstance().getBusRoutesResult();
|
||||
if (routesResult != null) {
|
||||
TextView lineIdTV = findViewById(R.id.bus_test_bar_current_line_id);
|
||||
TextView trajMd5TV = findViewById(R.id.bus_test_bar_current_traj_md5);
|
||||
TextView stopMd5TV = findViewById(R.id.bus_test_bar_current_stop_md5);
|
||||
lineIdTV.setText("lineId:" + (routesResult == null ? "" : String.valueOf(routesResult.getLineId())));
|
||||
trajMd5TV.setText("TMd5:" + (routesResult == null ? "" : routesResult.csvFileMd5));
|
||||
stopMd5TV.setText("SMd5:" + (routesResult == null ? "" : routesResult.txtFileMd5));
|
||||
}
|
||||
lineIdTV.setText("lineId:" + (routesResult == null ? "" : String.valueOf(routesResult.getLineId())));
|
||||
trajMd5TV.setText("TMd5:" + (routesResult == null ? "" : routesResult.csvFileMd5));
|
||||
stopMd5TV.setText("SMd5:" + (routesResult == null ? "" : routesResult.txtFileMd5));
|
||||
busTestBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateBusTestBarInfo() {
|
||||
if (busTestBar != null && busTestBar.getVisibility() == View.VISIBLE) {
|
||||
BusRoutesResult routesResult = BusOrderModel.getInstance().getBusRoutesResult();
|
||||
lineIdTV.setText("lineId:" + (routesResult == null ? "" : String.valueOf(routesResult.getLineId())));
|
||||
trajMd5TV.setText("TMd5:" + (routesResult == null ? "" : routesResult.csvFileMd5));
|
||||
stopMd5TV.setText("SMd5:" + (routesResult == null ? "" : routesResult.txtFileMd5));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* END
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -229,6 +229,8 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
mNextStationName.setText(nextStationName);
|
||||
mStartStationFlag.setVisibility(startStationFlagVisibility);
|
||||
mEndStationFlag.setVisibility(endStationFlagVisibility);
|
||||
|
||||
updateBusTestBarInfo();
|
||||
}
|
||||
|
||||
public void hideOchBus() {
|
||||
|
||||
@@ -15,7 +15,6 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.taxi.R;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.bean.OrderQueryRespBean;
|
||||
@@ -211,6 +210,7 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
if (serverOrdersFragment != null) {
|
||||
serverOrdersFragment.updateCurrentOrderStatusChanged(order);
|
||||
}
|
||||
updateTaxiTestBarInfo(); //更新调试bar中信息
|
||||
}
|
||||
|
||||
public void startAutoPilot() {
|
||||
@@ -373,23 +373,48 @@ public class TaxiFragment extends BaseTaxiTabFragment<TaxiFragment, TaxiPresente
|
||||
TPRouteDataTestUtils.converToRouteData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Taxi调试信息:订单、线路、轨迹等信息
|
||||
*
|
||||
* START
|
||||
*/
|
||||
private View testBar;
|
||||
private TextView testCurOrderId;
|
||||
private TextView testCurLineId;
|
||||
private TextView testCurTrajMd5;
|
||||
private TextView testCurStopMd5;
|
||||
|
||||
public void clickTestBar() {
|
||||
View testBar = findViewById(R.id.module_och_taxi_order_status_change_test_bar);
|
||||
if (testBar == null) {
|
||||
testBar = findViewById(R.id.module_och_taxi_order_status_change_test_bar);
|
||||
testCurOrderId = findViewById(R.id.test_bar_current_order_id);
|
||||
testCurLineId = findViewById(R.id.test_bar_current_line_id);
|
||||
testCurTrajMd5 = findViewById(R.id.test_bar_current_traj_md5);
|
||||
testCurStopMd5 = findViewById(R.id.test_bar_current_stop_md5);
|
||||
}
|
||||
|
||||
if (testBar.getVisibility() == View.VISIBLE) {
|
||||
testBar.setVisibility(View.GONE);
|
||||
} else {
|
||||
TextView testCurOrderId = findViewById(R.id.test_bar_current_order_id);
|
||||
TextView testCurLineId = findViewById(R.id.test_bar_current_line_id);
|
||||
TextView testCurTrajMd5 = findViewById(R.id.test_bar_current_traj_md5);
|
||||
TextView testCurStopMd5 = findViewById(R.id.test_bar_current_stop_md5);
|
||||
OrderQueryRespBean.Result order = TaxiModel.getInstance().getCurrentOCHOrder();
|
||||
|
||||
testCurOrderId.setText("orderNo:" + (order == null ? "" : String.valueOf(order.orderNo)));
|
||||
testCurLineId.setText("lineId:" + (order == null ? "" : String.valueOf(order.lineId)));
|
||||
testCurTrajMd5.setText("TMd5:" + (order == null ? "" : order.csvFileMd5));
|
||||
testCurStopMd5.setText("SMd5:" + (order == null ? "" : order.txtFileMd5));
|
||||
|
||||
testBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateTaxiTestBarInfo() {
|
||||
if (testBar != null && testBar.getVisibility() == View.VISIBLE) {
|
||||
OrderQueryRespBean.Result order = TaxiModel.getInstance().getCurrentOCHOrder();
|
||||
testCurOrderId.setText("orderNo:" + (order == null ? "" : String.valueOf(order.orderNo)));
|
||||
testCurLineId.setText("lineId:" + (order == null ? "" : String.valueOf(order.lineId)));
|
||||
testCurTrajMd5.setText("TMd5:" + (order == null ? "" : order.csvFileMd5));
|
||||
testCurStopMd5.setText("SMd5:" + (order == null ? "" : order.txtFileMd5));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* END
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user