fix: 修改误删照片目录的问题

This commit is contained in:
xiaoyan 2023-07-21 15:52:48 +08:00
parent 4ff0f5cd2a
commit d6b917fb72
4 changed files with 6 additions and 6 deletions

View File

@ -37,8 +37,8 @@ android {
applicationId "com.navinfo.outdoor"
minSdkVersion 24
targetSdkVersion 30
versionCode 109
versionName "8.230720-正式版-OCR"
versionCode 111
versionName "8.230721-正式版-OCR-BUGFIX"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {

View File

@ -406,7 +406,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
if (rgRoadStatus!=null) {
for (int i = 0; i < rgRoadStatus.getChildCount(); i++) {
RadioButton childAt = (RadioButton) rgRoadStatus.getChildAt(i);
if (childAt.getTag().equals(showPoiEntity.getExistence())) {
if (Integer.parseInt(childAt.getTag().toString())==showPoiEntity.getExistence()) {
childAt.setChecked(true);
break;
}
@ -640,7 +640,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
ToastUtils.Message(getActivity(), poiCheckResult.getMsg());
return;
}
if (existence == 0) {
if (existence == 0&&showPoiEntity.getGeoWkt()!=null) {
DataSaveUtils.checkRoadPoiPicture(showPoiEntity, (List<File>) fmRoadPic.getTag(), new DataSaveUtils.RoadPercentCheckCallback() {
@Override
public void callback(double percent) {

View File

@ -222,7 +222,7 @@ public class DataSaveUtils {
poiEntity.setUploadProgress(poiEntity.getUploadMax());
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
// 同时删除关联的照片文件和压缩包文件
if (zipFile.getParentFile().exists()) {
if (zipFile.getParentFile().exists()&&!zipFile.getParentFile().getName().endsWith("picture")) {
// 删除对应的文件夹
FileUtils.deleteFile(zipFile.getParentFile().getAbsolutePath());
}

View File

@ -503,7 +503,7 @@ public class PoiSaveUtils {
poiEntity.setTaskStatus(100);
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
// 同时删除关联的照片文件和压缩包文件
if (!list.isEmpty()&&list.get(0).getParentFile().exists()) {
if (!list.isEmpty()&&list.get(0).getParentFile().exists()&&!list.get(0).getParentFile().getName().endsWith("picture")) {
// 删除对应的文件夹
FileUtils.deleteFile(list.get(0).getParentFile().getAbsolutePath());
}