1.修改拍摄的语音提醒 2.修改log日志 3.修改数据库更新操作

This commit is contained in:
wangdongsheng 2021-11-17 18:34:08 +08:00
parent 61915b4ead
commit f46d12a77e
34 changed files with 505 additions and 421 deletions

View File

@ -157,14 +157,37 @@ public class HomeActivity extends BaseActivity {
if (!dataString.equals("")) { if (!dataString.equals("")) {
Constant.isPresent = true; Constant.isPresent = true;
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show(this, "提示", dataString, "确定"); DialogSettings.cancelable = false;
MessageDialog.show(this, "提示", dataString, "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
Message obtain1 = Message.obtain();
obtain1.what = Constant.EVENT_STAY_REFRESH;
EventBus.getDefault().post(obtain1);
return false;
}
});
} }
} else if (data.what == Constant.NEST_WORD_REGISTER) { } else if (data.what == Constant.NEST_WORD_REGISTER) {
String dataString = (String) data.obj; String dataString = (String) data.obj;
if (!dataString.equals("")) { if (!dataString.equals("")) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show(this, "提示", dataString, "确定"); DialogSettings.cancelable = false;
MessageDialog.show(this, "提示", dataString, "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
return false;
}
});
} }
}else if (data.what==Constant.EVENT_MESSAGE){ }else if (data.what==Constant.EVENT_MESSAGE){

View File

@ -33,6 +33,7 @@ import com.navinfo.outdoor.util.Base64;
import com.navinfo.outdoor.util.Md5Util; import com.navinfo.outdoor.util.Md5Util;
import com.navinfo.outdoor.util.SpeakMode; import com.navinfo.outdoor.util.SpeakMode;
import com.navinfo.outdoor.util.SystemTTS; import com.navinfo.outdoor.util.SystemTTS;
import com.navinfo.outdoor.util.TimestampUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
@ -99,7 +100,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
} }
} }
loginBuilder = new StringBuilder(); loginBuilder = new StringBuilder();
loginBuilder.append("LoginActivity-initData ,"); loginBuilder.append(TimestampUtil.time()).append("LoginActivity-initData ,");
} }
@Subscribe @Subscribe
@ -145,19 +146,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.tv_register: case R.id.tv_register:
loginBuilder.append("点击注册 ,"); loginBuilder.append(TimestampUtil.time()).append("点击注册 ,");
Intent register = new Intent(this, FragmentManagement.class); Intent register = new Intent(this, FragmentManagement.class);
register.putExtra("tag", 5); register.putExtra("tag", 5);
startActivity(register); startActivity(register);
break; break;
case R.id.tv_forget_paw: case R.id.tv_forget_paw:
loginBuilder.append("点击忘记密码 ,"); loginBuilder.append(TimestampUtil.time()).append("点击忘记密码 ,");
Intent forgetPaw = new Intent(this, FragmentManagement.class); Intent forgetPaw = new Intent(this, FragmentManagement.class);
forgetPaw.putExtra("tag", 6); forgetPaw.putExtra("tag", 6);
startActivity(forgetPaw); startActivity(forgetPaw);
break; break;
case R.id.btn_login: case R.id.btn_login:
loginBuilder.append("点击登录 , "); loginBuilder.append(TimestampUtil.time()).append("点击登录 , ");
btnLogin.setEnabled(false); btnLogin.setEnabled(false);
Message message = new Message(); Message message = new Message();
message.what = 0x103; message.what = 0x103;
@ -180,7 +181,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
} }
break; break;
case R.id.tv_statement: case R.id.tv_statement:
loginBuilder.append("点击了用户协议 ,"); loginBuilder.append(TimestampUtil.time()).append("点击了用户协议 ,");
Intent stateIntent = new Intent(this, StatementActivity.class); Intent stateIntent = new Intent(this, StatementActivity.class);
startActivity(stateIntent); startActivity(stateIntent);
break; break;
@ -223,7 +224,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
Constant.REFRESH_TOKEN = body.getRefresh_token(); Constant.REFRESH_TOKEN = body.getRefresh_token();
Constant.USHERED = body.getUserId(); Constant.USHERED = body.getUserId();
Constant.PASS_WORD = paw; Constant.PASS_WORD = paw;
loginBuilder.append("登录获取token ,"); loginBuilder.append(TimestampUtil.time()).append("登录获取token ,");
initGetUserInfo();//获取用户信息 initGetUserInfo();//获取用户信息
}else { }else {
Toast.makeText(LoginActivity.this, "获取id 失败", Toast.LENGTH_SHORT).show(); Toast.makeText(LoginActivity.this, "获取id 失败", Toast.LENGTH_SHORT).show();
@ -301,11 +302,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
navInfoEditor.commit(); navInfoEditor.commit();
int needGuide = body.getNeedGuide();//0不需要 1需要 int needGuide = body.getNeedGuide();//0不需要 1需要
if (needGuide == 1) { if (needGuide == 1) {
loginBuilder.append("进入介绍页 ,"); loginBuilder.append(TimestampUtil.time()).append("进入介绍页 ,");
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class); Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
startActivity(intent); startActivity(intent);
} else { } else {
loginBuilder.append("登录成功 ,"); loginBuilder.append(TimestampUtil.time()).append("登录成功 ,");
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_SHORT).show(); Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(LoginActivity.this, HomeActivity.class); Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
startActivity(intent); startActivity(intent);
@ -340,19 +341,19 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
loginBuilder.append("onPause ,"); loginBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
loginBuilder.append("onStop ,"); loginBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
loginBuilder.append("onDestroy"); loginBuilder.append(TimestampUtil.time()).append("onDestroy");
loginBuilder.append("\r\n"); loginBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), loginBuilder.toString(), true);
if (EventBus.getDefault().isRegistered(this)) {//加上判断 if (EventBus.getDefault().isRegistered(this)) {//加上判断

View File

@ -44,6 +44,7 @@ import com.navinfo.outdoor.util.Geohash;
import com.navinfo.outdoor.util.GeometryTools; import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.MyTecentLocationSource; import com.navinfo.outdoor.util.MyTecentLocationSource;
import com.navinfo.outdoor.util.SystemTTS; import com.navinfo.outdoor.util.SystemTTS;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtil; import com.navinfo.outdoor.util.ToastUtil;
import com.otaliastudios.cameraview.CameraListener; import com.otaliastudios.cameraview.CameraListener;
import com.otaliastudios.cameraview.CameraLogger; import com.otaliastudios.cameraview.CameraLogger;
@ -100,7 +101,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
private ViewGroup layerChange; // 切换地图和相机的父控件 private ViewGroup layerChange; // 切换地图和相机的父控件
private CheckBox capturePicture, cbMapType; //拍照 private CheckBox capturePicture, cbMapType; //拍照
private boolean isMapSlide = false; private boolean isMapSlide = false;
private boolean isOration = false; private boolean isOration = true;
private boolean isTerminus = false; private boolean isTerminus = false;
private boolean isBack = true; private boolean isBack = true;
private int type = 0; private int type = 0;
@ -175,10 +176,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
if (type == 3) {//poiVideo 1秒 if (type == 3) {//poiVideo 1秒
ivPicVideoImage.setVisibility(View.VISIBLE); ivPicVideoImage.setVisibility(View.VISIBLE);
ivPicRoadImage.setVisibility(View.GONE); ivPicRoadImage.setVisibility(View.GONE);
radioPicture = 2; radioPicture = 3;
radioBtnAuto.setTextColor(Color.parseColor("#FFEB3B")); radioBtnAutoSec.setTextColor(Color.parseColor("#FFEB3B"));
radioBtnHand.setTextColor(Color.WHITE); radioBtnHand.setTextColor(Color.WHITE);
radioBtnAutoSec.setTextColor(Color.WHITE); radioBtnAuto.setTextColor(Color.WHITE);
} else if (type == 4) {//道路2秒 } else if (type == 4) {//道路2秒
ivPicRoadImage.setVisibility(View.VISIBLE); ivPicRoadImage.setVisibility(View.VISIBLE);
ivPicVideoImage.setVisibility(View.GONE); ivPicVideoImage.setVisibility(View.GONE);
@ -193,7 +194,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
switch (checkedId) { switch (checkedId) {
case R.id.radio_btn_hand://手动 case R.id.radio_btn_hand://手动
radioPicture = 1; radioPicture = 1;
isOration = true; isOration = false;
capturePicture.setText("拍摄"); capturePicture.setText("拍摄");
capturePicture.setChecked(false); capturePicture.setChecked(false);
radioBtnHand.setTextColor(Color.parseColor("#FFEB3B")); radioBtnHand.setTextColor(Color.parseColor("#FFEB3B"));
@ -247,18 +248,16 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
if (isChecked) { if (isChecked) {
if (radioPicture != 1) { if (radioPicture != 1) {
isOration = true;
capturePicture.setText("暂停采集"); capturePicture.setText("暂停采集");
picturesBuilder.append("capturePicture 点击了开始采集 ,"); picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了开始采集 ,");
} else { } else {
picturesBuilder.append("capturePicture 点击了拍摄 ,"); picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了拍摄 ,");
} }
startTimer(); startTimer();
} else { } else {
if (radioPicture != 1) { if (radioPicture != 1) {
isOration = false;
capturePicture.setText("开始采集"); capturePicture.setText("开始采集");
picturesBuilder.append("capturePicture 点击了暂停采集 ,"); picturesBuilder.append(TimestampUtil.time()).append("capturePicture 点击了暂停采集 ,");
} }
stopTimer(); stopTimer();
} }
@ -285,6 +284,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
// 如果当前手机是竖向则不 // 如果当前手机是竖向则不
if (isOration) { if (isOration) {
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) { if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
isOration = true;
Toast.makeText(PicturesActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show(); Toast.makeText(PicturesActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
picturesBuilder.append("camera 用户竖屏拍照 ,"); picturesBuilder.append("camera 用户竖屏拍照 ,");
stopTimer(); stopTimer();
@ -320,7 +320,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
message.what = 0x103; message.what = 0x103;
handler.sendMessage(message); handler.sendMessage(message);
}*/ }*/
if (file.exists() && file != null) { if (file.exists() && file!= null) {
WebPNative webPNative = new WebPNative(); WebPNative webPNative = new WebPNative();
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
@ -467,7 +467,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
} }
picturesBuilder = new StringBuilder(); picturesBuilder = new StringBuilder();
picturesBuilder.append("PicturesActivity-onCreate-initData ,"); picturesBuilder.append(TimestampUtil.time()).append("PicturesActivity-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
picturesBuilder.append("userId:").append(Constant.USHERED).append(","); picturesBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -481,7 +481,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
if (isOration) { if (isOration) {
stopTimer(); stopTimer();
} }
picturesBuilder.append("onClick 点击了结束采集 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了结束采集 ,");
Intent intent = new Intent(); Intent intent = new Intent();
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp"; finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath); intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
@ -489,29 +489,29 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
this.finish(); this.finish();
break; break;
case R.id.image_view: case R.id.image_view:
picturesBuilder.append("onClick 点击了切换的窗口 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了切换的窗口 ,");
v.setEnabled(false); v.setEnabled(false);
benSwitch(); benSwitch();
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息 handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
break; break;
case R.id.btn_switch: case R.id.btn_switch:
picturesBuilder.append("onClick 点击了切换按钮 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了切换按钮 ,");
v.setEnabled(false); v.setEnabled(false);
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息 handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
benSwitch(); benSwitch();
break; break;
case R.id.iv_zoom_add://放大 case R.id.iv_zoom_add://放大
picturesBuilder.append("onClick 点击了放大 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了放大 ,");
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn(); CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
tencentMap.animateCamera(cameraUpdateIn); tencentMap.animateCamera(cameraUpdateIn);
break; break;
case R.id.iv_zoom_del://缩小 case R.id.iv_zoom_del://缩小
picturesBuilder.append("onClick 点击了缩小 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了缩小 ,");
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut(); CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
tencentMap.animateCamera(cameraUpdateOut); tencentMap.animateCamera(cameraUpdateOut);
break; break;
case R.id.iv_location://定位: case R.id.iv_location://定位:
picturesBuilder.append("onClick 点击了定位 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了定位 ,");
if (Constant.currentLocation != null) { if (Constant.currentLocation != null) {
CameraUpdate cameraSigma = CameraUpdateFactory CameraUpdate cameraSigma = CameraUpdateFactory
.newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标地图目标经纬度 .newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标地图目标经纬度
@ -649,7 +649,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
picturesBuilder.append("onPause ,"); picturesBuilder.append(TimestampUtil.time()).append("onPause ,");
tvMapView.onPause(); tvMapView.onPause();
camera.close(); camera.close();
stopTimer(); stopTimer();
@ -658,7 +658,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
picturesBuilder.append("onStop ,"); picturesBuilder.append(TimestampUtil.time()).append("onStop ,");
tvMapView.onStop(); tvMapView.onStop();
} }
@ -676,7 +676,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
removables.get(i).remove(); removables.get(i).remove();
} }
removables.clear(); removables.clear();
picturesBuilder.append("onDestroy"); picturesBuilder.append(TimestampUtil.time()).append("onDestroy");
picturesBuilder.append("\r\n"); picturesBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
if (EventBus.getDefault().isRegistered(this)) { if (EventBus.getDefault().isRegistered(this)) {
@ -720,7 +720,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
sb.append("\r\n"); sb.append("\r\n");
if (isBack) { if (isBack) {
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true); FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
// initSpeed(); //公里限速提醒
initSpeed();
//快到终点的语音播报 //快到终点的语音播报
initTerminus(); initTerminus();
} }
@ -761,12 +762,12 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
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 (radioPicture == 2) { if (type == 3) {
if (a > 25) {//25千米/h if (a > 40) {//40千米/h
systemTTS.playText("您已超速"); systemTTS.playText("您已超速");
} }
} else if (radioPicture == 3) { } else if (type == 4) {
if (a > 70) {//70千米/h if (a > 80) {//80千米/h
systemTTS.playText("您已超速"); systemTTS.playText("您已超速");
} }
} }
@ -775,15 +776,29 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
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 (radioPicture == 2) { if (type == 3) {
double speeds = ((geometry / 2) * 3600 / 1000); if (radioPicture==2){
if (speeds > 25) {//25千米/h double speeds = ((geometry / 1) * 3600 / 1000);
systemTTS.playText("您已超速"); if (speeds > 40) {//40千米/h
systemTTS.playText("您已超速");
}
}else if (radioPicture==3){
double speeds = ((geometry / 2) * 3600 / 1000);
if (speeds > 40) {//40千米/h
systemTTS.playText("您已超速");
}
} }
} else if (radioPicture == 3) { } else if (type == 4) {
double speeds = ((geometry / 1.5) * 3600 / 1000); if (radioPicture==2){
if (speeds > 70) {//70千米/h double speeds = ((geometry / 1) * 3600 / 1000);
systemTTS.playText("您已超速"); if (speeds > 80) {//80千米/h
systemTTS.playText("您已超速");
}
}else if (radioPicture==3){
double speeds = ((geometry / 2) * 3600 / 1000);
if (speeds > 80) {//80千米/h
systemTTS.playText("您已超速");
}
} }
} }
} }
@ -807,7 +822,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
MessageDialog.show(this, "提示", message, "", "").setOnOkButtonClickListener(new OnDialogButtonClickListener() { MessageDialog.show(this, "提示", message, "", "").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
picturesBuilder.append("onClick 点击了结束采集 ,"); picturesBuilder.append(TimestampUtil.time()).append("onClick 点击了结束采集 ,");
Intent intent = new Intent(); Intent intent = new Intent();
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp"; finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath); intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);

View File

@ -395,19 +395,19 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
userBuilder.append("onPause ,"); userBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
userBuilder.append("onStop ,"); userBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
userBuilder.append("onDestroy"); userBuilder.append(TimestampUtil.time()).append("onDestroy");
userBuilder.append("\r\n"); userBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
} }

View File

@ -63,7 +63,8 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
PoiEntity poiEntity = (PoiEntity) iterator.next(); PoiEntity poiEntity = (PoiEntity) iterator.next();
if (poiEntity.isChecked()) { if (poiEntity.isChecked()) {
PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity); PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity);
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
PoiDatabase.getInstance(context).getPoiDao().updatePoiEntity(poiEntity);
iterator.remove(); iterator.remove();
} }
} }

