change the tomeDelay upload data
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.mogo.module.service.network.bean;
|
||||
|
||||
public class MockSocketSendData {
|
||||
private long systemTime;
|
||||
private String uuid;
|
||||
private long satelliteTime;
|
||||
|
||||
public MockSocketSendData(long systemTime, String uuid, long satelliteTime) {
|
||||
this.systemTime = systemTime;
|
||||
this.uuid = uuid;
|
||||
this.satelliteTime = satelliteTime;
|
||||
}
|
||||
|
||||
public long getSystemTime() {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public void setSystemTime(long systemTime) {
|
||||
this.systemTime = systemTime;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public long getSatelliteTime() {
|
||||
return satelliteTime;
|
||||
}
|
||||
|
||||
public void setSatelliteTime(long satelliteTime) {
|
||||
this.satelliteTime = satelliteTime;
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,13 @@ import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.uploadintime.SnapshotLocationController;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.network.TimeDelayApiService;
|
||||
import com.mogo.module.service.network.bean.MockSocketReceiverData;
|
||||
import com.mogo.module.service.network.bean.MockSocketSendData;
|
||||
import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
||||
import com.mogo.realtime.entity.CloudRoadData;
|
||||
import com.mogo.realtime.entity.MogoSnapshotSetData;
|
||||
@@ -22,6 +24,7 @@ import com.mogo.service.connection.IMogoOnMessageListener;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -145,13 +148,13 @@ public class TimeDelayUploadManager implements IMogoOnMessageListener<MockSocket
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
if (result == null) {
|
||||
Logger.d(TAG,"未找到与之匹配数据");
|
||||
Logger.d(TAG, "未找到与之匹配数据");
|
||||
return;
|
||||
}
|
||||
MockSocketSendData mockSocketSendData = new MockSocketSendData(System.currentTimeMillis(), result.getUuid(), result.getSatelliteTime());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("systemTime", System.currentTimeMillis());
|
||||
map.put("uuid", result.getUuid());
|
||||
map.put("satelliteTime", result.getSatelliteTime());
|
||||
map.put("sn", Utils.getSn());
|
||||
map.put("data", GsonUtil.jsonFromObject(mockSocketSendData));
|
||||
timeDelayApiService.uploadDelayData(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
Reference in New Issue
Block a user