修改刷新后数据不显示的问题

This commit is contained in:
wangdongsheng 2021-09-24 18:36:17 +08:00
parent ae15085f30
commit c0b0222f7d
25 changed files with 203 additions and 155 deletions

View File

@ -42,4 +42,5 @@ public class LinkActivity extends BaseActivity implements View.OnClickListener {
finish(); finish();
} }
} }
} }

View File

@ -64,7 +64,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
if (!EventBus.getDefault().isRegistered(this)) {//加上判断 if (!EventBus.getDefault().isRegistered(this)) {//加上判断
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
} }
} }
@Override @Override
@ -278,11 +277,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
}); });
} }
@Override @Override
public void onConfigurationChanged(@NonNull Configuration newConfig) { public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
if (EventBus.getDefault().isRegistered(this))//加上判断 if (EventBus.getDefault().isRegistered(this))//加上判断

View File

@ -142,7 +142,14 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
} }
}); });
} }
@Override
public void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
Message obtain = Message.obtain();
obtain.what = Constant.PICTURE_VIDEO_WORD;
obtain.obj = true;
EventBus.getDefault().post(obtain);
}
@Subscribe @Subscribe
public void onEvent(Message data) { } public void onEvent(Message data) { }

View File

@ -155,7 +155,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
btnSwitch.setOnClickListener(this); btnSwitch.setOnClickListener(this);
//相机记录器 //相机记录器
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE); CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
ivZoomAdd = findViewById(R.id.iv_zoom_add); ivZoomAdd = findViewById(R.id.iv_zoom_add);
ivZoomAdd.setOnClickListener(this); ivZoomAdd.setOnClickListener(this);
ivZoomDel = findViewById(R.id.iv_zoom_del); ivZoomDel = findViewById(R.id.iv_zoom_del);
@ -164,7 +163,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
ivLocation.setOnClickListener(this); ivLocation.setOnClickListener(this);
camera = findViewById(R.id.camera); camera = findViewById(R.id.camera);
camera.setOnClickListener(this); camera.setOnClickListener(this);
ImageView imageView = findViewById(R.id.iv_image); ImageView imageView = findViewById(R.id.image_view);
imageView.setOnClickListener(this); imageView.setOnClickListener(this);
capturePicture = findViewById(R.id.capture_picture); capturePicture = findViewById(R.id.capture_picture);
if (poi_video_type == 2) { if (poi_video_type == 2) {
@ -315,7 +314,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
setResult(0x111, intent); setResult(0x111, intent);
finish(); finish();
break; break;
case R.id.iv_image: case R.id.image_view:
benSwitch(); benSwitch();
break; break;
case R.id.btn_switch: case R.id.btn_switch:
@ -409,7 +408,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
ivPicImage.setVisibility(View.GONE); ivPicImage.setVisibility(View.GONE);
} }
} }
//小图 //小图
private void initMapBig() { private void initMapBig() {
isMapSlide = false; isMapSlide = false;
@ -418,7 +416,6 @@ 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;
@ -451,7 +448,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
obtain.what = Constant.PICTURE_VIDEO_WORD; obtain.what = Constant.PICTURE_VIDEO_WORD;
obtain.obj = true; obtain.obj = true;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
} }
@Override @Override
@ -513,7 +509,7 @@ 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) {
@ -527,7 +523,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
} else { } else {
if (oldCurrentLocation != null) { if (oldCurrentLocation != null) {
LatLng startLatLng = new LatLng(oldCurrentLocation.getLatitude(), oldCurrentLocation.getLongitude()); //旧的坐标 LatLng startLatLng = new LatLng(oldCurrentLocation.getLatitude(), oldCurrentLocation.getLongitude());//旧的坐标
LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标 LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);// double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//
if (poi_video_type == 1) { if (poi_video_type == 1) {
@ -543,7 +539,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
} }
oldCurrentLocation = Constant.currentLocation; oldCurrentLocation = Constant.currentLocation;
}*/ }
} }
public void initMarker() { public void initMarker() {
@ -585,17 +581,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
private void stopTimer() { private void stopTimer() {
if (timer != null) { if (timer != null) {
timer.cancel(); timer.cancel();
timer = null; timer = null;
} }
if (timerTask != null) { if (timerTask != null) {
timerTask.cancel(); timerTask.cancel();
timerTask = null; timerTask = null;
} }
} }
} }