View File

@ -166,7 +166,7 @@ public class Constant {
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 = "11.16";//版本日期 public static final String NAVIN_FO = "11.17";//版本日期
//marker //marker
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show); public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);

View File

@ -51,6 +51,7 @@ import com.navinfo.outdoor.room.PoiEntity;
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.PhotoUtils; import com.navinfo.outdoor.util.PhotoUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtil; import com.navinfo.outdoor.util.ToastUtil;
import com.tencent.tencentmap.mapsdk.maps.TencentMap; import com.tencent.tencentmap.mapsdk.maps.TencentMap;
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor; import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
@ -185,6 +186,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkBoxLife.setOnClickListener(new View.OnClickListener() { checkBoxLife.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkBox 的按钮,");
if (checkBoxLife.isChecked()) { if (checkBoxLife.isChecked()) {
moveLatlng(latLng, new TencentMap.CancelableCallback() { moveLatlng(latLng, new TencentMap.CancelableCallback() {
@Override @Override
@ -230,6 +232,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkButton1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkButton1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton1 的按钮,");
if (isChecked) { if (isChecked) {
buffer1 = "1,"; buffer1 = "1,";
buffer2 = ""; buffer2 = "";
@ -249,6 +252,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkButton2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkButton2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton2 的按钮,");
if (isChecked) { if (isChecked) {
buffer2 = "2,"; buffer2 = "2,";
checkButton1.setChecked(false); checkButton1.setChecked(false);
@ -261,6 +265,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkButton3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkButton3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton3 的按钮,");
if (isChecked) { if (isChecked) {
buffer3 = "3,"; buffer3 = "3,";
checkButton1.setChecked(false); checkButton1.setChecked(false);
@ -273,6 +278,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkButton4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkButton4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton4 的按钮,");
if (isChecked) { if (isChecked) {
buffer4 = "4,"; buffer4 = "4,";
checkButton1.setChecked(false); checkButton1.setChecked(false);
@ -285,6 +291,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
checkButton5.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { checkButton5.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击了checkButton5 的按钮,");
if (isChecked) { if (isChecked) {
buffer5 = "5,"; buffer5 = "5,";
checkButton1.setChecked(false); checkButton1.setChecked(false);
@ -303,10 +310,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 存在,");
exist = 0;//存在 exist = 0;//存在
pileDisables(View.VISIBLE); pileDisables(View.VISIBLE);
break; break;
case 1: case 1:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不存在,");
exist = 1;//不存在 exist = 1;//不存在
pileDisables(View.GONE); pileDisables(View.GONE);
rlDevice.setVisibility(View.GONE); rlDevice.setVisibility(View.GONE);
@ -329,33 +338,43 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上五层,");
cp_floor = 5; cp_floor = 5;
break; break;
case 1: case 1:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上四层,");
cp_floor = 4; cp_floor = 4;
break; break;
case 2: case 2:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上三层,");
cp_floor = 3; cp_floor = 3;
break; break;
case 3: case 3:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上二层,");
cp_floor = 2; cp_floor = 2;
break; break;
case 4: case 4:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地上一层,");
cp_floor = 1; cp_floor = 1;
break; break;
case 5: case 5:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下一层,");
cp_floor = -1; cp_floor = -1;
break; break;
case 6: case 6:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下二层,");
cp_floor = -2; cp_floor = -2;
break; break;
case 7: case 7:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下三层,");
cp_floor = -3; cp_floor = -3;
break; break;
case 8: case 8:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下四层,");
cp_floor = -4; cp_floor = -4;
break; break;
case 9: case 9:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 地下五层,");
cp_floor = -5; cp_floor = -5;
break; break;
} }
@ -373,12 +392,14 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 存在,");
rlFacility.setBackgroundResource(R.drawable.selector_hui_bg); rlFacility.setBackgroundResource(R.drawable.selector_hui_bg);
rlScutcheon.setVisibility(View.GONE); rlScutcheon.setVisibility(View.GONE);
rlDevice.setVisibility(View.GONE); rlDevice.setVisibility(View.GONE);
sign_exist = 0; sign_exist = 0;
break; break;
case 1: case 1:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不存在,");
rlFacility.setBackgroundColor(Color.parseColor("#03A9F4")); rlFacility.setBackgroundColor(Color.parseColor("#03A9F4"));
if (exist==0){ if (exist==0){
rlScutcheon.setVisibility(View.VISIBLE); rlScutcheon.setVisibility(View.VISIBLE);
@ -404,18 +425,23 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 可以使用,");
cp_availableState = 0; cp_availableState = 0;
break; break;
case 1: case 1:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 不可使用,");
cp_availableState = 1; cp_availableState = 1;
break; break;
case 2: case 2:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 维修中,");
cp_availableState = 2; cp_availableState = 2;
break; break;
case 3: case 3:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 建设中,");
cp_availableState = 3; cp_availableState = 3;
break; break;
case 4: case 4:
chargingPileBuilder.append(TimestampUtil.time()).append("点击了下拉框 规划中,");
cp_availableState = 4; cp_availableState = 4;
break; break;
} }
@ -489,6 +515,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlAvailable.setOnLongClickListener(new View.OnLongClickListener() { rlAvailable.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -508,6 +535,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlUsable.setOnLongClickListener(new View.OnLongClickListener() { rlUsable.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -527,6 +555,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() { rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -547,6 +576,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlParking.setOnLongClickListener(new View.OnLongClickListener() { rlParking.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -566,6 +596,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() { rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -585,6 +616,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlNumber.setOnLongClickListener(new View.OnLongClickListener() { rlNumber.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -605,6 +637,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlFacility.setOnLongClickListener(new View.OnLongClickListener() { rlFacility.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -624,6 +657,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlEquipment.setOnLongClickListener(new View.OnLongClickListener() { rlEquipment.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -643,6 +677,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlDevice.setOnLongClickListener(new View.OnLongClickListener() { rlDevice.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
@ -662,6 +697,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
rlCoding.setOnLongClickListener(new View.OnLongClickListener() { rlCoding.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
chargingPileBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override

View File

@ -51,6 +51,7 @@ import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.UploadUtils; import com.navinfo.outdoor.util.UploadUtils;
import com.navinfo.outdoor.bean.ChargingPileSaveBean; import com.navinfo.outdoor.bean.ChargingPileSaveBean;
import com.navinfo.outdoor.bean.ChargingStationBean; import com.navinfo.outdoor.bean.ChargingStationBean;
@ -346,7 +347,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
checkBoxLife.setOnClickListener(new View.OnClickListener() { checkBoxLife.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
chargingStationBuilder.append("点击了编辑的按钮 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了编辑的按钮 ,");
if (checkBoxLife.isChecked()) { if (checkBoxLife.isChecked()) {
moveLatlng(latLng, new TencentMap.CancelableCallback() { moveLatlng(latLng, new TencentMap.CancelableCallback() {
@Override @Override
@ -396,15 +397,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充电站,");
station_type = 1; station_type = 1;
break; break;
case 1: case 1:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充换电站,");
station_type = 2; station_type = 2;
break; break;
case 2: case 2:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 充电桩组,");
station_type = 3; station_type = 3;
break; break;
case 3: case 3:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 换电站,");
station_type = 4; station_type = 4;
break; break;
} }
@ -424,6 +429,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 存在,");
rlInternalPhotos.setVisibility(View.VISIBLE); rlInternalPhotos.setVisibility(View.VISIBLE);
rlElse.setVisibility(View.VISIBLE); rlElse.setVisibility(View.VISIBLE);
rlScutcheon.setVisibility(View.VISIBLE); rlScutcheon.setVisibility(View.VISIBLE);
@ -431,6 +437,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
existence = 0; existence = 0;
break; break;
case 1: case 1:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在,");
rlInternalPhotos.setVisibility(View.GONE); rlInternalPhotos.setVisibility(View.GONE);
rlElse.setVisibility(View.GONE); rlElse.setVisibility(View.GONE);
rlScutcheon.setVisibility(View.GONE); rlScutcheon.setVisibility(View.GONE);
@ -438,6 +445,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
existence = 1; existence = 1;
break; break;
case 2: case 2:
chargingStationBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证,");
rlInternalPhotos.setVisibility(View.GONE); rlInternalPhotos.setVisibility(View.GONE);
rlElse.setVisibility(View.GONE); rlElse.setVisibility(View.GONE);
rlScutcheon.setVisibility(View.GONE); rlScutcheon.setVisibility(View.GONE);
@ -464,6 +472,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivElse.setImageDrawable(null); ivElse.setImageDrawable(null);
if (tvElse.getTag() != null) { if (tvElse.getTag() != null) {
File file = new File((String) tvElse.getTag()); File file = new File((String) tvElse.getTag());
@ -483,6 +492,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivScutcheon.setImageDrawable(null); ivScutcheon.setImageDrawable(null);
if (tvScutcheon.getTag() != null) { if (tvScutcheon.getTag() != null) {
File file = new File((String) tvScutcheon.getTag()); File file = new File((String) tvScutcheon.getTag());
@ -502,6 +512,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivPanorama.setImageDrawable(null); ivPanorama.setImageDrawable(null);
if (tvPanorama.getTag() != null) { if (tvPanorama.getTag() != null) {
File file = new File((String) tvPanorama.getTag()); File file = new File((String) tvPanorama.getTag());
@ -521,6 +532,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivName.setImageDrawable(null); ivName.setImageDrawable(null);
if (tvNamePic.getTag() != null) { if (tvNamePic.getTag() != null) {
File file = new File((String) tvNamePic.getTag()); File file = new File((String) tvNamePic.getTag());
@ -540,6 +552,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
chargingStationBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivInternal.setImageDrawable(null); ivInternal.setImageDrawable(null);
if (tvInternal.getTag() != null) { if (tvInternal.getTag() != null) {
File file = new File((String) tvInternal.getTag()); File file = new File((String) tvInternal.getTag());
@ -877,7 +890,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
} }
} }
chargingStationBuilder = new StringBuilder(); chargingStationBuilder = new StringBuilder();
chargingStationBuilder.append("ChargingStationActivity-onCreate-initData ,"); chargingStationBuilder.append(TimestampUtil.time()).append("ChargingStationActivity-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
chargingStationBuilder.append("userId:").append(Constant.USHERED).append(","); chargingStationBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -936,11 +949,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_save_local: case R.id.btn_save_local:
chargingStationBuilder.append("点击了保存本地的按钮 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮 ,");
initRoadSaveLocal(false); initRoadSaveLocal(false);
break; break;
case R.id.btn_uploading: case R.id.btn_uploading:
chargingStationBuilder.append("点击了上传的按钮 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
Message obtain = Message.obtain(); Message obtain = Message.obtain();
obtain.what = Constant.TREASURE_FRAGMENT; obtain.what = Constant.TREASURE_FRAGMENT;
obtain.obj = false; obtain.obj = false;
@ -1022,11 +1035,11 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
} }
break; break;
case R.id.tv_station_examine: case R.id.tv_station_examine:
chargingStationBuilder.append("点击了查重的按钮 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了查重的按钮 ,");
findingDuplicateByWork(); findingDuplicateByWork();
break; break;
case R.id.rl_panorama: case R.id.rl_panorama:
chargingStationBuilder.append("点击了全景照片进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了全景照片进行拍照 ,");
findingDuplicateByWork(); findingDuplicateByWork();
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File PanoramaFile = PhotoUtils.showPhotoFile("a", latLng); File PanoramaFile = PhotoUtils.showPhotoFile("a", latLng);
@ -1034,35 +1047,35 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
case R.id.rl_name: case R.id.rl_name:
chargingStationBuilder.append("点击了名称照片进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了名称照片进行拍照 ,");
Intent intentName = new Intent(getActivity(), PhotographActivity.class); Intent intentName = new Intent(getActivity(), PhotographActivity.class);
File nameFile = PhotoUtils.showPhotoFile("b", latLng); File nameFile = PhotoUtils.showPhotoFile("b", latLng);
intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath()); intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath());
startActivityForResult(intentName, 102); startActivityForResult(intentName, 102);
break; break;
case R.id.rl_internal_photos: case R.id.rl_internal_photos:
chargingStationBuilder.append("点击了服务说明进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了服务说明进行拍照 ,");
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class); Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
File internalFile = PhotoUtils.showPhotoFile("c", latLng); File internalFile = PhotoUtils.showPhotoFile("c", latLng);
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath()); intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath());
startActivityForResult(intentInternal, 103); startActivityForResult(intentInternal, 103);
break; break;
case R.id.rl_else: case R.id.rl_else:
chargingStationBuilder.append("点击了充电站指引牌进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了充电站指引牌进行拍照 ,");
Intent intentElse = new Intent(getActivity(), PhotographActivity.class); Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
File elseFile = PhotoUtils.showPhotoFile("d", latLng); File elseFile = PhotoUtils.showPhotoFile("d", latLng);
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath()); intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath());
startActivityForResult(intentElse, 104); startActivityForResult(intentElse, 104);
break; break;
case R.id.rl_scutcheon: case R.id.rl_scutcheon:
chargingStationBuilder.append("点击了停车收费标牌进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了停车收费标牌进行拍照 ,");
Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class); Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class);
File scutcheonFile = PhotoUtils.showPhotoFile("e", latLng); File scutcheonFile = PhotoUtils.showPhotoFile("e", latLng);
intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath()); intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath());
startActivityForResult(intentScutcheon, 105); startActivityForResult(intentScutcheon, 105);
break; break;
case R.id.linear_charging_pile: case R.id.linear_charging_pile:
chargingStationBuilder.append("查看了recyclerView ,"); chargingStationBuilder.append(TimestampUtil.time()).append("查看了recyclerView ,");
initChargingPile(); initChargingPile();
break; break;
} }
@ -1216,10 +1229,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) { private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) {
@ -1640,13 +1649,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
chargingStationBuilder.append("onPause ,"); chargingStationBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
chargingStationBuilder.append("onStop ,"); chargingStationBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
@ -1662,7 +1671,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
} }
removablesLocality.clear(); removablesLocality.clear();
chargingStationBuilder.append("onDestroy"); chargingStationBuilder.append(TimestampUtil.time()).append("onDestroy");
chargingStationBuilder.append("\r\n"); chargingStationBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), chargingStationBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), chargingStationBuilder.toString(), true);
} }
@ -1707,7 +1716,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
} }
} }
} }
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
initList(); initList();

View File

@ -352,7 +352,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() { filterAdapter.setItemCLick(new FilterAdapter.ItemCLick() {
@Override @Override
public void item(PoiEntity poiEntity) { public void item(PoiEntity poiEntity) {
filterBuilder.append(TimestampUtil.time()).append("点击了item ,"); filterBuilder.append(TimestampUtil.time()).append("点击了条目item ,");
//查看详情 //查看详情
Message obtains = Message.obtain(); Message obtains = Message.obtain();
obtains.what = Constant.FILTER_LIST_ITEM; obtains.what = Constant.FILTER_LIST_ITEM;
@ -363,7 +363,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
filterAdapter.setItemOnCLick(new FilterAdapter.ItemOnCLick() { filterAdapter.setItemOnCLick(new FilterAdapter.ItemOnCLick() {
@Override @Override
public void item(PoiEntity poiEntity, boolean isChockBox) { public void item(PoiEntity poiEntity, boolean isChockBox) {
filterBuilder.append(TimestampUtil.time()).append("点击了item ,"); filterBuilder.append(TimestampUtil.time()).append("点击了条目中的checkBox 按钮 ,");
if (isChockBox) { if (isChockBox) {
btnChock.add(poiEntity); btnChock.add(poiEntity);
} else { } else {
@ -421,12 +421,15 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
tvNumber.setText(text); tvNumber.setText(text);
switch (index) { switch (index) {
case 0: case 0:
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 200 ,");
Constant.NUMBER = 200; Constant.NUMBER = 200;
break; break;
case 1: case 1:
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 500 ,");
Constant.NUMBER = 500; Constant.NUMBER = 500;
break; break;
case 2: case 2:
filterBuilder.append(TimestampUtil.time()).append("点击了任务个数 1000 ,");
Constant.NUMBER = 1000; Constant.NUMBER = 1000;
break; break;
} }
@ -445,18 +448,23 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
tvPhotograph.setText(text); tvPhotograph.setText(text);
switch (index) { switch (index) {
case 0: case 0:
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 全部 ,");
Constant.LIMIT_TYPE = -1; Constant.LIMIT_TYPE = -1;
break; break;
case 1: case 1:
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 普通任务 ,");
Constant.LIMIT_TYPE = 0; Constant.LIMIT_TYPE = 0;
break; break;
case 2: case 2:
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 专属任务 ,");
Constant.LIMIT_TYPE = 1; Constant.LIMIT_TYPE = 1;
break; break;
case 3: case 3:
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 挑战任务 ,");
Constant.LIMIT_TYPE = 2; Constant.LIMIT_TYPE = 2;
break; break;
case 4: case 4:
filterBuilder.append(TimestampUtil.time()).append("点击了权限类型 奖励任务 ,");
Constant.LIMIT_TYPE = 3; Constant.LIMIT_TYPE = 3;
break; break;
} }
@ -483,24 +491,31 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
tvExclusive.setText(text); tvExclusive.setText(text);
switch (index) { switch (index) {
case 0: case 0:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 全部 ,");
Constant.TASK_TYPE = -1; Constant.TASK_TYPE = -1;
break; break;
case 1: case 1:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 POI ,");
Constant.TASK_TYPE = 1; Constant.TASK_TYPE = 1;
break; break;
case 2: case 2:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 充电站 ,");
Constant.TASK_TYPE = 2; Constant.TASK_TYPE = 2;
break; break;
case 3: case 3:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 POI录像 ,");
Constant.TASK_TYPE = 3; Constant.TASK_TYPE = 3;
break; break;
case 4: case 4:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 道路录像 ,");
Constant.TASK_TYPE = 4; Constant.TASK_TYPE = 4;
break; break;
case 5: case 5:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 其他 ,");
Constant.TASK_TYPE = 5; Constant.TASK_TYPE = 5;
break; break;
case 6: case 6:
filterBuilder.append(TimestampUtil.time()).append("点击了任务类型 面状任务 ,");
Constant.TASK_TYPE = 6; Constant.TASK_TYPE = 6;
break; break;
} }
@ -519,15 +534,19 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
tvType.setText(text); tvType.setText(text);
switch (index) { switch (index) {
case 0: case 0:
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 全部 ,");
Constant.TASK_STARTUP = -1; Constant.TASK_STARTUP = -1;
break; break;
case 1: case 1:
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 未领取 ,");
Constant.TASK_STARTUP = 0; Constant.TASK_STARTUP = 0;
break; break;
case 2: case 2:
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 已领取 ,");
Constant.TASK_STARTUP = 1; Constant.TASK_STARTUP = 1;
break; break;
case 3: case 3:
filterBuilder.append(TimestampUtil.time()).append("点击了任务状态 已领取(网络) ,");
Constant.TASK_STARTUP = 2; Constant.TASK_STARTUP = 2;
break; break;
} }
@ -729,13 +748,13 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
filterBuilder.append("onPause ,"); filterBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
filterBuilder.append("onStop ,"); filterBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
@ -743,7 +762,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
if (EventBus.getDefault().isRegistered(this))//加上判断 if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this);
super.onDestroy(); super.onDestroy();
filterBuilder.append("onDestroy"); filterBuilder.append(TimestampUtil.time()).append("onDestroy");
filterBuilder.append("\r\n"); filterBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), filterBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), filterBuilder.toString(), true);
} }

View File

@ -28,6 +28,7 @@ import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder; import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.util.Base64; import com.navinfo.outdoor.util.Base64;
import com.navinfo.outdoor.util.RegexUtil; import com.navinfo.outdoor.util.RegexUtil;
import com.navinfo.outdoor.util.TimestampUtil;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
@ -80,7 +81,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
} }
} }
forgetPawBuilder = new StringBuilder(); forgetPawBuilder = new StringBuilder();
forgetPawBuilder.append("ForgetPawFragment-onViewCreated-initData,"); forgetPawBuilder.append(TimestampUtil.time()).append("ForgetPawFragment-onViewCreated-initData,");
if (Constant.USHERED!=null){ if (Constant.USHERED!=null){
forgetPawBuilder.append("userId:").append(Constant.USHERED).append(","); forgetPawBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -105,11 +106,11 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.iv_forgePaw_finish: case R.id.iv_forgePaw_finish:
forgetPawBuilder.append("点击了忘记密码的返回,"); forgetPawBuilder.append(TimestampUtil.time()).append("点击了忘记密码的返回,");
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
break; break;
case R.id.forgetPaw_get_note: case R.id.forgetPaw_get_note:
forgetPawBuilder.append("点击了获取短信验证码,"); forgetPawBuilder.append(TimestampUtil.time()).append("点击了获取短信验证码,");
if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())) { if (!RegexUtil.isPhone(etForgetPawPhone.getText().toString())) {
Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show();
return; return;
@ -118,7 +119,7 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
break; break;
case R.id.btn_forgetPaw: case R.id.btn_forgetPaw:
forgetPawBuilder.append("点击了提交,"); forgetPawBuilder.append(TimestampUtil.time()).append("点击了提交,");
initForgetPaw(); initForgetPaw();
break; break;
} }
@ -280,19 +281,19 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
forgetPawBuilder.append("onPause,"); forgetPawBuilder.append(TimestampUtil.time()).append("onPause,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
forgetPawBuilder.append("onStop,"); forgetPawBuilder.append(TimestampUtil.time()).append("onStop,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
forgetPawBuilder.append("onDestroy"); forgetPawBuilder.append(TimestampUtil.time()).append("onDestroy");
forgetPawBuilder.append("\r\n"); forgetPawBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), forgetPawBuilder.toString(), true);
} }

View File

@ -312,7 +312,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() { Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -625,7 +626,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
if (poiEntity.getType() == 2) { if (poiEntity.getType() == 2) {
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId()); chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
} }
@ -768,7 +770,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
} else if (response.getCode() == 230) { } else if (response.getCode() == 230) {

View File

@ -48,6 +48,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.GetJsonDataUtil; import com.navinfo.outdoor.util.GetJsonDataUtil;
import com.navinfo.outdoor.util.PhotoUtils; import com.navinfo.outdoor.util.PhotoUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import org.json.JSONArray; import org.json.JSONArray;
@ -148,14 +149,14 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.iv_gathering: case R.id.iv_gathering:
gatheringBuilder.append("点击返回的按钮 ,"); gatheringBuilder.append(TimestampUtil.time()).append("点击返回的按钮 ,");
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
break; break;
case R.id.et_bank_num: case R.id.et_bank_num:
gatheringBuilder.append("输入银行卡号 ,"); gatheringBuilder.append(TimestampUtil.time()).append("输入银行卡号 ,");
break; break;
case R.id.iv_bank: case R.id.iv_bank:
gatheringBuilder.append("点击弹窗 ,"); gatheringBuilder.append(TimestampUtil.time()).append("点击弹窗 ,");
String bankJson = new GetJsonDataUtil().getJson(Objects.requireNonNull(getContext()), "bank.json");//获取assets目录下的json文件数据 String bankJson = new GetJsonDataUtil().getJson(Objects.requireNonNull(getContext()), "bank.json");//获取assets目录下的json文件数据
//用Gabon 转成实体 //用Gabon 转成实体
jsonBean = parseData(bankJson); jsonBean = parseData(bankJson);
@ -221,7 +222,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
dialog.show(); dialog.show();
break; break;
case R.id.btn_bank: case R.id.btn_bank:
gatheringBuilder.append("点击绑定银行卡 ,"); gatheringBuilder.append(TimestampUtil.time()).append("点击绑定银行卡 ,");
if (etBankNum.getText().toString().equals("")) { if (etBankNum.getText().toString().equals("")) {
Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "银行卡号不能为空", Toast.LENGTH_SHORT).show();
Log.e("TAG", "onClick: " + etBankNum); Log.e("TAG", "onClick: " + etBankNum);
@ -230,7 +231,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
gatheringNetWork(); gatheringNetWork();
break; break;
case R.id.gathering_camera: case R.id.gathering_camera:
gatheringBuilder.append("点击拍照 ,"); gatheringBuilder.append(TimestampUtil.time()).append("点击拍照 ,");
Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class); Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("a", null); File file = PhotoUtils.showPhotoFile("a", null);
gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
@ -285,7 +286,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
gatheringBuilder.append("绑定成功 ,"); gatheringBuilder.append(TimestampUtil.time()).append("绑定成功 ,");
Constant.BACKGROUND_NAME = bank; Constant.BACKGROUND_NAME = bank;
Constant.BACKGROUND = etBankAccount; Constant.BACKGROUND = etBankAccount;
navInfoEditor.putString("bankAccount", etBankAccount); navInfoEditor.putString("bankAccount", etBankAccount);

View File

@ -29,6 +29,7 @@ import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface; import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder; import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.TimestampUtil;
import java.io.File; import java.io.File;
import java.text.DateFormat; import java.text.DateFormat;
@ -77,7 +78,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override @Override
public void item(int id) { public void item(int id) {
messageBuilder.append("点击item ,"); messageBuilder.append(TimestampUtil.time()).append("点击item ,");
HashMap<String, String> paramMap = new HashMap<>(); HashMap<String, String> paramMap = new HashMap<>();
paramMap.put("id", id + ""); paramMap.put("id", id + "");
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap); intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
@ -161,7 +162,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
} }
} }
messageBuilder = new StringBuilder(); messageBuilder = new StringBuilder();
messageBuilder.append("MessageFragment-onCreate-initData ,"); messageBuilder.append(TimestampUtil.time()).append("MessageFragment-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
messageBuilder.append("userId:").append(Constant.USHERED).append(","); messageBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -170,7 +171,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (v.getId() == R.id.message_final) { if (v.getId() == R.id.message_final) {
messageBuilder.append("点击返回,"); messageBuilder.append(TimestampUtil.time()).append("点击返回,");
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
} }
} }
@ -178,19 +179,19 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
messageBuilder.append("onPause ,"); messageBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
messageBuilder.append("onStop ,"); messageBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
messageBuilder.append("onDestroy"); messageBuilder.append(TimestampUtil.time()).append("onDestroy");
messageBuilder.append("\r\n"); messageBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), messageBuilder.toString(), true);
} }

View File

@ -223,7 +223,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
} }
} }
mainBuilder = new StringBuilder(); mainBuilder = new StringBuilder();
mainBuilder.append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,"); mainBuilder.append(TimestampUtil.time()).append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
mainBuilder.append("userId:").append(Constant.USHERED).append(","); mainBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -257,7 +257,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
break; break;
case R.id.btn_withdraw://提现页面 case R.id.btn_withdraw://提现页面
mainBuilder.append(TimestampUtil.time()).append("点击了item 跳转到提现页面 ,"); mainBuilder.append(TimestampUtil.time()).append("点击了去提现的按钮 ,");
Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class); Intent intentWithdraw = new Intent(getActivity(), FragmentManagement.class);
intentWithdraw.putExtra("tag", 15); intentWithdraw.putExtra("tag", 15);
startActivity(intentWithdraw); startActivity(intentWithdraw);
@ -295,13 +295,13 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
mainBuilder.append("onPause ,"); mainBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
mainBuilder.append("onStop ,"); mainBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
@ -309,7 +309,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
if (EventBus.getDefault().isRegistered(this))//加上判断 if (EventBus.getDefault().isRegistered(this))//加上判断
EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this);
super.onDestroy(); super.onDestroy();
mainBuilder.append("onDestroy"); mainBuilder.append(TimestampUtil.time()).append("onDestroy");
mainBuilder.append("\r\n"); mainBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), mainBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), mainBuilder.toString(), true);
} }

View File

@ -45,6 +45,7 @@ import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil;
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;
@ -162,6 +163,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
otherBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
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);
@ -204,6 +206,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() { }).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
otherBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
return false; return false;
} }
}); });
@ -223,12 +226,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 门牌 ,");
station_type = 7; station_type = 7;
break; break;
case 1: case 1:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 公交 ,");
station_type = 8; station_type = 8;
break; break;
case 2: case 2:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 情报 ,");
station_type = 9; station_type = 9;
break; break;
} }
@ -242,6 +248,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
checkPot.setOnClickListener(new View.OnClickListener() { checkPot.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
otherBuilder.append(TimestampUtil.time()).append("点击了点位编辑,");
if (checkPot.isChecked()) { if (checkPot.isChecked()) {
moveLatlng(latLng, new TencentMap.CancelableCallback() { moveLatlng(latLng, new TencentMap.CancelableCallback() {
@Override @Override
@ -307,12 +314,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 存在 ,");
existence = 0; existence = 0;
break; break;
case 1: case 1:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在 ,");
existence = 1; existence = 1;
break; break;
case 2: case 2:
otherBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证 ,");
existence = 2; existence = 2;
break; break;
} }
@ -336,6 +346,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
otherBuilder.append(TimestampUtil.time()).append("长按删除图片 点击了确定按钮 ,");
ivPicture.setImageDrawable(null); ivPicture.setImageDrawable(null);
if (tvPicture.getTag() != null) { if (tvPicture.getTag() != null) {
File file = new File((String) tvPicture.getTag()); File file = new File((String) tvPicture.getTag());
@ -356,6 +367,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
otherBuilder.append(TimestampUtil.time()).append("长按删除图片 点击了确定按钮 ,");
ivPictures.setImageDrawable(null); ivPictures.setImageDrawable(null);
if (tvPictures.getTag() != null) { if (tvPictures.getTag() != null) {
File file = new File((String) tvPictures.getTag()); File file = new File((String) tvPictures.getTag());
@ -413,7 +425,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
} }
} }
otherBuilder = new StringBuilder(); otherBuilder = new StringBuilder();
otherBuilder.append("OtherActivity-onCreate-initData ,"); otherBuilder.append(TimestampUtil.time()).append("OtherActivity-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
otherBuilder.append("userId:").append(Constant.USHERED).append(","); otherBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -501,25 +513,25 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.rl_picture: case R.id.rl_picture:
otherBuilder.append("点击了第一个照片进行拍照 ,"); otherBuilder.append(TimestampUtil.time()).append("点击了第一个照片进行拍照 ,");
Intent intentPicture = new Intent(getActivity(), PhotographActivity.class); Intent intentPicture = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("a", latLng); File file = PhotoUtils.showPhotoFile("a", latLng);
intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
startActivityForResult(intentPicture, 101); startActivityForResult(intentPicture, 101);
break; break;
case R.id.rl_pictures: case R.id.rl_pictures:
otherBuilder.append("点击了第二个照片进行拍照 ,"); otherBuilder.append(TimestampUtil.time()).append("点击了第二个照片进行拍照 ,");
Intent intentPictures = new Intent(getActivity(), PhotographActivity.class); Intent intentPictures = new Intent(getActivity(), PhotographActivity.class);
File files = PhotoUtils.showPhotoFile("b", latLng); File files = PhotoUtils.showPhotoFile("b", latLng);
intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath()); intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath());
startActivityForResult(intentPictures, 102); startActivityForResult(intentPictures, 102);
break; break;
case R.id.btn_other_local: case R.id.btn_other_local:
otherBuilder.append("点击了保存本地的按钮,"); otherBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮,");
initPoiSaveLocal(false); initPoiSaveLocal(false);
break; break;
case R.id.btn_other_uploading: case R.id.btn_other_uploading:
otherBuilder.append("点击了上传的按钮,"); otherBuilder.append(TimestampUtil.time()).append("点击了上传的按钮,");
if (otherUploadList != null) { if (otherUploadList != null) {
otherUploadList.clear(); otherUploadList.clear();
} }
@ -631,10 +643,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void otherUploadByNet(int body, List<File> otherUploadList) { private void otherUploadByNet(int body, List<File> otherUploadList) {
@ -836,13 +844,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
otherBuilder.append("onPause ,"); otherBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
otherBuilder.append("onStop ,"); otherBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
@ -853,7 +861,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
if (markerOther != null) { if (markerOther != null) {
markerOther.remove(); markerOther.remove();
} }
otherBuilder.append("onDestroy"); otherBuilder.append(TimestampUtil.time()).append("onDestroy");
otherBuilder.append("\r\n"); otherBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true);
} }
@ -882,7 +890,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
initList(); initList();

View File

@ -173,6 +173,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
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);
@ -215,6 +216,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() { }).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
return false; return false;
} }
}); });
@ -315,12 +317,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0: case 0:
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 存在 ,");
existence = 0; existence = 0;
break; break;
case 1: case 1:
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 不存在 ,");
existence = 1; existence = 1;
break; break;
case 2: case 2:
poiBuilder.append(TimestampUtil.time()).append("下拉框选择 无法验证 ,");
existence = 2; existence = 2;
break; break;
} }
@ -346,6 +351,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivPanorama.setImageDrawable(null); ivPanorama.setImageDrawable(null);
if (tvPanorama.getTag() != null) { if (tvPanorama.getTag() != null) {
File file = new File((String) tvPanorama.getTag()); File file = new File((String) tvPanorama.getTag());
@ -365,6 +371,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivName.setImageDrawable(null); ivName.setImageDrawable(null);
if (tvPoiNamePic.getTag() != null) { if (tvPoiNamePic.getTag() != null) {
File file = new File((String) tvPoiNamePic.getTag()); File file = new File((String) tvPoiNamePic.getTag());
@ -384,6 +391,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivElse.setImageDrawable(null); ivElse.setImageDrawable(null);
if (tvElse.getTag() != null) { if (tvElse.getTag() != null) {
File file = new File((String) tvElse.getTag()); File file = new File((String) tvElse.getTag());
@ -403,6 +411,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivInternal.setImageDrawable(null); ivInternal.setImageDrawable(null);
if (tvInternal.getTag() != null) { if (tvInternal.getTag() != null) {
File file = new File((String) tvInternal.getTag()); File file = new File((String) tvInternal.getTag());
@ -423,6 +432,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiBuilder.append(TimestampUtil.time()).append("点击了长按删除图片确定 按钮,");
ivCard.setImageDrawable(null); ivCard.setImageDrawable(null);
if (tvCard.getTag() != null) { if (tvCard.getTag() != null) {
File file = new File((String) tvCard.getTag()); File file = new File((String) tvCard.getTag());
@ -989,10 +999,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void poiUploadByNetWork(int body, ArrayList<File> poiPicList) { private void poiUploadByNetWork(int body, ArrayList<File> poiPicList) {
@ -1247,13 +1253,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
poiBuilder.append("onPause,"); poiBuilder.append(TimestampUtil.time()).append("onPause,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
poiBuilder.append("onStop,"); poiBuilder.append(TimestampUtil.time()).append("onStop,");
} }
@Override @Override
@ -1264,7 +1270,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
if (markerPoi != null) { if (markerPoi != null) {
markerPoi.remove(); markerPoi.remove();
} }
poiBuilder.append("onDestroy "); poiBuilder.append(TimestampUtil.time()).append("onDestroy ");
poiBuilder.append("\r\n"); poiBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
} }
@ -1293,7 +1299,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
initList(); initList();

View File

@ -56,6 +56,7 @@ import com.navinfo.outdoor.util.FlushTokenUtil;
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.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.UploadUtils; import com.navinfo.outdoor.util.UploadUtils;
import com.navinfo.outdoor.util.ZipUtils; import com.navinfo.outdoor.util.ZipUtils;
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor; import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
@ -147,6 +148,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiVideoBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确定 按钮,");
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);
@ -196,6 +198,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() { }).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
poiVideoBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
return false; return false;
} }
}); });
@ -270,7 +273,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
} }
} }
poiVideoBuilder = new StringBuilder(); poiVideoBuilder = new StringBuilder();
poiVideoBuilder.append("PoiVideoActivity-onCreate-initData ,"); poiVideoBuilder.append(TimestampUtil.time()).append("PoiVideoActivity-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
poiVideoBuilder.append("userId:").append(Constant.USHERED).append(","); poiVideoBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -413,22 +416,23 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.fm_poi_video_picture: case R.id.fm_poi_video_picture:
poiVideoBuilder.append("点击了图片查看列表 ,"); poiVideoBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
if (fmPoiVideoPic.getTag() == null) { List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
Toast.makeText(getContext(), "还没有拍摄", Toast.LENGTH_SHORT).show(); if (fileListByUUID.size()>1){
return; Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
photoAlbumIntent.putExtra("tag", 36);
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
startActivity(photoAlbumIntent);
}else {
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
} }
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
photoAlbumIntent.putExtra("tag", 36);
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
startActivity(photoAlbumIntent);
break; break;
case R.id.btn_poi_video_save: case R.id.btn_poi_video_save:
poiVideoBuilder.append("点击了保存本地的按钮 ,"); poiVideoBuilder.append(TimestampUtil.time()).append("点击了保存本地的按钮 ,");
initPoiSaveLocal(false); initPoiSaveLocal(false);
break; break;
case R.id.tv_short://点击拍摄 case R.id.tv_short://点击拍摄
poiVideoBuilder.append("点击了拍摄的按钮 ,"); poiVideoBuilder.append(TimestampUtil.time()).append("点击了拍摄的按钮 ,");
double latitude = Constant.currentLocation.getLatitude(); double latitude = Constant.currentLocation.getLatitude();
double longitude = Constant.currentLocation.getLongitude(); double longitude = Constant.currentLocation.getLongitude();
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置 LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
@ -454,7 +458,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
startActivityForResult(intents, 0x102); startActivityForResult(intents, 0x102);
break; break;
case R.id.tv_combo://自动连拍: case R.id.tv_combo://自动连拍:
poiVideoBuilder.append("点击了自动连拍的按钮 ,"); poiVideoBuilder.append(TimestampUtil.time()).append("点击了自动连拍的按钮 ,");
LatLng startLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); //用户当前位置 LatLng startLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); //用户当前位置
double geom = GeometryTools.distanceToDouble(startLng, latLng); double geom = GeometryTools.distanceToDouble(startLng, latLng);
double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng); double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng);
@ -478,7 +482,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
startActivityForResult(intent, 0x101); startActivityForResult(intent, 0x101);
break; break;
case R.id.btn_poi_video_upload: case R.id.btn_poi_video_upload:
poiVideoBuilder.append("点击了上传的按钮 ,"); poiVideoBuilder.append(TimestampUtil.time()).append("点击了上传的按钮 ,");
if (Constant.isPresent) { if (Constant.isPresent) {
if (fmPoiVideoPic.getTag() != null) { if (fmPoiVideoPic.getTag() != null) {
List<File> videoFileList = (List<File>) fmPoiVideoPic.getTag(); List<File> videoFileList = (List<File>) fmPoiVideoPic.getTag();
@ -597,10 +601,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void poiVideoUpload(int poiVideoBody, File fileZip) { private void poiVideoUpload(int poiVideoBody, File fileZip) {
@ -775,13 +775,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
poiVideoBuilder.append("onPause ,"); poiVideoBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
poiVideoBuilder.append("onStop ,"); poiVideoBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
@ -792,7 +792,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
if (markerPoiVideo != null) { if (markerPoiVideo != null) {
markerPoiVideo.remove(); markerPoiVideo.remove();
} }
poiVideoBuilder.append("onDestroy "); poiVideoBuilder.append(TimestampUtil.time()).append("onDestroy ");
poiVideoBuilder.append("\r\n"); poiVideoBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), poiVideoBuilder.toString(), true);
} }
@ -820,7 +820,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
if (poiEntity.getId() != null) { if (poiEntity.getId() != null) {

View File

@ -142,6 +142,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
.setOnOkButtonClickListener(new OnDialogButtonClickListener() { .setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
roadBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 确认 按钮,");
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);
@ -192,6 +193,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
.setOnCancelButtonClickListener(new OnDialogButtonClickListener() { .setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
roadBuilder.append(TimestampUtil.time()).append("点击了返回当前页面的 取消 按钮,");
return false; return false;
} }
}); });
@ -227,6 +229,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
roadBuilder.append(TimestampUtil.time()).append("点击长按删除 确定按钮,");
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
fileListByUUID.get(i).delete(); fileListByUUID.get(i).delete();
@ -433,20 +436,21 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
break; break;
case R.id.fm_road_picture: case R.id.fm_road_picture:
roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,"); roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
if (fmRoadPic.getTag() == null) { List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
Toast.makeText(getContext(), "还没有拍摄", Toast.LENGTH_SHORT).show(); if (fileListByUUID.size()>1){
return; Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
photoAlbumIntent.putExtra("tag", 36);
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
startActivity(photoAlbumIntent);
}else {
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
} }
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
photoAlbumIntent.putExtra("tag", 36);
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
startActivity(photoAlbumIntent);
break; break;
case R.id.tv_pictures: case R.id.tv_pictures:
roadBuilder.append(TimestampUtil.time()).append("点击了自动拍照的按钮 ,"); roadBuilder.append(TimestampUtil.time()).append("点击了自动拍照的按钮 ,");
double latitude = Constant.currentLocation.getLatitude(); double latitude = Constant.currentLocation.getLatitude();
double longitude = Constant.currentLocation.getLongitude(); double longitude = Constant.currentLocation.getLongitude();
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置 LatLng startLatLng = new LatLng(latitude, longitude);//用户当前位置
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng); double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng); double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
@ -587,10 +591,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
@ -804,7 +804,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(poiEntity);
} }
}).start(); }).start();
if (poiEntity.getId() != null) { if (poiEntity.getId() != null) {

View File

@ -41,6 +41,7 @@ import com.navinfo.outdoor.room.PoiDatabase;
import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.PoiSaveUtils; import com.navinfo.outdoor.util.PoiSaveUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import com.umeng.umcrash.UMCrash; import com.umeng.umcrash.UMCrash;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
@ -108,7 +109,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
staySubmitAdapter.setOnClickItem(new StaySubmitAdapter.onClickItem() { staySubmitAdapter.setOnClickItem(new StaySubmitAdapter.onClickItem() {
@Override @Override
public void item(int position, PoiEntity poiEntity) { public void item(int position, PoiEntity poiEntity) {
staySubmitBuilder.append("点击了条目item 进行跳转 ,"); staySubmitBuilder.append(TimestampUtil.time()).append("点击了条目item 进行跳转 ,");
Message subObtain = Message.obtain(); Message subObtain = Message.obtain();
subObtain.what = Constant.EVENT_WORK_HOME; subObtain.what = Constant.EVENT_WORK_HOME;
subObtain.obj = true; subObtain.obj = true;
@ -123,11 +124,17 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
staySubmitBuilder.append("点击了全选进行勾选 ,"); staySubmitBuilder.append(TimestampUtil.time()).append("点击了全选进行勾选 ,");
staySubmitAdapter.setAllDataChecked(isChecked); staySubmitAdapter.setAllDataChecked(isChecked);
staySubmitAdapter.notifyDataSetChanged(); staySubmitAdapter.notifyDataSetChanged();
} }
}); });
}
@Override
public void onResume() {
super.onResume();
if (Constant.currentLocation != null) { if (Constant.currentLocation != null) {
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
cbSelect.setChecked(false); cbSelect.setChecked(false);
@ -157,7 +164,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
} }
} }
staySubmitBuilder = new StringBuilder(); staySubmitBuilder = new StringBuilder();
staySubmitBuilder.append("StaySubmitFragment-onCreate-initData ,"); staySubmitBuilder.append(TimestampUtil.time()).append("StaySubmitFragment-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
staySubmitBuilder.append("userId:").append(Constant.USHERED).append(","); staySubmitBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -192,7 +199,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
dismissLoadingDialog(); dismissLoadingDialog();
staySubmitBuilder.append("onStop ,"); staySubmitBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
public List<PoiEntity> initRoadWord(int type) { public List<PoiEntity> initRoadWord(int type) {
@ -214,7 +221,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务" case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
staySubmitBuilder.append("点击了待提交的类型 ,"); staySubmitBuilder.append(TimestampUtil.time()).append("点击了待提交的类型 ,");
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他"}, new OnMenuItemClickListener() { BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他"}, new OnMenuItemClickListener() {
@Override @Override
public void onClick(String text, int index) { public void onClick(String text, int index) {
@ -250,7 +257,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
break; break;
case R.id.tv_delete: case R.id.tv_delete:
staySubmitBuilder.append("点击了删除按钮 ,"); staySubmitBuilder.append(TimestampUtil.time()).append("点击了删除按钮 ,");
if (Constant.isPresent) { if (Constant.isPresent) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@ -265,7 +272,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
} }
break; break;
case R.id.btn_stay_submit://提交 case R.id.btn_stay_submit://提交
staySubmitBuilder.append("点击了提交的按钮 ,"); staySubmitBuilder.append(TimestampUtil.time()).append("点击了提交的按钮 ,");
if (Constant.isPresent) { if (Constant.isPresent) {
if (poiEntities == null) { if (poiEntities == null) {
poiEntities = new ArrayList<>(); poiEntities = new ArrayList<>();
@ -423,7 +430,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
staySubmitBuilder.append("onPause ,"); staySubmitBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override

View File

@ -29,6 +29,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
import com.jcodecraeer.xrecyclerview.ProgressStyle; import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView; import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.TimestampUtil;
import org.json.JSONObject; import org.json.JSONObject;
@ -99,7 +100,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() { taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
@Override @Override
public void onClick(int pos) { public void onClick(int pos) {
taskExplainBuilder.append("点击了item ,"); taskExplainBuilder.append(TimestampUtil.time()).append("点击了item ,");
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class); Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
itemIntent.putExtra("tag", 10); itemIntent.putExtra("tag", 10);
itemIntent.putExtra("id", pos + ""); itemIntent.putExtra("id", pos + "");
@ -131,7 +132,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
} }
} }
taskExplainBuilder = new StringBuilder(); taskExplainBuilder = new StringBuilder();
taskExplainBuilder.append("TaskExplainFragment-onCreate-initData ,"); taskExplainBuilder.append(TimestampUtil.time()).append("TaskExplainFragment-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
taskExplainBuilder.append("userId:").append(Constant.USHERED).append(","); taskExplainBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -213,26 +214,26 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
public void onClick(View v) { public void onClick(View v) {
if (v.getId() == R.id.iv_find_task_explain) { if (v.getId() == R.id.iv_find_task_explain) {
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
taskExplainBuilder.append("点击了返回的按钮 ,"); taskExplainBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
} }
} }
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
taskExplainBuilder.append("onPause ,"); taskExplainBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
taskExplainBuilder.append("onStop ,"); taskExplainBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
taskExplainBuilder.append("onDestroy"); taskExplainBuilder.append(TimestampUtil.time()).append("onDestroy");
taskExplainBuilder.append("\r\n"); taskExplainBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
} }

View File

@ -73,6 +73,7 @@ import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.MapManager; import com.navinfo.outdoor.util.MapManager;
import com.navinfo.outdoor.util.MyTecentLocationSource; import com.navinfo.outdoor.util.MyTecentLocationSource;
import com.navinfo.outdoor.util.NetWorkUtils; import com.navinfo.outdoor.util.NetWorkUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtil; import com.navinfo.outdoor.util.ToastUtil;
import com.sothree.slidinguppanel.ScrollableViewHelper; import com.sothree.slidinguppanel.ScrollableViewHelper;
import com.sothree.slidinguppanel.SlidingUpPanelLayout; import com.sothree.slidinguppanel.SlidingUpPanelLayout;
@ -154,47 +155,17 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private File logFile; private File logFile;
private StringBuilder treasureBuilder; private StringBuilder treasureBuilder;
private Marker gatherMarker; private Marker gatherMarker;
/*private boolean isHandler = false;
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) {
if (msg.what == 0x101) { if (msg.what == 0x101) {
if (!isHandler) { if (ivFilter != null) {
dismissLoadingDialog(); ivFilter.setEnabled(true);
OkGo.getInstance().cancelTag(this);
Constant.isPresent = true;
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "寻宝删选接口请求失败", "重新请求", "退出程序")
.setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("onFinish-获取到当前位置,");
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao();
refreshFilterData();
//上传用户位置金纬度
iniUserLocation();
//确定手机号
initPhone();
//检查是否有没有填完的页面
initSharePre();
return false;
}
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
getActivity().finish();
return false;
}
});
}else {
Toast.makeText(getActivity(), "寻宝删选接口请求成功", Toast.LENGTH_SHORT).show();
} }
} }
return false; return false;
} }
});*/ });
public static TreasureFragment newInstance(Bundle bundle) { public static TreasureFragment newInstance(Bundle bundle) {
TreasureFragment fragment = new TreasureFragment(); TreasureFragment fragment = new TreasureFragment();
fragment.setArguments(bundle); fragment.setArguments(bundle);
@ -291,7 +262,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
dismissLoadingDialog(); dismissLoadingDialog();
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext()); PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao(); poiDao = poiDatabase.getPoiDao();
treasureBuilder.append("onFinish-获取到当前位置,"); treasureBuilder.append(TimestampUtil.time()).append("onFinish-获取到当前位置,");
refreshFilterData(); refreshFilterData();
//上传用户位置金纬度 //上传用户位置金纬度
iniUserLocation(); iniUserLocation();
@ -355,11 +326,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
initThread(); // 刷新筛选的本地数据 initThread(); // 刷新筛选的本地数据
} }
if (Constant.currentLocation != null) { if (Constant.currentLocation != null) {
/* //延时60秒
Message message = new Message();
message.what = 0x101;
handler.sendMessageDelayed(message, 60000);
isHandler = false;*/
initList(Constant.currentLocation); // 刷新筛选的网络数据 initList(Constant.currentLocation); // 刷新筛选的网络数据
} else { } else {
Toast.makeText(getActivity(), "未开启定位服务", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "未开启定位服务", Toast.LENGTH_SHORT).show();
@ -1593,7 +1559,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} }
} }
treasureBuilder = new StringBuilder(); treasureBuilder = new StringBuilder();
treasureBuilder.append("TreasureFragment-onViewCreated-initData,"); treasureBuilder.append(TimestampUtil.time()).append("TreasureFragment-onViewCreated-initData,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
treasureBuilder.append("userId:").append(Constant.USHERED).append(","); treasureBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -1616,7 +1582,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("initSharePre-点击了poi"); treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了poi");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
PoiFragment poiFragment = PoiFragment.newInstance(bundle); PoiFragment poiFragment = PoiFragment.newInstance(bundle);
@ -1632,7 +1598,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("initSharePre-点击了充电站,"); treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了充电站,");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle); ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
@ -1648,7 +1614,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("initSharePre-点击了poi录像"); treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了poi录像");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle); PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
@ -1664,7 +1630,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("initSharePre-点击了道路,"); treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了道路,");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
RoadFragment roadFragment = RoadFragment.newInstance(bundle); RoadFragment roadFragment = RoadFragment.newInstance(bundle);
@ -1680,7 +1646,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
treasureBuilder.append("initSharePre-点击了其他,"); treasureBuilder.append(TimestampUtil.time()).append("未提交完的数据-点击了其他,");
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
OtherFragment otherFragment = OtherFragment.newInstance(bundle); OtherFragment otherFragment = OtherFragment.newInstance(bundle);
@ -1731,14 +1697,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
mapView.onPause(); mapView.onPause();
treasureBuilder.append("onPause,"); treasureBuilder.append(TimestampUtil.time()).append("onPause,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
mapView.onStop(); mapView.onStop();
treasureBuilder.append("onStop,"); treasureBuilder.append(TimestampUtil.time()).append("onStop,");
} }
@Override @Override
@ -1748,7 +1714,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} }
super.onDestroy(); super.onDestroy();
mapView.onDestroy(); mapView.onDestroy();
treasureBuilder.append("onDestroy"); treasureBuilder.append(TimestampUtil.time()).append("onDestroy");
treasureBuilder.append("\r\n"); treasureBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), treasureBuilder.toString(), true);
@ -1765,21 +1731,21 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.iv_zoom_add://放大 case R.id.iv_zoom_add://放大
treasureBuilder.append("点击了放大的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了放大的按钮,");
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn(); CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
tencentMap.animateCamera(cameraUpdateIn); tencentMap.animateCamera(cameraUpdateIn);
break; break;
case R.id.iv_zoom_del://缩小: case R.id.iv_zoom_del://缩小:
treasureBuilder.append("点击了缩小的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了缩小的按钮,");
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut(); CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
tencentMap.animateCamera(cameraUpdateOut); tencentMap.animateCamera(cameraUpdateOut);
break; break;
case R.id.iv_refrish://刷新: case R.id.iv_refrish://刷新:
treasureBuilder.append("点击了刷新的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了刷新的按钮,");
refreshFilterData(); refreshFilterData();
break; break;
case R.id.iv_location://定位: case R.id.iv_location://定位:
treasureBuilder.append("点击了定位的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了定位的按钮,");
if (Constant.currentLocation != null) { if (Constant.currentLocation != null) {
CameraUpdate cameraSigma = CameraUpdate cameraSigma =
CameraUpdateFactory.newCameraPosition(new CameraPosition( CameraUpdateFactory.newCameraPosition(new CameraPosition(
@ -1794,18 +1760,20 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} }
break; break;
case R.id.iv_submit://弹窗 case R.id.iv_submit://弹窗
treasureBuilder.append("点击了弹窗 上报的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了弹窗 上报的按钮,");
initSubmit(); initSubmit();
break; break;
case R.id.iv_filter: case R.id.iv_filter:
treasureBuilder.append("点击了删选的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了删选的按钮,");
debounce(ivFilter); debounce(ivFilter);
FilterFragment filterFragment = FilterFragment.newInstance(new Bundle()); FilterFragment filterFragment = FilterFragment.newInstance(new Bundle());
showSlidingFragment(filterFragment); showSlidingFragment(filterFragment);
refreshFilterData(); refreshFilterData();
v.setEnabled(false);
handler.sendEmptyMessageDelayed(0x101, 2000);
break; break;
case R.id.iv_message: case R.id.iv_message:
treasureBuilder.append("点击了消息的按钮,"); treasureBuilder.append(TimestampUtil.time()).append("点击了消息的按钮,");
Intent messageIntent = new Intent(getContext(), FragmentManagement.class); Intent messageIntent = new Intent(getContext(), FragmentManagement.class);
messageIntent.putExtra("tag", 35); messageIntent.putExtra("tag", 35);
startActivity(messageIntent); startActivity(messageIntent);
@ -1869,25 +1837,25 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
if (item.getText().equals("POI")) { if (item.getText().equals("POI")) {
PoiFragment poiFragment = PoiFragment.newInstance(bundle); PoiFragment poiFragment = PoiFragment.newInstance(bundle);
showSlidingFragment(poiFragment); showSlidingFragment(poiFragment);
treasureBuilder.append("点击弹窗上的poi,"); treasureBuilder.append(TimestampUtil.time()).append("点击弹窗上的poi,");
} else if (item.getText().equals("充电站")) { } else if (item.getText().equals("充电站")) {
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle); ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
showSlidingFragment(chargingStationFragment); showSlidingFragment(chargingStationFragment);
treasureBuilder.append("点击弹窗上的充电站,"); treasureBuilder.append(TimestampUtil.time()).append("点击弹窗上的充电站,");
} else if (item.getText().equals("POI录像")) { } else if (item.getText().equals("POI录像")) {
poiEntity.setWork_type(1); poiEntity.setWork_type(1);
bundle.putSerializable("poiEntity", poiEntity); bundle.putSerializable("poiEntity", poiEntity);
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle); PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
showSlidingFragment(poiVideoFragment); showSlidingFragment(poiVideoFragment);
treasureBuilder.append("点击弹窗上的poi录像,"); treasureBuilder.append(TimestampUtil.time()).append("点击弹窗上的poi录像,");
} else if (item.getText().equals("道路")) { } else if (item.getText().equals("道路")) {
RoadFragment roadFragment = RoadFragment.newInstance(bundle); RoadFragment roadFragment = RoadFragment.newInstance(bundle);
showSlidingFragment(roadFragment); showSlidingFragment(roadFragment);
treasureBuilder.append("点击弹窗上的道路,"); treasureBuilder.append(TimestampUtil.time()).append("点击弹窗上的道路,");
} else if (item.getText().equals("其他")) { } else if (item.getText().equals("其他")) {
OtherFragment otherFragment = OtherFragment.newInstance(bundle); OtherFragment otherFragment = OtherFragment.newInstance(bundle);
showSlidingFragment(otherFragment); showSlidingFragment(otherFragment);
treasureBuilder.append("点击弹窗上的其他,"); treasureBuilder.append(TimestampUtil.time()).append("点击弹窗上的其他,");
} }
return false; return false;
} }
@ -2069,7 +2037,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
TencentMap.OnMarkerClickListener markerClickListener = new TencentMap.OnMarkerClickListener() { TencentMap.OnMarkerClickListener markerClickListener = new TencentMap.OnMarkerClickListener() {
@Override @Override
public boolean onMarkerClick(Marker marker) { public boolean onMarkerClick(Marker marker) {
treasureBuilder.append("TencentMap.OnMarkerClickListener-点击了Marker,"); treasureBuilder.append(TimestampUtil.time()).append("TencentMap.OnMarkerClickListener-点击了Marker,");
LatLng latLng = marker.getPosition(); LatLng latLng = marker.getPosition();
ArrayList<LatLng> lngArrayList = new ArrayList<>();//存储的是内部的屏幕点坐标 ArrayList<LatLng> lngArrayList = new ArrayList<>();//存储的是内部的屏幕点坐标
Projection projection = tencentMap.getProjection(); Projection projection = tencentMap.getProjection();
@ -2261,7 +2229,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
*/ */
public void customDialog(List<PoiEntity> list, Marker marker) { public void customDialog(List<PoiEntity> list, Marker marker) {
AlertDialog dialog = builder.create(); AlertDialog dialog = builder.create();
treasureBuilder.append("customDialog-打开了自定义的dialog,"); treasureBuilder.append(TimestampUtil.time()).append("customDialog-打开了自定义的dialog,");
View dialogView = View.inflate(getActivity(), R.layout.layout_marker_dialog, null); View dialogView = View.inflate(getActivity(), R.layout.layout_marker_dialog, null);
dialog.setView(dialogView); dialog.setView(dialogView);
Window win = dialog.getWindow(); Window win = dialog.getWindow();
@ -2282,7 +2250,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
markerAdapter.setOnBankClick(new MarkerAdapter.OnBankClick() { markerAdapter.setOnBankClick(new MarkerAdapter.OnBankClick() {
@Override @Override
public void onClick(PoiEntity poiEntity) { public void onClick(PoiEntity poiEntity) {
treasureBuilder.append("customDialog-点击了item,"); treasureBuilder.append(TimestampUtil.time()).append("customDialog-点击了item,");
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction(); FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
if (poiEntity.getTaskStatus() == 0) {//网络未领取 if (poiEntity.getTaskStatus() == 0) {//网络未领取
initMarker(poiEntity, true); initMarker(poiEntity, true);

View File

@ -38,6 +38,7 @@ import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder; import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.PhotoUtils; import com.navinfo.outdoor.util.PhotoUtils;
import com.navinfo.outdoor.util.TimestampUtil;
import java.io.File; import java.io.File;
import java.text.DateFormat; import java.text.DateFormat;
@ -107,7 +108,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
} }
} }
userAttestationBuilder = new StringBuilder(); userAttestationBuilder = new StringBuilder();
userAttestationBuilder.append("UserAttestationFragment-onCreate-initData ,"); userAttestationBuilder.append(TimestampUtil.time()).append("UserAttestationFragment-onCreate-initData ,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
userAttestationBuilder.append("userId:").append(Constant.USHERED).append(","); userAttestationBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -200,25 +201,25 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.iv_attestation: case R.id.iv_attestation:
userAttestationBuilder.append("点击了进行返回 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("点击了进行返回 ,");
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
break; break;
case R.id.iv_attestation1: case R.id.iv_attestation1:
userAttestationBuilder.append("点击身份证人像面 进行拍照 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("点击身份证人像面 进行拍照 ,");
Intent ivAttestationIntent1 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent1 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile1 = PhotoUtils.showPhotoFile("a", null); File attestationFile1 = PhotoUtils.showPhotoFile("a", null);
ivAttestationIntent1.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile1.getPath()); ivAttestationIntent1.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile1.getPath());
startActivityForResult(ivAttestationIntent1, 121); startActivityForResult(ivAttestationIntent1, 121);
break; break;
case R.id.iv_attestation2: case R.id.iv_attestation2:
userAttestationBuilder.append("点击身份证国徽面 进行拍照 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("点击身份证国徽面 进行拍照 ,");
Intent ivAttestationIntent2 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent2 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile2 = PhotoUtils.showPhotoFile("b", null); File attestationFile2 = PhotoUtils.showPhotoFile("b", null);
ivAttestationIntent2.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile2.getPath()); ivAttestationIntent2.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile2.getPath());
startActivityForResult(ivAttestationIntent2, 122); startActivityForResult(ivAttestationIntent2, 122);
break; break;
case R.id.iv_attestation3: case R.id.iv_attestation3:
userAttestationBuilder.append("点击手持身份证 进行拍照 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("点击手持身份证 进行拍照 ,");
Intent ivAttestationIntent3 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent3 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile3 = PhotoUtils.showPhotoFile("c", null); File attestationFile3 = PhotoUtils.showPhotoFile("c", null);
ivAttestationIntent3.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile3.getPath()); ivAttestationIntent3.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile3.getPath());
@ -240,7 +241,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
nameAuthentication(); nameAuthentication();
break; break;
case R.id.user_attestation_camera: case R.id.user_attestation_camera:
userAttestationBuilder.append("点击认证按钮 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("点击认证按钮 ,");
Intent userCameraIntent = new Intent(getActivity(), PhotographActivity.class); Intent userCameraIntent = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("d", null); File file = PhotoUtils.showPhotoFile("d", null);
userCameraIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); userCameraIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
@ -260,9 +261,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
} }
/* /*中文姓名效验*/
* 中文姓名效验
*/
static boolean chineseNameTest(String name) { static boolean chineseNameTest(String name) {
if (!name.matches("[\u4e00-\u9fa5]{2,4}")) { if (!name.matches("[\u4e00-\u9fa5]{2,4}")) {
System.out.println("只能输入2到4个汉字"); System.out.println("只能输入2到4个汉字");
@ -324,7 +323,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
userAttestationBuilder.append("提交成功 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("提交成功 ,");
Constant.NAME = attestationName; Constant.NAME = attestationName;
Constant.ID_NUM = namePhone; Constant.ID_NUM = namePhone;
Constant.AUDIOTAPES = -1; Constant.AUDIOTAPES = -1;
@ -426,28 +425,28 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
if (inward != null) { if (inward != null) {
IdCardNumberBean idCardNumberBean = new Gson().fromJson(inward, IdCardNumberBean.class); IdCardNumberBean idCardNumberBean = new Gson().fromJson(inward, IdCardNumberBean.class);
if (idCardNumberBean == null) { if (idCardNumberBean == null) {
userAttestationBuilder.append("识别失败,可以重新识别或则进行手动输入 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
} else { } else {
if (idCardNumberBean.getWords_result().get公民身份号码() != null) { if (idCardNumberBean.getWords_result().get公民身份号码() != null) {
String words = idCardNumberBean.getWords_result().get公民身份号码().getWords(); String words = idCardNumberBean.getWords_result().get公民身份号码().getWords();
etNamePhone.setText(words); etNamePhone.setText(words);
userAttestationBuilder.append("身份号识别成功 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别成功 ,");
} else { } else {
Toast.makeText(getActivity(), "身份号识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "身份号识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
userAttestationBuilder.append("身份号识别失败,可以重新识别或则进行手动输入 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("身份号识别失败,可以重新识别或则进行手动输入 ,");
} }
if (idCardNumberBean.getWords_result().get姓名() != null) { if (idCardNumberBean.getWords_result().get姓名() != null) {
String words = idCardNumberBean.getWords_result().get姓名().getWords(); String words = idCardNumberBean.getWords_result().get姓名().getWords();
etAttestationName.setText(words); etAttestationName.setText(words);
userAttestationBuilder.append("姓名识别成功 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别成功 ,");
} else { } else {
Toast.makeText(getActivity(), "姓名识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "姓名识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
userAttestationBuilder.append("姓名识别失败,可以重新识别或则进行手动输入 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("姓名识别失败,可以重新识别或则进行手动输入 ,");
} }
} }
} else { } else {
userAttestationBuilder.append("识别失败,可以重新识别或则进行手动输入 ,"); userAttestationBuilder.append(TimestampUtil.time()).append("识别失败,可以重新识别或则进行手动输入 ,");
Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
} }
@ -461,19 +460,19 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
userAttestationBuilder.append("onPause ,"); userAttestationBuilder.append(TimestampUtil.time()).append("onPause ,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
userAttestationBuilder.append("onStop ,"); userAttestationBuilder.append(TimestampUtil.time()).append("onStop ,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
userAttestationBuilder.append("onDestroy"); userAttestationBuilder.append(TimestampUtil.time()).append("onDestroy");
userAttestationBuilder.append("\r\n"); userAttestationBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), userAttestationBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), userAttestationBuilder.toString(), true);
} }

View File

@ -33,6 +33,7 @@ import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface; import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder; import com.navinfo.outdoor.http.OkGoBuilder;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.TimestampUtil;
import java.io.File; import java.io.File;
import java.text.DateFormat; import java.text.DateFormat;
@ -83,7 +84,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
} }
} }
withdrawBuilder = new StringBuilder(); withdrawBuilder = new StringBuilder();
withdrawBuilder.append("WithdrawFragment-onViewCreated-initData,"); withdrawBuilder.append(TimestampUtil.time()).append("WithdrawFragment-onViewCreated-initData,");
if (Constant.USHERED != null) { if (Constant.USHERED != null) {
withdrawBuilder.append("userId:").append(Constant.USHERED).append(","); withdrawBuilder.append("userId:").append(Constant.USHERED).append(",");
} }
@ -110,10 +111,10 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
if (Constant.BACKGROUND == null) { if (Constant.BACKGROUND == null) {
Toast.makeText(getActivity(), "没有绑定银行卡,请先绑定银行卡", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "没有绑定银行卡,请先绑定银行卡", Toast.LENGTH_SHORT).show();
checkBox.setChecked(false); checkBox.setChecked(false);
withdrawBuilder.append("点击了银行卡的勾选,"); withdrawBuilder.append(TimestampUtil.time()).append("点击了银行卡的勾选,");
} else { } else {
checkBox.setChecked(true); checkBox.setChecked(true);
withdrawBuilder.append("取消了银行卡的勾选,"); withdrawBuilder.append(TimestampUtil.time()).append("取消了银行卡的勾选,");
} }
} }
} }
@ -194,22 +195,21 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
}); });
} }
@Override @Override
public void onClick(View v) { public void onClick(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.iv_withdraw: case R.id.iv_withdraw:
withdrawBuilder.append("点击了财务信息的返回 ,"); withdrawBuilder.append(TimestampUtil.time()).append("点击了财务信息的返回 ,");
Objects.requireNonNull(getActivity()).finish(); Objects.requireNonNull(getActivity()).finish();
break; break;
case R.id.tv_text: case R.id.tv_text:
withdrawBuilder.append("点击了提现记录 ,"); withdrawBuilder.append(TimestampUtil.time()).append("点击了提现记录 ,");
Intent intentText = new Intent(getActivity(), FragmentManagement.class); Intent intentText = new Intent(getActivity(), FragmentManagement.class);
intentText.putExtra("tag", 26); intentText.putExtra("tag", 26);
startActivity(intentText); startActivity(intentText);
break; break;
case R.id.button: case R.id.button:
withdrawBuilder.append("点击了立即提现 ,"); withdrawBuilder.append(TimestampUtil.time()).append("点击了立即提现 ,");
String price = etAllPrice.getText().toString().trim(); String price = etAllPrice.getText().toString().trim();
if (!price.equals("")) { if (!price.equals("")) {
double aDouble = Double.parseDouble(price); double aDouble = Double.parseDouble(price);
@ -230,6 +230,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.BACKGROUND.substring(Constant.BACKGROUND.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.BACKGROUND.substring(Constant.BACKGROUND.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
withdrawBuilder.append(TimestampUtil.time()).append("点击了提取到银行卡的确定按钮 ,");
immediatelyPrice(); immediatelyPrice();
return false; return false;
} }
@ -240,7 +241,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
} }
break; break;
case R.id.tv_all: case R.id.tv_all:
withdrawBuilder.append("点击了全部 ,"); withdrawBuilder.append(TimestampUtil.time()).append("点击了全部 ,");
if (canExchangePrice != 0) { if (canExchangePrice != 0) {
etAllPrice.setText(canExchangePrice + ""); etAllPrice.setText(canExchangePrice + "");
} }
@ -271,7 +272,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "该提现申请已提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "该提现申请已提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
withdrawBuilder.append("提现了成功 "); withdrawBuilder.append(TimestampUtil.time()).append("提现了成功 ");
initNetWork(); initNetWork();
return false; return false;
} }
@ -279,7 +280,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
} else if (response.getCode() == 230) { } else if (response.getCode() == 230) {
FlushTokenUtil.flushToken(getActivity()); FlushTokenUtil.flushToken(getActivity());
} else { } else {
withdrawBuilder.append("提现了失败 "); withdrawBuilder.append(TimestampUtil.time()).append("提现了失败 ");
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
} }
etAllPrice.getText().clear(); etAllPrice.getText().clear();
@ -304,19 +305,19 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
@Override @Override
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
withdrawBuilder.append("onPause,"); withdrawBuilder.append(TimestampUtil.time()).append("onPause,");
} }
@Override @Override
public void onStop() { public void onStop() {
super.onStop(); super.onStop();
withdrawBuilder.append("onStop,"); withdrawBuilder.append(TimestampUtil.time()).append("onStop,");
} }
@Override @Override
public void onDestroy() { public void onDestroy() {
super.onDestroy(); super.onDestroy();
withdrawBuilder.append("onDestroy"); withdrawBuilder.append(TimestampUtil.time()).append("onDestroy");
withdrawBuilder.append("\r\n"); withdrawBuilder.append("\r\n");
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true); FileUtils.writeFile(logFile.getAbsolutePath(), withdrawBuilder.toString(), true);
} }

