将上传改为用户点击后再进行上报

This commit is contained in:
董宏宇
2020-11-13 18:32:51 +08:00
parent 5238a03b43
commit fe1ae68d91
2 changed files with 14 additions and 12 deletions

View File

@@ -9,6 +9,7 @@ import android.widget.TextView;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.map.MogoLatLng;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XRoadEventEntity;
@@ -21,6 +22,8 @@ import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.share.IMogoTanluProvider;
import com.mogo.service.share.TanluUploadParams;
import com.mogo.utils.network.utils.GsonUtil;
import java.util.HashMap;
@@ -133,6 +136,17 @@ public class V2XEventUgcVH extends V2XBaseViewHolder<V2XEventShowEntity> {
ivEventReportTrue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 上报事故
TanluUploadParams params =
new TanluUploadParams(
mV2XRoadEventEntity.getPoiType(),
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
mV2XRoadEventEntity.getNoveltyInfo().getInfoIdInt(),
new MogoLatLng(mV2XRoadEventEntity.getLocation().getLat(),
mV2XRoadEventEntity.getLocation().getLon())
);
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
manualMarkingTrafficJam(1);
dataStatistics(1);
}

View File

@@ -82,18 +82,6 @@ public class V2XEarlyWarningServer {
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2xMessageEntity);
LocalBroadcastManager.getInstance(V2XUtils.getApp()).sendBroadcast(intent);
// 上报事故
TanluUploadParams params =
new TanluUploadParams(
v2XRoadEventEntity.getPoiType(),
IMogoTanluProvider.UPLOAD_FROM_STRATEGY_UGC,
v2XRoadEventEntity.getNoveltyInfo().getInfoIdInt(),
new MogoLatLng(v2XRoadEventEntity.getLocation().getLat(),
v2XRoadEventEntity.getLocation().getLon())
);
V2XServiceManager.getTanluManager().uploadRoadCondition(params);
}
// 移出已经预警的事件列表
//V2XAlarmServer.mAlertRoadEventList.remove(v2XRoadEventEntity);