View File

@ -53,7 +53,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
private String region_id; private String region_id;
private SharedPreferences.Editor navInfoEditor; private SharedPreferences.Editor navInfoEditor;
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.activity_user; return R.layout.activity_user;
@ -198,10 +197,8 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
break; break;
} }
} }
private void netWork(HttpParams httpParams) { private void netWork(HttpParams httpParams) {
showLoadingDialog(); showLoadingDialog();
OkGoBuilder.getInstance() OkGoBuilder.getInstance()
@ -239,7 +236,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
}); });
} }
/*public static boolean isEmail(String email) { /*public static boolean isEmail(String email) {
if (null == email || "".equals(email)) return false; if (null == email || "".equals(email)) return false;
Matcher m = compile.matcher(email); Matcher m = compile.matcher(email);
@ -288,22 +284,17 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
pvOptions.show(); pvOptions.show();
} }
private void initJsonData() {//解析数据 省市区三级联动 private void initJsonData() {//解析数据 省市区三级联动
/* /* 注意assets 目录下的Json文件仅供参考实际使用可自行替换文件
* 注意assets 目录下的Json文件仅供参考实际使用可自行替换文件
* 关键逻辑在于循环体 * 关键逻辑在于循环体
*/ */
String JsonData = new GetJsonDataUtil().getJson(UserActivity.this, "prov_city_county.json");//获取assets目录下的json文件数据 String JsonData = new GetJsonDataUtil().getJson(UserActivity.this, "prov_city_county.json");//获取assets目录下的json文件数据
ArrayList<JsonBean> jsonBean = parseData(JsonData);//用GOON 转成实体 ArrayList<JsonBean> jsonBean = parseData(JsonData);//用GOON 转成实体
/* 添加省份数据
/*
* 添加省份数据
* 注意如果是添加的JavaBean实体则实体类需要实现 IPickerViewData 接口 * 注意如果是添加的JavaBean实体则实体类需要实现 IPickerViewData 接口
* PickerView会通过getPickerViewText方法获取字符串显示出来 * PickerView会通过getPickerViewText方法获取字符串显示出来
*/ */
options1Items = jsonBean; options1Items = jsonBean;
for (int i = 0; i < jsonBean.size(); i++) {//遍历省份 for (int i = 0; i < jsonBean.size(); i++) {//遍历省份
ArrayList<String> CityList = new ArrayList<>();//该省的城市列表第二级 ArrayList<String> CityList = new ArrayList<>();//该省的城市列表第二级
ArrayList<ArrayList<CityBean>> city_AreaList = new ArrayList<>();//该省的所有地区列表第三级 ArrayList<ArrayList<CityBean>> city_AreaList = new ArrayList<>();//该省的所有地区列表第三级
@ -327,12 +318,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
Province_AreaList.add(City_AreaList);//添加该省所有地区数据 Province_AreaList.add(City_AreaList);//添加该省所有地区数据
city_AreaList.add(AreaList);//添加该省所有地区数据的bean city_AreaList.add(AreaList);//添加该省所有地区数据的bean
} }
/* /*添加城市数据
* 添加城市数据
*/ */
options2Items.add(CityList); options2Items.add(CityList);
/* /* 添加地区数据
* 添加地区数据
*/ */
options3Items.add(Province_AreaList); options3Items.add(Province_AreaList);
cityItems.add(city_AreaList); cityItems.add(city_AreaList);
@ -354,5 +343,4 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
return detail; return detail;
} }
} }