View File

@ -1,8 +1,8 @@
package com.navinfo.outdoor.http; package com.navinfo.outdoor.http;
public class HttpInterface { public class HttpInterface {
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口 public static final String IP= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String IP= "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/";//登录

View File

@ -20,7 +20,7 @@ public interface PoiDao {
@Query("SELECT * FROM poi") @Query("SELECT * FROM poi")
List<PoiEntity> getAllPoi(); List<PoiEntity> getAllPoi();
@Query("SELECT * FROM poi where taskStatus > 1 and type!=6") @Query("SELECT * FROM poi where taskStatus > 1 and taskStatus!=100 and type!=6 ")
List<PoiEntity> getAllPoiByRecoded(); List<PoiEntity> getAllPoiByRecoded();
@Query("SELECT * FROM poi where type=:type") @Query("SELECT * FROM poi where type=:type")
@ -29,7 +29,7 @@ public interface PoiDao {
@Query("SELECT * FROM poi where taskStatus =5") @Query("SELECT * FROM poi where taskStatus =5")
List<PoiEntity> getAllPoiStatus(); List<PoiEntity> getAllPoiStatus();
@Query("SELECT * FROM poi WHERE (:taskStatus =-1 or taskStatus=:taskStatus1) and (:type=-1 or type=:type1) and (:isExclusive=-1 or isExclusive=:isExclusive1) ") @Query("SELECT * FROM poi WHERE (:taskStatus =-1 or taskStatus=:taskStatus1) and (:type=-1 or type=:type1) and (:isExclusive=-1 or isExclusive=:isExclusive1) and taskStatus !=100")
// @Query("SELECT * FROM poi WHERE taskStatus=:taskStatus and type=:type and (:isExclusive=-1 or isExclusive=:isExclusive) ") // @Query("SELECT * FROM poi WHERE taskStatus=:taskStatus and type=:type and (:isExclusive=-1 or isExclusive=:isExclusive) ")
List<PoiEntity> getAllTaskStatus(int taskStatus, int taskStatus1, int type, int type1, int isExclusive, int isExclusive1); List<PoiEntity> getAllTaskStatus(int taskStatus, int taskStatus1, int type, int type1, int isExclusive, int isExclusive1);
@ -39,6 +39,7 @@ public interface PoiDao {
@Query("SELECT * FROM poi where taskId=:taskId") @Query("SELECT * FROM poi where taskId=:taskId")
PoiEntity getTaskIdPoiEntity(int taskId); PoiEntity getTaskIdPoiEntity(int taskId);
/** /**
* 添加 * 添加
*/ */

View File

@ -42,7 +42,7 @@ public class PoiEntity implements Serializable {
private String y;//纬度 private String y;//纬度
private String detail;//需要保存的数据的wkt private String detail;//需要保存的数据的wkt
private String dist;//距离用户位置 private String dist;//距离用户位置
private int taskStatus;//任务状态 0.未领取 1.已领取5 立即采集2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功)4已上传结束采集 private int taskStatus;//任务状态 0.未领取 1.已领取5 立即采集2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功)4已上传结束采集,100 上传成功
private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务" private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 "门牌", "公交:6 情报:7 private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 "门牌", "公交:6 情报:7
private int isLocalData;//是否是本地数据 0,服务 1,本地 private int isLocalData;//是否是本地数据 0,服务 1,本地

View File

@ -352,7 +352,8 @@ public class PoiSaveUtils {
Gson gson = new Gson(); Gson gson = new Gson();
OtherUploadPicBean otherUploadPicBean = gson.fromJson(bodyStr, OtherUploadPicBean.class); OtherUploadPicBean otherUploadPicBean = gson.fromJson(bodyStr, OtherUploadPicBean.class);
if (otherUploadPicBean.getCode() == 200) { if (otherUploadPicBean.getCode() == 200) {
PoiDatabase.getInstance(mContext).getPoiDao().deletePoiEntity(poiEntity); poiEntity.setTaskStatus(100);
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
list.get(i).delete(); list.get(i).delete();
} }

View File

@ -66,11 +66,6 @@ public class PreserveUtils {
obtain1.what = Constant.NEST_WORD_SUBMIT; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "道路:" + poiEntity.getName() + " 保存成功"; obtain1.obj = "道路:" + poiEntity.getName() + " 保存成功";
EventBus.getDefault().post(obtain1); EventBus.getDefault().post(obtain1);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
}); });
} }
@ -126,11 +121,6 @@ public class PreserveUtils {
obtain1.what = Constant.NEST_WORD_SUBMIT; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "Poi" + poiEntity.getName() + " 保存成功"; obtain1.obj = "Poi" + poiEntity.getName() + " 保存成功";
EventBus.getDefault().post(obtain1); EventBus.getDefault().post(obtain1);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
}); });
} }
@ -188,11 +178,6 @@ public class PreserveUtils {
obtain1.what = Constant.NEST_WORD_SUBMIT; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "Poi录像" + poiEntity.getName() + " 保存成功"; obtain1.obj = "Poi录像" + poiEntity.getName() + " 保存成功";
EventBus.getDefault().post(obtain1); EventBus.getDefault().post(obtain1);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
}); });
} }
@ -249,11 +234,6 @@ public class PreserveUtils {
obtain1.what = Constant.NEST_WORD_SUBMIT; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "其他:" + poiEntity.getName() + " 保存成功"; obtain1.obj = "其他:" + poiEntity.getName() + " 保存成功";
EventBus.getDefault().post(obtain1); EventBus.getDefault().post(obtain1);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
}); });
} }
@ -311,11 +291,6 @@ public class PreserveUtils {
obtain1.what = Constant.NEST_WORD_SUBMIT; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存成功"; obtain1.obj = "充电站:" + poiEntity.getName() + " 保存成功";
EventBus.getDefault().post(obtain1); EventBus.getDefault().post(obtain1);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
}); });
} }

