[6.0.0/5.0.0]MessagePad.Line新增lineName字段:各业务更新接口

This commit is contained in:
pangfan
2023-08-15 15:36:14 +08:00
committed by zhongchao
parent 56d9025875
commit 770360edf0
12 changed files with 64 additions and 106 deletions

View File

@@ -143,34 +143,35 @@ public abstract class BaseSweeperTabFragment<V extends IView, P extends Presente
ToastUtils.showLong("解析失败=" + err);
}
@Override
public void onParse(MessagePad.SetAutopilotModeReq bean) {
ToastUtils.showLong("下发命令\n" + TextFormat.printer().escapingNonAscii(false).printToString(bean));
AutopilotControlParameters parameters = new AutopilotControlParameters();
MessagePad.RouteInfo routeInfo = bean.getRouteInfo();
if (routeInfo.getRouteID() > 0) {
parameters.routeID = routeInfo.getRouteID();
@Override
public void onParse(MessagePad.SetAutopilotModeReq bean) {
ToastUtils.showLong("下发命令\n" + TextFormat.printer().escapingNonAscii(false).printToString(bean));
AutopilotControlParameters parameters = new AutopilotControlParameters();
MessagePad.RouteInfo routeInfo = bean.getRouteInfo();
if (routeInfo.getRouteID() > 0) {
parameters.routeID = routeInfo.getRouteID();
}
parameters.routeName = routeInfo.getRouteName();
parameters.startName = routeInfo.getStartName();//拼音
parameters.endName = routeInfo.getEndName();//拼音
parameters.startLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getStartLocation().getLatitude(), routeInfo.getStartLocation().getLongitude());
parameters.endLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getEndLocation().getLatitude(), routeInfo.getEndLocation().getLongitude());
parameters.vehicleType = 10;
MessagePad.Line line = routeInfo.getLine();
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
line.getLineId(), line.getLineName(),
line.getTrajUrl(), line.getTrajMd5(),
line.getStopUrl(), line.getStopMd5(),
line.getTimestamp(), line.getVehicleModel(),
line.getTrajUrlDpqp(), line.getTrajMd5Dpqp(),
line.getStopUrlDpqp(), line.getStopMd5Dpqp(),
line.getTimestampDpqp());
CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
}
parameters.routeName = routeInfo.getRouteName();
parameters.startName = routeInfo.getStartName();//拼音
parameters.endName = routeInfo.getEndName();//拼音
parameters.startLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getStartLocation().getLatitude(), routeInfo.getStartLocation().getLongitude());
parameters.endLatLon = new AutopilotControlParameters
.AutoPilotLonLat(routeInfo.getEndLocation().getLatitude(), routeInfo.getEndLocation().getLongitude());
parameters.vehicleType = 10;
MessagePad.Line line = routeInfo.getLine();
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
line.getLineId(),
line.getTrajUrl(), line.getTrajMd5(),
line.getStopUrl(), line.getStopMd5(),
line.getTimestamp(), line.getVehicleModel(),
line.getTrajUrlDpqp(), line.getTrajMd5Dpqp(),
line.getStopUrlDpqp(), line.getStopMd5Dpqp(),
line.getTimestampDpqp());
CallerAutoPilotControlManager.INSTANCE.startAutoPilot(parameters);
}
}).read();
}).read();
}
});
// 模拟 查询当前任务
findViewById(R.id.btnQueryCurrentTask).setOnClickListener(view ->

View File

@@ -518,7 +518,7 @@ public class SweeperTaskModel {
.AutoPilotLonLat(mCurrentSubTaskDetail.getEndSiteWgs64Lat(), mCurrentSubTaskDetail.getEndSiteWgs64Lon());
parameters.vehicleType = VEHICLE_TYPE;
parameters.autoPilotLine = new AutopilotControlParameters.AutoPilotLine(
mCurrentSubTaskDetail.getLineId(),
mCurrentSubTaskDetail.getLineId(), mCurrentSubTaskDetail.getLineName(),
mCurrentSubTaskDetail.getCsvFileUrl(), mCurrentSubTaskDetail.getCsvFileMd5(),
mCurrentSubTaskDetail.getTxtFileUrl(), mCurrentSubTaskDetail.getTxtFileMd5(),
mCurrentSubTaskDetail.getPublishTime(), mCurrentSubTaskDetail.getCarModel(),

View File

@@ -37,7 +37,7 @@ public class SweeperTrajectoryManager {
private Disposable mSendReqDisposable = null;
public SweeperTrajectoryManager() {
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(-1,
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(-1, "",
"", "", "", "", 0, "",
"", "", "", "", 0);
}
@@ -99,7 +99,8 @@ public class SweeperTrajectoryManager {
CallerLogger.INSTANCE.e(M_SWEEPER + TAG, "setupAutoPilotLine(): routesResult is null.");
return;
} else {
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(subTaskDetail.getLineId(),
mAutoPilotLine = new AutopilotControlParameters.AutoPilotLine(
subTaskDetail.getLineId(), subTaskDetail.getLineName(),
subTaskDetail.getCsvFileUrl(), subTaskDetail.getCsvFileMd5(),
subTaskDetail.getTxtFileUrl(), subTaskDetail.getTxtFileMd5(),
subTaskDetail.getPublishTime(), subTaskDetail.getCarModel(),
@@ -112,6 +113,7 @@ public class SweeperTrajectoryManager {
private void clearAutoPilotLine() {
if (mAutoPilotLine == null) return;
mAutoPilotLine.setLineId(-1);
mAutoPilotLine.setLineName("");
mAutoPilotLine.setTrajUrl("");
mAutoPilotLine.setTrajMd5("");
mAutoPilotLine.setStopUrl("");
@@ -161,25 +163,6 @@ public class SweeperTrajectoryManager {
return;
}
// TODO: 2022/6/24
// test1
// mAutoPilotLine.setLineId(148);
// mAutoPilotLine.setTrajUrl("http://file-qa.zhidaozhixing.com/fileServer/upload/downloadFileStream?key=fileServer/online_car_hailing/e27c20c2da32481021d934c3ef084536/traj_148.csv");
// mAutoPilotLine.setTrajMd5("e27c20c2da32481021d934c3ef084536");
// mAutoPilotLine.setStopUrl("http://file-qa.zhidaozhixing.com/fileServer/upload/downloadFileStream?key=fileServer/online_car_hailing/6224c9dd2c0e2bd990c6482c0464de45/stop_148.txt");
// mAutoPilotLine.setStopMd5("6224c9dd2c0e2bd990c6482c0464de45");
// mAutoPilotLine.setTimestamp(1654596000000L); //20220607 18:00
// mAutoPilotLine.setVehicleModel("红旗H9");
// test2
// mAutoPilotLine.setLineId(148);
// mAutoPilotLine.setTrajUrl("http://file-qa.zhidaozhixing.com/fileServer/upload/downloadFileStream?key=fileServer/online_car_hailing/8654497cf918be461a59c7ad8e22920d/traj_148.csv");
// mAutoPilotLine.setTrajMd5("8654497cf918be461a59c7ad8e22920d");
// mAutoPilotLine.setStopUrl("http://file-qa.zhidaozhixing.com/fileServer/upload/downloadFileStream?key=fileServer/online_car_hailing/1bb098b244922649bf3e7bada0d3950f/stop_148.txt");
// mAutoPilotLine.setStopMd5("1bb098b244922649bf3e7bada0d3950f");
// mAutoPilotLine.setTimestamp(1654761600000L); //20220609 16:00
// mAutoPilotLine.setVehicleModel("红旗H9");
CallerAutoPilotControlManager.INSTANCE.sendTrajectoryDownloadReq(mAutoPilotLine);
CallerLogger.INSTANCE.d(M_SWEEPER + TAG, "sendTrajectoryReq(): "
+ GsonUtils.toJson(mAutoPilotLine));