View File

@ -32,9 +32,6 @@ import cn.jzvd.JzvdStd;
*/ */
public class VideoActivity extends BaseActivity implements View.OnClickListener { public class VideoActivity extends BaseActivity implements View.OnClickListener {
private String videoPath;
private JzvdStd jzvdStd;
@Override @Override
protected int getLayout() { protected int getLayout() {
return R.layout.activity_video; return R.layout.activity_video;
@ -43,8 +40,8 @@ public class VideoActivity extends BaseActivity implements View.OnClickListener
@Override @Override
protected void initView() { protected void initView() {
super.initView(); super.initView();
videoPath = getIntent().getStringExtra("video"); String videoPath = getIntent().getStringExtra("video");
jzvdStd = findViewById(R.id.jz_video); JzvdStd jzvdStd = findViewById(R.id.jz_video);
ImageView imageVideo = findViewById(R.id.iv_video); ImageView imageVideo = findViewById(R.id.iv_video);
imageVideo.setOnClickListener(this); imageVideo.setOnClickListener(this);
jzvdStd.setUp(videoPath,"", Jzvd.SCREEN_NORMAL); jzvdStd.setUp(videoPath,"", Jzvd.SCREEN_NORMAL);

View File

@ -24,7 +24,7 @@ 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”位置权限,否则当前功能将不可使用";
@ -186,7 +186,7 @@ public class Constant {
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.23";//版本 public static final String NAVIN_FO="9.24";//版本
/** /**
* 联系我们的QQ群名称和QQ群号 * 联系我们的QQ群名称和QQ群号

View File

@ -102,21 +102,20 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
@Override @Override
public void onSuccess(MeasureBean response, int id) { public void onSuccess(MeasureBean response, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
//单选 //单选
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice(); if (response.getBody().getMultiChoice() != null) {
if (multiChoice != null) { List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
for (int i = 0; i < multiChoice.size(); i++) { for (int i = 0; i < multiChoice.size(); i++) {
baleen.add(new BolBean(multiChoice.get(i).getId(), multiChoice.get(i).getQuestion(), multiChoice.get(i).getOption(), true)); baleen.add(new BolBean(multiChoice.get(i).getId(), multiChoice.get(i).getQuestion(), multiChoice.get(i).getOption(), true));
examId = multiChoice.get(i).getExamId(); examId = multiChoice.get(i).getExamId();
} }
} }
//多选 //多选
List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice1 = response.getBody().getSingleChoice(); if (response.getBody().getSingleChoice() != null) {
if (singleChoice1 != null) { List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice = response.getBody().getSingleChoice();
for (int i = 0; i < singleChoice1.size(); i++) { for (int i = 0; i < singleChoice.size(); i++) {
baleen.add(new BolBean(singleChoice1.get(i).getId(), singleChoice1.get(i).getQuestion(), singleChoice1.get(i).getOption(), false)); baleen.add(new BolBean(singleChoice.get(i).getId(), singleChoice.get(i).getQuestion(), singleChoice.get(i).getOption(), false));
examId = singleChoice1.get(i).getExamId(); examId = singleChoice.get(i).getExamId();
} }
} }
if (baleen != null) { if (baleen != null) {

View File

@ -840,8 +840,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) {
if (data.what == Constant.CHARGING_PILE_WORD) { if (data.what == Constant.PICTURE_VIDEO_WORD) {
latLng = (LatLng) data.obj; if ((boolean) data.obj) {
initPileSharePre();
}
} }
} }

View File

@ -686,6 +686,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
}); });
} }
public void initRemovePileSharePre() { public void initRemovePileSharePre() {
//获取SharedPreferences对象方法中两个参数的意思为第一个name //获取SharedPreferences对象方法中两个参数的意思为第一个name
@ -729,9 +730,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) {
if (data.what == Constant.CHARGING_STATION_WORD) { // 移动充电站点位 if (data.what == Constant.CHARGING_PILE_STATION) { // 新增充电桩
latLng = (LatLng) data.obj;
} else if (data.what == Constant.CHARGING_PILE_STATION) { // 新增充电桩
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) data.obj; ChargingPileEntity chargingPileEntity = (ChargingPileEntity) data.obj;
List<ChargingPileEntity> currentChargingPileList = chargingPileAdapter.getChargingPileEntities(); List<ChargingPileEntity> currentChargingPileList = chargingPileAdapter.getChargingPileEntities();
m: m:
@ -751,6 +750,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingPileAdapter.notifyDataSetChanged(); chargingPileAdapter.notifyDataSetChanged();
} else if (data.what == Constant.PILE_MARKER_SHOW) { } else if (data.what == Constant.PILE_MARKER_SHOW) {
initPileMarkerShow(); initPileMarkerShow();
}else if (data.what == Constant.PICTURE_VIDEO_WORD) {
if ((boolean) data.obj) {
initStationSharePre();
}
} }
} }
@ -1015,6 +1018,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
return; return;
} }
poiEntity.setTaskStatus(2);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -1462,7 +1466,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
poiEntity.setCreateTime(format); poiEntity.setCreateTime(format);
poiEntity.setExistence(existence); poiEntity.setExistence(existence);
poiEntity.setType(2); poiEntity.setType(2);
poiEntity.setTaskStatus(2);
return poiEntity; return poiEntity;
} }

View File

@ -79,7 +79,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
if (!hidden) { if (!hidden) {
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT); setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
if (slidingPaneLayout != null) { if (slidingPaneLayout != null) {
slidingPaneLayout.setScrollableView(recyclerFilter); } slidingPaneLayout.setScrollableView(recyclerFilter);
}
initHeader(); initHeader();
} }
} }
@ -92,7 +93,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
Bundle arguments = getArguments(); Bundle arguments = getArguments();
if (arguments != null) { if (arguments != null) {
isSliding = arguments.getBoolean("isSliding", true); isSliding = arguments.getBoolean("isSliding", true);
Log.d("TAG", "onCaress's: " + isSliding); } Log.d("TAG", "onCaress's: " + isSliding);
}
if (isSliding) { if (isSliding) {
// 监听到返回按钮点击事件 // 监听到返回按钮点击事件
Message obtain = Message.obtain(); Message obtain = Message.obtain();
@ -131,7 +133,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
if (allPoi != null) { if (allPoi != null) {
for (int i = 0; i < allPoi.size(); i++) { for (int i = 0; i < allPoi.size(); i++) {
if (allPoi.get(i).getTaskStatus() == 0 || allPoi.get(i).getTaskStatus() == 1) { if (allPoi.get(i).getTaskStatus() == 0 || allPoi.get(i).getTaskStatus() == 1) {
poiEntities.add(allPoi.get(i)); } poiEntities.add(allPoi.get(i));
}
} }
} }
filterAdapter.setAllPoi(poiEntities); filterAdapter.setAllPoi(poiEntities);
@ -263,7 +266,9 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
recyclerFilter.setAdapter(filterAdapter); recyclerFilter.setAdapter(filterAdapter);
recyclerFilter.setScrollAlphaChangeListener(new XRecyclerView.ScrollAlphaChangeListener() { recyclerFilter.setScrollAlphaChangeListener(new XRecyclerView.ScrollAlphaChangeListener() {
@Override @Override
public void onAlphaChange(int alpha) {} public void onAlphaChange(int alpha) {
}
@Override @Override
public int setLimitHeight() { public int setLimitHeight() {
return 0; return 0;
@ -272,9 +277,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
recyclerFilter.getDefaultFootView().setNoMoreHint("成功加载完毕"); recyclerFilter.getDefaultFootView().setNoMoreHint("成功加载完毕");
recyclerFilter.setLoadingListener(new XRecyclerView.LoadingListener() { recyclerFilter.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override @Override
public void onRefresh() {} public void onRefresh() {
}
@Override @Override
public void onLoadMore() {} public void onLoadMore() {
}
}); });
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
@ -304,8 +312,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
public void item(PoiEntity poiEntity, boolean isChockBox) { public void item(PoiEntity poiEntity, boolean isChockBox) {
if (isChockBox) { if (isChockBox) {
btnChock.add(poiEntity); btnChock.add(poiEntity);
} } else {
else {
for (int i = 0; i < btnChock.size(); i++) { for (int i = 0; i < btnChock.size(); i++) {
if (poiEntity.getId().equals(btnChock.get(i).getId())) { if (poiEntity.getId().equals(btnChock.get(i).getId())) {
btnChock.remove(poiEntity); btnChock.remove(poiEntity);
@ -342,10 +349,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
obtain.what = Constant.TREASURE_FRAGMENT; obtain.what = Constant.TREASURE_FRAGMENT;
obtain.obj = true; obtain.obj = true;
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain);
Message obtains = Message.obtain(); Message obtains = Message.obtain();
obtains.what = Constant.JOB_WORD_MONITOR; obtains.what = Constant.JOB_WORD_MONITOR;
obtains.obj = true; obtains.obj = true;
EventBus.getDefault().post(obtains); EventBus.getDefault().post(obtains);
onBackPressed(); onBackPressed();
break; break;
case R.id.cl_number: case R.id.cl_number:
@ -458,12 +467,14 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
case 2: case 2:
Constant.TASK_STARTUP = 1; Constant.TASK_STARTUP = 1;
break; break;
/* case 3: /*
case 3:
Constant.TASK_STATUS = 2; Constant.TASK_STATUS = 2;
break; break;
case 4: case 4:
Constant.TASK_STATUS = 3; Constant.TASK_STATUS = 3;
break;*/ break;
*/
} }
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain.what = Constant.JOB_WORD_MONITOR;

View File

@ -57,6 +57,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
private ImageView gatheringCamera; private ImageView gatheringCamera;
private ArrayList<BankPathBean> jsonBean; private ArrayList<BankPathBean> jsonBean;
private String value; private String value;
private SharedPreferences.Editor navInfoEditor;
public static GatheringFragment newInstance(Bundle bundle) { public static GatheringFragment newInstance(Bundle bundle) {
GatheringFragment fragment = new GatheringFragment(); GatheringFragment fragment = new GatheringFragment();
@ -74,7 +75,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
protected void initView() { protected void initView() {
super.initView(); super.initView();
SharedPreferences navInfo = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE); SharedPreferences navInfo = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
SharedPreferences.Editor navInfoEditor = navInfo.edit(); navInfoEditor = navInfo.edit();
ImageView ivGathering = findViewById(R.id.iv_gathering); ImageView ivGathering = findViewById(R.id.iv_gathering);
ivGathering.setOnClickListener(this); ivGathering.setOnClickListener(this);
ImageView imageBank = findViewById(R.id.iv_bank); ImageView imageBank = findViewById(R.id.iv_bank);
@ -90,19 +91,16 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
if (Constant.NAME != null) { if (Constant.NAME != null) {
tvName.setText(Constant.NAME); tvName.setText(Constant.NAME);
} }
/* if (Constant.ID_NUMBER != null && Constant.BACKGROUND != null) {
String bankAccount = navInfo.getString("bankAccount", null);
String bank = navInfo.getString("bankName", null);
String idNumber = navInfo.getString("idNumber", null);
if (bankAccount!=null&&!bankAccount.equals("")&&bank!=null&&!bank.equals("")&&idNumber!=null&&!idNumber.equals("")){
etBankNum.setText(idNumber);
tvBank.setText(bank);
value=bankAccount;
btnBank.setText("重新绑定");
}*/
if (Constant.ID_NUMBER != null && Constant.BACKGROUND_NAME != null && Constant.BACKGROUND != null) {
etBankNum.setText(Constant.ID_NUMBER); etBankNum.setText(Constant.ID_NUMBER);
tvBank.setText(Constant.BACKGROUND_NAME); if (Constant.BACKGROUND_NAME==null){
String bank = navInfo.getString("bankName", null);
if (bank!=null&&!bank.equals("")){
tvBank.setText(bank);
}
}else {
tvBank.setText(Constant.BACKGROUND_NAME);
}
value = Constant.BACKGROUND; value = Constant.BACKGROUND;
btnBank.setText("重新绑定"); btnBank.setText("重新绑定");
} }
@ -252,6 +250,10 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
Constant.BACKGROUND = value; Constant.BACKGROUND = value;
Constant.BACKGROUND_NAME = bank; Constant.BACKGROUND_NAME = bank;
Constant.ID_NUMBER = etBankAccount; Constant.ID_NUMBER = etBankAccount;
navInfoEditor.putString("bankAccount", value);
navInfoEditor.putString("idNumber", etBankAccount);
navInfoEditor.putString("bankName",bank);
navInfoEditor.commit();
getActivity().finish(); getActivity().finish();
return false; return false;
} }

View File

@ -322,8 +322,10 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) {
if (data.what == Constant.OTHER_WORD) { if (data.what == Constant.PICTURE_VIDEO_WORD) {
latLng = (LatLng) data.obj; if ((boolean) data.obj) {
initOtherSharePre();
}
} }
} }
@ -502,6 +504,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
return; return;
} }
poiEntity.setTaskStatus(2);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -775,7 +778,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
poiEntity.setCreateTime(format); poiEntity.setCreateTime(format);
poiEntity.setExistence(existence); poiEntity.setExistence(existence);
poiEntity.setType(5); poiEntity.setType(5);
poiEntity.setTaskStatus(2);
return poiEntity; return poiEntity;
} }