View File

@ -43,14 +43,11 @@ public class UploadUtils {
@Override @Override
public void onSuccess(OtherUploadPicBean response, int id) { public void onSuccess(OtherUploadPicBean response, int id) {
if (response.getCode() == 200) { if (response.getCode() == 200) {
Message obtain1 = Message.obtain();
obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "道路:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain1);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(showPoiEntity); showPoiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(showPoiEntity);
if (showPoiEntity.getId()!=null){ if (showPoiEntity.getId()!=null){
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
@ -63,10 +60,10 @@ public class UploadUtils {
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() { Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Message obtain = Message.obtain(); Message obtain1 = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain.obj = true; obtain1.obj = "道路:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain1);
} }
}); });
} }
@ -106,24 +103,21 @@ public class UploadUtils {
@Override @Override
public void onSuccess(OtherUploadPicBean response, int id) { public void onSuccess(OtherUploadPicBean response, int id) {
if (response.getCode() == 200) { if (response.getCode() == 200) {
Message obtain1 = Message.obtain();
obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "Poi" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain1);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(showPoiEntity); showPoiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(showPoiEntity);
for (int i = 0; i < poiPicList.size(); i++) { for (int i = 0; i < poiPicList.size(); i++) {
poiPicList.get(i).delete(); poiPicList.get(i).delete();
} }
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() { Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Message obtain = Message.obtain(); Message obtain1 = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain.obj = true; obtain1.obj = "Poi" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain1);
} }
}); });
} }
@ -163,14 +157,11 @@ public class UploadUtils {
@Override @Override
public void onSuccess(OtherUploadPicBean response, int id) { public void onSuccess(OtherUploadPicBean response, int id) {
if (response.getCode() == 200) { if (response.getCode() == 200) {
Message obtain1 = Message.obtain();
obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "poi录像" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain1);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(showPoiEntity); showPoiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(showPoiEntity);
if (showPoiEntity.getId() != null) { if (showPoiEntity.getId() != null) {
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
@ -183,10 +174,10 @@ public class UploadUtils {
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() { Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Message obtain = Message.obtain(); Message obtain1 = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain.obj = true; obtain1.obj = "poi录像" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain1);
} }
}); });
} }
@ -226,24 +217,21 @@ public class UploadUtils {
@Override @Override
public void onSuccess(PoiUploadBean response, int id) { public void onSuccess(PoiUploadBean response, int id) {
if (response.getCode() == 200) { if (response.getCode() == 200) {
Message obtain1 = Message.obtain();
obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "其他:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain1);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(showPoiEntity); showPoiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(showPoiEntity);
for (int i = 0; i < otherUploadList.size(); i++) { for (int i = 0; i < otherUploadList.size(); i++) {
otherUploadList.get(i).delete(); otherUploadList.get(i).delete();
} }
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() { Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Message obtain = Message.obtain(); Message obtain1 = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain.obj = true; obtain1.obj = "其他:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain1);
} }
}); });
} }
@ -284,24 +272,21 @@ public class UploadUtils {
@Override @Override
public void onSuccess(PoiUploadBean response, int id) { public void onSuccess(PoiUploadBean response, int id) {
if (response.getCode() == 200) { if (response.getCode() == 200) {
Message obtain1 = Message.obtain();
obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain1.obj = "充电站:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain1);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
poiDao.deletePoiEntity(showPoiEntity); showPoiEntity.setTaskStatus(100);
poiDao.updatePoiEntity(showPoiEntity);
for (int i = 0; i < chargingStationList.size(); i++) { for (int i = 0; i < chargingStationList.size(); i++) {
chargingStationList.get(i).delete(); chargingStationList.get(i).delete();
} }
mContext.runOnUiThread(new Runnable() { mContext.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
Message obtain = Message.obtain(); Message obtain1 = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR; obtain1.what = Constant.NEST_WORD_SUBMIT;
obtain.obj = true; obtain1.obj = "充电站:" + showPoiEntity.getName() + " 上传成功";
EventBus.getDefault().post(obtain); EventBus.getDefault().post(obtain1);
} }
}); });
} }

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -10,78 +9,97 @@
android:id="@+id/btn_delete" android:id="@+id/btn_delete"
android:layout_width="25dp" android:layout_width="25dp"
android:layout_height="25dp" android:layout_height="25dp"
android:padding="5dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/delete" android:background="@drawable/delete"
android:padding="5dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <LinearLayout
android:id="@+id/tv_title" android:id="@+id/linear_layout"
android:layout_width="270dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="15dp" android:orientation="horizontal"
android:text="众包录像 测试3"
android:ellipsize="end"
android:lines="2"
android:textColor="#333"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btn_delete" /> app:layout_constraintTop_toBottomOf="@+id/btn_delete">
<TextView <TextView
android:id="@+id/tv_money" android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:ellipsize="end"
android:lines="2"
android:text="众包录像 测试3"
android:textColor="#333"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="3.5元"
android:textColor="#F44336"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_title" />
</LinearLayout>
<RelativeLayout
android:id="@+id/relative_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="3.5元" android:layout_marginTop="10dp"
android:textColor="#F44336" app:layout_constraintStart_toStartOf="@+id/linear_layout"
android:textSize="20sp" app:layout_constraintTop_toBottomOf="@+id/linear_layout">
android:textStyle="bold"
android:layout_margin="15dp" <TextView
app:layout_constraintBottom_toBottomOf="@+id/tv_title" android:id="@+id/tv_time"
app:layout_constraintEnd_toEndOf="parent" android:layout_width="wrap_content"
app:layout_constraintTop_toTopOf="@+id/tv_title" /> android:layout_height="wrap_content"
<TextView android:layout_marginStart="15dp"
android:id="@+id/tv_time" android:text="到期时间:"
android:layout_width="wrap_content" android:textSize="15sp" />
android:layout_height="wrap_content"
android:layout_marginTop="15dp" <TextView
android:text="到期时间:" android:id="@+id/tv_distance"
android:textSize="15sp" android:layout_width="wrap_content"
app:layout_constraintStart_toStartOf="@+id/tv_title" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tv_title" /> android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:maxLength="10"
android:text="距离:"
android:textSize="15sp" />
</RelativeLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="#BFB8B8" android:background="#BFB8B8"
android:layout_marginStart="20dp" app:layout_constraintBottom_toTopOf="@+id/tv_describe"
android:layout_marginEnd="20dp" app:layout_constraintTop_toBottomOf="@+id/relative_linear"
app:layout_constraintBottom_toBottomOf="@+id/tv_time" tools:layout_editor_absoluteX="20dp" />
app:layout_constraintTop_toTopOf="@+id/tv_describe" />
<TextView
android:id="@+id/tv_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_marginEnd="20dp"
android:maxLength="10"
android:text="距离:"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_time"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_time" />
<TextView <TextView
android:id="@+id/tv_describe" android:id="@+id/tv_describe"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:text="任务描述:" android:text="任务描述:"
android:textSize="15sp" android:textSize="15sp"
android:layout_marginTop="20dp" app:layout_constraintStart_toStartOf="@+id/relative_linear"
app:layout_constraintStart_toStartOf="@+id/tv_time" app:layout_constraintTop_toBottomOf="@+id/relative_linear" />
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -16,15 +16,16 @@
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
</include> </include>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/nested_scroll_view" android:id="@+id/nested_scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
<TextView <TextView
android:id="@+id/tv_message" android:id="@+id/tv_message"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -102,16 +103,15 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
app:layout_constraintLeft_toLeftOf="@id/ll_pictures" app:layout_constraintLeft_toLeftOf="@id/ll_pictures"
app:layout_constraintTop_toBottomOf="@id/ll_pictures"> app:layout_constraintTop_toBottomOf="@id/ll_pictures">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="点击拍摄成果可查看,长按可删除" android:text="点击拍摄成果可查看,长按可删除"
android:textSize="16sp" android:textSize="16sp" />
android:layout_marginStart="10dp"
/>
<ImageView <ImageView
android:id="@+id/iv_road_picture" android:id="@+id/iv_road_picture"
android:layout_width="200dp" android:layout_width="200dp"

