修改‘其他’页面的接口

This commit is contained in:
md
2021-07-08 15:31:54 +08:00
parent 8fc6ed7d2a
commit ce4e734199
6 changed files with 39 additions and 11 deletions

View File

@@ -94,6 +94,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
private ArrayList<File> otheruploadList;
private String takePhotoPath;
private String takePhotoPath2;
private PoiEntity poiEntity;
public static OtherFragment newInstance(Bundle bundle) {
OtherFragment fragment = new OtherFragment();
@@ -299,7 +300,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
public void onGranted(List<String> permissions, boolean all) {
if (all) {
//保存数据库:
PoiEntity poiEntity = new PoiEntity();
poiEntity = new PoiEntity();
List<Info> infoList = new ArrayList<>();
String name = editTaskName.getText().toString().trim();//名称
@@ -379,12 +380,13 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
break;
case R.id.btn_other_uploading:
otherUploadByNet();
otherUploadByNet(poiEntity);
break;
}
}
private void otherUploadByNet() {
private void otherUploadByNet(PoiEntity poiEntity) {
showLoadingDialog();
otheruploadList = new ArrayList<>();
File otherUploadFile = new File(takePhotoPath);
@@ -399,7 +401,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
// 请求方式和请求url
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
// 请求的 tag, 主要用于取消对应的请求
.params("userid", "1")
.params("auditId", poiEntity.getTaskId())
.addFileParams("file", otheruploadList)
.tag(this)
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {

View File

@@ -108,6 +108,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private String takePhotoPath4;
private String takePhotoPath3;
private String takePhotoPath1;
private PoiEntity poiEntity;
public static PoiFragment newInstance(Bundle bundle) {
PoiFragment fragment = new PoiFragment();
@@ -371,7 +372,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
public void onGranted(List<String> permissions, boolean all) {
if (all) {
//保存数据库:
PoiEntity poiEntity = new PoiEntity();
poiEntity = new PoiEntity();
ArrayList<Info> infoPhoto = new ArrayList<>();
String name = editNameContent.getText().toString().trim();//名称
if (name == null || name.equals("")) {
@@ -477,7 +478,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
obtain.what = Constant.TREASURE_FRAGMENT;
obtain.obj = false;
EventBus.getDefault().post(obtain);
poiUploadByNetWork();
poiUploadByNetWork(poiEntity);
break;
case R.id.tv_examine:
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
@@ -506,7 +507,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
}
}
private void poiUploadByNetWork() {
private void poiUploadByNetWork(PoiEntity poiEntity) {
poiUploadList = new ArrayList<>();
File poiUploadFile1 = new File(takePhotoPath1);
File poiUploadFile2 = new File(takePhotoPath2);
@@ -526,7 +527,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
// 请求方式和请求url
.<NameAuthenticationBean>post(HttpInterface.USER_AUTH_ADD)
// 请求的 tag, 主要用于取消对应的请求
.params("auditId", "1")
.params("auditId", poiEntity.getTaskId())
.addFileParams("file",poiUploadList)
.tag(this)
.execute(new DialogCallback<NameAuthenticationBean>(NameAuthenticationBean.class) {