View File

@ -573,7 +573,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} }
@Subscribe @Subscribe
public void onEvent(Message data) { } public void onEvent(Message data) {
if (data.what == Constant.PICTURE_VIDEO_WORD) {
if ((boolean) data.obj) {
initPoiSharePre();
}
}
}
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -752,6 +758,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
return; return;
} }
poiEntity.setTaskStatus(2);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -1072,7 +1079,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiEntity.setCreateTime(format); poiEntity.setCreateTime(format);
poiEntity.setExistence(existence); poiEntity.setExistence(existence);
poiEntity.setType(1); poiEntity.setType(1);
poiEntity.setTaskStatus(2);
return poiEntity; return poiEntity;
} }

View File

@ -74,9 +74,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
tvTaskTitle.setText("其他任务列表"); tvTaskTitle.setText("其他任务列表");
break; break;
} }
ImageView ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish); ImageView ivPoiTaskFinish = findViewById(R.id.iv_poiTask_finish);
ivPoiTaskFinish.setOnClickListener(this); ivPoiTaskFinish.setOnClickListener(this);
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv); poiTaskXrv = findViewById(R.id.poiTask_xrv);
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity())); poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader); poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
poiTaskXrv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate); poiTaskXrv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
@ -95,7 +95,6 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans); poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
poiTaskXrv.setAdapter(poiTaskAdapter); poiTaskXrv.setAdapter(poiTaskAdapter);
poiTaskAdapter.notifyDataSetChanged(); poiTaskAdapter.notifyDataSetChanged();
} }
@Override @Override

