修改bug,添加保存本地刪除功能
This commit is contained in:
parent
327da2a8d0
commit
f241b5e877
@ -194,7 +194,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
initGetUserInfo();//获取用户信息
|
initGetUserInfo();//获取用户信息
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
dismissLoadingDialog();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
@ -122,7 +122,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
private CheckBox cbMapType;
|
private CheckBox cbMapType;
|
||||||
private boolean isMapSlide = false;
|
private boolean isMapSlide = false;
|
||||||
private int pageNum = 0;
|
private int pageNum = 0;
|
||||||
|
|
||||||
private Handler handler = new Handler(new Handler.Callback() {
|
private Handler handler = new Handler(new Handler.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean handleMessage(@NonNull Message msg) {
|
public boolean handleMessage(@NonNull Message msg) {
|
||||||
@ -147,15 +146,14 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
if (getIntent() != null) {
|
if (getIntent() != null) {
|
||||||
|
|
||||||
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
|
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
|
||||||
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
|
||||||
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
|
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
|
||||||
}
|
}
|
||||||
videoChronometer = findViewById(R.id.video_chronometer);
|
videoChronometer = findViewById(R.id.video_chronometer);
|
||||||
// if (finalVideoPath == null) {
|
// if (finalVideoPath == null) {
|
||||||
//// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
|
// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
|
||||||
//// }
|
// }
|
||||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||||
ivZoomAdd.setOnClickListener(this);
|
ivZoomAdd.setOnClickListener(this);
|
||||||
@ -228,7 +226,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
|
|
||||||
// uiSettings.setAllGesturesEnabled(false);
|
// uiSettings.setAllGesturesEnabled(false);
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
|
|
||||||
initLine();
|
initLine();
|
||||||
// camera.addFrameProcessor(new FrameProcessor() {
|
// camera.addFrameProcessor(new FrameProcessor() {
|
||||||
// @Override
|
// @Override
|
||||||
@ -407,7 +404,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
|
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions
|
PolylineOptions polylineOptions
|
||||||
= new PolylineOptions().addAll(latLineString)
|
= new PolylineOptions().addAll(latLineString)
|
||||||
|
@ -121,7 +121,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private TimerTask timerTask;
|
private TimerTask timerTask;
|
||||||
private int videoIndex = -1;
|
private int videoIndex = -1;
|
||||||
private int oration = 0;
|
private int oration = 0;
|
||||||
private ImageView ivPicImage;
|
private ImageView ivPicImage, ivPicVideoImage;
|
||||||
private SystemTTS systemTTS;
|
private SystemTTS systemTTS;
|
||||||
private boolean isBack = false;
|
private boolean isBack = false;
|
||||||
|
|
||||||
@ -153,10 +153,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
ivMap = findViewById(R.id.iv_map);
|
ivMap = findViewById(R.id.iv_map);
|
||||||
ivMap.setOnClickListener(this);
|
ivMap.setOnClickListener(this);
|
||||||
ivPicImage = findViewById(R.id.iv_pic);
|
ivPicImage = findViewById(R.id.iv_pic);
|
||||||
|
ivPicVideoImage = findViewById(R.id.iv_pic_video);
|
||||||
|
|
||||||
if (poi_video_type == 1 || poi_video_type == 2) {
|
if (poi_video_type == 1 || poi_video_type == 2) {
|
||||||
ivPicImage.setImageResource(R.mipmap.take_poi_video_arrow);
|
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||||
|
ivPicImage.setVisibility(View.GONE);
|
||||||
} else if (poi_video_type == 3) {
|
} else if (poi_video_type == 3) {
|
||||||
ivPicImage.setImageResource(R.mipmap.take_pic_arrow);
|
ivPicImage.setVisibility(View.VISIBLE);
|
||||||
|
ivPicVideoImage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
btnSwitch = findViewById(R.id.btn_switch);
|
btnSwitch = findViewById(R.id.btn_switch);
|
||||||
btnSwitch.setOnClickListener(this);
|
btnSwitch.setOnClickListener(this);
|
||||||
@ -184,12 +188,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
isOration = true;
|
isOration = true;
|
||||||
if (poi_video_type != 2) {
|
if (poi_video_type != 2) {
|
||||||
capturePicture.setText("暂停采集"); }
|
capturePicture.setText("暂停采集");
|
||||||
|
}
|
||||||
startTimer();
|
startTimer();
|
||||||
} else {
|
} else {
|
||||||
isOration = false;
|
isOration = false;
|
||||||
if (poi_video_type != 2) {
|
if (poi_video_type != 2) {
|
||||||
capturePicture.setText("开始采集"); }
|
capturePicture.setText("开始采集");
|
||||||
|
}
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,6 +362,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
0)); //目标旋转角 0~360° (正北方为0)
|
0)); //目标旋转角 0~360° (正北方为0)
|
||||||
tencentMap.animateCamera(cameraSigma);
|
tencentMap.animateCamera(cameraSigma);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -411,7 +418,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
layerChange.addView(camera);
|
layerChange.addView(camera);
|
||||||
layerChange.addView(ivMap);
|
layerChange.addView(ivMap);
|
||||||
initMapBig();
|
initMapBig();
|
||||||
|
if (poi_video_type == 1 || poi_video_type == 2) {
|
||||||
|
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||||
|
ivPicImage.setVisibility(View.GONE);
|
||||||
|
} else if (poi_video_type == 3) {
|
||||||
ivPicImage.setVisibility(View.VISIBLE);
|
ivPicImage.setVisibility(View.VISIBLE);
|
||||||
|
ivPicVideoImage.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
layoutParamsMap.height = heightCamera;
|
layoutParamsMap.height = heightCamera;
|
||||||
layoutParamsMap.width = widthCamera;
|
layoutParamsMap.width = widthCamera;
|
||||||
@ -423,8 +436,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
layerChange.addView(camera);
|
layerChange.addView(camera);
|
||||||
initMapShort();
|
initMapShort();
|
||||||
ivPicImage.setVisibility(View.GONE);
|
ivPicImage.setVisibility(View.GONE);
|
||||||
|
ivPicVideoImage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//小图
|
//小图
|
||||||
private void initMapBig() {
|
private void initMapBig() {
|
||||||
isMapSlide = false;
|
isMapSlide = false;
|
||||||
@ -433,6 +448,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
ivLocation.setVisibility(View.GONE);
|
ivLocation.setVisibility(View.GONE);
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//大图
|
//大图
|
||||||
private void initMapShort() {
|
private void initMapShort() {
|
||||||
isMapSlide = true;
|
isMapSlide = true;
|
||||||
@ -526,7 +542,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
sb.append("\r\n");
|
sb.append("\r\n");
|
||||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||||
float speed = Constant.currentLocation.getSpeed();//米/秒
|
|
||||||
|
/*float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||||
if (speed != 0) {
|
if (speed != 0) {
|
||||||
float a = (speed * 3600 / 1000);//km/h
|
float a = (speed * 3600 / 1000);//km/h
|
||||||
if (poi_video_type == 1) {
|
if (poi_video_type == 1) {
|
||||||
@ -556,7 +573,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
oldCurrentLocation = Constant.currentLocation;
|
oldCurrentLocation = Constant.currentLocation;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -565,6 +583,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (isOration) {
|
if (isOration) {
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
MessageDialog.show(this, "提示", "当前路段已拍摄的自动保存,可以在选择继续拍摄", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
MessageDialog.show(this, "提示", "当前路段已拍摄的自动保存,可以在选择继续拍摄", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@ -572,7 +591,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
finish();
|
finish();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}).setStyle(DialogSettings.STYLE.STYLE_MIUI);
|
});
|
||||||
} else {
|
} else {
|
||||||
this.finish();
|
this.finish();
|
||||||
}
|
}
|
||||||
|
@ -19,35 +19,42 @@ import java.io.File;
|
|||||||
* 常量
|
* 常量
|
||||||
*/
|
*/
|
||||||
public class Constant {
|
public class Constant {
|
||||||
/**
|
/*当前网络不可用
|
||||||
* 当前网络不可用
|
|
||||||
*/
|
*/
|
||||||
public static final CharSequence NETWORK_UNAVAILABLE = "当前网络不可用,请检查网络设置";
|
public static final CharSequence NETWORK_UNAVAILABLE = "当前网络不可用,请检查网络设置";
|
||||||
|
|
||||||
/*
|
/*位置权限
|
||||||
* 位置权限
|
|
||||||
*/
|
*/
|
||||||
public static final String SET_LOCATION_PERMISSION = "请在“设置”中给予“TengXunMap”位置权限,否则当前功能将不可使用";
|
public static final String SET_LOCATION_PERMISSION = "请在“设置”中给予“TengXunMap”位置权限,否则当前功能将不可使用";
|
||||||
|
|
||||||
public static final String SET_LOCATION = "请在“设置”中给予权限否则当前功能将不可使用";
|
public static final String SET_LOCATION = "请在“设置”中给予权限否则当前功能将不可使用";
|
||||||
|
|
||||||
|
|
||||||
public static final String GET_ERR_MESSAGE1 = "设备缺少使用腾讯定位服务需要的基本条件";
|
public static final String GET_ERR_MESSAGE1 = "设备缺少使用腾讯定位服务需要的基本条件";
|
||||||
|
|
||||||
public static final String GET_ERR_MESSAGE2 = "manifest 中配置的 key 不正确";
|
public static final String GET_ERR_MESSAGE2 = "manifest 中配置的 key 不正确";
|
||||||
|
|
||||||
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
||||||
|
|
||||||
public static final String ROOT_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
|
public static final String ROOT_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
|
||||||
|
|
||||||
public static final String INTENT_POI_ROAD = "poi_road";
|
public static final String INTENT_POI_ROAD = "poi_road";
|
||||||
|
|
||||||
public static String BASE_FOLDER = ROOT_FOLDER;
|
public static String BASE_FOLDER = ROOT_FOLDER;
|
||||||
// 保存图片的目录
|
// 保存图片的目录
|
||||||
public static String PICTURE_FOLDER;
|
public static String PICTURE_FOLDER;
|
||||||
|
|
||||||
public static String VIDEOS_;
|
public static String VIDEOS_;
|
||||||
|
|
||||||
public static String POI_DAO;
|
public static String POI_DAO;
|
||||||
|
|
||||||
public static String SHARED_PREFERENCES = "navInfo";
|
public static String SHARED_PREFERENCES = "navInfo";
|
||||||
|
|
||||||
public static String MESSAGE_TYPE="messageType";
|
public static String MESSAGE_TYPE="messageType";
|
||||||
|
|
||||||
public static String DATA_FILE = "dataFile";
|
public static String DATA_FILE = "dataFile";
|
||||||
//下载文件
|
//下载文件
|
||||||
public static final String NABISCO_APk = ROOT_FOLDER + "/apk/";
|
public static final String NABISCO_APk = ROOT_FOLDER + "/apk/";
|
||||||
|
|
||||||
public static int TelLength=0;
|
public static int TelLength=0;
|
||||||
|
|
||||||
public static void initRootFolder(String userId) {
|
public static void initRootFolder(String userId) {
|
||||||
@ -61,7 +68,6 @@ public class Constant {
|
|||||||
if (!baseFolder.exists()) {
|
if (!baseFolder.exists()) {
|
||||||
SdkFolderCreate.mkdirs(baseFolder.getAbsolutePath());
|
SdkFolderCreate.mkdirs(baseFolder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
File picFolder = new File(PICTURE_FOLDER); // 视频照片文件夹路径
|
File picFolder = new File(PICTURE_FOLDER); // 视频照片文件夹路径
|
||||||
if (!picFolder.exists()) {
|
if (!picFolder.exists()) {
|
||||||
SdkFolderCreate.mkdirs(picFolder.getAbsolutePath());
|
SdkFolderCreate.mkdirs(picFolder.getAbsolutePath());
|
||||||
@ -154,7 +160,6 @@ public class Constant {
|
|||||||
public static final int PHOTO_FINISH_VIDEO = 49;//拍照列表的返回
|
public static final int PHOTO_FINISH_VIDEO = 49;//拍照列表的返回
|
||||||
public static final int NEST_WORD_SUBMIT =50;//所有的提交/上传
|
public static final int NEST_WORD_SUBMIT =50;//所有的提交/上传
|
||||||
|
|
||||||
|
|
||||||
public static final String INTENT_POI_VIDEO_TYPE ="poi_video_type";
|
public static final String INTENT_POI_VIDEO_TYPE ="poi_video_type";
|
||||||
public static int NUMBER = 200; //任务个数
|
public static int NUMBER = 200; //任务个数
|
||||||
public static int LIMIT_TYPE = -1; //权限类型,普通任务-0,专属任务-1
|
public static int LIMIT_TYPE = -1; //权限类型,普通任务-0,专属任务-1
|
||||||
@ -175,22 +180,28 @@ public class Constant {
|
|||||||
|
|
||||||
|
|
||||||
public static JobSearchBean jobSearchBean;//数据
|
public static JobSearchBean jobSearchBean;//数据
|
||||||
|
|
||||||
public static MapView treasureMap;
|
public static MapView treasureMap;
|
||||||
|
|
||||||
public static final String INTENT_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
public static final String INTENT_VIDEO_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||||
|
|
||||||
public static final String INTENT_JPG_PATH = "INTENT_JPG_PATH"; // 拍照界面指定的图片保存位置
|
public static final String INTENT_JPG_PATH = "INTENT_JPG_PATH"; // 拍照界面指定的图片保存位置
|
||||||
|
|
||||||
public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置
|
public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置
|
||||||
|
|
||||||
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||||
|
|
||||||
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
||||||
|
|
||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
|
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
|
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
||||||
|
|
||||||
public static final String NAVIN_FO="9.27";//版本
|
public static final String NAVIN_FO="9.28";//版本
|
||||||
|
/*联系我们的QQ群名称和QQ群号
|
||||||
/**
|
*/
|
||||||
* 联系我们的QQ群名称和QQ群号
|
|
||||||
* */
|
|
||||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||||
public static String REGION_JIG_PHONE = "9721810";
|
public static String REGION_JIG_PHONE = "9721810";
|
||||||
public static String REGION_HEI_NAME = "黑吉辽-地图寻宝群";
|
public static String REGION_HEI_NAME = "黑吉辽-地图寻宝群";
|
||||||
|
@ -1363,16 +1363,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||||
} else {
|
} else if (showPoiEntity.getTaskStatus() == 0 | showPoiEntity.getTaskStatus() == 1) {
|
||||||
Message obtain = Message.obtain();
|
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
|
||||||
obtain.obj = true;
|
|
||||||
EventBus.getDefault().post(obtain);
|
|
||||||
}
|
|
||||||
if (showPoiEntity.getId() != null) {
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
if (poiDaoPoiEntity.getTaskStatus() == 5 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 1) {
|
|
||||||
initList();
|
initList();
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
||||||
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
||||||
@ -1382,18 +1377,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
chargingPileFileList.add(new File(photoPath));
|
chargingPileFileList.add(new File(photoPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new Thread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
PoiDatabase.getInstance(getActivity()).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
PoiDatabase.getInstance(getActivity()).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||||
chargingPileFileList.get(i).delete();
|
chargingPileFileList.get(i).delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
} else {
|
||||||
}
|
Message obtain = Message.obtain();
|
||||||
}
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
|
obtain.obj = true;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1463,10 +1459,26 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
||||||
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
|
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
||||||
|
List<File> chargingPileFileList = new ArrayList<>();
|
||||||
|
if (chargingPileEntity.getPhotos() != null && !chargingPileEntity.getPhotos().isEmpty()) {
|
||||||
|
for (String photoPath : chargingPileEntity.getPhotos()) {
|
||||||
|
chargingPileFileList.add(new File(photoPath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PoiDatabase.getInstance(getActivity()).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
|
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||||
|
chargingPileFileList.get(i).delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
@ -40,6 +40,7 @@ import com.navinfo.outdoor.activity.FragmentManagement;
|
|||||||
import com.navinfo.outdoor.activity.PhotographActivity;
|
import com.navinfo.outdoor.activity.PhotographActivity;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
import com.navinfo.outdoor.util.UploadUtils;
|
import com.navinfo.outdoor.util.UploadUtils;
|
||||||
import com.navinfo.outdoor.bean.Info;
|
import com.navinfo.outdoor.bean.Info;
|
||||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||||
@ -690,18 +691,14 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||||
|
}else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
||||||
|
initList();
|
||||||
} else {
|
} else {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
if (showPoiEntity.getId() != null) {
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
if (poiDaoPoiEntity.getTaskStatus() == 5 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 1) {
|
|
||||||
initList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -757,6 +754,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
@ -189,6 +189,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
checkBoxLife.setTextColor(Color.WHITE);
|
checkBoxLife.setTextColor(Color.WHITE);
|
||||||
checkBoxLife.setChecked(true);
|
checkBoxLife.setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancel() {
|
public void onCancel() {
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
|
||||||
@ -266,8 +267,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNothingSelected(AdapterView<?> parent) { }
|
public void onNothingSelected(AdapterView<?> parent) {
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//数据展示
|
//数据展示
|
||||||
initShowPoi();
|
initShowPoi();
|
||||||
@ -537,6 +540,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -972,18 +976,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||||
|
} else if (showPoiEntity.getTaskStatus() == 0 | showPoiEntity.getTaskStatus() == 1) {
|
||||||
|
initList();
|
||||||
} else {
|
} else {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
if (showPoiEntity.getId()!=null){
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==5||poiDaoPoiEntity.getTaskStatus()==0||poiDaoPoiEntity.getTaskStatus()==1){
|
|
||||||
initList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1052,6 +1053,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
@ -37,7 +37,6 @@ import com.navinfo.outdoor.activity.FragmentManagement;
|
|||||||
import com.navinfo.outdoor.activity.PicturesActivity;
|
import com.navinfo.outdoor.activity.PicturesActivity;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
import com.navinfo.outdoor.util.UploadUtils;
|
|
||||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||||
@ -52,6 +51,7 @@ import com.navinfo.outdoor.room.PoiEntity;
|
|||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
|
import com.navinfo.outdoor.util.UploadUtils;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptorFactory;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
@ -558,21 +558,17 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);//结束领取
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);//结束领取
|
||||||
|
}else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
||||||
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
if (showPoiEntity.getId()!=null){
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==5||poiDaoPoiEntity.getTaskStatus()==0||poiDaoPoiEntity.getTaskStatus()==1){
|
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
|
||||||
fileListByUUID.get(i).delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,6 +607,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
@ -568,21 +568,17 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||||
|
} else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
||||||
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
if (showPoiEntity.getId()!=null){
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==5||poiDaoPoiEntity.getTaskStatus()==0||poiDaoPoiEntity.getTaskStatus()==1){
|
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
|
||||||
fileListByUUID.get(i).delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,6 +617,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
@ -55,6 +55,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
private ArrayList<PoiEntity> newEntities;
|
private ArrayList<PoiEntity> newEntities;
|
||||||
private ArrayList<PoiEntity> poiEntities;
|
private ArrayList<PoiEntity> poiEntities;
|
||||||
private CheckBox cbSelect;
|
private CheckBox cbSelect;
|
||||||
|
private MessageDialog messageDialog;
|
||||||
|
|
||||||
|
|
||||||
public static StaySubmitFragment newInstance(Bundle bundle) {
|
public static StaySubmitFragment newInstance(Bundle bundle) {
|
||||||
@ -126,6 +127,8 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
||||||
cbSelect.setChecked(false);
|
cbSelect.setChecked(false);
|
||||||
refreshData();
|
refreshData();
|
||||||
|
}else if (data.what==Constant.NEST_WORD_SUBMIT){
|
||||||
|
messageDialog.doDismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,8 +221,14 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
if (poiEntities.size() > 0) {
|
if (poiEntities.size() > 0) {
|
||||||
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
||||||
Constant.isPresent = false;
|
Constant.isPresent = false;
|
||||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在提交中,无需重复提交");
|
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||||
WaitDialog.dismiss(2000);
|
messageDialog = MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "任务正在提交中,无需重复提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
baseDialog.doDismiss();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
private final int MARKER_LINE = 2;
|
private final int MARKER_LINE = 2;
|
||||||
private final int MARKER_FACE = 1;
|
private final int MARKER_FACE = 1;
|
||||||
private final int MARKER_BIG = 4;
|
private final int MARKER_BIG = 4;
|
||||||
|
private boolean isBack = false;
|
||||||
private HashMap<String, List<Marker>> removableHashMap;
|
private HashMap<String, List<Marker>> removableHashMap;
|
||||||
private ArrayList<LatLng> latList;
|
private ArrayList<LatLng> latList;
|
||||||
private ArrayList<PoiEntity> poiEntityArrayList;
|
private ArrayList<PoiEntity> poiEntityArrayList;
|
||||||
@ -840,6 +841,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
int taskStatus = Constant.TASK_STARTUP;
|
int taskStatus = Constant.TASK_STARTUP;
|
||||||
int type = Constant.TASK_TYPE;
|
int type = Constant.TASK_TYPE;
|
||||||
int limit = Constant.LIMIT_TYPE;
|
int limit = Constant.LIMIT_TYPE;
|
||||||
|
if (poiDao==null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -1817,19 +1821,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*@Override
|
|
||||||
public boolean onBackPressed() {
|
|
||||||
if (!isBack) {
|
|
||||||
isBack = true;
|
|
||||||
Toast.makeText(getActivity(), "双击退出程序", Toast.LENGTH_SHORT).show();
|
|
||||||
handler.sendEmptyMessageDelayed(0x100, 2000);
|
|
||||||
} else {
|
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* 获取屏幕中心点位置
|
* 获取屏幕中心点位置
|
||||||
*/
|
*/
|
||||||
|
@ -57,18 +57,14 @@ public class PoiSaveUtils {
|
|||||||
* 批量上传数据到服务端
|
* 批量上传数据到服务端
|
||||||
*/
|
*/
|
||||||
public void uploadPoiEntityBatch(List<PoiEntity> poiEntityList) {
|
public void uploadPoiEntityBatch(List<PoiEntity> poiEntityList) {
|
||||||
if (poiEntityList == null) {
|
if (poiEntityList != null) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (poiEntityList.size()==0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
anInt = 0;
|
|
||||||
bInt = 0;
|
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (PoiEntity poiEntity : poiEntityList) {
|
anInt = 0;
|
||||||
|
bInt = 0;
|
||||||
|
for (int i = 0; i < poiEntityList.size(); i++) {
|
||||||
|
PoiEntity poiEntity = poiEntityList.get(i);
|
||||||
if (poiEntity.getType() == 2) { // 如果是充电站数据,首先检查子充电桩的状态
|
if (poiEntity.getType() == 2) { // 如果是充电站数据,首先检查子充电桩的状态
|
||||||
if (saveChargingPileByChargingStation(poiEntity)) {
|
if (saveChargingPileByChargingStation(poiEntity)) {
|
||||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||||
@ -106,6 +102,8 @@ public class PoiSaveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 保存数据到本地,保存后taskStatus为2
|
// * 保存数据到本地,保存后taskStatus为2
|
||||||
// * */
|
// * */
|
||||||
|
@ -116,11 +116,22 @@
|
|||||||
android:id="@+id/iv_pic"
|
android:id="@+id/iv_pic"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/take_pic_arrow"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_pic_video"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/take_poi_video_arrow"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/capture_picture"
|
android:id="@+id/capture_picture"
|
||||||
style="@style/user_data_style"
|
style="@style/user_data_style"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user