1.保存放入后台,2.地图修改大小。3.添加token 刷新 4.添加 超时
This commit is contained in:
parent
873e671de9
commit
647a24085d
@ -11,6 +11,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
@ -268,16 +269,13 @@ public class GuidanceActivity extends BaseActivity {
|
||||
|
||||
private void initGuide() {
|
||||
showLoadingDialog();
|
||||
/* HttpParams httpParams = new HttpParams();
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);*/
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.INSERT_USER_GUIDE)
|
||||
.cls(BaseBean.class)
|
||||
.params(new HttpParams())
|
||||
.getRequest(new Callback<BaseBean<Integer>>() {
|
||||
.params(new HttpParams());
|
||||
okGoBuilder.getRequest(new Callback<BaseBean<Integer>>() {
|
||||
@Override
|
||||
public void onSuccess(BaseBean<Integer> response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -285,17 +283,23 @@ public class GuidanceActivity extends BaseActivity {
|
||||
startActivity(new Intent(GuidanceActivity.this, HomeActivity.class));
|
||||
GuidanceActivity.this.finish();
|
||||
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_LONG).show();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(GuidanceActivity.this);
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(GuidanceActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(GuidanceActivity.this, e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Log.e("TAG", "onError: "+e.getMessage()+"");
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")){
|
||||
Toast.makeText(GuidanceActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(GuidanceActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -148,8 +148,8 @@ public class HomeActivity extends BaseActivity{
|
||||
}else if (data.what==Constant.NEST_WORD_SUBMIT){
|
||||
String dataString = (String) data.obj;
|
||||
if (!dataString.equals("")) {
|
||||
Constant.isPresent=true;
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
Constant.isPresent=true;
|
||||
MessageDialog.show(this, "提示", dataString, "确定");
|
||||
}
|
||||
}
|
||||
|
@ -196,13 +196,14 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
httpParams.put("grant_type", "password");
|
||||
httpParams.put("datetime", time);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.USER_LOGIN_OAUTH_TOKEN)
|
||||
.cls(LoginOauthTokenBean.class)
|
||||
.params(httpParams)
|
||||
.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||
@Override
|
||||
public void onSuccess(LoginOauthTokenBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -233,7 +234,13 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(LoginActivity.this, e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(LoginActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(LoginActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@ -242,14 +249,15 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
}
|
||||
|
||||
private void initGetUserInfo() {
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.cls(UserDetailBean.class)
|
||||
.getRequest(new Callback<UserDetailBean>() {
|
||||
.cls(UserDetailBean.class);
|
||||
okGoBuilder.getRequest(new Callback<UserDetailBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserDetailBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -310,7 +318,13 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(LoginActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(LoginActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(LoginActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public class MainActivity extends BaseActivity {
|
||||
httpParams.put("operationType", "android");
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.time(0)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.APP_CHECK_VERSION)
|
||||
.params(httpParams)
|
||||
@ -195,7 +195,13 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(MainActivity.this, e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
initTime();
|
||||
}
|
||||
});
|
||||
@ -269,14 +275,14 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void initGetUserInfo() {
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.cls(UserDetailBean.class)
|
||||
.getRequest(new Callback<UserDetailBean>() {
|
||||
.cls(UserDetailBean.class);
|
||||
okGoBuilder.getRequest(new Callback<UserDetailBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserDetailBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -337,7 +343,13 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -350,13 +362,13 @@ public class MainActivity extends BaseActivity {
|
||||
httpParams.put("refresh_token", Constant.REFRESH_TOKEN);
|
||||
httpParams.put("datetime", time);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.USER_LOGIN_OAUTH_TOKEN)
|
||||
.cls(LoginOauthTokenBean.class)
|
||||
.params(httpParams)
|
||||
.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||
@Override
|
||||
public void onSuccess(LoginOauthTokenBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -384,7 +396,13 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(MainActivity.this, e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
@ -269,7 +269,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void run() {
|
||||
//Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show();
|
||||
tvTitle.setText("保存成功:" + (videoIndex + 1));
|
||||
}
|
||||
});
|
||||
@ -319,6 +318,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
});
|
||||
} else {
|
||||
isBack = false;
|
||||
if (poi_video_type != 2) {
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
capturePicture.setChecked(false);
|
||||
stopTimer();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -342,9 +346,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (geometry.getGeometryType().equals("LineString")) {//线
|
||||
BitmapDescriptor bitmapLine = null;
|
||||
if (type != null) {
|
||||
if (type.equals("3")) {//poi录像
|
||||
if (type.equals("4")) {//poi录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
||||
} else if (type.equals("4")) {//道路录像
|
||||
} else if (type.equals("3")) {//道路录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||
}
|
||||
}
|
||||
@ -372,18 +376,32 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
String geo = Geohash.getInstance().decode(detail);
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
if (geometry.getGeometryType().equals("LineString")) {//线
|
||||
BitmapDescriptor bitmapLine = null;
|
||||
if (type != null) {
|
||||
if (type.equals("4")) {//poi录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
||||
} else if (type.equals("3")) {//道路录像
|
||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||
}
|
||||
}
|
||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||
assert latLineString != null;
|
||||
for (int i = 0; i < latLineString.size(); i++) {
|
||||
LatLng latLng = latLineString.get(i);
|
||||
if (latLng != null) {
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.ic_baseline);
|
||||
Marker marker = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor).alpha(0.9f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
removables.add(marker);
|
||||
}
|
||||
}
|
||||
startLatLine = latLineString.get(0);
|
||||
endLatLine = latLineString.get(latLineString.size() - 1);
|
||||
// 构造 PolylineOnions
|
||||
PolylineOptions polylineOptions = new PolylineOptions().addAll(latLineString)
|
||||
// 折线设置圆形线头
|
||||
.lineCap(true)
|
||||
// 折线的颜色为绿色
|
||||
.color(Color.parseColor("#BDBDBD"))
|
||||
// 折线宽度为5像素
|
||||
.width(20)
|
||||
.arrow(true)
|
||||
.arrowSpacing(150)
|
||||
.arrowTexture(bitmapLine);
|
||||
// 绘制折线
|
||||
polyline = tencentMap.addPolyline(polylineOptions);
|
||||
polyline.setZIndex(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -458,7 +476,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (Constant.currentLocation != null) {
|
||||
CameraUpdate cameraSigma = CameraUpdateFactory
|
||||
.newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
tencentMap.getCameraPosition().zoom, //目标缩放级别
|
||||
17, //目标缩放级别
|
||||
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
@ -483,7 +501,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
/*
|
||||
* 设置定位图标样式
|
||||
设置定位图标样式
|
||||
*/
|
||||
private void setLocMarkerStyle(int type) {
|
||||
tencentMap.setLocationSource(new MyTecentLocationSource(this));
|
||||
@ -500,7 +518,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
tencentMap.setMyLocationStyle(locationStyle);
|
||||
}
|
||||
|
||||
|
||||
public void benSwitch() {
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
|
||||
int heightMap = ivMap.getMeasuredHeight();
|
||||
@ -626,7 +643,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
TencentLocation tencentLocation = (TencentLocation) msg.obj;
|
||||
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
20, //目标缩放级别
|
||||
17, //目标缩放级别
|
||||
0, //目标倾斜角
|
||||
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
@ -655,6 +672,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
sb.append("\r\n");
|
||||
if (isBack) {
|
||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||
//initSpeed();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
UMCrash.generateCustomLog(e, "自定义");
|
||||
@ -665,7 +683,27 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
/* float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||
//快到终点的语音播报
|
||||
/*if (Constant.currentLocation != null) {
|
||||
LatLng newLatLine = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
|
||||
if (endLatLine != null && startLatLine != null) {
|
||||
double startDistance = GeometryTools.distanceToDouble(newLatLine, startLatLine);
|
||||
double endDistance = GeometryTools.distanceToDouble(newLatLine, endLatLine);
|
||||
if (startDistance > endDistance) {//endDistance: 起点 startDistance:终点
|
||||
if (startDistance == 50) {
|
||||
systemTTS.playText("即将到达任务终点");
|
||||
}
|
||||
} else {
|
||||
if (endDistance == 50) {
|
||||
systemTTS.playText("即将到达任务终点");
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void initSpeed() {
|
||||
float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||
if (speed != 0) {
|
||||
float a = (speed * 3600 / 1000);//km/h
|
||||
if (poi_video_type == 1) {
|
||||
@ -695,24 +733,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
oldCurrentLocation = Constant.currentLocation;
|
||||
}*/
|
||||
//快到终点的语音播报
|
||||
/*if (Constant.currentLocation!=null){
|
||||
LatLng newLatLine = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
|
||||
if (endLatLine!=null&&startLatLine!=null){
|
||||
double startDistance = GeometryTools.distanceToDouble(newLatLine, startLatLine);
|
||||
double endDistance = GeometryTools.distanceToDouble(newLatLine, endLatLine);
|
||||
if (startDistance>endDistance){//endDistance: 起点 startDistance:终点
|
||||
if (startDistance==50){
|
||||
systemTTS.playText("即将到达任务终点");
|
||||
}
|
||||
}else {
|
||||
if (endDistance==50){
|
||||
systemTTS.playText("即将到达任务终点");
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -746,8 +767,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
LatLng latLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory
|
||||
.fromResource(R.drawable.circle);
|
||||
Marker marker = tencentMap
|
||||
.addMarker(new MarkerOptions(latLng)
|
||||
Marker marker = tencentMap.addMarker(new MarkerOptions(latLng)
|
||||
.icon(pileDescriptor)
|
||||
.alpha(0.9f)
|
||||
.flat(true)
|
||||
|
@ -123,14 +123,14 @@ public class TestActivity extends BaseActivity {
|
||||
httpParams.put("pageNum", treasurePage);
|
||||
httpParams.put("type", task_type);
|
||||
httpParams.put("isExclusive", limit_type);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.TASK_LIST)
|
||||
.cls(JobSearchBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<JobSearchBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<JobSearchBean>() {
|
||||
@Override
|
||||
public void onSuccess(JobSearchBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -293,8 +293,8 @@ public class TestActivity extends BaseActivity {
|
||||
String key = entry.getKey();
|
||||
List<Marker> markerList = stringListHashMap.get(key);
|
||||
assert markerList != null;
|
||||
Log.d("TAG", ": "+markerList.toString());
|
||||
Log.d("TAG", ": "+entry.getValue()+"-"+entry.getKey());
|
||||
Log.d("TAG", ": " + markerList.toString());
|
||||
Log.d("TAG", ": " + entry.getValue() + "-" + entry.getKey());
|
||||
LatLng lng = GeometryTools.createLatLng(key);
|
||||
listLatLng.add(lng);
|
||||
}
|
||||
@ -386,9 +386,9 @@ public class TestActivity extends BaseActivity {
|
||||
for (int i = 0; i < latList.size(); i++) {
|
||||
LatLng latL = latList.get(i);
|
||||
Geometry geometry = GeometryTools.createGeometry(latL);
|
||||
Log.d("TAG", "onMarkerClick: "+geometry.toString());
|
||||
Log.d("TAG", "onMarkerClick: " + geometry.toString());
|
||||
List<Marker> markerList = stringListHashMap.get(geometry.toText());
|
||||
if (markerList!=null){
|
||||
if (markerList != null) {
|
||||
for (Marker mar : markerList) {
|
||||
JobSearchBean.BodyBean.ListBean listBean = (JobSearchBean.BodyBean.ListBean) mar.getTag();
|
||||
if (listBean != null) {
|
||||
|
@ -33,6 +33,7 @@ import com.navinfo.outdoor.bean.UserBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||
import com.navinfo.outdoor.util.RegexUtil;
|
||||
|
||||
@ -240,14 +241,15 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}
|
||||
}
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(HttpInterface.USER_UPDATE)
|
||||
.cls(UserBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.postRequest(new Callback<UserBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.postRequest(new Callback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -258,15 +260,17 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
navInfoEditor.putString("region", region_text);
|
||||
navInfoEditor.putString("mobile", userphone);
|
||||
Constant.MOBILE=userphone;
|
||||
Constant.MOBILE = userphone;
|
||||
navInfoEditor.putString("qq", userqq);
|
||||
Constant.QQ=userqq;
|
||||
Constant.QQ = userqq;
|
||||
//navInfoEditor.putString("mailbox", usermailbox);
|
||||
navInfoEditor.commit();
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else if(response.getCode()==203){
|
||||
FlushTokenUtil.flushToken(UserActivity.this);
|
||||
} else {
|
||||
Toast.makeText(UserActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -275,7 +279,13 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(UserActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(UserActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(UserActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -305,10 +315,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
&& options3Items.get(options1).get(options2).size() > 0 ?
|
||||
options3Items.get(options1).get(options2).get(options3) : "";
|
||||
region_id = cityItems.get(options1).get(options2).get(options3).getRegion_id();
|
||||
Log.d("TAG", "onOptionsSelect: "+region_id);
|
||||
Log.d("TAG", "onOptionsSelect: " + region_id);
|
||||
region_text = opt1tx + " " + opt2tx + " " + opt3tx;
|
||||
region.setText(region_text);
|
||||
Log.d("TAG", "onOptionsSelect: "+region_text);
|
||||
Log.d("TAG", "onOptionsSelect: " + region_text);
|
||||
}
|
||||
}).setSubmitText("确定")//确定按钮文字
|
||||
.setCancelText("取消")//取消按钮文字
|
||||
@ -403,7 +413,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
userBuilder.append("onDestroy ");
|
||||
userBuilder.append("onDestroy");
|
||||
userBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), userBuilder.toString(), true);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
package com.navinfo.outdoor.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
@ -10,6 +11,7 @@ import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
@ -17,6 +19,8 @@ import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.bean.RichTextBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -48,7 +52,7 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private void initWebWork() {
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
if (bundle!=null){
|
||||
if (bundle != null) {
|
||||
String url = bundle.getString("url");
|
||||
if (url == null || url.equals("")) {
|
||||
Toast.makeText(this, "连接失败", Toast.LENGTH_SHORT).show();
|
||||
@ -56,42 +60,50 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
||||
if (map!=null&&!map.isEmpty()){
|
||||
for(Map.Entry<String, String> entry : map.entrySet()){
|
||||
httpParams.put(entry.getKey(),entry.getValue());
|
||||
if (map != null && !map.isEmpty()) {
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
httpParams.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(this)
|
||||
.url(url)
|
||||
.cls(RichTextBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<RichTextBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.getRequest(new Callback<RichTextBean>() {
|
||||
@Override
|
||||
public void onSuccess(RichTextBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
if (response.getCode() == 200) {
|
||||
String richBody = response.getBody();
|
||||
if (richBody!=null){
|
||||
if (richBody != null) {
|
||||
richBody = richBody.replace("<img", "<img style='max-width: 100%'");
|
||||
nWebView.loadDataWithBaseURL(null, richBody, "text/html", "utf-8", null);
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(WebActivity.this, response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}else if(response.getCode()==203){
|
||||
FlushTokenUtil.flushToken(WebActivity.this);
|
||||
} else {
|
||||
Toast.makeText(WebActivity.this, response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(WebActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(WebActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError:失败" + e.getMessage() + "");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,7 +16,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class AuthService {
|
||||
|
||||
/**
|
||||
/*
|
||||
* 获取权限token
|
||||
* @return 返回示例:
|
||||
* {
|
||||
|
@ -156,18 +156,16 @@ public class Constant {
|
||||
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
|
||||
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
|
||||
|
||||
|
||||
|
||||
public static final String INTENT_ID="id";//poiEntity 的id
|
||||
public static final String INTENT_TYPE="type";//poiEntity 的type
|
||||
|
||||
public static final String INTENT_GEO_WKT="geowkt";//poiEntity 的geowkt
|
||||
public static final String INTENT_DETAIL="Detail";//poiEntity 的detail
|
||||
public static final String INTENT_ID = "id";//poiEntity 的id
|
||||
public static final String INTENT_TYPE = "type";//poiEntity 的type
|
||||
public static final String INTENT_GEO_WKT = "geowkt";//poiEntity 的geowkt
|
||||
public static final String INTENT_DETAIL = "Detail";//poiEntity 的detail
|
||||
|
||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||
|
||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||
public static final String NAVIN_FO = "11.08";//版本日期
|
||||
public static final String NAVIN_FO = "11.11";//版本日期
|
||||
//marker
|
||||
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);
|
||||
|
@ -38,6 +38,7 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
||||
super.initData();
|
||||
if (Constant.currentLocation!=null){
|
||||
int mockGps = Constant.currentLocation.isMockGps();
|
||||
int gpsRssi = Constant.currentLocation.getGPSRssi();//无信号,信号弱,信号中,信号强
|
||||
//1为是,0为否,-1为无法判断
|
||||
if (mockGps == 1) {
|
||||
onBackPressed();
|
||||
|
@ -48,7 +48,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
private XRecyclerView capacityEvaluationRecycler;
|
||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||
private int capacityPage = 1;
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList ;
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList;
|
||||
private File logFile;
|
||||
private StringBuilder capacityEvaluationBuilder;
|
||||
|
||||
@ -73,17 +73,18 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
capacityEvaluationRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
capacityEvaluationRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能
|
||||
//capacityEvaluationRecycler.setPullRefreshEnabled(false);
|
||||
//capacityEvaluationRecycler.setLoadingMoreEnabled(false);
|
||||
capacityEvaluationAdapter = new CapacityEvaluationAdapter(capacityList,getActivity());
|
||||
/*capacityEvaluationRecycler.setPullRefreshEnabled(false);
|
||||
capacityEvaluationRecycler.setLoadingMoreEnabled(false);*/
|
||||
capacityEvaluationAdapter = new CapacityEvaluationAdapter(capacityList, getActivity());
|
||||
capacityEvaluationRecycler.setAdapter(capacityEvaluationAdapter);
|
||||
capacityEvaluationRecycler.getDefaultFootView().setNoMoreHint("加载成功");
|
||||
capacityEvaluationRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
capacityPage=1;
|
||||
capacityPage = 1;
|
||||
initNewWork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
initNewWork(false);
|
||||
@ -95,7 +96,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
capacityEvaluationBuilder.append("点击了item ,");
|
||||
Intent capacityEvaWeb = new Intent(getActivity(), FragmentManagement.class);
|
||||
capacityEvaWeb.putExtra("tag", 14);
|
||||
capacityEvaWeb.putExtra("id",id+"");
|
||||
capacityEvaWeb.putExtra("id", id + "");
|
||||
startActivity(capacityEvaWeb);
|
||||
}
|
||||
});
|
||||
@ -104,7 +105,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
capacityList=new ArrayList<>();
|
||||
capacityList = new ArrayList<>();
|
||||
initNewWork(true);
|
||||
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||
@ -136,22 +137,22 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
httpParams.put("fid", 4);
|
||||
httpParams.put("pageNum", capacityPage);
|
||||
httpParams.put("pageSize", 20);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
initTaskPrefectureBean(response,aNet);
|
||||
}else if (response.getCode()==203){
|
||||
if (response.getCode() == 200) {
|
||||
initTaskPrefectureBean(response, aNet);
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafrases");
|
||||
@ -160,7 +161,13 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
/* 友盟+
|
||||
* 返回自定义报错信息*/
|
||||
@ -175,7 +182,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
if (capacityList.size() > 0) {
|
||||
capacityList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
capacityList.addAll(taskPrefectureBean.getBody().getList());
|
||||
|
@ -88,32 +88,37 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
||||
|
||||
private void initNetWorks(boolean aBoolean) {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(new HttpParams())
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.cls(TaskPrefectureBean.class);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
if (response.getCode() == 200) {
|
||||
capacityItemAdapter.setCapItemList(response.getBody().getList());
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's"+aBoolean);
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "sassafras's" + aBoolean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -36,6 +36,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
@ -142,6 +143,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
@Override
|
||||
public void onSuccess(MeasureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
||||
//单选
|
||||
if (response.getBody().getMultiChoice() != null) {
|
||||
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
||||
@ -166,14 +168,18 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
tvCapacity.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -252,7 +258,9 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
}else if (response.getCode()==203){
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.toString());
|
||||
@ -261,7 +269,13 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
|
@ -373,7 +373,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
rlFacility.setBackgroundColor(Color.parseColor("#EFEDED"));
|
||||
rlFacility.setBackgroundResource(R.drawable.selector_hui_bg);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlDevice.setVisibility(View.GONE);
|
||||
sign_exist = 0;
|
||||
@ -731,20 +731,19 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
int sign_exist = chargingPileEntity.getSign_exist();
|
||||
spinnerScutcheon.setSelection(sign_exist, true);
|
||||
if (sign_exist == 0) {
|
||||
rlFacility.setBackgroundColor(Color.parseColor("#EFEDED"));
|
||||
rlFacility.setBackgroundResource(R.drawable.selector_hui_bg);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlDevice.setVisibility(View.GONE);
|
||||
} else if (sign_exist == 1) {
|
||||
int exist = chargingPileEntity.getExist();
|
||||
if (exist == 0) {
|
||||
rlFacility.setBackgroundColor(Color.parseColor("#03A9F4"));
|
||||
rlScutcheon.setVisibility(View.VISIBLE);
|
||||
if (exist == 0) {
|
||||
rlDevice.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlDevice.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
int cp_availableState = chargingPileEntity.getCp_availableState();
|
||||
spinnerStake.setSelection(cp_availableState, true);
|
||||
|
@ -49,6 +49,7 @@ import com.navinfo.outdoor.adapter.ChargingPileAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.PreserveUtils;
|
||||
import com.navinfo.outdoor.util.UploadUtils;
|
||||
import com.navinfo.outdoor.bean.ChargingPileSaveBean;
|
||||
import com.navinfo.outdoor.bean.ChargingStationBean;
|
||||
@ -121,7 +122,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private LatLng latLng;
|
||||
private RelativeLayout linearExist;
|
||||
private Spinner spinnerExist;
|
||||
private Integer bodyId;
|
||||
|
||||
private LinearLayout linearContact;
|
||||
private ContactView contactView;
|
||||
private ArrayList<File> chargingStationList;
|
||||
@ -579,7 +580,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
if (address != null && !address.equals("")) {
|
||||
editSiteContent.setText(address);
|
||||
}
|
||||
bodyId = showPoiEntity.getBodyId(); // 获取当前数据的bodyId
|
||||
String geoWkt = showPoiEntity.getGeoWkt();
|
||||
if (geoWkt != null) {
|
||||
String geo = Geohash.getInstance().decode(geoWkt);
|
||||
@ -776,9 +776,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if (getPhoneBean.getCode()==203){
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -786,7 +786,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -909,7 +915,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_save_local:
|
||||
chargingStationBuilder.append("点击了保存本地的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
initRoadSaveLocal(false);
|
||||
}
|
||||
break;
|
||||
case R.id.btn_uploading:
|
||||
chargingStationBuilder.append("点击了上传的按钮 ,");
|
||||
@ -1120,37 +1128,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
}
|
||||
|
||||
/* OkGo
|
||||
// 请求方式和请求url
|
||||
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params("auditId", chargingPileEntity.getBodyId())
|
||||
.addFileParams("file", chargingPileFileList)
|
||||
.tag(this)
|
||||
.execute(new DialogCallback<PoiUploadBean>(PoiUploadBean.class) {
|
||||
@Override
|
||||
public void onSuccess(Response<PoiUploadBean> poiUploadBeanResponse) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||
isChargingPoleUploaded = true;
|
||||
if (isChargeStationUploaded && isChargingPoleUploaded) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
getActivity().onBackPressed();//回退
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onError(Response<PoiUploadBean> poiUploadBeanResponse) {
|
||||
super.onError(poiUploadBeanResponse);
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), poiUploadBeanResponse.code() + "", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + poiUploadBeanResponse.code() + "");
|
||||
}
|
||||
});*/
|
||||
|
||||
private void initRoadSaveLocal(boolean isLocal) {
|
||||
XXPermissions.with(this)
|
||||
//读写权限
|
||||
@ -1175,7 +1152,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
chargingStationSaveByWork(poiEntity, isLocal);
|
||||
if (isLocal) {
|
||||
chargingStationSaveByWork(poiEntity);
|
||||
} else {
|
||||
chargingStationSaveWork(poiEntity);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1198,6 +1180,28 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
});
|
||||
}
|
||||
|
||||
private void chargingStationSaveWork(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("sptype", poiEntity.getStation_type());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("telephone", poiEntity.getTelPhone());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("geo", poiEntity.getGeoWkt());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_CTASK)
|
||||
.cls(ChargingStationBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getChargingPreserveCallback(getActivity(), poiEntity));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
|
||||
WaitDialog.dismiss(1000);
|
||||
}
|
||||
|
||||
private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) {
|
||||
if (poiEntity == null) {
|
||||
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||
@ -1220,15 +1224,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
public void run() {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", poiEntity.getBodyId());
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||
.fileList(chargingStationList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class)
|
||||
.postFileAsynchronous(UploadUtils.getInstance().getChargingUploadCallback(getActivity(), showPoiEntity, chargingStationList));
|
||||
.cls(PoiUploadBean.class);
|
||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getChargingUploadCallback(getActivity(), showPoiEntity, chargingStationList));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
@ -1241,7 +1245,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
/**
|
||||
* 保存充电站数据到服务器
|
||||
*/
|
||||
private void chargingStationSaveByWork(PoiEntity poiEntity, boolean isLocal) {
|
||||
private void chargingStationSaveByWork(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("sptype", poiEntity.getStation_type());
|
||||
@ -1251,19 +1255,19 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("geo", poiEntity.getGeoWkt());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_CTASK)
|
||||
.cls(ChargingStationBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<ChargingStationBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<ChargingStationBean>() {
|
||||
@Override
|
||||
public void onSuccess(ChargingStationBean chargingStationBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (chargingStationBean.getCode() == 200) {
|
||||
bodyId = chargingStationBean.getBody();
|
||||
Integer bodyId = chargingStationBean.getBody();
|
||||
if (bodyId != null && bodyId != 0) {
|
||||
poiEntity.setBodyId(bodyId);
|
||||
poiEntity.setTaskStatus(3);
|
||||
@ -1277,27 +1281,17 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocal) {
|
||||
stationUploadByNetWork(poiEntity, chargingStationList);
|
||||
Constant.isPresent = false;
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if (chargingStationBean.getCode()==203){
|
||||
} else if (chargingStationBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + chargingStationBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -1307,7 +1301,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -1318,13 +1318,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude);
|
||||
httpParams.put("geo", encode);
|
||||
httpParams.put("name", editNameContent.getText().toString());
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.TASK_NAME)
|
||||
.cls(TaskNameBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskNameBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskNameBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -1343,7 +1343,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if (taskNameBean.getCode()==203){
|
||||
} else if (taskNameBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
editNameContent.setTextColor(Color.RED);
|
||||
@ -1359,7 +1359,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -1571,7 +1577,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
removablesLocality.clear();
|
||||
|
||||
chargingStationBuilder.append("onDestroy ");
|
||||
chargingStationBuilder.append("onDestroy");
|
||||
chargingStationBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), chargingStationBuilder.toString(), true);
|
||||
}
|
||||
@ -1584,14 +1590,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -1624,7 +1630,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -1634,7 +1640,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
|
@ -99,14 +99,14 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
httpParams.put("fid", "2");
|
||||
httpParams.put("pageNum", eventPage);
|
||||
httpParams.put("pageSize", "20");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.LIST_EVENT)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -123,7 +123,13 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -221,7 +227,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
eventPrefectureBuilder.append("onDestroy ,");
|
||||
eventPrefectureBuilder.append("onDestroy");
|
||||
eventPrefectureBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
||||
}
|
||||
|
@ -111,6 +111,11 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||
obtain.obj = isSliding;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain1.obj = true;
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
onBackPressed();
|
||||
}
|
||||
@ -525,14 +530,6 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
case 3:
|
||||
Constant.TASK_STARTUP = 2;
|
||||
break;
|
||||
/*
|
||||
case 3:
|
||||
Constant.TASK_STATUS = 2;
|
||||
break;
|
||||
case 4:
|
||||
Constant.TASK_STATUS = 3;
|
||||
break;
|
||||
*/
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
@ -551,14 +548,14 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", taskId);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(60)
|
||||
.Builder(getActivity())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(FilterBatchBean.class)
|
||||
.url(HttpInterface.RECEIVE_TASK)
|
||||
.getRequest(new Callback<FilterBatchBean>() {
|
||||
.url(HttpInterface.RECEIVE_TASK);
|
||||
okGoBuilder.getRequest(new Callback<FilterBatchBean>() {
|
||||
@Override
|
||||
public void onSuccess(FilterBatchBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -581,13 +578,17 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
}else {
|
||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -742,7 +743,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
filterBuilder.append("onDestroy ");
|
||||
filterBuilder.append("onDestroy");
|
||||
filterBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), filterBuilder.toString(), true);
|
||||
}
|
||||
|
@ -113,7 +113,6 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
endIntent.putExtra("tag", 11);
|
||||
startActivity(endIntent);*/
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,7 +131,7 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
findBuilder.append("onDestroy ");
|
||||
findBuilder.append("onDestroy");
|
||||
findBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
||||
}
|
||||
|
@ -188,7 +188,6 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -197,7 +196,14 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -260,7 +266,13 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (arguments != null) {//poiEntity
|
||||
poiEntity = (PoiEntity) arguments.getSerializable("poiEntity");
|
||||
if (poiEntity != null) {
|
||||
tvTitle.setText(poiEntity.getName()+"");
|
||||
tvTitle.setText(poiEntity.getName() + "");
|
||||
if (poiEntity.getPrecision() == null) {
|
||||
tvMoney.setText("¥" + 0);
|
||||
} else {
|
||||
@ -427,7 +427,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (statusId == 1 || statusId == 5) {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), chargingStationEntity);
|
||||
}
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -448,7 +448,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -472,7 +472,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -482,7 +482,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -540,14 +546,14 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), polygonEntity);
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initViewByTaskStatus(1);
|
||||
Toast.makeText(getActivity(), "领取成功", Toast.LENGTH_SHORT).show();
|
||||
if (aBoolean) {
|
||||
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK , polygonEntity);
|
||||
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK, polygonEntity);
|
||||
} else {
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.JOB_WORD_MONITOR;
|
||||
@ -559,7 +565,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -569,7 +575,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -607,7 +619,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (poiEntity.getType() == 2) {
|
||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||
}
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -622,16 +634,23 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -664,7 +683,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -682,17 +701,23 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -706,7 +731,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("id",poiEntity.getTaskId());
|
||||
httpParams.put("id", poiEntity.getTaskId());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
@ -726,17 +751,23 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -750,14 +781,14 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url + "/" + poiEntity.getTaskId())
|
||||
.cls(ReceivedPoiBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<ReceivedPoiBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<ReceivedPoiBean>() {
|
||||
@Override
|
||||
public void onSuccess(ReceivedPoiBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -809,7 +840,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (statusId == 1 || statusId == 5) {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
|
||||
}
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -830,7 +861,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -853,7 +884,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -863,8 +894,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -883,14 +919,15 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
*/
|
||||
private void taskByNet(String url, PoiEntity poiEntity, boolean isSaver, int statusId) {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url + "/" + poiEntity.getTaskId())
|
||||
.cls(TaskByNetBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskByNetBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskByNetBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskByNetBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -934,7 +971,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (statusId == 1 || statusId == 5) {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
|
||||
}
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -954,7 +991,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -978,7 +1015,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -988,8 +1025,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1013,7 +1055,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
gatherGetBuilder.append("onDestroy ,");
|
||||
gatherGetBuilder.append("onDestroy");
|
||||
gatherGetBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
@ -47,7 +48,9 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||
import com.navinfo.outdoor.util.PhotoUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -101,12 +104,12 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
if (Constant.BACKGROUND != null) {
|
||||
etBankNum.setText(Constant.BACKGROUND);
|
||||
if (Constant.BACKGROUND_NAME==null){
|
||||
if (Constant.BACKGROUND_NAME == null) {
|
||||
String bank = navInfo.getString("bankName", null);
|
||||
if (bank!=null&&!bank.equals("")){
|
||||
if (bank != null && !bank.equals("")) {
|
||||
tvBank.setText(bank);
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
tvBank.setText(Constant.BACKGROUND_NAME);
|
||||
}
|
||||
|
||||
@ -123,20 +126,20 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||
if (pictures_time==null){
|
||||
sharedEdit.putString("pictures_time",newFormat);
|
||||
if (pictures_time == null) {
|
||||
sharedEdit.putString("pictures_time", newFormat);
|
||||
sharedEdit.apply();
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}else {
|
||||
if (pictures_time.equals(newFormat)){
|
||||
} else {
|
||||
if (pictures_time.equals(newFormat)) {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||
}else {
|
||||
} else {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}
|
||||
}
|
||||
gatheringBuilder = new StringBuilder();
|
||||
gatheringBuilder.append("GatheringFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
gatheringBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
}
|
||||
@ -187,7 +190,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
bankPathBeans.clear();
|
||||
for (int i = 0; i < jsonBean.size(); i++) {
|
||||
String label = jsonBean.get(i).getLabel();
|
||||
if (label.contains(s.toString())){//含有
|
||||
if (label.contains(s.toString())) {//含有
|
||||
BankPathBean bankPathBean = jsonBean.get(i);
|
||||
bankPathBeans.add(bankPathBean);
|
||||
}
|
||||
@ -200,7 +203,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
bankPathBeans.clear();
|
||||
for (int i = 0; i < jsonBean.size(); i++) {
|
||||
String label = jsonBean.get(i).getLabel();
|
||||
if (label.contains(s.toString())){//含有
|
||||
if (label.contains(s.toString())) {//含有
|
||||
BankPathBean bankPathBean = jsonBean.get(i);
|
||||
bankPathBeans.add(bankPathBean);
|
||||
}
|
||||
@ -238,7 +241,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
private void gatheringNetWork() {
|
||||
if (Constant.USHERED==null){
|
||||
if (Constant.USHERED == null) {
|
||||
return;
|
||||
}
|
||||
ArrayList<File> gatheringList = new ArrayList<>();
|
||||
@ -263,23 +266,23 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("userid", Constant.USHERED);
|
||||
httpParams.put("bankAccount",etBankAccount);//银行卡号
|
||||
httpParams.put("bankAccount", etBankAccount);//银行卡号
|
||||
httpParams.put("bankName", bank);//银行id
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_BANKCARD_UP_DATA)
|
||||
.cls(BankPhoneBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.fileList(gatheringList)
|
||||
.postFileAsynchronous(new Callback<BankPhoneBean>() {
|
||||
.fileList(gatheringList);
|
||||
okGoBuilder.postFileAsynchronous(new Callback<BankPhoneBean>() {
|
||||
@Override
|
||||
public void onSuccess(BankPhoneBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
DialogSettings.cancelable=false;
|
||||
DialogSettings.cancelable = false;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
@ -287,13 +290,13 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
Constant.BACKGROUND_NAME = bank;
|
||||
Constant.BACKGROUND = etBankAccount;
|
||||
navInfoEditor.putString("bankAccount", etBankAccount);
|
||||
navInfoEditor.putString("bankName",bank);
|
||||
navInfoEditor.putString("bankName", bank);
|
||||
navInfoEditor.commit();
|
||||
getActivity().finish();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "绑定失败!", Toast.LENGTH_SHORT).show();
|
||||
@ -303,7 +306,13 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -326,8 +335,8 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
if (bankCardBean == null) {
|
||||
Toast.makeText(getContext(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
if (bankCardBean.getResult()!=null){
|
||||
if (bankCardBean.getResult().getBank_card_number()!=null){
|
||||
if (bankCardBean.getResult() != null) {
|
||||
if (bankCardBean.getResult().getBank_card_number() != null) {
|
||||
String bankCardNumber = bankCardBean.getResult().getBank_card_number().trim();
|
||||
String bank_card_number = bankCardNumber.replace(" ", "");
|
||||
if (StringUtils.isEmpty(bank_card_number)) {
|
||||
@ -335,10 +344,10 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
etBankNum.setText(bank_card_number);
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -378,7 +387,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
gatheringBuilder.append("onDestroy ");
|
||||
gatheringBuilder.append("onDestroy");
|
||||
gatheringBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
|
||||
}
|
||||
|
@ -126,9 +126,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
public void initRequest() {
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
HttpInterface.initHttpInter(Constant.USHERED);
|
||||
if (HttpInterface.GET_COMMIT_LIST!=null){
|
||||
if (HttpInterface.GET_COMMIT_LIST != null) {
|
||||
initPoiSubMitWork();//poi
|
||||
initCaningSubMitWork();//充电站
|
||||
initPoiVideoSubMitWork();//poi录像
|
||||
@ -143,21 +143,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("type", 5);
|
||||
httpParams.put("pageSize", 10);
|
||||
httpParams.put("pageNum", 1);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody != null) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -170,9 +170,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -190,21 +196,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("type", 2);
|
||||
httpParams.put("pageSize", 10);
|
||||
httpParams.put("pageNum", 1);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody != null) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -216,17 +222,23 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -236,21 +248,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("type", 4);
|
||||
httpParams.put("pageSize", 10);
|
||||
httpParams.put("pageNum", 1);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody != null) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -262,9 +274,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -272,6 +284,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -281,21 +300,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("type", 3);
|
||||
httpParams.put("pageSize", 10);
|
||||
httpParams.put("pageNum", 1);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody != null) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -307,16 +326,23 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
ToastUtil.show(getContext(),"请求失败",1000);
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -327,21 +353,21 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
httpParams.put("pageSize", 10);
|
||||
httpParams.put("pageNum", 1);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody != null) {
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -354,9 +380,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -364,6 +390,13 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -454,7 +487,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
hasSubmitBuilder.append("onDestroy ");
|
||||
hasSubmitBuilder.append("onDestroy");
|
||||
hasSubmitBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), hasSubmitBuilder.toString(), true);
|
||||
}
|
||||
|
@ -67,33 +67,38 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
httpParams.put("fid", 1);
|
||||
httpParams.put("pageNum", issuePage);
|
||||
httpParams.put("pageSize", 10);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
if (response.getCode() == 200) {
|
||||
issueProblemAdapter.setExplainList(response.getBody().getList());
|
||||
issuePage++;
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -117,19 +122,21 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
mainIssueRecycler.getDefaultFootView().setNoMoreHint("成功加载完毕");
|
||||
mainIssueRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {}
|
||||
public void onRefresh() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {}
|
||||
public void onLoadMore() {
|
||||
}
|
||||
});
|
||||
|
||||
issueProblemAdapter.setOnIssueClick(new IssueProblemAdapter.OnIssueClick() {
|
||||
@Override
|
||||
public void onClick(int pos) {
|
||||
Intent issueWeb = new Intent(getActivity(), FragmentManagement.class);
|
||||
issueWeb.putExtra("tag",16);
|
||||
issueWeb.putExtra("tag", 16);
|
||||
startActivity(issueWeb);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,6 @@ public class MapDownloadFragment extends BaseFragment implements View.OnClickLis
|
||||
super.initView();
|
||||
ImageView ivDownLoad = findViewById(R.id.iv_download);
|
||||
ivDownLoad.setOnClickListener(this);
|
||||
XRecyclerView recyclerView = findViewById(R.id.recycler_view);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,57 +76,69 @@ public class MessageFragment extends BaseFragment implements View.OnClickListen
|
||||
messageAdapter.setMessageClickItem(new MessageAdapter.messageClickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
|
||||
messageBuilder.append("点击item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",id+"");
|
||||
paramMap.put("id", id + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
messageRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
messageRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() { }
|
||||
|
||||
@Override
|
||||
public void onLoadMore() { }
|
||||
public void onRefresh() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initNetwork() {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", 5);
|
||||
httpParams.put("pageNum", messagePage);
|
||||
httpParams.put("pageSize", 10);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.MSG_LISt)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (taskPrefectureBean.getCode() == 200){
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
messageAdapter.setMessageList(taskPrefectureBean.getBody().getList());
|
||||
messagePage++;
|
||||
}else if (taskPrefectureBean.getCode()==203){
|
||||
} else if (taskPrefectureBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "");
|
||||
//initTaskSpecification(taskSpecificationBean,start);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
@ -137,23 +149,22 @@ public class MessageFragment extends BaseFragment implements View.OnClickListen
|
||||
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||
if (pictures_time==null){
|
||||
sharedEdit.putString("pictures_time",newFormat);
|
||||
if (pictures_time == null) {
|
||||
sharedEdit.putString("pictures_time", newFormat);
|
||||
sharedEdit.apply();
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}else {
|
||||
if (pictures_time.equals(newFormat)){
|
||||
} else {
|
||||
if (pictures_time.equals(newFormat)) {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||
}else {
|
||||
} else {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}
|
||||
}
|
||||
messageBuilder = new StringBuilder();
|
||||
messageBuilder.append("MessageFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
messageBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -110,7 +110,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
}
|
||||
if (Constant.USHERED != null) {
|
||||
HttpInterface.initHttpInter(Constant.USHERED);
|
||||
if (HttpInterface.GET_PRICE!=null){
|
||||
if (HttpInterface.GET_PRICE != null) {
|
||||
initNetWork();
|
||||
}
|
||||
}
|
||||
@ -120,9 +120,9 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.HOME_MINE) {
|
||||
if ((boolean) data.obj) {
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
HttpInterface.initHttpInter(Constant.USHERED);
|
||||
if (HttpInterface.GET_PRICE!=null){
|
||||
if (HttpInterface.GET_PRICE != null) {
|
||||
initNetWork();
|
||||
}
|
||||
}
|
||||
@ -132,14 +132,14 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
|
||||
private void initNetWork() {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_PRICE)
|
||||
.cls(GetPriceBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPriceBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<GetPriceBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPriceBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -147,19 +147,19 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
GetPriceBean.BodyBean body = response.getBody();
|
||||
if (body != null) {
|
||||
Double userPrice = body.getUserPrice();
|
||||
if (getActivity()!=null){
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void run() {
|
||||
tvMoney.setText(userPrice+"");
|
||||
tvMoney.setText(userPrice + "");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.toString());
|
||||
@ -168,6 +168,13 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
|
@ -44,6 +44,7 @@ import com.navinfo.outdoor.activity.PhotographActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.PreserveUtils;
|
||||
import com.navinfo.outdoor.util.UploadUtils;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
@ -232,6 +233,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
@ -516,7 +518,9 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
break;
|
||||
case R.id.btn_other_local:
|
||||
otherBuilder.append("点击了保存本地的按钮,");
|
||||
if (Constant.isPresent) {
|
||||
initPoiSaveLocal(false);
|
||||
}
|
||||
break;
|
||||
case R.id.btn_other_uploading:
|
||||
otherBuilder.append("点击了上传的按钮,");
|
||||
@ -586,7 +590,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
otherSaveByNetWork(poiEntity, isLocal);
|
||||
if (isLocal) {
|
||||
otherSaveByNetWork(poiEntity);
|
||||
} else {
|
||||
otherSaveNetWork(poiEntity);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -607,6 +617,27 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
private void otherSaveNetWork(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("type", poiEntity.getStation_type());
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("existence", poiEntity.getExistence());
|
||||
httpParams.put("geo", poiEntity.getGeoWkt());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_OTHER_TASK)
|
||||
.cls(PoiSaveBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getOtherPreserveCallback(getActivity(), poiEntity));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
|
||||
WaitDialog.dismiss(1000);
|
||||
}
|
||||
|
||||
private void otherUploadByNet(int body, List<File> otherUploadList) {
|
||||
if (body == 0) {
|
||||
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||
@ -615,23 +646,21 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", body);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.OTHER_TASK_UPLOAD_PIC)
|
||||
.fileList(otherUploadList)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.cls(PoiUploadBean.class)
|
||||
.postFileAsynchronous(UploadUtils.getInstance().getOtherUploadCallback(getActivity(), showPoiEntity, otherUploadList));
|
||||
.cls(PoiUploadBean.class);
|
||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getOtherUploadCallback(getActivity(), showPoiEntity, otherUploadList));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
}
|
||||
|
||||
private void otherSaveByNetWork(PoiEntity poiEntity, boolean isLocal) {
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("保存中...");
|
||||
private void otherSaveByNetWork(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("type", poiEntity.getStation_type());
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
@ -639,14 +668,16 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
httpParams.put("existence", poiEntity.getExistence());
|
||||
httpParams.put("geo", poiEntity.getGeoWkt());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
OkGoBuilder.getInstance()
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("保存中...");
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_OTHER_TASK)
|
||||
.cls(PoiSaveBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<PoiSaveBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<PoiSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -663,17 +694,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocal) {
|
||||
otherUploadByNet(body, otherUploadList);
|
||||
Constant.isPresent = false;
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -682,18 +704,23 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else if (poiSaveBean.getCode()==203){
|
||||
} else if (poiSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), poiSaveBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -799,7 +826,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
if (markerOther != null) {
|
||||
markerOther.remove();
|
||||
}
|
||||
otherBuilder.append("onDestroy ");
|
||||
otherBuilder.append("onDestroy");
|
||||
otherBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), otherBuilder.toString(), true);
|
||||
}
|
||||
@ -812,14 +839,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -835,18 +863,23 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -878,7 +911,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
poiEntity.setPhotoInfo(arrayList);
|
||||
poiEntity.setStation_type(station_type);
|
||||
@SuppressLint("SimpleDateFormat") DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
|
@ -48,6 +48,7 @@ import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.PreserveUtils;
|
||||
import com.navinfo.outdoor.util.UploadUtils;
|
||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
@ -435,7 +436,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initShowPoi() {
|
||||
// 添加信息:
|
||||
assert getArguments() != null;
|
||||
@ -567,8 +567,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
|
||||
if (editNameContent.getText().toString() != null || editNameContent != null) {
|
||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
@ -577,9 +575,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -618,9 +613,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if (getPhoneBean.getCode()==203){
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -628,7 +623,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -702,7 +703,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_save_local:
|
||||
poiBuilder.append("点击了保存本地的按钮,");
|
||||
if (Constant.isPresent) {
|
||||
initPoiSaveLocal(false);
|
||||
}
|
||||
break;
|
||||
case R.id.btn_uploading:
|
||||
poiBuilder.append("点击了上传的按钮,");
|
||||
@ -810,14 +813,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude);
|
||||
httpParams.put("geo", encode);
|
||||
httpParams.put("name", editNameContent.getText().toString());
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.TASK_NAME)
|
||||
.cls(TaskNameBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskNameBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskNameBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -839,12 +842,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有类似名称,可以作业", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else if (taskNameBean.getCode()==203){
|
||||
} else if (taskNameBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
editNameContent.setTextColor(Color.RED);
|
||||
btnUploading.setEnabled(false);
|
||||
btnSaveLocal.setEnabled(false);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -852,8 +852,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -881,7 +886,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiSaveByNet(poiEntity, isLocal);
|
||||
if (isLocal) {
|
||||
poiSaveByNet(poiEntity);
|
||||
} else {
|
||||
poiSaveNet(poiEntity);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -903,6 +914,28 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
}
|
||||
|
||||
private void poiSaveNet(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("existence", poiEntity.getExistence());
|
||||
httpParams.put("geo", poiEntity.getGeoWkt());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
httpParams.put("telephone", poiEntity.getTelPhone());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_POI_TASK)
|
||||
.cls(PoiSaveBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams);
|
||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getPoiPreserveCallback(getActivity(), poiEntity));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
|
||||
WaitDialog.dismiss(1000);
|
||||
}
|
||||
|
||||
private void poiUploadByNetWork(int body, ArrayList<File> poiPicList) {
|
||||
if (body == 0) {
|
||||
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||
@ -911,22 +944,21 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", body);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.POI_TASK_UPLOAD_PIC)
|
||||
.cls(OtherUploadPicBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.fileList(poiPicList)
|
||||
.params(httpParams)
|
||||
.postFileAsynchronous(UploadUtils.getInstance().getPoiUploadCallback(getActivity(), showPoiEntity, poiPicList));
|
||||
.params(httpParams);
|
||||
okGoBuilder.postFileAsynchronous(UploadUtils.getInstance().getPoiUploadCallback(getActivity(), showPoiEntity, poiPicList));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
|
||||
}
|
||||
|
||||
private void poiSaveByNet(PoiEntity poiEntity, boolean isLocal) {
|
||||
private void poiSaveByNet(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
@ -937,14 +969,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
httpParams.put("telephone", poiEntity.getTelPhone());
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("保存中...");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.SUBMIT_POI_TASK)
|
||||
.cls(PoiSaveBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<PoiSaveBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<PoiSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -960,17 +992,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocal) {
|
||||
poiUploadByNetWork(body, poiPicList);//上传
|
||||
Constant.isPresent = false;
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -978,7 +1001,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if (poiSaveBean.getCode()==203){
|
||||
} else if (poiSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -988,7 +1011,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -1164,14 +1193,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -1187,7 +1216,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -1198,6 +1227,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
private XRecyclerView poiTaskXrv;
|
||||
private int type;
|
||||
private PoiTaskAdapter poiTaskAdapter;
|
||||
private int page=1;
|
||||
private int page = 1;
|
||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||
|
||||
public static PoiTaskFragment newInstance(Bundle bundle) {
|
||||
@ -58,7 +58,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
TextView tvTaskTitle = findViewById(R.id.tv_poiTask_title);
|
||||
switch (type){
|
||||
switch (type) {
|
||||
case 1:
|
||||
tvTaskTitle.setText("POI任务列表");
|
||||
break;
|
||||
@ -85,11 +85,12 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
page = 1;
|
||||
initWork(type,true);
|
||||
initWork(type, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
initWork(type,false);
|
||||
initWork(type, false);
|
||||
}
|
||||
});
|
||||
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
||||
@ -103,9 +104,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
assert getArguments() != null;
|
||||
type = getArguments().getInt("type", 0);
|
||||
listBeans = new ArrayList<>();
|
||||
if (Constant.currentLocation!=null){
|
||||
if (Constant.USHERED!=null){
|
||||
initWork(type,true);
|
||||
if (Constant.currentLocation != null) {
|
||||
if (Constant.USHERED != null) {
|
||||
initWork(type, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -116,33 +117,38 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
httpParams.put("pageSize", "20");
|
||||
httpParams.put("pageNum", page);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_COMMIT_LIST)
|
||||
.cls(HasSubmitBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<HasSubmitBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<HasSubmitBean>() {
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getBody()!=null){
|
||||
initHasSubmitBean(hasSubmitBean,aBoolean);
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
if (hasSubmitBean.getBody() != null) {
|
||||
initHasSubmitBean(hasSubmitBean, aBoolean);
|
||||
}
|
||||
}else if (hasSubmitBean.getCode()==203){
|
||||
} else if (hasSubmitBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
Toast.makeText(getActivity(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -153,7 +159,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
if (listBeans.size() > 0) {
|
||||
listBeans.clear();
|
||||
}
|
||||
if (hasSubmitBean.getBody().getList()== null) {
|
||||
if (hasSubmitBean.getBody().getList() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
listBeans.addAll(hasSubmitBean.getBody().getList());
|
||||
|
@ -55,6 +55,7 @@ import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.Geohash;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.navinfo.outdoor.util.PreserveUtils;
|
||||
import com.navinfo.outdoor.util.UploadUtils;
|
||||
import com.navinfo.outdoor.util.ZipUtils;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.BitmapDescriptor;
|
||||
@ -143,7 +144,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
|
||||
private void initBack() {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定","取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
if (showPoiEntity != null) {
|
||||
@ -306,7 +307,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
moveLatlng(latLng, null);
|
||||
} else {
|
||||
String detail = showPoiEntity.getDetail();
|
||||
if (detail!=null){
|
||||
if (detail != null) {
|
||||
String geo = Geohash.getInstance().decode(detail);
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
switch (geometry.getGeometryType()) {
|
||||
@ -325,7 +326,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
markerPoiVideo = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).anchor(0.5f, 1.0f));
|
||||
markerPoiVideo.setZIndex(4);
|
||||
moveLatlng(latLng, null);
|
||||
}else {
|
||||
} else {
|
||||
String x = showPoiEntity.getX();
|
||||
String y = showPoiEntity.getY();
|
||||
if (x != null && y != null) {
|
||||
@ -424,7 +425,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
break;
|
||||
case R.id.btn_poi_video_save:
|
||||
poiVideoBuilder.append("点击了保存本地的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
initPoiSaveLocal(false);
|
||||
}
|
||||
break;
|
||||
case R.id.tv_short://手动拍摄
|
||||
poiVideoBuilder.append("点击了手动拍摄的按钮 ,");
|
||||
@ -442,7 +445,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
||||
intents.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
intents.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 2);
|
||||
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType()+"");
|
||||
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType() + "");
|
||||
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
||||
startActivityForResult(intents, 0x102);
|
||||
@ -462,7 +465,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
intent.putExtra(Constant.INTENT_JPG_PATH, fileJpgPath.getAbsolutePath());
|
||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 1);
|
||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType()+"");
|
||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType() + "");
|
||||
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
||||
startActivityForResult(intent, 0x101);
|
||||
@ -543,13 +546,18 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiVideoSave(poiEntity, isLocal);
|
||||
if (isLocal) {
|
||||
poiVideoSave(poiEntity);
|
||||
} else {
|
||||
poiVideoSaveNet(poiEntity);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
//onBackPressed();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有申请权限,请手动申请", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -566,6 +574,26 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
});
|
||||
}
|
||||
|
||||
private void poiVideoSaveNet(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", poiEntity.getWork_type());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.INSIDE_API_LIST)
|
||||
.cls(PoiVideoBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getPoiVideoPreserveCallback(getActivity(), poiEntity));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
|
||||
WaitDialog.dismiss(1000);
|
||||
}
|
||||
|
||||
private void poiVideoUpload(int poiVideoBody, File fileZip) {
|
||||
if (poiVideoBody == 0) {
|
||||
Toast.makeText(getActivity(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
||||
@ -580,20 +608,20 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
httpParams.put("file", fileZip);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||
.cls(OtherUploadPicBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.postRequest(UploadUtils.getInstance().getPoiVideoUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.postRequest(UploadUtils.getInstance().getPoiVideoUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
}
|
||||
|
||||
private void poiVideoSave(PoiEntity poiEntity, boolean isLocal) {
|
||||
private void poiVideoSave(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
@ -601,14 +629,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
httpParams.put("workType", poiEntity.getWork_type());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.INSIDE_API_LIST)
|
||||
.cls(PoiVideoBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<PoiVideoBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<PoiVideoBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -625,16 +653,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocal) {
|
||||
poiVideoUpload(poiVideoBody, fileZip);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
getActivity().getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -643,17 +663,23 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
} else {
|
||||
Toast.makeText(getContext(), "" + poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if (poiVideoBean.getCode()==203){
|
||||
} else if (poiVideoBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), poiVideoBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -739,14 +765,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -769,17 +795,23 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -837,7 +869,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiEntity.setDetail(lineString);
|
||||
}
|
||||
}
|
||||
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -96,20 +96,20 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||
if (pictures_time==null){
|
||||
sharedEdit.putString("pictures_time",newFormat);
|
||||
if (pictures_time == null) {
|
||||
sharedEdit.putString("pictures_time", newFormat);
|
||||
sharedEdit.apply();
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}else {
|
||||
if (pictures_time.equals(newFormat)){
|
||||
} else {
|
||||
if (pictures_time.equals(newFormat)) {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||
}else {
|
||||
} else {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}
|
||||
}
|
||||
registerBuilder = new StringBuilder();
|
||||
registerBuilder.append("RegisterFragment-onViewCreated-initData,");
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
registerBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
}
|
||||
@ -156,14 +156,14 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
httpParams.put("type", 1);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_MESSAGE)
|
||||
.cls(MessageCodeBean.class)
|
||||
.token(null)
|
||||
.params(httpParams)
|
||||
.getRequest(new Callback<MessageCodeBean>() {
|
||||
.params(httpParams);
|
||||
okGoBuilder.getRequest(new Callback<MessageCodeBean>() {
|
||||
@Override
|
||||
public void onSuccess(MessageCodeBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -181,7 +181,13 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -235,14 +241,14 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_REGISTER)
|
||||
.token(null)
|
||||
.params(httpParams)
|
||||
.cls(UserBean.class)
|
||||
.postRequest(new Callback<UserBean>() {
|
||||
.cls(UserBean.class);
|
||||
okGoBuilder.postRequest(new Callback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -265,7 +271,13 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -41,6 +41,7 @@ import com.navinfo.outdoor.activity.PicturesActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||
import com.navinfo.outdoor.util.PreserveUtils;
|
||||
import com.navinfo.outdoor.util.UploadUtils;
|
||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||
@ -136,7 +137,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
|
||||
private void initBack() {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定","取消").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "当前在任务作业中,是否退出", "确定", "取消")
|
||||
.setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
if (showPoiEntity != null) {
|
||||
@ -185,7 +187,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
})
|
||||
.setOnCancelButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
return false;
|
||||
@ -241,8 +244,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
roadUpload.setOnClickListener(this);
|
||||
//数据展示
|
||||
initShowPoi();
|
||||
//禁用可操作性控件
|
||||
// disables();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -303,7 +304,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
moveLatlng(latLng, null);
|
||||
} else {
|
||||
String detail = showPoiEntity.getDetail();
|
||||
if (detail!=null){
|
||||
if (detail != null) {
|
||||
String geo = Geohash.getInstance().decode(detail);
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
switch (geometry.getGeometryType()) {
|
||||
@ -322,7 +323,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
markerRoad = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).anchor(0.5f, 1.0f));
|
||||
markerRoad.setZIndex(4);
|
||||
moveLatlng(latLng, null);
|
||||
}else {
|
||||
} else {
|
||||
String x = showPoiEntity.getX();
|
||||
String y = showPoiEntity.getY();
|
||||
if (x != null && y != null) {
|
||||
@ -427,7 +428,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
switch (v.getId()) {
|
||||
case R.id.btn_road_save:
|
||||
roadBuilder.append("点击了保存本地的按钮 ,");
|
||||
if (Constant.isPresent) {
|
||||
initPoiSaveLocal(false);
|
||||
}
|
||||
break;
|
||||
case R.id.fm_road_picture:
|
||||
roadBuilder.append("点击了图片查看列表 ,");
|
||||
@ -456,7 +459,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
intent.putExtra(Constant.INTENT_JPG_PATH, finalFile.getAbsolutePath());
|
||||
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
|
||||
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 3);
|
||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType()+"");
|
||||
intent.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType() + "");
|
||||
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
||||
startActivityForResult(intent, 0x101);
|
||||
@ -537,7 +540,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
roadSaveBetWork(poiEntity, isLocal);
|
||||
if (isLocal) {
|
||||
roadSaveBetWork(poiEntity);
|
||||
} else {
|
||||
roadSaveWork(poiEntity);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -558,6 +567,26 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
});
|
||||
}
|
||||
|
||||
private void roadSaveWork(PoiEntity poiEntity) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", poiEntity.getWork_type());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.ROAD_TASK_SUBMIT)
|
||||
.cls(RoadSaveBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(PreserveUtils.getInstance().getRoadPreserveCallback(getActivity(), poiEntity));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
|
||||
WaitDialog.dismiss(1000);
|
||||
}
|
||||
|
||||
|
||||
private void poiVideoUpload(int body, File fileZip) {
|
||||
if (body == 0) {
|
||||
@ -573,37 +602,36 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
httpParams.put("file", fileZip);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(0)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.ROAD_TASK_UPLOAD_PIC)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.cls(OtherUploadPicBean.class)
|
||||
.postRequest(UploadUtils.getInstance().getRoadUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||
.cls(OtherUploadPicBean.class);
|
||||
okGoBuilder.postRequest(UploadUtils.getInstance().getRoadUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void roadSaveBetWork(PoiEntity poiEntity, boolean isLocal) {
|
||||
private void roadSaveBetWork(PoiEntity poiEntity) {
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("保存中...");
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", poiEntity.getTaskId());
|
||||
httpParams.put("name", poiEntity.getName());
|
||||
httpParams.put("address", poiEntity.getAddress());
|
||||
httpParams.put("workType", poiEntity.getWork_type());
|
||||
httpParams.put("memo", poiEntity.getMemo());
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.ROAD_TASK_SUBMIT)
|
||||
.cls(RoadSaveBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<RoadSaveBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<RoadSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(RoadSaveBean roadSaveBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -620,17 +648,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocal) {
|
||||
poiVideoUpload(roadBody, fileZip);
|
||||
Constant.isPresent = false;
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
getActivity().getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -639,7 +658,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else if (roadSaveBean.getCode()==203){
|
||||
} else if (roadSaveBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -649,10 +668,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -676,14 +699,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
initRoadSharePre();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* 防止程序崩溃后数据丢失
|
||||
*/
|
||||
public void initRoadSharePre() {
|
||||
@ -724,7 +746,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (markerRoad != null) {
|
||||
markerRoad.remove();
|
||||
}
|
||||
roadBuilder.append("onDestroy ");
|
||||
roadBuilder.append("onDestroy");
|
||||
roadBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), roadBuilder.toString(), true);
|
||||
}
|
||||
@ -737,14 +759,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -767,7 +789,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -777,8 +799,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -67,7 +67,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
private File logFile;
|
||||
private StringBuilder staySubmitBuilder;
|
||||
|
||||
|
||||
public static StaySubmitFragment newInstance(Bundle bundle) {
|
||||
StaySubmitFragment fragment = new StaySubmitFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -82,7 +81,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.fragment_stay_submit;
|
||||
@ -179,8 +177,8 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
if (messageDialog != null) {
|
||||
messageDialog.doDismiss();
|
||||
}
|
||||
}else if (data.what==Constant.STAY_SUBMIT_ITEM){
|
||||
if ((boolean)data.obj){
|
||||
} else if (data.what == Constant.STAY_SUBMIT_ITEM) {
|
||||
if ((boolean) data.obj) {
|
||||
if (cbSelect != null) {
|
||||
cbSelect.setChecked(false);
|
||||
}
|
||||
@ -335,22 +333,22 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", taskIds.toString());
|
||||
httpParams.put("auditIds", auditIds.toString());
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.UNRECEIVED_POLYGON_TASK)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
.cls(UnPolygonTaskBean.class);
|
||||
okGoBuilder.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
staySubmitAdapter.setAllCheckedDelete();
|
||||
} else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -358,7 +356,13 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -408,20 +412,20 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
staySubmitBuilder.append("onPause ,");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
dismissLoadingDialog();
|
||||
staySubmitBuilder.append("onDestroy ");
|
||||
staySubmitBuilder.append("onDestroy");
|
||||
staySubmitBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
ImageView ivFindTaskExplain = findViewById(R.id.iv_find_task_explain);
|
||||
taskExplainRecycle =findViewById(R.id.task_explain_recycler);
|
||||
taskExplainRecycle = findViewById(R.id.task_explain_recycler);
|
||||
ivFindTaskExplain.setOnClickListener(this);
|
||||
|
||||
taskExplainRecycle.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
@ -80,13 +80,13 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
//取消上啦加载下拉刷新
|
||||
// taskExplainRecycle.setPullRefreshEnabled(false);
|
||||
// taskExplainRecycle.setLoadingMoreEnabled(false);
|
||||
taskExplainAdapter = new TaskExplainAdapter(explainList,getActivity());
|
||||
taskExplainAdapter = new TaskExplainAdapter(explainList, getActivity());
|
||||
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
||||
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
taskPage=1;
|
||||
taskPage = 1;
|
||||
initNetWork(true);
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
taskExplainBuilder.append("点击了item ,");
|
||||
Intent itemIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
itemIntent.putExtra("tag", 10);
|
||||
itemIntent.putExtra("id",pos+"");
|
||||
itemIntent.putExtra("id", pos + "");
|
||||
startActivity(itemIntent);
|
||||
}
|
||||
});
|
||||
@ -143,30 +143,36 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
httpParams.put("fid", 3);
|
||||
httpParams.put("pageNum", taskPage);
|
||||
httpParams.put("pageSize", 20);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.LIST_TASK_EXPLAIN)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
initTaskPrefectureBean(response,aNet);
|
||||
}else if (response.getCode()==203){
|
||||
if (response.getCode() == 200) {
|
||||
initTaskPrefectureBean(response, aNet);
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
@ -178,7 +184,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
if (explainList.size() > 0) {
|
||||
explainList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||
@ -202,6 +208,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_find_task_explain) {
|
||||
@ -225,7 +232,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
taskExplainBuilder.append("onDestroy ");
|
||||
taskExplainBuilder.append("onDestroy");
|
||||
taskExplainBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplainBuilder.toString(), true);
|
||||
}
|
||||
|
@ -79,13 +79,13 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
//取消上拉加载,刷新功能。
|
||||
// taskExplain2Recycler.setPullRefreshEnabled(false);
|
||||
// taskExplain2Recycler.setLoadingMoreEnabled(false);
|
||||
taskExplainAdapter2 = new TaskExplainAdapter2(explainList,getActivity());
|
||||
taskExplainAdapter2 = new TaskExplainAdapter2(explainList, getActivity());
|
||||
taskExplain2Recycler.setAdapter(taskExplainAdapter2);
|
||||
taskExplain2Recycler.getDefaultFootView().setNoMoreHint("加载完毕");
|
||||
taskExplain2Recycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
taskExplainPage=1;
|
||||
taskExplainPage = 1;
|
||||
initNetWork2(true);
|
||||
}
|
||||
|
||||
@ -99,12 +99,13 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
public void onClick2(int pos) {
|
||||
taskExplain2Builder.append("点击了item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",pos+"");
|
||||
paramMap.put("id", pos + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
@ -141,23 +142,23 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
httpParams.put("pageNum", taskExplainPage);
|
||||
httpParams.put("pageSize", 20);
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.LIST_TASK)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
initTaskPrefectureBean(response,aBoolean);
|
||||
}else if (response.getCode()==203){
|
||||
if (response.getCode() == 200) {
|
||||
initTaskPrefectureBean(response, aBoolean);
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||
}
|
||||
@ -165,8 +166,13 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -177,7 +183,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
if (explainList.size() > 0) {
|
||||
explainList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||
|
@ -77,7 +77,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
taskRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
taskPage=1;
|
||||
taskPage = 1;
|
||||
initNetwork(true);
|
||||
}
|
||||
@Override
|
||||
@ -85,14 +85,14 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
initNetwork(false);
|
||||
}
|
||||
});
|
||||
taskPrefectureAdapter = new TaskPrefectureAdapter(dataBeanList,getActivity());
|
||||
taskPrefectureAdapter = new TaskPrefectureAdapter(dataBeanList, getActivity());
|
||||
taskRecycler.setAdapter(taskPrefectureAdapter);
|
||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
taskPrefectureBuilder.append("点击了item ,");
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",id+"");
|
||||
paramMap.put("id", id + "");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
@ -133,35 +133,41 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
httpParams.put("fid", "1");
|
||||
httpParams.put("pageNum", taskPage);
|
||||
httpParams.put("pageSize", "20");
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.LIST_TASK)
|
||||
.cls(TaskPrefectureBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<TaskPrefectureBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
initTaskPrefectureBean(taskPrefectureBean,aNet);
|
||||
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "");
|
||||
//initTaskSpecification(taskSpecificationBean,start);
|
||||
initTaskPrefectureBean(taskPrefectureBean, aNet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initTaskPrefectureBean(TaskPrefectureBean taskPrefectureBean, boolean aBoolean) {
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (dataBeanList.size() > 0) {
|
||||
dataBeanList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||
@ -179,52 +185,13 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
taskPage++;
|
||||
}
|
||||
}
|
||||
}else if (taskPrefectureBean.getCode()==203){
|
||||
} else if (taskPrefectureBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
/* private void initTaskSpecification(TaskPrefectureBean taskPrefectureBean, boolean start) {
|
||||
if (taskPrefectureBean.getStatus() == 0) {
|
||||
if (start) {
|
||||
if (dataBeanList.size() > 0) {
|
||||
dataBeanList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody() == null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||
page++;
|
||||
}
|
||||
taskPrefectureAdapter.notifyDataSetChanged();
|
||||
taskRecycler.refreshComplete();
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody() == null) {
|
||||
taskRecycler.setNoMore(true);
|
||||
} else {
|
||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskPrefectureAdapter.notifyDataSetChanged();
|
||||
taskRecycler.loadMoreComplete();
|
||||
page++;
|
||||
}
|
||||
}
|
||||
} else if (taskPrefectureBean.getStatus() == 2) {
|
||||
if (start) {
|
||||
if (dataBeanList.size() > 0) {
|
||||
dataBeanList.clear();
|
||||
taskPrefectureAdapter.notifyDataSetChanged();
|
||||
}
|
||||
taskRecycler.refreshComplete();
|
||||
} else {
|
||||
taskRecycler.setNoMore(true);
|
||||
}
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -123,7 +123,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private TextureMapView mapView;
|
||||
private TencentMap tencentMap;
|
||||
private CheckBox cbMapType;
|
||||
private ImageView ivZoomAdd, ivZoomDel,ivLocation, ivSubmit, ivRaffish,ivFilter,ivMessage,ivMassNotification;
|
||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivSubmit, ivRaffish, ivFilter, ivMessage, ivMassNotification;
|
||||
private MyLocationStyle locationStyle;
|
||||
|
||||
private SlidingUpPanelLayout sliding_layout;
|
||||
@ -154,7 +154,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private File logFile;
|
||||
private StringBuilder treasureBuilder;
|
||||
private Marker gatherMarker;
|
||||
|
||||
/*private boolean isHandler = false;
|
||||
private Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
@ -195,7 +194,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
return false;
|
||||
}
|
||||
});*/
|
||||
|
||||
public static TreasureFragment newInstance(Bundle bundle) {
|
||||
TreasureFragment fragment = new TreasureFragment();
|
||||
fragment.setArguments(bundle);
|
||||
@ -283,7 +281,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||
18, //目标缩放级别
|
||||
17, //目标缩放级别
|
||||
0, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||
0)); //目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() {
|
||||
@ -431,7 +429,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
sharedEdit.putInt("type", messageType);
|
||||
sharedEdit.putString("dataTime", format);
|
||||
sharedEdit.commit();
|
||||
}else if (messageNoticeBean.getCode()==203){
|
||||
} else if (messageNoticeBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), messageNoticeBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
@ -441,18 +439,23 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: "+e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* 得到电话区号,电话位数*/
|
||||
private void initPhone() {
|
||||
if (Constant.USHERED == null) {
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
if (HttpInterface.GET_PHONES == null) {
|
||||
return;
|
||||
}
|
||||
@ -479,7 +482,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength = telLength;
|
||||
}else if (getPhoneBean.getCode()==203){
|
||||
} else if (getPhoneBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
@ -489,8 +492,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: "+e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -525,7 +534,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private void iniUserLocation() {
|
||||
if (Constant.USHERED == null) {
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
if (HttpInterface.USER_LOCATION == null) {
|
||||
return;
|
||||
}
|
||||
@ -548,31 +557,36 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {//上传用户位置金纬度 寻宝删选接口请求成功
|
||||
Toast.makeText(getActivity(), "上传用户位置成功", Toast.LENGTH_SHORT).show();
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess:" + response.getMessage() + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess:" + e.getMessage() + "");
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网络删选接口
|
||||
*
|
||||
* @param tencentLocation
|
||||
*/
|
||||
private void initList(TencentLocation tencentLocation) {
|
||||
if (Constant.USHERED == null) {
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
if (HttpInterface.TASK_LIST == null) {
|
||||
return;
|
||||
}
|
||||
@ -604,8 +618,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
httpParams.put("pageNum", 1);
|
||||
httpParams.put("type", task_type);
|
||||
httpParams.put("isExclusive", limit_type);
|
||||
if (taskStatus==2){
|
||||
if (Constant.USHERED!=null){
|
||||
if (taskStatus == 2) {
|
||||
if (Constant.USHERED != null) {
|
||||
httpParams.put("received", Constant.USHERED);
|
||||
}
|
||||
}
|
||||
@ -818,10 +832,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||
obtain.obj = response;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "任务搜索接口:" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@ -829,14 +842,20 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 坐标点转成geo
|
||||
*
|
||||
* @param latLng
|
||||
* @return
|
||||
*/
|
||||
@ -859,23 +878,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
/**
|
||||
* marker 选中的状态
|
||||
*
|
||||
* @param poiEntity
|
||||
* @param aBoolean
|
||||
*/
|
||||
public void initMarker(PoiEntity poiEntity, boolean aBoolean) {
|
||||
String geoWkt = poiEntity.getGeoWkt();
|
||||
if (geoWkt==null){
|
||||
if (poiEntity.getDetail()!=null){
|
||||
if (geoWkt == null) {
|
||||
if (poiEntity.getDetail() != null) {
|
||||
geoWkt = poiEntity.getDetail();
|
||||
}else {
|
||||
} else {
|
||||
if (poiEntity.getX() != null && poiEntity.getY() != null) {
|
||||
String encode = Geohash.getInstance().encode(Double.parseDouble(poiEntity.getY()), Double.parseDouble(poiEntity.getX()));
|
||||
if (encode==null){
|
||||
if (encode == null) {
|
||||
return;
|
||||
}else {
|
||||
geoWkt=encode;
|
||||
} else {
|
||||
geoWkt = encode;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1088,7 +1108,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
} else {
|
||||
String detail = allTaskStatus.get(i).getDetail();
|
||||
if (detail!=null){
|
||||
if (detail != null) {
|
||||
String geo = Geohash.getInstance().decode(detail);//解密geo
|
||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||
switch (geometry.getGeometryType()) {
|
||||
@ -1150,7 +1170,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
break;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (allTaskStatus.get(i).getX() != null && allTaskStatus.get(i).getY() != null) {
|
||||
latLng = new LatLng(Double.parseDouble(allTaskStatus.get(i).getY()), Double.parseDouble(allTaskStatus.get(i).getX()));
|
||||
}
|
||||
@ -1480,6 +1500,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
treasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 奔溃后的数据
|
||||
*/
|
||||
@ -1665,7 +1686,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
CameraUpdate cameraSigma =
|
||||
CameraUpdateFactory.newCameraPosition(new CameraPosition(
|
||||
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()),//中心点坐标,地图目标经纬度
|
||||
18,//目标缩放级别
|
||||
17,//目标缩放级别
|
||||
0,//目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
|
||||
0));//目标旋转角 0~360° (正北方为0)
|
||||
tencentMap.animateCamera(cameraSigma);
|
||||
|
@ -94,20 +94,20 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||
if (pictures_time==null){
|
||||
sharedEdit.putString("pictures_time",newFormat);
|
||||
if (pictures_time == null) {
|
||||
sharedEdit.putString("pictures_time", newFormat);
|
||||
sharedEdit.apply();
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}else {
|
||||
if (pictures_time.equals(newFormat)){
|
||||
} else {
|
||||
if (pictures_time.equals(newFormat)) {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||
}else {
|
||||
} else {
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}
|
||||
}
|
||||
userAttestationBuilder = new StringBuilder();
|
||||
userAttestationBuilder.append("UserAttestationFragment-onCreate-initData ,");
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
userAttestationBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||
}
|
||||
}
|
||||
@ -173,8 +173,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
btnAttestation.setEnabled(false);
|
||||
useCamera.setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -291,21 +289,21 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
httpParams.put("userid", Constant.USHERED);
|
||||
httpParams.put("name", attestationName);
|
||||
httpParams.put("idnum", namePhone);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_AUTH_ADD)
|
||||
.cls(NameAuthenticationBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.fileList(takePhoneList)
|
||||
.postFileAsynchronous(new Callback<NameAuthenticationBean>() {
|
||||
.fileList(takePhoneList);
|
||||
okGoBuilder.postFileAsynchronous(new Callback<NameAuthenticationBean>() {
|
||||
@Override
|
||||
public void onSuccess(NameAuthenticationBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
DialogSettings.cancelable=false;
|
||||
DialogSettings.cancelable = false;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
@ -317,15 +315,23 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "提交失败!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: 失败" + e.getMessage() + "");
|
||||
}
|
||||
});
|
||||
@ -393,11 +399,11 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
Toast.makeText(getActivity(), "身份号识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
|
||||
userAttestationBuilder.append("身份号识别失败,可以重新识别或则进行手动输入 ,");
|
||||
}
|
||||
if (idCardNumberBean.getWords_result().get姓名()!=null){
|
||||
if (idCardNumberBean.getWords_result().get姓名() != null) {
|
||||
String words = idCardNumberBean.getWords_result().get姓名().getWords();
|
||||
etAttestationName.setText(words);
|
||||
userAttestationBuilder.append("姓名识别成功 ,");
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "姓名识别失败,可以重新识别或则进行手动输入", Toast.LENGTH_SHORT).show();
|
||||
userAttestationBuilder.append("姓名识别失败,可以重新识别或则进行手动输入 ,");
|
||||
}
|
||||
@ -429,7 +435,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnC
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
userAttestationBuilder.append("onDestroy ,");
|
||||
userAttestationBuilder.append("onDestroy");
|
||||
userAttestationBuilder.append("\r\n");
|
||||
FileUtils.writeFile(logFile.getAbsolutePath(), userAttestationBuilder.toString(), true);
|
||||
}
|
||||
|
@ -137,14 +137,14 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
private void initNetWork() {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.GET_PRICE)
|
||||
.cls(GetPriceBean.class)
|
||||
.params(new HttpParams())
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<GetPriceBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<GetPriceBean>() {
|
||||
@Override
|
||||
public void onSuccess(GetPriceBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -172,9 +172,9 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getContext(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onSuccess: " + response.toString());
|
||||
@ -183,7 +183,13 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -248,14 +254,14 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("exchangeMoney", etAllPrice.getText().toString());
|
||||
httpParams.put("payType", 1);
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.USER_PRICE_EXCHANGE)
|
||||
.cls(UserPriceExchangeBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UserPriceExchangeBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<UserPriceExchangeBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserPriceExchangeBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
@ -270,7 +276,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}else if (response.getCode()==203){
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
withdrawBuilder.append("提现了失败 ,");
|
||||
@ -283,7 +289,13 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
|
@ -69,7 +69,7 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
withdrawalAdapter.withClearData();
|
||||
withPage=1;
|
||||
withPage = 1;
|
||||
initNetwork();
|
||||
}
|
||||
|
||||
@ -85,29 +85,29 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
}
|
||||
|
||||
private void initNetwork() {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("pageNum", withPage);
|
||||
|
||||
OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.PRICE_EXCHANGE)
|
||||
.cls(WithdrawalBean.class)
|
||||
.params(httpParams)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<WithdrawalBean>() {
|
||||
.token(Constant.ACCESS_TOKEN);
|
||||
okGoBuilder.getRequest(new Callback<WithdrawalBean>() {
|
||||
@Override
|
||||
public void onSuccess(WithdrawalBean withdrawalBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (withdrawalBean.getCode() == 200){
|
||||
if (withdrawalBean.getCode() == 200) {
|
||||
withdrawalAdapter.setDataBeans(withdrawalBean.getBody().getList());
|
||||
withPage++;
|
||||
}else if (withdrawalBean.getCode()==203){
|
||||
} else if (withdrawalBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(getActivity());
|
||||
} else {
|
||||
Toast.makeText(getActivity(), withdrawalBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), withdrawalBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
rxlWithdraw.loadMoreComplete();
|
||||
rxlWithdraw.refreshComplete();
|
||||
@ -119,10 +119,17 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
||||
rxlWithdraw.loadMoreComplete();
|
||||
rxlWithdraw.refreshComplete();
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout")||message.equals("Read time out")){
|
||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.iv_withdraw) {
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.navinfo.outdoor.http;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
public class HttpInterface {
|
||||
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String IP= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||
@ -10,7 +8,6 @@ public class HttpInterface {
|
||||
public static final String USER_LOGIN_PATH ="/userlogin/";//登录
|
||||
public static final String PRICE_PATH ="/price/";//提现
|
||||
public static final String TASK_PATH ="/task/";//任务
|
||||
|
||||
/*
|
||||
public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
|
||||
public static final String APK_IP = "http://172.23.139.4:8001/";
|
||||
@ -18,7 +15,7 @@ public class HttpInterface {
|
||||
public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口
|
||||
*/
|
||||
/*
|
||||
*用户版本升级
|
||||
用户版本升级
|
||||
*/
|
||||
// dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android
|
||||
// 172.23.139.4:8001/appVersion/checkVersion?version=155&operationType=android //version是版本 operationType固定值 安卓 get
|
||||
@ -27,7 +24,7 @@ public class HttpInterface {
|
||||
APP_CHECK_VERSION = IP + USER_PATH + "appVersion/" + userId + "/checkVersion"; //版本升级
|
||||
}
|
||||
/* 我的
|
||||
* Path=/m4/user/*
|
||||
Path=/m4/user/*
|
||||
*/
|
||||
//172.23.139.4:8001/m4/user/update
|
||||
public static String USER_UPDATE;//用户资料
|
||||
@ -57,6 +54,7 @@ public class HttpInterface {
|
||||
/*登录
|
||||
* Path=/m4/userlogin/**
|
||||
*/
|
||||
|
||||
//172.23.139.4:9999/m4/userlogin/oauth/token
|
||||
public static String USER_LOGIN_OAUTH_TOKEN = IP + USER_LOGIN_PATH + "oauth/token"; //登录接口
|
||||
///m4/user/user/register
|
||||
|
@ -149,7 +149,6 @@ public class OkGoBuilder<T> {
|
||||
//全局统一缓存时间,默认永不过期,可以不传
|
||||
.setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE)
|
||||
.setRetryCount(0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,6 @@ public class PoiEntity implements Serializable {
|
||||
private int bodyId;//保存本地的bodyId
|
||||
private int work_type;//0."车行" 1."自行车" 2."步行"
|
||||
private int record_way; //等同于 canReceived : 1是可领取 0是不可领取
|
||||
|
||||
public int getRecord_way() {
|
||||
return record_way;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class FlushTokenUtil {
|
||||
private static SharedPreferences.Editor navInfoEditor;
|
||||
|
||||
public static void flushToken(Activity activity) {
|
||||
Constant.isPresent=true;
|
||||
Constant.isPresent = true;
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(activity), "提示", "登录已过期,是否重新登录", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
@ -42,28 +42,31 @@ public class FlushTokenUtil {
|
||||
});
|
||||
}
|
||||
|
||||
private static void initLogin(Activity activity){
|
||||
private static void initLogin(Activity activity) {
|
||||
SharedPreferences navInfo = activity.getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
navInfoEditor = navInfo.edit();
|
||||
if (Constant.USHERED == null) {
|
||||
Toast.makeText(activity, "token :更新失败", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}else {
|
||||
} else {
|
||||
if (HttpInterface.USER_LOGIN_OAUTH_TOKEN == null) {
|
||||
Toast.makeText(activity, "token :更新失败", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
}
|
||||
try {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("grant_type", "refresh_token");
|
||||
httpParams.put("refresh_token", Constant.REFRESH_TOKEN);
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
.time(30)
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.Builder(activity)
|
||||
.time(30)
|
||||
.url(HttpInterface.USER_LOGIN_OAUTH_TOKEN)
|
||||
.cls(LoginOauthTokenBean.class)
|
||||
.params(httpParams);
|
||||
.params(httpParams)
|
||||
.cls(LoginOauthTokenBean.class);
|
||||
okGoBuilder.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||
@Override
|
||||
public void onSuccess(LoginOauthTokenBean response, int id) {
|
||||
@ -85,7 +88,6 @@ public class FlushTokenUtil {
|
||||
} else {
|
||||
initGetUserInfo(activity);//获取用户信息
|
||||
}
|
||||
|
||||
} else {
|
||||
Toast.makeText(activity, response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -93,8 +95,13 @@ public class FlushTokenUtil {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Toast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(activity, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(activity, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@ -103,7 +110,8 @@ public class FlushTokenUtil {
|
||||
}
|
||||
|
||||
private static void initGetUserInfo(Activity activity) {
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder.getInstance()
|
||||
OkGoBuilder okGoBuilder = OkGoBuilder
|
||||
.getInstance()
|
||||
.time(30)
|
||||
.Builder(activity)
|
||||
.url(HttpInterface.USER_DETAIL_BY_USER_ID)
|
||||
@ -158,8 +166,13 @@ public class FlushTokenUtil {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Toast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
String message = e.getMessage();
|
||||
assert message != null;
|
||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||
Toast.makeText(activity, "请求超时", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(activity, message, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
410
app/src/main/java/com/navinfo/outdoor/util/PreserveUtils.java
Normal file
410
app/src/main/java/com/navinfo/outdoor/util/PreserveUtils.java
Normal file
@ -0,0 +1,410 @@
|
||||
package com.navinfo.outdoor.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.bean.ChargingPileSaveBean;
|
||||
import com.navinfo.outdoor.bean.ChargingStationBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import okhttp3.Response;
|
||||
|
||||
public class PreserveUtils {
|
||||
private static PreserveUtils instance;
|
||||
|
||||
public static PreserveUtils getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new PreserveUtils();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* road
|
||||
* @param mContext
|
||||
*/
|
||||
public Callback getRoadPreserveCallback(Activity mContext, PoiEntity poiEntity) {
|
||||
return new Callback<RoadSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(RoadSaveBean response, int id) {
|
||||
if (response.getCode() == 200) {
|
||||
Integer body = response.getBody();
|
||||
if (body != null && body != 0) {
|
||||
poiEntity.setBodyId(body);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存成功";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(mContext);
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "道路:" + poiEntity.getName() + "保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* poi
|
||||
* @param mContext
|
||||
*/
|
||||
public Callback getPoiPreserveCallback(Activity mContext, PoiEntity poiEntity) {
|
||||
return new Callback<PoiSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiSaveBean response, int id) {
|
||||
if (response.getCode() == 200) {
|
||||
Integer body = response.getBody();
|
||||
if (body != null && body != 0) {
|
||||
poiEntity.setBodyId(body);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存成功";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(mContext);
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi:" + poiEntity.getName() + "保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* PoiVideo
|
||||
*
|
||||
* @param mContext
|
||||
* @return
|
||||
*/
|
||||
public Callback getPoiVideoPreserveCallback(Activity mContext, PoiEntity poiEntity) {
|
||||
return new Callback<PoiVideoBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiVideoBean response, int id) {
|
||||
if (response.getCode() == 200) {
|
||||
Integer body = response.getBody();
|
||||
if (body != null && body != 0) {
|
||||
poiEntity.setBodyId(body);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存成功";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(mContext);
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + "保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* other
|
||||
* @param mContext
|
||||
* @return
|
||||
*/
|
||||
public Callback getOtherPreserveCallback(Activity mContext, PoiEntity poiEntity) {
|
||||
return new Callback<PoiSaveBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiSaveBean response, int id) {
|
||||
if (response.getCode() == 200) {
|
||||
Integer body = response.getBody();
|
||||
if (body != null && body != 0) {
|
||||
poiEntity.setBodyId(body);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存成功";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
} else if (response.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(mContext);
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "其他:" + poiEntity.getName() + "保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* charging
|
||||
* @param mContext
|
||||
*/
|
||||
public Callback getChargingPreserveCallback(Activity mContext, PoiEntity poiEntity) {
|
||||
return new Callback<ChargingStationBean>() {
|
||||
@Override
|
||||
public void onSuccess(ChargingStationBean chargingStationBean, int id) {
|
||||
if (chargingStationBean.getCode() == 200) {
|
||||
Integer bodyId = chargingStationBean.getBody();
|
||||
if (bodyId != null && bodyId != 0) {
|
||||
poiEntity.setBodyId(bodyId);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(mContext, poiEntity);
|
||||
// 充电站数据已经保存在服务上,批量保存充电桩数据
|
||||
saveChargingPileByChargingStation(mContext,poiEntity);
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存成功";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
} else if (chargingStationBean.getCode() == 203) {
|
||||
FlushTokenUtil.flushToken(mContext);
|
||||
} else {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
Message obtain1 = Message.obtain();
|
||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||
EventBus.getDefault().post(obtain1);
|
||||
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* 根据充电站数据检查充电桩数据,如果没有网络保存,则批量网络保存
|
||||
*/
|
||||
private void saveChargingPileByChargingStation(Activity mContext,PoiEntity chargingStationPoiEntity) {
|
||||
if (chargingStationPoiEntity != null) {
|
||||
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(mContext).getChargingPileDao().getChargingPileByStationId(chargingStationPoiEntity.getId());
|
||||
PoiEntity poiEntity = PoiDatabase.getInstance(mContext).getPoiDao().getPoiEntity(chargingStationPoiEntity.getId());
|
||||
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||
for (ChargingPileEntity pileEntity : chargingPileEntityList) {
|
||||
if (pileEntity.getBodyId() == 0) {
|
||||
saveChargingPileByWork(mContext,pileEntity, poiEntity.getBodyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存充电桩数据到服务端
|
||||
*/
|
||||
private void saveChargingPileByWork(Activity mContext,ChargingPileEntity chargingPileEntity, int bodyId) {
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskId", chargingPileEntity.getTaskId());
|
||||
httpParams.put("name", chargingPileEntity.getName());
|
||||
httpParams.put("existence", chargingPileEntity.getExist());
|
||||
httpParams.put("geo", chargingPileEntity.getP());
|
||||
httpParams.put("memo", chargingPileEntity.getMemo());
|
||||
httpParams.put("ffid", bodyId);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("cp_openType", chargingPileEntity.getCp_openType());
|
||||
hashMap.put("cp_floor", chargingPileEntity.getCp_floor());
|
||||
hashMap.put("cp_availableState", chargingPileEntity.getCp_availableState());
|
||||
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
||||
httpParams.put("detail", String.valueOf(hashMap));
|
||||
try {
|
||||
Response execute = OkGoBuilder
|
||||
.getInstance()
|
||||
.url(HttpInterface.SUBMIT_CSTASK)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.params(httpParams)
|
||||
.getSynchronization();
|
||||
if (execute != null) {
|
||||
assert execute.body() != null;
|
||||
String responseBodyStr = execute.body().string();
|
||||
Gson gson = new Gson();
|
||||
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
|
||||
if (chargingPileSaveBean.getCode() != 200) {
|
||||
return;
|
||||
}
|
||||
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(mContext, chargingPileEntity); // 更新当前充电桩的bodyId
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -36,7 +36,6 @@ public class UploadUtils {
|
||||
* @param mContext
|
||||
* @param showPoiEntity
|
||||
* @param fileZip
|
||||
* @return
|
||||
*/
|
||||
public Callback getRoadUploadCallback(Activity mContext, PoiEntity showPoiEntity, File fileZip) {
|
||||
PoiDao poiDao = PoiDatabase.getInstance(mContext).getPoiDao();
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:text="@string/tv_login_title"
|
||||
android:textColor="@color/colorWhite"
|
||||
@ -24,7 +24,7 @@
|
||||
android:id="@+id/tv_login_deck"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:text="@string/tv_login_deck"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="35sp"
|
||||
@ -134,7 +134,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/tv_register"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv_forget_paw"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
|
||||
|
@ -7,6 +7,4 @@
|
||||
android:background="@drawable/start_bg"
|
||||
tools:context="activity.MainActivity">
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -48,6 +48,7 @@
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.4" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="300dp"
|
||||
@ -61,20 +62,21 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zoom_add"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:src="@mipmap/zoom_add"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -113,12 +115,12 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switch"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:text="切换"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -132,6 +134,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic_video"
|
||||
android:layout_width="wrap_content"
|
||||
@ -142,6 +145,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/capture_picture"
|
||||
style="@style/user_data_style"
|
||||
|
@ -19,8 +19,7 @@
|
||||
android:id="@+id/iv_user"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_arrow"
|
||||
/>
|
||||
|
||||
@ -28,7 +27,6 @@
|
||||
android:id="@+id/tv_user"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="用户资料" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -66,7 +64,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实名认证"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style" />
|
||||
<Button
|
||||
@ -74,8 +72,8 @@
|
||||
style="@style/user_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="去认证"
|
||||
android:textColor="#fff" />
|
||||
|
||||
@ -96,7 +94,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="收款信息"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
@ -104,8 +102,8 @@
|
||||
android:id="@+id/btn_gathering"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="去绑定"
|
||||
android:textColor="#fff"
|
||||
style="@style/user_style"
|
||||
@ -130,15 +128,13 @@
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="所在地区*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/region"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/user_hint_style"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请选择所在区域"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
@ -161,12 +157,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="手机号码*"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_toRightOf="@id/tv_number"
|
||||
android:layout_toEndOf="@id/tv_number"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/user_hint_style"
|
||||
android:digits="1234567890"
|
||||
@ -194,12 +190,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="QQ号码"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_qq"
|
||||
android:layout_toRightOf="@id/tv_qq"
|
||||
android:layout_toEndOf="@id/tv_qq"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请输入QQ号码 "
|
||||
@ -226,12 +222,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电子邮箱"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/edit_mailbox"
|
||||
android:layout_toRightOf="@id/tv_mailbox"
|
||||
android:layout_toEndOf="@id/tv_mailbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:hint="请输入邮箱地址"
|
||||
@ -254,7 +250,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="微信"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/user_text_style"
|
||||
/>
|
||||
@ -262,8 +258,8 @@
|
||||
android:id="@+id/btn_weChat_binding"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="去绑定"
|
||||
android:textColor="#fff"
|
||||
style="@style/user_style"
|
||||
|
@ -17,15 +17,15 @@
|
||||
android:layout_height="45dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_baseline_arrow"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp" />
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="详情页面"
|
||||
android:layout_toRightOf="@id/iv_icon"
|
||||
android:layout_toEndOf="@id/iv_icon"
|
||||
android:textColor="#fff" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -57,9 +57,9 @@
|
||||
android:id="@+id/tv_exist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="是否存在*"
|
||||
@ -70,10 +70,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_exist"
|
||||
android:layout_toRightOf="@id/tv_exist"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -81,7 +80,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
@ -102,9 +101,9 @@
|
||||
android:id="@+id/tv_pot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="点位*"
|
||||
@ -115,8 +114,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/tv_pot"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/tv_pot"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -128,8 +127,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/check_pot_life"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/check_pot_life"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -154,9 +153,9 @@
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="名称*"
|
||||
@ -167,9 +166,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_toEndOf="@id/tv_name"
|
||||
android:layout_toRightOf="@id/tv_name"
|
||||
android:background="@color/white"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
@ -328,9 +326,9 @@
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="充电地面层"
|
||||
@ -341,10 +339,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_type"
|
||||
android:layout_toRightOf="@id/tv_type"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -352,7 +349,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
|
||||
@ -372,7 +369,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="长按图片可删除"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_02"
|
||||
@ -399,9 +396,9 @@
|
||||
android:id="@+id/rl_panorama"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
|
||||
@ -439,7 +436,7 @@
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
|
||||
@ -486,9 +483,9 @@
|
||||
android:id="@+id/tv_scutcheon1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="设备标牌"
|
||||
@ -499,10 +496,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_scutcheon1"
|
||||
android:layout_toRightOf="@id/tv_scutcheon1"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -510,7 +506,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
|
||||
@ -524,9 +520,9 @@
|
||||
android:id="@+id/rl_equipment"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
|
||||
@ -564,7 +560,7 @@
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_hui_bg">
|
||||
|
||||
@ -600,10 +596,10 @@
|
||||
android:id="@+id/rl_scutcheon"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_red_bg"
|
||||
android:visibility="gone">
|
||||
@ -642,9 +638,8 @@
|
||||
android:id="@+id/rl_device"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/selector_red_bg"
|
||||
android:visibility="gone">
|
||||
@ -690,9 +685,9 @@
|
||||
android:id="@+id/tv_stake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="桩可用状态"
|
||||
@ -703,10 +698,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_stake"
|
||||
android:layout_toRightOf="@id/tv_stake"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -714,7 +708,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
|
||||
@ -730,7 +724,7 @@
|
||||
android:id="@+id/rl_usable"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
|
||||
<ImageView
|
||||
@ -797,7 +791,7 @@
|
||||
android:id="@+id/rl_parking"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
|
||||
<ImageView
|
||||
@ -833,7 +827,6 @@
|
||||
android:id="@+id/rl_number"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/selector_hui_bg">
|
||||
|
||||
@ -897,7 +890,7 @@
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="top"
|
||||
android:hint="任务描述"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="40dp"
|
||||
android:textColor="@color/test_color_selector"
|
||||
|
@ -53,9 +53,9 @@
|
||||
android:id="@+id/tv_exist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="是否存在*"
|
||||
@ -66,10 +66,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_exist"
|
||||
android:layout_toRightOf="@id/tv_exist"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -77,7 +76,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
@ -97,9 +96,9 @@
|
||||
android:id="@+id/tv_pot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="点位*"
|
||||
@ -110,8 +109,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/tv_pot"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/tv_pot"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -123,8 +122,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/check_pot_life"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/check_pot_life"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -148,9 +147,9 @@
|
||||
android:id="@+id/tv_name_pic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="名称*"
|
||||
@ -161,10 +160,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_toStartOf="@id/tv_station_examine"
|
||||
android:layout_toEndOf="@id/tv_name_pic"
|
||||
android:layout_toRightOf="@id/tv_name_pic"
|
||||
android:background="@color/white"
|
||||
android:hint="名称"
|
||||
android:singleLine="true"
|
||||
@ -175,7 +173,7 @@
|
||||
android:id="@+id/tv_station_examine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="4dp"
|
||||
android:text="查重"
|
||||
@ -197,9 +195,9 @@
|
||||
android:id="@+id/tv_site"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="地址"
|
||||
@ -210,9 +208,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toRightOf="@id/tv_site"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_site"
|
||||
android:background="@color/white"
|
||||
android:hint="地址"
|
||||
android:textColor="@color/test_color_selector"
|
||||
@ -241,7 +239,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical"></LinearLayout>
|
||||
android:orientation="vertical"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@ -259,9 +257,9 @@
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="类型"
|
||||
@ -272,10 +270,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_type"
|
||||
android:layout_toRightOf="@id/tv_type"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -283,7 +280,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
@ -305,7 +302,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长按图片可删除"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_02"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tv_02"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_02"
|
||||
@ -332,7 +329,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -369,7 +366,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -406,7 +403,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -449,7 +446,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -486,7 +483,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -523,9 +520,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"></RelativeLayout>
|
||||
android:layout_weight="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -572,7 +569,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="添加桩"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
@ -19,8 +19,7 @@
|
||||
android:id="@+id/iv_event_task"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_arrow"
|
||||
/>
|
||||
|
||||
@ -28,7 +27,6 @@
|
||||
android:id="@+id/tv_event"
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="活动专区" />
|
||||
</LinearLayout>
|
||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||
|
@ -20,8 +20,7 @@
|
||||
android:id="@+id/message_final"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/ic_baseline_arrow"
|
||||
/>
|
||||
|
||||
@ -29,8 +28,7 @@
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="消息"
|
||||
android:textColor="#fff"
|
||||
|
@ -97,9 +97,9 @@
|
||||
android:id="@+id/tv_exist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="是否存在*"
|
||||
@ -110,10 +110,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_exist"
|
||||
android:layout_toRightOf="@id/tv_exist"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -121,7 +120,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
@ -157,7 +156,7 @@
|
||||
android:id="@+id/tv_indeo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="点位*"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -183,7 +182,7 @@
|
||||
android:id="@+id/iv_other_map"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/icon_location"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -202,14 +201,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="名称*" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_task_name"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="@null"
|
||||
android:hint="任务名称"
|
||||
android:singleLine="true"
|
||||
@ -232,7 +231,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长按图片可删除"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_other_picture"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tv_other_picture"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_other_picture"
|
||||
@ -355,7 +354,7 @@
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="top"
|
||||
android:hint="任务描述"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="30dp"
|
||||
android:textColor="@color/test_color_selector"
|
||||
|
@ -22,8 +22,7 @@
|
||||
android:id="@+id/iv_poiTask_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/ic_baseline_arrow" />
|
||||
|
||||
<TextView
|
||||
@ -31,8 +30,7 @@
|
||||
style="@style/toolbar_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="POI任务列表" />
|
||||
</LinearLayout>
|
||||
|
@ -37,6 +37,18 @@
|
||||
android:text="注册" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rl_register">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/register_title"
|
||||
android:layout_width="match_parent"
|
||||
@ -47,7 +59,7 @@
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rl_register" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/register_desc"
|
||||
@ -278,6 +290,7 @@
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:gravity="center"
|
||||
android:text="注册"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -285,5 +298,11 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_register_check"
|
||||
app:layout_constraintVertical_bias="0.20" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -15,7 +15,7 @@
|
||||
android:id="@+id/tv_mine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="我的"
|
||||
android:textColor="#000"
|
||||
@ -36,7 +36,7 @@
|
||||
android:id="@+id/image_heard"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -46,7 +46,7 @@
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="NO7378"
|
||||
android:textColor="#fff"
|
||||
android:textSize="25sp"
|
||||
@ -60,7 +60,7 @@
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/shares"
|
||||
android:layout_marginRight="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name" />
|
||||
@ -94,7 +94,7 @@
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="总资产(元)"
|
||||
android:textColor="#333"
|
||||
@ -119,7 +119,7 @@
|
||||
style="@style/main_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="去提现"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -131,9 +131,9 @@
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="55dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -162,11 +162,11 @@
|
||||
android:id="@+id/main_grade"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@id/image_grade_view"
|
||||
android:layout_toStartOf="@id/image_grade_view"
|
||||
android:text="LV.0"
|
||||
|
||||
android:textSize="16sp" />
|
||||
@ -174,7 +174,7 @@
|
||||
android:id="@+id/image_grade_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:gravity="center"
|
||||
@ -199,7 +199,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的特权"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
style="@style/main_text_style" />
|
||||
<TextView
|
||||
android:layout_width="45dp"
|
||||
@ -208,7 +208,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/main_outLogin_style"
|
||||
android:layout_toLeftOf="@id/image_view"
|
||||
android:layout_toStartOf="@id/image_view"
|
||||
|
||||
/>
|
||||
|
||||
@ -216,7 +216,7 @@
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:gravity="center"
|
||||
@ -245,7 +245,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:textSize="18sp" />
|
||||
@ -273,7 +273,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:textSize="18sp" />
|
||||
@ -301,7 +301,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:textSize="18sp" />
|
||||
@ -329,7 +329,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:textSize="18sp" />
|
||||
@ -356,7 +356,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_navigate"
|
||||
android:textSize="18sp" />
|
||||
|
@ -50,9 +50,9 @@
|
||||
android:id="@+id/tv_exist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="是否存在*"
|
||||
@ -63,10 +63,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_exist"
|
||||
android:layout_toRightOf="@id/tv_exist"
|
||||
android:background="@color/white"
|
||||
android:textColor="#333"
|
||||
android:textSize="15sp" />
|
||||
@ -74,7 +73,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
@ -94,9 +93,9 @@
|
||||
android:id="@+id/tv_pot"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="点位*"
|
||||
@ -107,8 +106,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/tv_pot"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/tv_pot"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -120,8 +119,8 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/check_pot_life"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/check_pot_life"
|
||||
android:background="@drawable/selector_change_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
@ -145,9 +144,9 @@
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="名称*"
|
||||
@ -158,10 +157,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_toStartOf="@id/tv_poi_examine"
|
||||
android:layout_toEndOf="@id/tv_name"
|
||||
android:layout_toRightOf="@id/tv_name"
|
||||
android:background="@color/white"
|
||||
android:hint="poi名称"
|
||||
android:inputType="text"
|
||||
@ -174,7 +172,7 @@
|
||||
android:id="@+id/tv_poi_examine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="4dp"
|
||||
android:text="查重"
|
||||
@ -196,9 +194,9 @@
|
||||
android:id="@+id/tv_site"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="地址"
|
||||
@ -209,9 +207,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_toRightOf="@id/tv_site"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_toEndOf="@id/tv_site"
|
||||
android:background="@color/white"
|
||||
android:hint="poi地址"
|
||||
android:textColor="@color/test_color_selector"
|
||||
@ -261,7 +259,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="长按图片可删除"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_02"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tv_02"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_02"
|
||||
@ -288,7 +286,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -326,7 +324,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_red_bg">
|
||||
@ -364,7 +362,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_hui_bg">
|
||||
@ -408,7 +406,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_hui_bg">
|
||||
@ -446,7 +444,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_hui_bg">
|
||||
@ -483,7 +481,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
@ -521,13 +519,11 @@
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="top"
|
||||
android:hint="任务描述"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="30dp"
|
||||
android:textColor="@color/test_color_selector"
|
||||
android:textSize="15sp"
|
||||
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -42,15 +42,17 @@
|
||||
android:id="@+id/tab_record"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
app:tabMode="fixed"
|
||||
app:tabGravity="fill"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabTextColor="@color/colormap"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabRippleColor="@color/colormap"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
android:background="@color/colorPrimaryBlue"
|
||||
app:layout_constraintTop_toBottomOf="@id/rl_record" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rl_record"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabMode="fixed"
|
||||
app:tabRippleColor="@color/colormap"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="@color/colormap" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -66,11 +66,11 @@
|
||||
android:id="@+id/cb_map_type"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/atlas_selector"
|
||||
android:button="@null"
|
||||
android:checked="false"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_submit"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_zoom_del"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_zoom_add" />
|
||||
|
||||
@ -80,18 +80,19 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/submit"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_refrish"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_refrish"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cb_map_type"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cb_map_type"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_zoom_del" />
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_zoom_del" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_filter"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@mipmap/filter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_location"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cb_map_type"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_submit" />
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_refrish" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zoom_add"
|
||||
|
@ -1,15 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_withdraw"
|
||||
android:layout_width="match_parent"
|
||||
@ -25,16 +27,14 @@
|
||||
android:id="@+id/iv_withdraw"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/ic_baseline_arrow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_withdraw"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="财务信息"
|
||||
android:textColor="#fff"
|
||||
@ -62,8 +62,8 @@
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="可提现(元)"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -84,7 +84,7 @@
|
||||
android:id="@+id/tv_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableRight="@drawable/ic_baseline_navigate"
|
||||
android:drawableEnd="@drawable/ic_baseline_navigate"
|
||||
android:text="提现记录"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_unit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -113,6 +113,7 @@
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_already_withdraw"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_already_withdraw"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_already_withdraw" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_assets"
|
||||
android:layout_width="wrap_content"
|
||||
@ -123,6 +124,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_already_withdraw"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total"
|
||||
android:layout_width="wrap_content"
|
||||
@ -153,7 +155,7 @@
|
||||
android:id="@+id/tv_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="¥"
|
||||
android:textSize="18sp"
|
||||
@ -164,20 +166,20 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:maxLines="1"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:layout_toRightOf="@id/tv_view"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/tv_view"
|
||||
android:background="@null"
|
||||
android:hint="请输入提现金额"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="25sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="全部"
|
||||
android:textColor="#2196F3"
|
||||
@ -202,11 +204,11 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
style="@style/main_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_margin="20dp"
|
||||
android:text="立即提现"
|
||||
style="@style/main_style"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/checkBox" />
|
||||
@ -215,9 +217,9 @@
|
||||
android:id="@+id/tv_infuse"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="注:达到10元方可兑换,只能兑换整数部分,10个工作日内发放,如遇到特殊情况可能延后"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -230,7 +232,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="#fff"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -240,8 +242,8 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_poi"
|
||||
@ -255,8 +257,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/image_poi"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_poi"
|
||||
android:text="POI推送金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
@ -265,7 +267,7 @@
|
||||
android:id="@+id/poi_push_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
@ -277,11 +279,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_poi_report"
|
||||
@ -295,8 +298,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/image_poi_report"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_poi_report"
|
||||
android:text="POI上报任务金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
@ -305,22 +308,24 @@
|
||||
android:id="@+id/poi_report_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_poiVideo"
|
||||
@ -334,8 +339,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/image_poiVideo"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_poiVideo"
|
||||
android:text="POI录像推送金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
@ -344,7 +349,7 @@
|
||||
android:id="@+id/poiVideo_push_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
@ -356,11 +361,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_poiVideo_report"
|
||||
@ -374,8 +380,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/image_poiVideo_report"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_poiVideo_report"
|
||||
android:text="POI录像上报任务金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
@ -384,7 +390,7 @@
|
||||
android:id="@+id/poiVideo_report_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
@ -396,11 +402,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_way"
|
||||
android:layout_width="wrap_content"
|
||||
@ -412,33 +420,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="道路推送金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_way"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_way"
|
||||
android:text="道路推送金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_push_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_way_report"
|
||||
android:layout_width="wrap_content"
|
||||
@ -450,33 +461,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="道路上报任务金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_way_report"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_way_report"
|
||||
android:text="道路上报任务金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_report_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_charging"
|
||||
android:layout_width="wrap_content"
|
||||
@ -488,33 +502,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="充电站推送金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_charging"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_charging"
|
||||
android:text="充电站推送金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/charging_push_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_charge_report"
|
||||
android:layout_width="wrap_content"
|
||||
@ -526,33 +543,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="道路上报任务金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_charge_report"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_charge_report"
|
||||
android:text="道路上报任务金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/charging_report_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_other"
|
||||
android:layout_width="wrap_content"
|
||||
@ -564,33 +584,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="其他推送金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_other"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_other"
|
||||
android:text="其他推送金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/other_push_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:padding="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_other_report"
|
||||
android:layout_width="wrap_content"
|
||||
@ -602,30 +625,31 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="其他上报任务金额"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/image_other_report"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_toEndOf="@id/image_other_report"
|
||||
android:text="其他上报任务金额"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/other_report_money"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="+¥0.0"
|
||||
android:textColor="#333"
|
||||
android:textSize="18sp"
|
||||
/>
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F0F0" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
Loading…
x
Reference in New Issue
Block a user