| | |
| | | import retrofit2.Call |
| | | import retrofit2.Callback |
| | | import retrofit2.Response |
| | | import retrofit2.http.Url |
| | | import safeluck.drive.evaluation.Constant |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase |
| | | import safeluck.drive.evaluation.DB.rtktb.RTKConfig |
| | |
| | | import safeluck.drive.evaluation.worker.MCUUpgradeWorker |
| | | import java.io.IOException |
| | | import java.io.InputStreamReader |
| | | import java.net.URL |
| | | import java.net.URLDecoder |
| | | import java.nio.charset.Charset |
| | | |
| | | /** |
| | |
| | | jsonObject1 = JSONObject(str) |
| | | val result = jsonObject1!!.getBoolean("result") |
| | | if (result) { |
| | | var mapInfoHead: MapInfoHead = MapInfoHead("","", BaseDataUIBean.TYPE_.car) |
| | | var mapInfoHead: MapInfoHead = MapInfoHead("","", BaseDataUIBean.TYPE_.car,"","") |
| | | |
| | | when(type){ |
| | | "road" ->{ |
| | |
| | | |
| | | if (map.data.map_json.type.equals("road")) { |
| | | mapInfoHead.str = map.data.map_json.name |
| | | mapInfoHead.gps_moinitor_url = URLDecoder.decode( map.data.gps_monitor_url,"UTF-8") |
| | | mapInfoHead.arcgis_url = map.data.map_url |
| | | ExamPlatformData.getInstance().setNewRoadMapPath(Environment.getExternalStorageDirectory().absolutePath + "/" |
| | | + app.getAppContext().getPackageName() + "/" + fileName) |
| | | CThreadPoolExecutor.runInBackground(Runnable { |
| | |
| | | if (yard.isResult){ |
| | | if (yard.data !=null){ |
| | | mapInfoHead.version = yard.data.version |
| | | mapInfoHead.gps_moinitor_url = URLDecoder.decode(yard.data.gps_monitor_url,"UTF-8") |
| | | |
| | | mapInfoHead.str = yard.data.map_json.name |
| | | mapInfoHead.arcgis_url = yard.data.map_url |
| | | ExamPlatformData.getInstance().setNewMapPath(Environment.getExternalStorageDirectory().absolutePath + "/" |
| | | + app.getAppContext().getPackageName() + "/"+fileName) |
| | | CThreadPoolExecutor.runInBackground(Runnable{ |
| | | MyLog.i(PlatFormConstant.HTTPTAG,"科三场地地图保存成功") |
| | | MyLog.i(PlatFormConstant.HTTPTAG,"场地地图保存成功") |
| | | str = gson.toJson(yard.data.map_json) |
| | | FileUtil.writeTxtFileToSD(app.getAppContext(),fileName,str,"") |
| | | sendMapInfo() |