| | |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.Date; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker; |
| | |
| | | |
| | | private void initData() { |
| | | CThreadPoolExecutor.runInBackground(()->{ |
| | | MyLog.i("开始初始化数据发送地图/车辆/mcu升级文件/考试状态"); |
| | | |
| | | int type = WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getExamStatusDao().getStartExamInt(); |
| | | MyLog.i("开始初始化数据发送地图/车辆/mcu升级文件/考试状态="+type); |
| | | ExamPlatformData.getInstance().setExamType(type); |
| | | // OneTimeWorkRequest examStatausOutWorker = OneTimeWorkRequest.from(ExamStatusOutWorker.class); |
| | | sendMapInfo(); |
| | |
| | | int enter_status = -1; |
| | | @Override |
| | | public void callBackMsg(final int cmd, String json) { |
| | | String strConent = String.format("收到命令[%d],Json内容为%s", cmd, json); |
| | | String strConent = String.format("收到命令[%d],Json内容为%s,线程号=%d,时间=%s", cmd, json,Thread.currentThread().getId(),Utils.formatTimeYYMMDDHHmmSSSSS(System.currentTimeMillis())); |
| | | if (strConent.equalsIgnoreCase(lastStr)){ |
| | | |
| | | }else{ |
| | |
| | | } |
| | | |
| | | private void sendVechileInfo() { |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | |
| | | String carPath = ExamPlatformData.getInstance().getCarModelPath(); |
| | | if (!TextUtils.isEmpty(carPath)){ |
| | | MyLog.i("使用更新后的Car模型地图"+carPath); |
| | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }).start(); |
| | | |
| | | } |
| | | |
| | | private void sendMapInfo(){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | |
| | | final String mapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | final String roadmapPath = ExamPlatformData.getInstance().getRoadMapPath(); |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }).start(); |
| | | |
| | | |
| | | } |
| | | |