fix: 合并代码

This commit is contained in:
wds 2021-08-10 20:46:04 +08:00
commit 74956539a7
9 changed files with 59 additions and 25 deletions

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
// ndkVersion '23.0.7123448'
// ndkVersion '23.0.7123448'
defaultConfig {
applicationId "com.navinfo.outdoor"

View File

@ -197,19 +197,19 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
dismissLoadingDialog();
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
if (response.body().equals("0")) {
MessageDialog.show(UserActivity.this, "是否保存", "取消", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
if (response.code()==200) {
MessageDialog.show(UserActivity.this, "是否保存", "确定", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
return false;
}
});
} else {
MessageDialog.show(UserActivity.this, "是否保存", "确定", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show(UserActivity.this, "是否保存", "取消", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Toast.makeText(getContext(), "点击了取消", Toast.LENGTH_SHORT).show();
return false;
}
});

View File

@ -428,9 +428,11 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Log.e("TAG", "poiUploadByNetWork: " + body + otherUploadList);
return;
}
showLoadingDialog();
HttpParams httpParams=new HttpParams();
httpParams.put("auditId",body);
showFileLoadingDialog();
setLoadingDialogText("上传中...");
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.OTHER_TASK_UPLOAD_PIC)

View File

@ -98,6 +98,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private int existence = 0;
private RelativeLayout linearExist;
private Spinner spinnerExist;
String str = "";
//获取的拍照图片
@ -108,6 +109,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private String tagPanorama;
private File file;
public static PoiFragment newInstance(Bundle bundle) {
PoiFragment fragment = new PoiFragment();
fragment.setArguments(bundle);
@ -574,7 +577,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}).start();
break;
case R.id.tv_examine:
findingDuplicateByWork(showPoiEntity);
findingDuplicateByWork();
break;
case R.id.rl_panorama:
Intent intentPanorama = new Intent("android.media.action.IMAGE_CAPTURE");
@ -609,10 +612,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}
}
private void findingDuplicateByWork(PoiEntity poiEntity) {
private void findingDuplicateByWork() {
showLoadingDialog();
HttpParams httpParams = new HttpParams();
httpParams.put("geo", poiEntity.getGeoWkt());
String encode = Geohash.getInstance().encode(latLng.latitude, latLng.longitude);
httpParams.put("geo", encode);
httpParams.put("name", editNameContent.getText().toString());
OkGoBuilder.getInstance()
.Builder(getActivity())
@ -624,8 +628,23 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
@Override
public void onSuccess(TaskNameBean taskNameBean, int id) {
dismissLoadingDialog();
if (taskNameBean.getCode()==200){
List<String> body = taskNameBean.getBody();
if (body!=null){
for (int i = 0; i < body.size(); i++) {
str +=body.get(i) + ",";
}
if (str!=null){
Toast.makeText(getContext(), "存在类似名称---"+str, Toast.LENGTH_SHORT).show();
str = "";
}else {
Toast.makeText(getContext(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(getContext(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
}
}
Toast.makeText(getContext(), "存在类似名称" + taskNameBean.getBody(), Toast.LENGTH_SHORT).show();
}
@Override
@ -688,7 +707,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Log.e("TAG", "poiUploadByNetWork: " + body + poiPicList);
return;
}
showLoadingDialog();
showFileLoadingDialog();
setLoadingDialogText("上传中...");
HttpParams httpParams=new HttpParams();
httpParams.put("auditId",body);
OkGoBuilder.getInstance()
@ -728,7 +748,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}
private void poiSaveByNet(PoiEntity poiEntity, boolean isLocal) {
showLoadingDialog();
HttpParams httpParams = new HttpParams();
httpParams.put("taskId", poiEntity.getTaskId());
httpParams.put("name", poiEntity.getName());
@ -737,6 +757,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
httpParams.put("geo", poiEntity.getGeoWkt());
httpParams.put("memo", poiEntity.getMemo());
httpParams.put("telephone", poiEntity.getTelPhone());
showLoadingDialog();
setLoadingDialogText("保存中...");
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.SUBMIT_POI_TASK)

View File

@ -383,6 +383,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
long time=System.currentTimeMillis();
httpParams.put("datetime",time);
httpParams.put("file", fileZip);
showFileLoadingDialog();
setLoadingDialogText("上传中...");
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.POI_VIDEO_UPLOAD_PIC)
@ -420,13 +422,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
}
private void poiVideoSave(PoiEntity poiEntity, boolean isLocal) {
showLoadingDialog();
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());
showLoadingDialog();
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.INSIDE_API_LIST)

View File

@ -396,6 +396,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
long time=System.currentTimeMillis();
httpParams.put("datetime",time);
httpParams.put("file", fileZip);
showFileLoadingDialog();
setLoadingDialogText("上传中...");
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.ROAD_TASK_UPLOAD_PIC)

View File

@ -181,19 +181,22 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
break;
case R.id.button:
if (etAllPrice == null) {
Toast.makeText(getContext(), "控件不能为空", Toast.LENGTH_SHORT).show();
if (etAllPrice == null&&etAllPrice.getText().toString().equals("")) {
Toast.makeText(getContext(), "提现金额不能为空", Toast.LENGTH_SHORT).show();
return;
}
if (etAllPrice.getText().toString().equals("")) {
String price = etAllPrice.getText().toString().trim();
if (price!=null){
Integer integer = Integer.valueOf(price);
if (integer!=null&&integer<10){
Toast.makeText(getContext(), "提现金额不能低于10元", Toast.LENGTH_SHORT).show();
return;
}
}else {
Toast.makeText(getContext(), "提现金额不能为空", Toast.LENGTH_SHORT).show();
}
String price = etAllPrice.getText().toString();
double prices = Double.valueOf(price);
if (prices != 0 && prices < 10) {
Toast.makeText(getContext(), "提现金额不能低于10元", Toast.LENGTH_SHORT).show();
return;
}
if (!checkBox.isChecked()) {
Toast.makeText(getContext(), "请勾选银行卡", Toast.LENGTH_SHORT).show();
return;
@ -221,6 +224,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
private void immediatelyPrice() {
showLoadingDialog();
setLoadingDialogText("提现中...");
HttpParams httpParams = new HttpParams();
httpParams.put("exchangeMoney", etAllPrice.getText().toString());

View File

@ -47,6 +47,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint=" ID/手机号"
android:maxLines="1"
android:paddingBottom="20dp"
android:layout_marginRight="35dp"
android:layout_marginLeft="35dp"
@ -81,6 +82,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint=" 请输入密码"
android:maxLines="1"
android:paddingBottom="15dp"
android:layout_marginRight="35dp"
android:layout_marginLeft="35dp"

View File

@ -261,8 +261,7 @@
app:layout_constraintBottom_toBottomOf="@id/iv_register_check"/>
<Button
android:id="@+id/btn_register"
android:layout_width="300dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:gravity="center"