修改面状任务上的bug
This commit is contained in:
parent
8a8117875f
commit
eb90acb1c5
@ -125,7 +125,5 @@ dependencies {
|
|||||||
implementation 'com.googlecode.mp4parser:isoparser:1.1.21'
|
implementation 'com.googlecode.mp4parser:isoparser:1.1.21'
|
||||||
// Android常用库 https://github.com/l123456789jy/Lazy
|
// Android常用库 https://github.com/l123456789jy/Lazy
|
||||||
implementation 'com.github.lazylibrary:lazylibrary:1.0.2'
|
implementation 'com.github.lazylibrary:lazylibrary:1.0.2'
|
||||||
//屏幕的适配百分比
|
|
||||||
//https://www.jianshu.com/p/0c2a8db91bda?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation
|
|
||||||
implementation 'com.android.support:percent:27.0.2'
|
|
||||||
}
|
}
|
@ -14,10 +14,9 @@ import com.lzy.okgo.model.HttpParams;
|
|||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.adapter.CapacityEvaluationAdapter;
|
import com.navinfo.outdoor.adapter.CapacityEvaluationAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
|
||||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
@ -44,6 +43,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.fragment_capacity_evaluation;
|
return R.layout.fragment_capacity_evaluation;
|
||||||
@ -52,7 +52,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
ivEvaluationTaskFinish =findViewById(R.id.iv_evaluation_task_finish);
|
ivEvaluationTaskFinish = findViewById(R.id.iv_evaluation_task_finish);
|
||||||
capacityEvaluationRecycler = findViewById(R.id.capacity_evaluation_recycler);
|
capacityEvaluationRecycler = findViewById(R.id.capacity_evaluation_recycler);
|
||||||
ivEvaluationTaskFinish.setOnClickListener(this::onClick);
|
ivEvaluationTaskFinish.setOnClickListener(this::onClick);
|
||||||
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
@ -80,7 +80,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(int id) {
|
public void onClick(int id) {
|
||||||
Intent capacityEvaWeb = new Intent(getActivity(), FragmentManagement.class);
|
Intent capacityEvaWeb = new Intent(getActivity(), FragmentManagement.class);
|
||||||
capacityEvaWeb.putExtra("tag",14);
|
capacityEvaWeb.putExtra("tag", 14);
|
||||||
startActivity(capacityEvaWeb);
|
startActivity(capacityEvaWeb);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -96,16 +96,15 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
private void initNewWork() {
|
private void initNewWork() {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("fid","1");
|
httpParams.put("fid", "1");
|
||||||
httpParams.put("pageNum", "1");
|
httpParams.put("pageNum", "1");
|
||||||
httpParams.put("pageSize","10");
|
httpParams.put("pageSize", "10");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.MSG_LISt)
|
.url(HttpInterface.MSG_LISt)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -122,9 +121,9 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
* 友盟+
|
* 友盟+
|
||||||
* 返回自定义报错信息
|
* 返回自定义报错信息
|
||||||
*/
|
*/
|
||||||
UMCrash.generateCustomLog("网络请求报错-位置:CapacityEvaluationFragment"+e.getMessage(),"UmengException");
|
UMCrash.generateCustomLog("网络请求报错-位置:CapacityEvaluationFragment" + e.getMessage(), "UmengException");
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,9 +88,8 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.MSG_LISt)
|
.url(HttpInterface.MSG_LISt)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -104,7 +103,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,10 +94,9 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.EXAM_CONTENT)
|
.url(HttpInterface.EXAM_CONTENT)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(MeasureBean.class)
|
.cls(MeasureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<MeasureBean>() {
|
.getRequest(new Callback<MeasureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MeasureBean response, int id) {
|
public void onSuccess(MeasureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -134,7 +133,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import com.kongzue.dialog.util.DialogSettings;
|
|||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Response;
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.adapter.ChargingPileAdapter;
|
import com.navinfo.outdoor.adapter.ChargingPileAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
@ -77,6 +76,7 @@ import java.util.Calendar;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import okhttp3.Response;
|
||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
import static android.app.Activity.RESULT_OK;
|
import static android.app.Activity.RESULT_OK;
|
||||||
@ -606,10 +606,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PHONES)
|
.url(HttpInterface.GET_PHONES)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.params(new HttpParams("geo", encode))
|
.params(new HttpParams("geo", encode))
|
||||||
.cls(GetPhoneBean.class)
|
.cls(GetPhoneBean.class)
|
||||||
.callback(new Callback<GetPhoneBean>() {
|
.getRequest(new Callback<GetPhoneBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -624,7 +623,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -823,14 +822,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
okhttp3.Response execute = OkGo
|
Response execute = OkGoBuilder.getInstance().url(HttpInterface.CS_TASK_UP_LOAD_PIC).fileList(chargingPileFileList).postFileSynchronization((int) chargingPileEntity.getBodyId());
|
||||||
// 请求方式和请求url
|
|
||||||
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
|
||||||
.params("auditId", chargingPileEntity.getBodyId())
|
|
||||||
.addFileParams("file", chargingPileFileList)
|
|
||||||
.tag(this)
|
|
||||||
.execute();
|
|
||||||
String pileUpLoadResultStr = execute.body().string();
|
String pileUpLoadResultStr = execute.body().string();
|
||||||
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||||
if (uploadBeanResult != null) {
|
if (uploadBeanResult != null) {
|
||||||
@ -1017,7 +1009,48 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
OkGo
|
OkGoBuilder.getInstance()
|
||||||
|
.Builder(getActivity())
|
||||||
|
.url(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||||
|
.fileList(chargingStationList)
|
||||||
|
.cls(PoiUploadBean.class)
|
||||||
|
.postFileAsynchronous(poiEntity.getBodyId(), new Callback<PoiUploadBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(PoiUploadBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
if (response == null || response.getCode()!= 200) {
|
||||||
|
Toast.makeText(getActivity(), "上传失败", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response != null && response.getCode()== 200) {
|
||||||
|
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getActivity().onBackPressed();//回退
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Toast.makeText(getActivity(), e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
|
Log.d("TAG", "onError: " +e.getMessage() + "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/* OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<PoiUploadBean>post(HttpInterface.C_TASK_UP_LOAD_PIC)
|
.<PoiUploadBean>post(HttpInterface.C_TASK_UP_LOAD_PIC)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
@ -1062,7 +1095,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
Toast.makeText(getActivity(), poiUploadBeanResponse.code() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), poiUploadBeanResponse.code() + "", Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + poiUploadBeanResponse.code() + "");
|
Log.d("TAG", "onError: " + poiUploadBeanResponse.code() + "");
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1086,10 +1119,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.SUBMIT_CTASK)
|
.url(HttpInterface.SUBMIT_CTASK)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(ChargingStationBean.class)
|
.cls(ChargingStationBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<ChargingStationBean>() {
|
.getRequest(new Callback<ChargingStationBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ChargingStationBean chargingStationBean, int id) {
|
public void onSuccess(ChargingStationBean chargingStationBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -1125,7 +1157,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,10 +1432,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
||||||
httpParams.put("detail", String.valueOf(hashMap));
|
httpParams.put("detail", String.valueOf(hashMap));
|
||||||
try {
|
try {
|
||||||
okhttp3.Response execute = OkGo.<String>get(HttpInterface.SUBMIT_CSTASK)
|
Response execute = OkGoBuilder.getInstance().url(HttpInterface.SUBMIT_CSTASK).params(httpParams).getSynchronization();
|
||||||
.params(httpParams)
|
|
||||||
.tag(ChargingStationFragment.this)
|
|
||||||
.execute();
|
|
||||||
String responseBodyStr = execute.body().string();
|
String responseBodyStr = execute.body().string();
|
||||||
if (responseBodyStr != null) {
|
if (responseBodyStr != null) {
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
@ -68,10 +68,9 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listEvent)
|
.url(HttpInterface.listEvent)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -86,7 +85,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,9 +300,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(ReceivedBean.class)
|
.cls(ReceivedBean.class)
|
||||||
.callback(new Callback<ReceivedBean>() {
|
.getRequest(new Callback<ReceivedBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ReceivedBean response, int id) {
|
public void onSuccess(ReceivedBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -397,7 +396,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -415,9 +414,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(PolygonTaskBean.class)
|
.cls(PolygonTaskBean.class)
|
||||||
.callback(new Callback<PolygonTaskBean>() {
|
.getRequest(new Callback<PolygonTaskBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PolygonTaskBean response, int id) {
|
public void onSuccess(PolygonTaskBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -475,7 +473,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,9 +490,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(UnPolygonTaskBean.class)
|
.cls(UnPolygonTaskBean.class)
|
||||||
.callback(new Callback<UnPolygonTaskBean>() {
|
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -525,7 +522,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -542,9 +539,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(UnPolygonTaskBean.class)
|
.cls(UnPolygonTaskBean.class)
|
||||||
.callback(new Callback<UnPolygonTaskBean>() {
|
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -575,7 +571,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -591,10 +587,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url)
|
.url(url)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.params(new HttpParams("id", String.valueOf(taskId)))
|
.params(new HttpParams("id", String.valueOf(taskId)))
|
||||||
.cls(UnPolygonTaskBean.class)
|
.cls(UnPolygonTaskBean.class)
|
||||||
.callback(new Callback<UnPolygonTaskBean>() {
|
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -625,7 +620,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,9 +634,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(ReceivedPoiBean.class)
|
.cls(ReceivedPoiBean.class)
|
||||||
.callback(new Callback<ReceivedPoiBean>() {
|
.getRequest(new Callback<ReceivedPoiBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ReceivedPoiBean response, int id) {
|
public void onSuccess(ReceivedPoiBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -721,7 +715,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -748,9 +742,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(url + "/" + taskId)
|
.url(url + "/" + taskId)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskByNetBean.class)
|
.cls(TaskByNetBean.class)
|
||||||
.callback(new Callback<TaskByNetBean>() {
|
.getRequest(new Callback<TaskByNetBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskByNetBean response, int id) {
|
public void onSuccess(TaskByNetBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -833,7 +826,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,10 +107,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -129,7 +128,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initChaningSubMitWork() {
|
private void initChaningSubMitWork() {
|
||||||
@ -140,10 +139,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -162,7 +160,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRoadSubMitWork() {
|
private void initRoadSubMitWork() {
|
||||||
@ -173,10 +171,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -195,7 +192,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPoiVideoSubMitWork() {
|
private void initPoiVideoSubMitWork() {
|
||||||
@ -206,10 +203,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -228,7 +224,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPoiSubMitWork() {
|
private void initPoiSubMitWork() {
|
||||||
@ -239,10 +235,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -262,7 +257,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,10 +64,9 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTaskExplain)
|
.url(HttpInterface.listTaskExplain)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -81,7 +80,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,10 +92,9 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTask)
|
.url(HttpInterface.listTask)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -109,7 +108,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,9 +105,8 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PRICE)
|
.url(HttpInterface.GET_PRICE)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(GetPriceBean.class)
|
.cls(GetPriceBean.class)
|
||||||
.callback(new Callback<GetPriceBean>() {
|
.getRequest(new Callback<GetPriceBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPriceBean response, int id) {
|
public void onSuccess(GetPriceBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -123,7 +122,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
// Toast.makeText(getContext(), "获取失败"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "获取失败"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,41 +469,38 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGo
|
OkGoBuilder.getInstance()
|
||||||
// 请求方式和请求url
|
.Builder(getActivity())
|
||||||
.<PoiUploadBean>post(HttpInterface.OTHER_TASK_UPLOAD_PIC)
|
.url(HttpInterface.OTHER_TASK_UPLOAD_PIC)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
.fileList(otherUploadList)
|
||||||
.params("auditId", body)
|
.cls(PoiUploadBean.class)
|
||||||
.addFileParams("file", otherUploadList)
|
.postFileAsynchronous(body, new Callback<PoiUploadBean>() {
|
||||||
.tag(this)
|
@Override
|
||||||
.execute(new DialogCallback<PoiUploadBean>(PoiUploadBean.class) {
|
public void onSuccess(PoiUploadBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<PoiUploadBean> poiUploadBeanResponse) {
|
public void run() {
|
||||||
dismissLoadingDialog();
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
new Thread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
getActivity().onBackPressed();//回退
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
getActivity().onBackPressed();//回退
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}).start();
|
});
|
||||||
}
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<PoiUploadBean> poiUploadBeanResponse) {
|
public void onError(Throwable e, int id) {
|
||||||
super.onError(poiUploadBeanResponse);
|
dismissLoadingDialog();
|
||||||
dismissLoadingDialog();
|
Toast.makeText(getActivity(), e.getMessage()+ "", Toast.LENGTH_SHORT).show();
|
||||||
Toast.makeText(getActivity(), poiUploadBeanResponse.code() + "", Toast.LENGTH_SHORT).show();
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
Log.d("TAG", "onError: " + poiUploadBeanResponse.code() + "");
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -519,10 +516,9 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.SUBMIT_OTHER_TASK)
|
.url(HttpInterface.SUBMIT_OTHER_TASK)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(PoiSaveBean.class)
|
.cls(PoiSaveBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<PoiSaveBean>() {
|
.getRequest(new Callback<PoiSaveBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -554,7 +550,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,9 +325,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
if (showPoiEntity.getTaskStatus()==1||showPoiEntity.getTaskStatus()==5){
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
tvExamine.setVisibility(View.GONE);
|
tvExamine.setVisibility(View.GONE);
|
||||||
}else {
|
} else {
|
||||||
tvExamine.setVisibility(View.VISIBLE);
|
tvExamine.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
@ -345,7 +345,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
latLng.setLatitude(Double.parseDouble(y));
|
latLng.setLatitude(Double.parseDouble(y));
|
||||||
latLng.setLongitude(Double.parseDouble(x));
|
latLng.setLongitude(Double.parseDouble(x));
|
||||||
}
|
}
|
||||||
//得到区号
|
//得到区号
|
||||||
initPhone();
|
initPhone();
|
||||||
String memo = showPoiEntity.getMemo();//任务描述
|
String memo = showPoiEntity.getMemo();//任务描述
|
||||||
if (memo != null && !memo.equals("")) {
|
if (memo != null && !memo.equals("")) {
|
||||||
@ -448,16 +448,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PHONES)
|
.url(HttpInterface.GET_PHONES)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.params(new HttpParams("geo", encode))
|
.params(new HttpParams("geo", encode))
|
||||||
.cls(GetPhoneBean.class)
|
.cls(GetPhoneBean.class)
|
||||||
.callback(new Callback<GetPhoneBean>() {
|
.getRequest(new Callback<GetPhoneBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (getPhoneBean.getCode() == 200) {
|
if (getPhoneBean.getCode() == 200) {
|
||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
// Toast.makeText(getActivity(), code+"", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), code+"", Toast.LENGTH_SHORT).show();
|
||||||
Constant.CODE = code;
|
Constant.CODE = code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -467,7 +466,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,10 +604,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.TASK_NAME)
|
.url(HttpInterface.TASK_NAME)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskNameBean.class)
|
.cls(TaskNameBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskNameBean>() {
|
.getRequest(new Callback<TaskNameBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -622,7 +620,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,41 +738,36 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGo
|
OkGoBuilder.getInstance()
|
||||||
// 请求方式和请求url
|
.url(HttpInterface.POI_TASK_UPLOAD_PIC)
|
||||||
.<OtherUploadPicBean>post(HttpInterface.POI_TASK_UPLOAD_PIC)
|
.cls(OtherUploadPicBean.class)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
.fileList(poiPicList)
|
||||||
.params("auditId", body)
|
.postFileAsynchronous(body, new Callback<OtherUploadPicBean>() {
|
||||||
.addFileParams("file", poiPicList)
|
@Override
|
||||||
.tag(this)
|
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||||
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
dismissLoadingDialog();
|
||||||
|
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
public void run() {
|
||||||
dismissLoadingDialog();
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
new Thread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
getActivity().onBackPressed();//回退
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
getActivity().onBackPressed();//回退
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}).start();
|
});
|
||||||
}
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<OtherUploadPicBean> response) {
|
public void onError(Throwable e, int id) {
|
||||||
super.onError(response);
|
dismissLoadingDialog();
|
||||||
dismissLoadingDialog();
|
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||||
Toast.makeText(getActivity(), response.message() + "", Toast.LENGTH_SHORT).show();
|
}
|
||||||
Log.d("TAG", "onError: " + response.message() + "");
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -792,10 +785,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.SUBMIT_POI_TASK)
|
.url(HttpInterface.SUBMIT_POI_TASK)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(PoiSaveBean.class)
|
.cls(PoiSaveBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<PoiSaveBean>() {
|
.getRequest(new Callback<PoiSaveBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
public void onSuccess(PoiSaveBean poiSaveBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -827,7 +819,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1036,8 +1028,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity != null ) {
|
if (poiDaoPoiEntity != null) {
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==5){
|
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,10 +112,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_COMMIT_LIST)
|
.url(HttpInterface.GET_COMMIT_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(HasSubmitBean.class)
|
.cls(HasSubmitBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<HasSubmitBean>() {
|
.getRequest(new Callback<HasSubmitBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -132,7 +131,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请求失败", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,16 +441,17 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
Toast.makeText(getActivity(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OkGo
|
HttpParams httpParams = new HttpParams();
|
||||||
// 请求方式和请求url
|
httpParams.put("auditId", poiVideoBody);
|
||||||
.<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
httpParams.put("file", fileZip);
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
OkGoBuilder.getInstance()
|
||||||
.params("auditId", poiVideoBody)
|
.Builder(getActivity())
|
||||||
.params("file", fileZip)
|
.url(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||||
.tag(this)
|
.cls(OtherUploadPicBean.class)
|
||||||
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
.params(httpParams)
|
||||||
|
.postRequest(new Callback<OtherUploadPicBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -466,15 +467,13 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<OtherUploadPicBean> response) {
|
public void onError(Throwable e, int id) {
|
||||||
super.onError(response);
|
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "上传失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "上传失败", Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + response.message() + "");
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
@ -491,10 +490,9 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.INSIDE_API_LIST)
|
.url(HttpInterface.INSIDE_API_LIST)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(PoiVideoBean.class)
|
.cls(PoiVideoBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<PoiVideoBean>() {
|
.getRequest(new Callback<PoiVideoBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -531,7 +529,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,23 +421,23 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Toast.makeText(getContext(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OkGo
|
HttpParams httpParams = new HttpParams();
|
||||||
// 请求方式和请求url
|
httpParams.put("auditId", body);
|
||||||
.<OtherUploadPicBean>post(HttpInterface.ROAD_TASK_UPLOAD_PIC)
|
httpParams.put("file", fileZip);
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
OkGoBuilder.getInstance()
|
||||||
.params("auditId", body)
|
.Builder(getActivity())
|
||||||
.params("file", fileZip)
|
.url(HttpInterface.ROAD_TASK_UPLOAD_PIC)
|
||||||
.tag(this)
|
.params(httpParams)
|
||||||
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
.cls(OtherUploadPicBean.class)
|
||||||
|
.postRequest(new Callback<OtherUploadPicBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -447,15 +447,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Response<OtherUploadPicBean> response) {
|
public void onError(Throwable e, int id) {
|
||||||
super.onError(response);
|
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getContext(), "上传失败", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "上传失败", Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + response.code() + "");
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
@ -472,10 +470,9 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.ROAD_TASK_SUBMIT)
|
.url(HttpInterface.ROAD_TASK_SUBMIT)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(RoadSaveBean.class)
|
.cls(RoadSaveBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<RoadSaveBean>() {
|
.getRequest(new Callback<RoadSaveBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(RoadSaveBean roadSaveBean, int id) {
|
public void onSuccess(RoadSaveBean roadSaveBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -513,7 +510,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,10 +103,9 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTaskExplain)
|
.url(HttpInterface.listTaskExplain)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -120,7 +119,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,9 +97,8 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTaskExplain)
|
.url(HttpInterface.listTaskExplain)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskExplainInfo.class)
|
.cls(TaskExplainInfo.class)
|
||||||
.callback(new Callback<TaskExplainInfo>() {
|
.getRequest(new Callback<TaskExplainInfo>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskExplainInfo response, int id) {
|
public void onSuccess(TaskExplainInfo response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -113,7 +112,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,10 +104,9 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTask)
|
.url(HttpInterface.listTask)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(TaskPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskPrefectureBean>() {
|
.getRequest(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -121,7 +120,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ import com.kongzue.dialog.util.DialogSettings;
|
|||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.kongzue.dialog.v3.ShareDialog;
|
import com.kongzue.dialog.v3.ShareDialog;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Response;
|
import com.lzy.okgo.model.Response;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
@ -46,8 +47,10 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
|||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.JobSearchBean;
|
import com.navinfo.outdoor.bean.JobSearchBean;
|
||||||
import com.navinfo.outdoor.bean.RoadExtend;
|
import com.navinfo.outdoor.bean.RoadExtend;
|
||||||
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
import com.navinfo.outdoor.http.DialogCallback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
||||||
import com.navinfo.outdoor.room.PoiDao;
|
import com.navinfo.outdoor.room.PoiDao;
|
||||||
@ -318,7 +321,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
int task_type = Constant.TASK_TYPE;
|
int task_type = Constant.TASK_TYPE;
|
||||||
int limit_type = Constant.LIMIT_TTPE;
|
int limit_type = Constant.LIMIT_TTPE;
|
||||||
int taskStatus = Constant.TASK_STASTUS;
|
int taskStatus = Constant.TASK_STASTUS;
|
||||||
if (taskStatus == 1 || taskStatus == 2 || taskStatus == 3 || taskStatus == 4) {
|
if (taskStatus == 1 || taskStatus == 2 || taskStatus == 3) {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||||
obtain.obj = null;
|
obtain.obj = null;
|
||||||
@ -335,6 +338,154 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
OkGo.getInstance().cancelTag(this);
|
OkGo.getInstance().cancelTag(this);
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
httpParams.put("userGeo", userEncode);
|
||||||
|
httpParams.put("centerGeo", centerEncode);
|
||||||
|
httpParams.put("date", date);
|
||||||
|
httpParams.put("pageSize", Constant.NUMBER);
|
||||||
|
httpParams.put("pageNum", "1");
|
||||||
|
httpParams.put("type", task_type);
|
||||||
|
httpParams.put("isExclusive", limit_type);
|
||||||
|
OkGoBuilder.getInstance()
|
||||||
|
.Builder(getActivity())
|
||||||
|
.url(HttpInterface.TASK_LIST)
|
||||||
|
.cls(JobSearchBean.class)
|
||||||
|
.params(httpParams)
|
||||||
|
.getRequest(new Callback<JobSearchBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(JobSearchBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Log.d("TAG", "onSuccess: " + response.getBody().toString() + "sssssssssssss");
|
||||||
|
for (int i = 0; i < removables.size(); i++) {
|
||||||
|
removables.get(i).remove();
|
||||||
|
}
|
||||||
|
removables.clear();
|
||||||
|
List<JobSearchBean.BodyBean.ListBean> list = response.getBody().getList();
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
JobSearchBean.BodyBean.ListBean listBean = list.get(i);
|
||||||
|
String geo = list.get(i).getGeo();
|
||||||
|
Log.d("TAG", "onSuccess: " + geo);
|
||||||
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
|
LatLng latLng = null;
|
||||||
|
if (geometry.getGeometryType().equals("Point")) {//点
|
||||||
|
latLng = GeometryTools.createLatLng(geo);
|
||||||
|
} else if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
|
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
|
||||||
|
// 构造 PolylineOpitons
|
||||||
|
PolylineOptions polylineOptions = new PolylineOptions()
|
||||||
|
.addAll(latLineString)
|
||||||
|
// 折线设置圆形线头
|
||||||
|
.lineCap(true)
|
||||||
|
// 折线的颜色为绿色
|
||||||
|
.color(0xff00ff00)
|
||||||
|
// 折线宽度为5像素
|
||||||
|
.width(5)
|
||||||
|
// 还可以添加描边颜色
|
||||||
|
.borderColor(0xffff0000)
|
||||||
|
// 描边颜色的宽度,线宽还是 25 像素,不过填充的部分宽度为 `width` - 2 * `borderWidth`
|
||||||
|
.borderWidth(1);
|
||||||
|
// 绘制折线
|
||||||
|
Polyline polyline = tencentMap.addPolyline(polylineOptions);
|
||||||
|
polyline.setZIndex(3);
|
||||||
|
removables.add(polyline);
|
||||||
|
if (latLineString != null && latLineString.size() > 0) {
|
||||||
|
latLng = latLineString.get(0);
|
||||||
|
}
|
||||||
|
} else if (geometry.getGeometryType().equals("Polygon")) {//面
|
||||||
|
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
|
||||||
|
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
|
||||||
|
//连接封闭图形的点
|
||||||
|
addAll(latPolygon).
|
||||||
|
//填充颜色为红色
|
||||||
|
fillColor(Color.parseColor("#97E0E7EC")).
|
||||||
|
//边线颜色为黑色
|
||||||
|
strokeColor(0xff000000).
|
||||||
|
//边线宽度15像素
|
||||||
|
strokeWidth(5));
|
||||||
|
polygon.setZIndex(1);
|
||||||
|
removables.add(polygon);
|
||||||
|
if (latPolygon != null && latPolygon.size() > 0) {
|
||||||
|
latLng = latPolygon.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (Integer.valueOf(list.get(i).getType())) {
|
||||||
|
case 1://poi
|
||||||
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
|
||||||
|
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
poiMarker.setZIndex(2);
|
||||||
|
poiMarker.setTag(listBean);
|
||||||
|
removables.add(poiMarker);
|
||||||
|
poiMarker.setClickable(true);
|
||||||
|
break;
|
||||||
|
case 2://充电站
|
||||||
|
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg1);
|
||||||
|
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
stationMarker.setTag(listBean);
|
||||||
|
removables.add(stationMarker);
|
||||||
|
stationMarker.setClickable(true);
|
||||||
|
stationMarker.setZIndex(2);
|
||||||
|
break;
|
||||||
|
case 3://poi录像
|
||||||
|
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
|
||||||
|
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
poiVideoMarker.setTag(listBean);
|
||||||
|
removables.add(poiVideoMarker);
|
||||||
|
poiVideoMarker.setClickable(true);
|
||||||
|
poiVideoMarker.setZIndex(2);
|
||||||
|
break;
|
||||||
|
case 4://道路录像
|
||||||
|
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||||
|
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
roadMarker.setTag(listBean);
|
||||||
|
removables.add(roadMarker);
|
||||||
|
roadMarker.setClickable(true);
|
||||||
|
roadMarker.setZIndex(2);
|
||||||
|
break;
|
||||||
|
case 5://其他
|
||||||
|
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
|
||||||
|
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
otherMarker.setTag(listBean);
|
||||||
|
removables.add(otherMarker);
|
||||||
|
otherMarker.setClickable(true);
|
||||||
|
otherMarker.setZIndex(2);
|
||||||
|
break;
|
||||||
|
case 6://面状任务
|
||||||
|
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
||||||
|
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||||
|
.flat(true)
|
||||||
|
.clockwise(false));
|
||||||
|
Log.d("面状任务", "onSuccess: " + planarMarker);
|
||||||
|
planarMarker.setTag(listBean);
|
||||||
|
removables.add(planarMarker);
|
||||||
|
planarMarker.setClickable(true);
|
||||||
|
planarMarker.setZIndex(2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||||
|
obtain.obj = response;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Throwable e, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
OkGo.<JobSearchBean>get(HttpInterface.TASK_LIST)
|
OkGo.<JobSearchBean>get(HttpInterface.TASK_LIST)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
@ -480,7 +631,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: " + response.message() + "");
|
Log.d("TAG", "onError: " + response.message() + "");
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,6 +667,13 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
int taskStatus = Constant.TASK_STASTUS;
|
int taskStatus = Constant.TASK_STASTUS;
|
||||||
int type = Constant.TASK_TYPE;
|
int type = Constant.TASK_TYPE;
|
||||||
int limit = Constant.LIMIT_TTPE;
|
int limit = Constant.LIMIT_TTPE;
|
||||||
|
if (taskStatus==0){
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what = Constant.JOB_SEARCH_POI_WORD;
|
||||||
|
obtain.obj = null;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
return;
|
||||||
|
}
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -89,9 +89,8 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PRICE)
|
.url(HttpInterface.GET_PRICE)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(GetPriceBean.class)
|
.cls(GetPriceBean.class)
|
||||||
.callback(new Callback<GetPriceBean>() {
|
.getRequest(new Callback<GetPriceBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPriceBean response, int id) {
|
public void onSuccess(GetPriceBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -118,7 +117,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
// Toast.makeText(getContext(), "获取失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getContext(), "获取失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,10 +157,9 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.USER_PRICE_EXCHANGE)
|
.url(HttpInterface.USER_PRICE_EXCHANGE)
|
||||||
.method(OkGoBuilder.GET)
|
|
||||||
.cls(UserPriceExchangeBean.class)
|
.cls(UserPriceExchangeBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.callback(new Callback<UserPriceExchangeBean>() {
|
.getRequest(new Callback<UserPriceExchangeBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(UserPriceExchangeBean response, int id) {
|
public void onSuccess(UserPriceExchangeBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@ -175,7 +173,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
});
|
||||||
dismissDialog();
|
dismissDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,41 +6,26 @@ import com.lzy.okgo.OkGo;
|
|||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Response;
|
import com.lzy.okgo.model.Response;
|
||||||
import com.lzy.okgo.request.PostRequest;
|
import com.lzy.okgo.request.PostRequest;
|
||||||
|
import com.navinfo.outdoor.bean.PoiUploadBean;
|
||||||
import com.umeng.umcrash.UMCrash;
|
import com.umeng.umcrash.UMCrash;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作用:OKGO帮助类-建造者模式
|
* 作用:OKGO帮助类-建造者模式
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class OkGoBuilder<T> {
|
public class OkGoBuilder<T> {
|
||||||
/**
|
|
||||||
* get请求
|
|
||||||
*/
|
|
||||||
public static final int GET = 1;
|
|
||||||
/**
|
|
||||||
* post请求
|
|
||||||
*/
|
|
||||||
public static final int POST = 2;
|
|
||||||
/**
|
|
||||||
* post请求
|
|
||||||
*/
|
|
||||||
public static final int PSOTFILE = 3;
|
|
||||||
|
|
||||||
public static final int PSOTFILEALONE = 4;
|
|
||||||
|
|
||||||
private Activity activity;
|
private Activity activity;
|
||||||
/**
|
/**
|
||||||
* 请求网址
|
* 请求网址
|
||||||
*/
|
*/
|
||||||
private String url;
|
private String url;
|
||||||
private String file;
|
private String file;
|
||||||
private String pdf;
|
|
||||||
/**
|
/**
|
||||||
* 参数
|
* 参数
|
||||||
*/
|
*/
|
||||||
@ -50,13 +35,7 @@ public class OkGoBuilder<T> {
|
|||||||
* 实体类
|
* 实体类
|
||||||
*/
|
*/
|
||||||
private Class<T> clazz;
|
private Class<T> clazz;
|
||||||
/**
|
private List<File> files;
|
||||||
* 回调
|
|
||||||
*/
|
|
||||||
private Callback<T> callback;
|
|
||||||
|
|
||||||
private int methodType;
|
|
||||||
private ArrayList<File> list;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单列模式
|
* 单列模式
|
||||||
@ -99,64 +78,36 @@ public class OkGoBuilder<T> {
|
|||||||
this.file = file;
|
this.file = file;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public OkGoBuilder pdf(String pdf) {
|
|
||||||
this.pdf = pdf;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
public OkGoBuilder method(int methodType) {
|
|
||||||
this.methodType = methodType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public OkGoBuilder params(HttpParams params) {
|
public OkGoBuilder params(HttpParams params) {
|
||||||
this.params = params;
|
this.params = params;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OkGoBuilder list(ArrayList<File> list) {
|
public OkGoBuilder fileList(List<File> files) {
|
||||||
this.list = list;
|
this.files = files;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public OkGoBuilder json(String json) {
|
public OkGoBuilder json(String json) {
|
||||||
this.json = json;
|
this.json = json;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OkGoBuilder cls(Class<T> clazz) {
|
public OkGoBuilder cls(Class<T> clazz) {
|
||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OkGoBuilder callback(Callback<T> callback) {
|
|
||||||
this.callback = callback;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public OkGoBuilder build() {
|
|
||||||
switch (methodType) {
|
|
||||||
case 1:
|
|
||||||
getRequest();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
postRequest(json);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
postRequestFile();
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
postRequestAloneFile();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* post请求
|
* post异步请求
|
||||||
*/
|
*/
|
||||||
private void postRequest(String json) {
|
public void postRequest(Callback<T> callback) {
|
||||||
OkGo
|
OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<T>post(url)
|
.<T>post(url)
|
||||||
@ -185,16 +136,83 @@ public class OkGoBuilder<T> {
|
|||||||
* 友盟+
|
* 友盟+
|
||||||
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
||||||
*/
|
*/
|
||||||
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder"+throwable,"UmengException");
|
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder" + throwable, "UmengException");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get请求
|
* post 文件 同步请求
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @param id
|
||||||
*/
|
*/
|
||||||
private void getRequest() {
|
public okhttp3.Response postFileSynchronization(int id) {
|
||||||
|
try {
|
||||||
|
okhttp3.Response execute = OkGo
|
||||||
|
// 请求方式和请求url
|
||||||
|
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||||
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
|
.params("auditId", id)
|
||||||
|
.addFileParams("file", files)
|
||||||
|
.tag(this)
|
||||||
|
.execute();
|
||||||
|
return execute;
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* post 文件 异步请求
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @param id
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
public void postFileAsynchronous(int id, Callback callback) {
|
||||||
|
OkGo
|
||||||
|
// 请求方式和请求url
|
||||||
|
.<T>post(url)
|
||||||
|
.params("auditId", id)
|
||||||
|
.addFileParams("file", files)
|
||||||
|
// .upJson(json)
|
||||||
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
|
.tag(this)
|
||||||
|
// 设置当前请求的缓存key,建议每个不同功能的请求设置一个
|
||||||
|
// .cacheKey("cacheKey")
|
||||||
|
// 缓存模式,详细请看缓存介绍
|
||||||
|
// .cacheMode(CacheMode.DEFAULT)
|
||||||
|
.execute(new DialogCallback<T>(clazz) {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Response<T> response) {
|
||||||
|
callback.onSuccess(response.body(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Response<T> response) {
|
||||||
|
super.onError(response);
|
||||||
|
Throwable throwable = response.getException();
|
||||||
|
if (throwable != null) {
|
||||||
|
throwable.printStackTrace();
|
||||||
|
callback.onError(throwable, 2);
|
||||||
|
/**
|
||||||
|
* 友盟+
|
||||||
|
* 使用自定义错误,查看时请在错误列表页面选择【自定义异常】
|
||||||
|
*/
|
||||||
|
UMCrash.generateCustomLog("网络请求报错-位置:OKGOBuilder" + throwable, "UmengException");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get异步请求
|
||||||
|
*/
|
||||||
|
public void getRequest(Callback<T> callback) {
|
||||||
OkGo
|
OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<T>get(url)
|
.<T>get(url)
|
||||||
@ -222,60 +240,21 @@ public class OkGoBuilder<T> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* post 发送文件
|
* get同步请求
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
private void postRequestFile() {
|
public okhttp3.Response getSynchronization() {
|
||||||
PostRequest<T> request = OkGo.<T>post(url)
|
try {
|
||||||
.tag(this)
|
okhttp3.Response execute = OkGo.<String>get(HttpInterface.SUBMIT_CSTASK)
|
||||||
.params("param", json.toString());
|
.params(params)
|
||||||
if (list != null && list.size() > 0) {
|
.tag(this)
|
||||||
for (int i = 0; i < list.size(); i++) {
|
.execute();
|
||||||
request.params("file_" + i, list.get(i));
|
return execute;
|
||||||
}
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (pdf!=null){
|
return null;
|
||||||
request.params("pdf", new File(pdf));
|
|
||||||
}
|
|
||||||
request.execute(new DialogCallback<T>(clazz) {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Response<T> response) {
|
|
||||||
callback.onSuccess(response.body(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Response<T> response) {
|
|
||||||
super.onError(response);
|
|
||||||
Throwable throwable = response.getException();
|
|
||||||
if (throwable != null) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
callback.onError(throwable, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void postRequestAloneFile() {
|
|
||||||
PostRequest<T> request = OkGo.<T>post(url).tag(this)
|
|
||||||
.params("param", json.toString());
|
|
||||||
if (file!=null){
|
|
||||||
request.params("file", new File(file));
|
|
||||||
}
|
|
||||||
request.execute(new DialogCallback<T>(clazz) {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Response<T> response) {
|
|
||||||
callback.onSuccess(response.body(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Response<T> response) {
|
|
||||||
super.onError(response);
|
|
||||||
Throwable throwable = response.getException();
|
|
||||||
if (throwable != null) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
callback.onError(throwable, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,19 @@
|
|||||||
package com.navinfo.outdoor.util;
|
package com.navinfo.outdoor.util;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.github.lazylibrary.util.ZipUtil;
|
import com.github.lazylibrary.util.ZipUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
|
||||||
import com.hjq.permissions.Permission;
|
|
||||||
import com.hjq.permissions.XXPermissions;
|
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.bean.ChargingPileSaveBean;
|
import com.navinfo.outdoor.bean.ChargingPileSaveBean;
|
||||||
import com.navinfo.outdoor.bean.Info;
|
|
||||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||||
import com.navinfo.outdoor.bean.PoiUploadBean;
|
import com.navinfo.outdoor.bean.PoiUploadBean;
|
||||||
import com.navinfo.outdoor.fragment.ChargingStationFragment;
|
|
||||||
import com.navinfo.outdoor.http.Callback;
|
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
@ -76,7 +68,7 @@ public class PoiSaveUtils {
|
|||||||
if (saveChargingPileByChargingStation(poiEntity)) {
|
if (saveChargingPileByChargingStation(poiEntity)) {
|
||||||
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
if (savePoiNet(poiEntity) == 200) { // 网络保存成功
|
||||||
// 开始上传流程
|
// 开始上传流程
|
||||||
if (saveChargingPileUploadChargingStation(poiEntity)){
|
if (saveChargingPileUploadChargingStation(poiEntity)) {
|
||||||
uploadPoiNet(poiEntity);
|
uploadPoiNet(poiEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,10 +174,7 @@ public class PoiSaveUtils {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
okhttp3.Response execute = OkGo.<String>get(url)
|
Response execute = OkGoBuilder.getInstance().url(url).params(httpParams).getSynchronization();
|
||||||
.tag(PoiSaveUtils.this)
|
|
||||||
.params(httpParams)
|
|
||||||
.execute();
|
|
||||||
if (execute.code() != 200) {
|
if (execute.code() != 200) {
|
||||||
return execute.code();
|
return execute.code();
|
||||||
}
|
}
|
||||||
@ -245,8 +234,8 @@ public class PoiSaveUtils {
|
|||||||
}
|
}
|
||||||
ArrayList<File> photoFile = new ArrayList<>();
|
ArrayList<File> photoFile = new ArrayList<>();
|
||||||
photoFile.clear();
|
photoFile.clear();
|
||||||
if (poiEntity.getPhotoInfo()!=null) {
|
if (poiEntity.getPhotoInfo() != null) {
|
||||||
if (poiEntity.getPhotoInfo().size()>0){
|
if (poiEntity.getPhotoInfo().size() > 0) {
|
||||||
for (int i = 0; i < poiEntity.getPhotoInfo().size(); i++) {
|
for (int i = 0; i < poiEntity.getPhotoInfo().size(); i++) {
|
||||||
String photo = poiEntity.getPhotoInfo().get(i).getPhoto();
|
String photo = poiEntity.getPhotoInfo().get(i).getPhoto();
|
||||||
photoFile.add(new File(photo));
|
photoFile.add(new File(photo));
|
||||||
@ -276,12 +265,7 @@ public class PoiSaveUtils {
|
|||||||
url = HttpInterface.OTHER_TASK_UPLOAD_PIC;
|
url = HttpInterface.OTHER_TASK_UPLOAD_PIC;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Response execute = OkGo.post(url)
|
Response execute = OkGoBuilder.getInstance().url(url).fileList(photoFile).postFileSynchronization(bodyId);
|
||||||
.params("auditId", bodyId)
|
|
||||||
.addFileParams("file", photoFile)
|
|
||||||
.tag(PoiSaveUtils.this)
|
|
||||||
.execute();
|
|
||||||
|
|
||||||
if (execute.code() != 200) {
|
if (execute.code() != 200) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -294,10 +278,10 @@ public class PoiSaveUtils {
|
|||||||
if (otherUploadPicBean.getCode() == 200) {
|
if (otherUploadPicBean.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(mContext).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(mContext).getPoiDao().deletePoiEntity(poiEntity);
|
||||||
Log.d("TAGss", "uploadPoiNet: 成功");
|
Log.d("TAGss", "uploadPoiNet: 成功");
|
||||||
isBoolean=true;
|
isBoolean = true;
|
||||||
} else {
|
} else {
|
||||||
Log.d("TAGss", "uploadPoiNet: 失败");
|
Log.d("TAGss", "uploadPoiNet: 失败");
|
||||||
isBoolean=false;
|
isBoolean = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -347,7 +331,7 @@ public class PoiSaveUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d("TAGss", "saveChargingPileByChargingStation"+result);
|
Log.d("TAGss", "saveChargingPileByChargingStation" + result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,10 +353,7 @@ public class PoiSaveUtils {
|
|||||||
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
hashMap.put("sign_exist", chargingPileEntity.getSign_exist());
|
||||||
httpParams.put("detail", String.valueOf(hashMap));
|
httpParams.put("detail", String.valueOf(hashMap));
|
||||||
try {
|
try {
|
||||||
okhttp3.Response execute = OkGo.<String>get(HttpInterface.SUBMIT_CSTASK)
|
Response execute = OkGoBuilder.getInstance().url(HttpInterface.SUBMIT_CSTASK).params(httpParams).getSynchronization();
|
||||||
.params(httpParams)
|
|
||||||
.tag(PoiSaveUtils.this)
|
|
||||||
.execute();
|
|
||||||
if (execute.code() != 200) {
|
if (execute.code() != 200) {
|
||||||
return execute.code();
|
return execute.code();
|
||||||
}
|
}
|
||||||
@ -386,7 +367,7 @@ public class PoiSaveUtils {
|
|||||||
if (chargingPileSaveBean.getCode() != 200) {
|
if (chargingPileSaveBean.getCode() != 200) {
|
||||||
return chargingPileSaveBean.getCode();
|
return chargingPileSaveBean.getCode();
|
||||||
}
|
}
|
||||||
Log.d("TAGss", "saveChargingPile2NetWork"+200);
|
Log.d("TAGss", "saveChargingPile2NetWork" + 200);
|
||||||
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(mContext, chargingPileEntity); // 更新当前充电桩的bodyId
|
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(mContext, chargingPileEntity); // 更新当前充电桩的bodyId
|
||||||
}
|
}
|
||||||
@ -404,9 +385,9 @@ public class PoiSaveUtils {
|
|||||||
if (chargingStationPoiEntity != null) {
|
if (chargingStationPoiEntity != null) {
|
||||||
// 首先批量上传充电桩数据
|
// 首先批量上传充电桩数据
|
||||||
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(mContext).getChargingPileDao().getChargingPileByStationId(chargingStationPoiEntity.getId());
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(mContext).getChargingPileDao().getChargingPileByStationId(chargingStationPoiEntity.getId());
|
||||||
if (chargingPileEntityList!=null&&!chargingPileEntityList.isEmpty()) {
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
for (ChargingPileEntity chargingPileEntity: chargingPileEntityList) {
|
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
||||||
if (chargingPileEntity.getBodyId()!=0) {
|
if (chargingPileEntity.getBodyId() != 0) {
|
||||||
int pileResult = chargingPileUploadNetWork(chargingPileEntity);
|
int pileResult = chargingPileUploadNetWork(chargingPileEntity);
|
||||||
if (pileResult == 200) {
|
if (pileResult == 200) {
|
||||||
result = result & true;
|
result = result & true;
|
||||||
@ -417,34 +398,28 @@ public class PoiSaveUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.d("TAGss", "saveChargingPileUploadChargingStation"+result);
|
Log.d("TAGss", "saveChargingPileUploadChargingStation" + result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传充电桩数据到服务器
|
* 上传充电桩数据到服务器
|
||||||
* */
|
*/
|
||||||
private int chargingPileUploadNetWork(ChargingPileEntity chargingPileEntity) {
|
private int chargingPileUploadNetWork(ChargingPileEntity chargingPileEntity) {
|
||||||
if (chargingPileEntity==null|| chargingPileEntity.getBodyId() == 0) {
|
if (chargingPileEntity == null || chargingPileEntity.getBodyId() == 0) {
|
||||||
Toast.makeText(mContext, "没有保存本地", Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<File> chargingPileFileList = new ArrayList<>();
|
List<File> chargingPileFileList = new ArrayList<>();
|
||||||
if (chargingPileEntity.getPhotos()!=null&&!chargingPileEntity.getPhotos().isEmpty()) {
|
if (chargingPileEntity.getPhotos() != null && !chargingPileEntity.getPhotos().isEmpty()) {
|
||||||
for (String photoPath: chargingPileEntity.getPhotos()) {
|
for (String photoPath : chargingPileEntity.getPhotos()) {
|
||||||
chargingPileFileList.add(new File(photoPath));
|
chargingPileFileList.add(new File(photoPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
okhttp3.Response execute = OkGo
|
Response execute = OkGoBuilder.getInstance().url(HttpInterface.CS_TASK_UP_LOAD_PIC).fileList(chargingPileFileList).postFileSynchronization((int) chargingPileEntity.getBodyId());
|
||||||
// 请求方式和请求url
|
|
||||||
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
|
||||||
.params("auditId", chargingPileEntity.getBodyId())
|
|
||||||
.addFileParams("file", chargingPileFileList)
|
|
||||||
.tag(this)
|
|
||||||
.execute();
|
|
||||||
if (execute.code() != 200) {
|
if (execute.code() != 200) {
|
||||||
return execute.code();
|
return execute.code();
|
||||||
}
|
}
|
||||||
@ -456,7 +431,7 @@ public class PoiSaveUtils {
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||||
if (uploadBeanResult.getCode() == 200) {
|
if (uploadBeanResult.getCode() == 200) {
|
||||||
Log.d("TAGss", "chargingPileUploadNetWork"+200);
|
Log.d("TAGss", "chargingPileUploadNetWork" + 200);
|
||||||
PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_heightPercent="100%"
|
|
||||||
android:background="@drawable/bg"
|
android:background="@drawable/bg"
|
||||||
|
|
||||||
tools:context="activity.LoginActivity">
|
tools:context="activity.LoginActivity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user