View File

@ -339,23 +339,44 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
@Override @Override
public void run() { public void run() {
ZipUtil.zipFiles(videoFileList, fileZip, null); ZipUtil.zipFiles(videoFileList, fileZip, null);
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId()); if (showPoiEntity.getId()==null){
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) { if (showPoiEntity == null || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() { Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
initPoiSaveLocal(true); initPoiSaveLocal(true);
} }
}); });
} else { } else {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() { Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip); poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
Constant.isPresent=false; Constant.isPresent=false;
} }
}); });
}
}else {
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initPoiSaveLocal(true);
}
});
} else {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
Constant.isPresent=false;
}
});
}
} }
} }
}).start(); }).start();
} else { } else {
@ -384,6 +405,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
return; return;
} }
poiEntity.setTaskStatus(2);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -554,11 +576,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
super.onDestroyView(); super.onDestroyView();
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);//结束领取
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} else { } else {
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain.what = Constant.JOB_WORD_MONITOR;
@ -661,7 +680,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
String format = formatter.format(calendar.getTime()); String format = formatter.format(calendar.getTime());
poiEntity.setCreateTime(format); poiEntity.setCreateTime(format);
poiEntity.setType(3); poiEntity.setType(3);
poiEntity.setTaskStatus(2);
if (fmPoiVideoPic.getTag() == null) { if (fmPoiVideoPic.getTag() == null) {
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
if (fileListByUUID != null) { if (fileListByUUID != null) {

View File

@ -182,7 +182,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
initShowPoi(); initShowPoi();
//禁用可操作性控件 //禁用可操作性控件
// disables(); // disables();
} }
private void initShowPoi() { private void initShowPoi() {
@ -344,25 +343,45 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
@Override @Override
public void run() { public void run() {
ZipUtil.zipFiles(videoFileList, fileZip, null);//压缩 ZipUtil.zipFiles(videoFileList, fileZip, null);//压缩
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId()); if (showPoiEntity.getId()==null){
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) { if (showPoiEntity == null || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() { Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
initPoiSaveLocal(true); initPoiSaveLocal(true);
} }
}); });
} else {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
Constant.isPresent = false;
}
});
}
}else {
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initPoiSaveLocal(true);
}
});
} else { } else {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() { Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip); poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
Constant.isPresent = false; Constant.isPresent = false;
} }
}); });
}
} }
} }
}).start(); }).start();
} else { } else {
@ -391,6 +410,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
return; return;
} }
poiEntity.setTaskStatus(2);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -670,7 +690,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
String format = formatter.format(calendar.getTime()); String format = formatter.format(calendar.getTime());
poiEntity.setCreateTime(format); poiEntity.setCreateTime(format);
poiEntity.setType(4); poiEntity.setType(4);
poiEntity.setTaskStatus(2);
if (fmRoadPic.getTag() == null) { if (fmRoadPic.getTag() == null) {
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
if (fileListByUUID != null) { if (fileListByUUID != null) {

View File

@ -293,8 +293,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
sharedEdit = sharedPreferences.edit(); sharedEdit = sharedPreferences.edit();
//fragment 管理器 //fragment 管理器
supportFragmentManager = Objects.requireNonNull(getActivity()).getSupportFragmentManager(); supportFragmentManager = Objects.requireNonNull(getActivity()).getSupportFragmentManager();
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao();
builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity())); builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity()));
sliding_layout = findViewById(R.id.sliding_layout); sliding_layout = findViewById(R.id.sliding_layout);
frameLayout = findViewById(R.id.frame_layout); frameLayout = findViewById(R.id.frame_layout);
@ -366,6 +364,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() { tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() {
@Override @Override
public void onFinish() { public void onFinish() {
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao();
refreshFilterData(); refreshFilterData();
//上传用户位置金纬度 //上传用户位置金纬度
iniUserLocation(); iniUserLocation();

View File

@ -3,18 +3,15 @@ package com.navinfo.outdoor.http;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
public class HttpInterface { public class HttpInterface {
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口 public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口 public static final String IP = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
public static final String USER_PATH ="/user/";//我的
public static final String USER_PATH = "/user/";//我的 public static final String MSG_LIST_PATH ="/msgList/";//发现
public static final String MSG_LIST_PATH = "/msgList/";//发现 public static final String USER_LOGIN_PATH ="/userlogin/";//登录
public static final String USER_LOGIN_PATH = "/userlogin/";//登录 public static final String PRICE_PATH ="/price/";//提现
public static final String PRICE_PATH = "/price/";//提现 public static final String TASK_PATH ="/task/";//任务
public static final String TASK_PATH = "/task/";//任务 /* public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
/* public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
public static final String APKIP = "http://172.23.139.4:8001/"; public static final String APKIP = "http://172.23.139.4:8001/";
public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口*/ public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口*/
/* 用户版本升级 /* 用户版本升级

View File

@ -57,7 +57,10 @@ public class PoiSaveUtils {
* 批量上传数据到服务端 * 批量上传数据到服务端
*/ */
public void uploadPoiEntityBatch(List<PoiEntity> poiEntityList) { public void uploadPoiEntityBatch(List<PoiEntity> poiEntityList) {
if (poiEntityList == null || poiEntityList.isEmpty()) { if (poiEntityList == null) {
return;
}
if (poiEntityList.size()==0){
return; return;
} }
anInt = 0; anInt = 0;
@ -295,6 +298,7 @@ public class PoiSaveUtils {
if (execute.code() != 200) { if (execute.code() != 200) {
return; return;
} }
assert execute.body() != null;
String bodyStr = execute.body().string(); String bodyStr = execute.body().string();
if (bodyStr == null) { if (bodyStr == null) {
return; return;

View File

@ -154,16 +154,15 @@
style="@style/login_style" style="@style/login_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="261dp"
android:layout_marginRight="40dp"
android:layout_marginLeft="40dp" android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:gravity="center" android:gravity="center"
android:text="@string/btn_login" android:text="@string/btn_login"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/et_login_paw" app:layout_constraintEnd_toEndOf="@+id/et_login_paw"
app:layout_constraintStart_toStartOf="@+id/et_login_paw" app:layout_constraintStart_toStartOf="@+id/et_login_paw"
app:layout_constraintTop_toBottomOf="@+id/tv_statement" /> app:layout_constraintTop_toBottomOf="@+id/iv_login_check"
app:layout_constraintVertical_bias="0.20" />
<TextView <TextView
android:id="@+id/tv_view" android:id="@+id/tv_view"

View File

@ -47,9 +47,9 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_default="percent" app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent="0.4" /> app:layout_constraintWidth_percent="0.4" />
</FrameLayout> </FrameLayout>
<ImageView <ImageView
android:id="@+id/iv_image" android:id="@+id/image_view"
android:layout_width="300dp" android:layout_width="300dp"
android:layout_height="157dp" android:layout_height="157dp"
app:layout_constraintHeight_default="percent" app:layout_constraintHeight_default="percent"

View File

@ -216,7 +216,6 @@
android:id="@+id/rl_draw" android:id="@+id/rl_draw"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:visibility="gone"
android:background="@drawable/road_shape" android:background="@drawable/road_shape"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -220,13 +220,14 @@
style="@style/login_style" style="@style/login_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginLeft="20dp" android:layout_marginStart="24dp"
android:layout_marginTop="20dp" android:layout_marginEnd="24dp"
android:layout_marginRight="50dp"
android:gravity="center" android:gravity="center"
android:text="提交" android:text="提交"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_confirm_paw" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_confirm_paw"
app:layout_constraintVertical_bias="0.20" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -276,12 +276,14 @@
style="@style/login_style" style="@style/login_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginLeft="35dp" android:layout_marginStart="35dp"
android:layout_marginTop="20dp" android:layout_marginEnd="35dp"
android:layout_marginRight="35dp"
android:gravity="center" android:gravity="center"
android:text="注册" android:text="注册"
app:layout_constraintLeft_toLeftOf="@id/iv_register_check" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_register_check" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_register_check"
app:layout_constraintVertical_bias="0.20" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>