fix: 修改bug
This commit is contained in:
parent
a039b44271
commit
4ff0f5cd2a
@ -37,8 +37,8 @@ android {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 106
|
||||
versionName "8.230717-正式版-OCR"
|
||||
versionCode 109
|
||||
versionName "8.230720-正式版-OCR"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
ndk {
|
||||
|
||||
@ -1409,7 +1409,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
// 增加对应九天平台的参数
|
||||
httpParams.put("existence", 0);
|
||||
|
||||
@ -1392,7 +1392,7 @@ public class AutoTakePicture4PoiVideoActivity extends BaseActivity implements Vi
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
// 增加对应九天平台的参数
|
||||
httpParams.put("existence", 0);
|
||||
|
||||
@ -1460,7 +1460,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
// 增加对应九天平台的参数
|
||||
httpParams.put("existence", 0);
|
||||
|
||||
@ -588,6 +588,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
@ -652,8 +653,9 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 1);
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
@ -891,11 +893,11 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
||||
poiEntity.setType(3);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
if (fileListByUUID != null&&!fileListByUUID.isEmpty()) {
|
||||
fmPoiVideoPic.setTag(fileListByUUID);
|
||||
if (booleanExtra) {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
@ -903,15 +905,15 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
||||
}
|
||||
} else {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
}
|
||||
}
|
||||
}
|
||||
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(photoStr);
|
||||
// String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(fileListByUUID.size()+"");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -689,6 +689,7 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
@ -753,8 +754,9 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 1);
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
@ -994,11 +996,11 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
|
||||
poiEntity.setType(3);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
if (fileListByUUID != null&&!fileListByUUID.isEmpty()) {
|
||||
fmPoiVideoPic.setTag(fileListByUUID);
|
||||
if (booleanExtra) {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
@ -1006,15 +1008,15 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
|
||||
}
|
||||
} else {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
}
|
||||
}
|
||||
}
|
||||
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(photoStr);
|
||||
// String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(fileListByUUID.size()+"");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -592,6 +592,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
@ -656,8 +657,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 1);
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
@ -893,11 +895,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiEntity.setType(3);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
if (fileListByUUID != null&&!fileListByUUID.isEmpty()) {
|
||||
fmPoiVideoPic.setTag(fileListByUUID);
|
||||
if (booleanExtra) {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
@ -905,7 +907,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
} else {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
|
||||
@ -695,7 +695,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
// 增加对应九天平台的参数
|
||||
httpParams.put("existence", existence);
|
||||
@ -766,7 +766,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
// 增加对应九天平台的参数
|
||||
httpParams.put("existence", existence);
|
||||
@ -1006,11 +1006,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
poiEntity.setExistence(existence);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
if (fileListByUUID != null&&!fileListByUUID.isEmpty()) {
|
||||
fmRoadPic.setTag(fileListByUUID);
|
||||
if (booleanExtra) {//true
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String encodeList = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (encodeList != null) {
|
||||
poiEntity.setDetail(encodeList);
|
||||
@ -1018,7 +1018,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
} else {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
|
||||
@ -588,6 +588,7 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
@ -652,8 +653,9 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 1);
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
@ -891,11 +893,11 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
|
||||
poiEntity.setType(3);
|
||||
if (showPoiEntity.getId() != null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
if (fileListByUUID != null&&!fileListByUUID.isEmpty()) {
|
||||
fmPoiVideoPic.setTag(fileListByUUID);
|
||||
if (booleanExtra) {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getLinePhotoByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
@ -903,15 +905,15 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
|
||||
}
|
||||
} else {
|
||||
List<LatLng> lineStringByFileList = AWMp4ParserHelper.getInstance().getGpsLineByList(fileListByUUID);
|
||||
if (lineStringByFileList != null) {
|
||||
if (lineStringByFileList != null&&lineStringByFileList.size()>1) {
|
||||
String lineString = Geohash.getInstance().encodeList(lineStringByFileList);
|
||||
if (lineString != null) {
|
||||
poiEntity.setDetail(lineString);
|
||||
}
|
||||
}
|
||||
}
|
||||
String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(photoStr);
|
||||
// String photoStr = AWMp4ParserHelper.getInstance().getVideoFileListStr(fileListByUUID);
|
||||
poiEntity.setPhoto(fileListByUUID.size()+"");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.navinfo.outdoor.room;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.Database;
|
||||
@ -9,6 +10,7 @@ import androidx.room.RoomDatabase;
|
||||
import androidx.room.migration.Migration;
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase;
|
||||
|
||||
import com.elvishew.xlog.XLog;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.bean.LocationRecorder;
|
||||
import com.navinfo.outdoor.util.SdkFolderCreate;
|
||||
@ -28,7 +30,7 @@ import java.io.File;
|
||||
* 如果需要在主线程调用则使用allowMainThreadQueries进行说明。
|
||||
*/
|
||||
|
||||
@Database(entities = {PoiEntity.class,ChargingPileEntity.class, LocationRecorder.class}, version = 5, exportSchema = false)
|
||||
@Database(entities = {PoiEntity.class,ChargingPileEntity.class, LocationRecorder.class}, version = 6, exportSchema = false)
|
||||
public abstract class PoiDatabase extends RoomDatabase {
|
||||
private static final String DB_NAME = "navinfo.db";
|
||||
private static volatile PoiDatabase instance;
|
||||
@ -54,6 +56,7 @@ public abstract class PoiDatabase extends RoomDatabase {
|
||||
.addMigrations(migration_2_3)
|
||||
.addMigrations(migration_3_4)
|
||||
.addMigrations(migration_4_5)
|
||||
.addMigrations(migration_5_6)
|
||||
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
||||
.build();
|
||||
}
|
||||
@ -87,9 +90,13 @@ public abstract class PoiDatabase extends RoomDatabase {
|
||||
private static Migration migration_3_4 = new Migration(3, 4) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
database.execSQL("ALTER TABLE poi "+" ADD COLUMN uploadProgress INTEGER NOT NULL DEFAULT 0");//添加了一个上传进度
|
||||
database.execSQL("ALTER TABLE poi "+" ADD COLUMN credible INTEGER NOT NULL DEFAULT 0");//添加了一个置信度
|
||||
database.execSQL("ALTER TABLE poi "+" ADD COLUMN drawLine TEXT NOT NULL DEFAULT ''");//添加了一个用户绘制线型
|
||||
try {
|
||||
database.execSQL("ALTER TABLE poi ADD COLUMN uploadProgress INTEGER NOT NULL DEFAULT 'null'");//添加了一个上传进度
|
||||
database.execSQL("ALTER TABLE poi ADD COLUMN score INTEGER NOT NULL DEFAULT 'null'");//添加了一个置信度
|
||||
database.execSQL("ALTER TABLE poi ADD COLUMN drawLine TEXT DEFAULT 'null'");//添加了一个用户绘制线型
|
||||
} catch (Exception e) {
|
||||
XLog.e(e.toString());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -97,10 +104,28 @@ public abstract class PoiDatabase extends RoomDatabase {
|
||||
private static Migration migration_4_5 = new Migration(4, 5) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
database.execSQL("ALTER TABLE poi "+" ADD COLUMN uploadMax INTEGER NOT NULL DEFAULT 0");//添加了一个上传总数
|
||||
database.execSQL("ALTER TABLE poi "+" ADD COLUMN uploadResult TEXT NOT NULL DEFAULT ''");//添加了一个上传结果
|
||||
try {
|
||||
database.execSQL("ALTER TABLE poi ADD COLUMN uploadMax INTEGER NOT NULL DEFAULT 'null'");//添加了一个上传总数
|
||||
database.execSQL("ALTER TABLE poi ADD COLUMN uploadResult TEXT DEFAULT 'null'");//添加了一个上传结果
|
||||
} catch (Exception e) {
|
||||
XLog.e(e.toString());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private static Migration migration_5_6 = new Migration(5, 6) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
try {
|
||||
database.execSQL("UPDATE poi set uploadProgress = 0 where uploadProgress = 'null'");
|
||||
database.execSQL("UPDATE poi set score = 0 where score = 'null'");
|
||||
database.execSQL("UPDATE poi set uploadMax = 0 where uploadMax = 'null'");
|
||||
} catch (Exception e) {
|
||||
XLog.e(e.toString());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public abstract PoiDao getPoiDao();//其他信息
|
||||
public abstract ChargingPileDao getChargingPileDao();//充电桩
|
||||
public abstract LocationRecorderDao getRecorderDao();
|
||||
|
||||
@ -288,7 +288,7 @@ public class PoiSaveUtils {
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 1);
|
||||
// httpParams.put("workType", 1);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("score", poiEntity.getScore());
|
||||
httpParams.put("drawLine", poiEntity.getDrawLine());
|
||||
@ -297,7 +297,7 @@ public class PoiSaveUtils {
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", 0);
|
||||
// httpParams.put("workType", 0);
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
url = HttpInterface.ROAD_TASK_SUBMIT;
|
||||
} else if (poiEntity.getType() == 5) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user