diff --git a/app/build.gradle b/app/build.gradle index 990e385..255b821 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,7 +38,7 @@ android { minSdkVersion 24 targetSdkVersion 30 versionCode 115 - versionName "8.230921-测试版" + versionName "8.230926-测试版" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/AreaHubFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/AreaHubFragment.java index 17583f3..dd74bd1 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/AreaHubFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/AreaHubFragment.java @@ -232,7 +232,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL @Override public boolean onLongClick(View v) { DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; - MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { + MessageDialog.show((AppCompatActivity) requireContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { @Override public boolean onClick(BaseDialog baseDialog, View v) { poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片的 按钮,"); @@ -588,6 +588,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -655,6 +656,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -893,6 +895,12 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL poiEntity.setCreateTime(format); poiEntity.setChecked(false); poiEntity.setType(12); + if (latLng != null) { + String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude); + poiEntity.setGeoWkt(encode); + poiEntity.setX(String.valueOf(latLng.longitude)); + poiEntity.setY(String.valueOf(latLng.latitude)); + } if (showPoiEntity.getId() != null) { List fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); if (fileListByUUID != null&&!fileListByUUID.isEmpty()) { diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/BuildingInFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/BuildingInFragment.java index e359725..f096591 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/BuildingInFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/BuildingInFragment.java @@ -241,7 +241,7 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli @Override public boolean onLongClick(View v) { DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; - MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { + MessageDialog.show((AppCompatActivity) requireContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { @Override public boolean onClick(BaseDialog baseDialog, View v) { poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片的 按钮,"); @@ -689,6 +689,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -756,6 +757,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -996,6 +998,12 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli poiEntity.setCreateTime(format); poiEntity.setChecked(false); poiEntity.setType(13); + if (latLng != null) { + String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude); + poiEntity.setGeoWkt(encode); + poiEntity.setX(String.valueOf(latLng.longitude)); + poiEntity.setY(String.valueOf(latLng.latitude)); + } if (showPoiEntity.getId() != null) { List fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); if (fileListByUUID != null&&!fileListByUUID.isEmpty()) { diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/PoiVideoFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/PoiVideoFragment.java index a7beeaf..d630b47 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/PoiVideoFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/PoiVideoFragment.java @@ -592,6 +592,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -659,6 +660,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -895,6 +897,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick poiEntity.setCreateTime(format); poiEntity.setChecked(false); poiEntity.setType(3); + if (latLng != null) { + String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude); + poiEntity.setGeoWkt(encode); + poiEntity.setX(String.valueOf(latLng.longitude)); + poiEntity.setY(String.valueOf(latLng.latitude)); + } if (showPoiEntity.getId() != null) { List fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); if (fileListByUUID != null&&!fileListByUUID.isEmpty()) { diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/RoadFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/RoadFragment.java index aea14dd..aba1661 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/RoadFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/RoadFragment.java @@ -697,6 +697,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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 0); httpParams.put("memo", poiEntity.getMemo()); // 增加对应九天平台的参数 @@ -768,6 +769,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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 0); httpParams.put("memo", poiEntity.getMemo()); // 增加对应九天平台的参数 @@ -1006,6 +1008,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList poiEntity.setType(4); poiEntity.setChecked(false); poiEntity.setExistence(existence); + if (latLng != null) { + String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude); + poiEntity.setGeoWkt(encode); + poiEntity.setX(String.valueOf(latLng.longitude)); + poiEntity.setY(String.valueOf(latLng.latitude)); + } if (showPoiEntity.getId() != null) { List fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); if (fileListByUUID != null&&!fileListByUUID.isEmpty()) { diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/TrafficHubFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/TrafficHubFragment.java index 9b462fe..315cb15 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/TrafficHubFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/TrafficHubFragment.java @@ -232,7 +232,7 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli @Override public boolean onLongClick(View v) { DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; - MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { + MessageDialog.show((AppCompatActivity) requireContext(), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { @Override public boolean onClick(BaseDialog baseDialog, View v) { poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了长按删除图片的 按钮,"); @@ -588,6 +588,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -655,6 +656,7 @@ 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("geo", poiEntity.getGeoWkt()); // httpParams.put("workType", 1); httpParams.put("memo", poiEntity.getMemo()); httpParams.put("score", poiEntity.getScore()); @@ -893,6 +895,12 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli poiEntity.setCreateTime(format); poiEntity.setChecked(false); poiEntity.setType(11); + if (latLng != null) { + String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude); + poiEntity.setGeoWkt(encode); + poiEntity.setX(String.valueOf(latLng.longitude)); + poiEntity.setY(String.valueOf(latLng.latitude)); + } if (showPoiEntity.getId() != null) { List fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); if (fileListByUUID != null&&!fileListByUUID.isEmpty()) { diff --git a/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java b/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java index f58fbb4..6dafeb8 100644 --- a/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java +++ b/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java @@ -4,8 +4,10 @@ public class HttpInterface { // public static final String IP = "http://172.23.138.133:9999/m4";//测试接口-IP // public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-外网 - public static final String IP = "http://120.92.15.187/dtxb/test/m4";//开发接口-外网 - public static final String IP_UPLOAD = "http://120.92.109.239/dtxb/test/m4";//开发接口-外网 +// public static final String IP = "http://120.92.15.187/dtxb/test/m4";//开发接口-外网 +// public static final String IP_UPLOAD = "http://120.92.109.239/dtxb/test/m4";//开发接口-外网 + public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//金山云接口地址 + public static final String IP_UPLOAD = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//金山云接口地址-数据上传 public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试接口-外网 public static final String IP2 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口 public static final String IP4 = "http://10.130.23.166/dtxb/jinshan/m4";//心榕给的测试地址