View File

@ -132,7 +132,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="100dp" android:layout_marginLeft="100dp"
android:layout_marginRight="50dp" android:layout_marginRight="30dp"
android:background="@null" android:background="@null"
android:hint="银行卡号" android:hint="银行卡号"
android:digits="1234567890" android:digits="1234567890"
@ -142,16 +142,15 @@
app:layout_constraintLeft_toRightOf="@+id/tv_creditNumbers" app:layout_constraintLeft_toRightOf="@+id/tv_creditNumbers"
/> />
<ImageView <ImageView
android:id="@+id/gathering_camera" android:id="@+id/gathering_camera"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginBottom="10dp" android:src="@drawable/ic_baseline_camera"
android:src="@drawable/ic_baseline_camera" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toRightOf="@+id/et_bank_num" app:layout_constraintLeft_toRightOf="@+id/et_bank_num"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
/>

View File

@ -128,7 +128,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="点击拍摄成果可查看,长按可删除" android:text="点击拍摄成果可查看,长按可删除"
android:textSize="16sp" android:textSize="16sp"
android:layout_marginStart="10dp"/> />
<ImageView <ImageView
android:id="@+id/iv_poi_video_picture" android:id="@+id/iv_poi_video_picture"
android:layout_width="200dp" android:layout_width="200dp"

View File

@ -140,22 +140,22 @@
android:background="@null" android:background="@null"
android:textColorHint="@color/colorRed" android:textColorHint="@color/colorRed"
android:layout_marginLeft="100dp" android:layout_marginLeft="100dp"
android:layout_marginRight="50dp" android:layout_marginRight="30dp"
android:hint="点击拍照自动识别" android:hint="点击拍照自动识别"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintLeft_toRightOf="@+id/tv_card" app:layout_constraintLeft_toRightOf="@+id/tv_card"
app:layout_constraintTop_toTopOf="@+id/tv_card" app:layout_constraintTop_toTopOf="@+id/tv_card"
/> />
<ImageView <ImageView
android:id="@+id/user_attestation_camera" android:id="@+id/user_attestation_camera"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_marginBottom="10dp"
android:src="@drawable/ic_baseline_camera" android:src="@drawable/ic_baseline_camera"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toRightOf="@+id/et_namePhone" app:layout_constraintLeft_toRightOf="@+id/et_namePhone"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<View <View