新路交接口替换
This commit is contained in:
parent
f13815709d
commit
f5e24e2273
@ -1,5 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
||||||
|
|
||||||
|
import com.alct.mdp.model.Location;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,7 +14,7 @@ public class PickupBean implements Serializable {
|
|||||||
|
|
||||||
private String shipmentCode;
|
private String shipmentCode;
|
||||||
private String enterpriseCode;
|
private String enterpriseCode;
|
||||||
private LocationDTO location;
|
private Location location;
|
||||||
|
|
||||||
public String getShipmentCode() {
|
public String getShipmentCode() {
|
||||||
return shipmentCode;
|
return shipmentCode;
|
||||||
@ -30,11 +32,11 @@ public class PickupBean implements Serializable {
|
|||||||
this.enterpriseCode = enterpriseCode;
|
this.enterpriseCode = enterpriseCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocationDTO getLocation() {
|
public Location getLocation() {
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocation(LocationDTO location) {
|
public void setLocation(Location location) {
|
||||||
this.location = location;
|
this.location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
package com.arpa.hndahesudintocctmsdriver.request.bean.newlj;
|
||||||
|
|
||||||
|
import com.alct.mdp.model.Image;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,7 +14,7 @@ public class UpimgBean implements Serializable {
|
|||||||
|
|
||||||
private String shipmentCode;
|
private String shipmentCode;
|
||||||
private String enterpriseCode;
|
private String enterpriseCode;
|
||||||
private ImageDTO image;
|
private Image image;
|
||||||
|
|
||||||
public String getShipmentCode() {
|
public String getShipmentCode() {
|
||||||
return shipmentCode;
|
return shipmentCode;
|
||||||
@ -30,11 +32,11 @@ public class UpimgBean implements Serializable {
|
|||||||
this.enterpriseCode = enterpriseCode;
|
this.enterpriseCode = enterpriseCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageDTO getImage() {
|
public Image getImage() {
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImage(ImageDTO image) {
|
public void setImage(Image image) {
|
||||||
this.image = image;
|
this.image = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public class BaseObserver<T> implements Observer<CommonResponseBean<T>> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(CommonResponseBean<T> tCommonResponseBean) {
|
public void onNext(CommonResponseBean<T> tCommonResponseBean) {
|
||||||
if (200==tCommonResponseBean.getCode()) {
|
if (0==tCommonResponseBean.getCode()) {
|
||||||
mRxHttpCallBack.onSuccess(tCommonResponseBean);
|
mRxHttpCallBack.onSuccess(tCommonResponseBean);
|
||||||
} else {
|
} else {
|
||||||
mRxHttpCallBack.onCodeError(mContext, tCommonResponseBean);
|
mRxHttpCallBack.onCodeError(mContext, tCommonResponseBean);
|
||||||
|
@ -34,6 +34,7 @@ import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.NfcUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
import com.arpa.hndahesudintocctmsdriver.util.SPUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.alert.ToastUtil;
|
||||||
@ -42,6 +43,8 @@ import com.arpa.hndahesudintocctmsdriver.util.location.LocationUtil;
|
|||||||
import com.baidu.mapapi.model.LatLng;
|
import com.baidu.mapapi.model.LatLng;
|
||||||
import com.baidu.mapapi.utils.CoordinateConverter;
|
import com.baidu.mapapi.utils.CoordinateConverter;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.dahe.mylibrary.callback.OnGDDownloadResultListener;
|
||||||
|
import com.dahe.mylibrary.callback.OnGDResultListener;
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -456,29 +459,52 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--装货信息", gson.toJson(lub));
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
if (locationKey) {//高德定位
|
if (locationKey) {//高德定位
|
||||||
if (keys) {
|
if (keys) {
|
||||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Object o) {
|
|
||||||
|
|
||||||
String string = o.toString();
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
if (string.equals("PICKUPED")) {//安联装货,单平台未装货
|
@Override
|
||||||
|
public void onSuccess(String var1) {
|
||||||
|
String string = var1;
|
||||||
|
if (string.equals("30")) {//安联装货,单平台未装货
|
||||||
isFinish = true;
|
isFinish = true;
|
||||||
//平台确认装货
|
//平台确认装货
|
||||||
hyr.loading(lub);
|
hyr.loading(lub);
|
||||||
} else {
|
} else {
|
||||||
nfc();
|
// nfc();
|
||||||
loadInfo();
|
loadInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
ToastUtils.showToast(con, s1);
|
ToastUtils.showToast(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess(Object o) {
|
||||||
|
//
|
||||||
|
// String string = o.toString();
|
||||||
|
// if (string.equals("PICKUPED")) {//安联装货,单平台未装货
|
||||||
|
// isFinish = true;
|
||||||
|
// //平台确认装货
|
||||||
|
// hyr.loading(lub);
|
||||||
|
// } else {
|
||||||
|
// nfc();
|
||||||
|
// loadInfo();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// ToastUtils.showToast(con, s1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
// nfc();
|
// nfc();
|
||||||
@ -511,10 +537,11 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--卸货信息", gson.toJson(lub));
|
Log.e("--卸货信息", gson.toJson(lub));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (keys) {
|
if (keys) {
|
||||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
|
||||||
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object o) {
|
public void onSuccess(String var1) {
|
||||||
if (o.toString().equals("UNLOADED")) {//安联装货,单平台未装货
|
if (var1.equals("40")) {//安联装货,单平台未装货
|
||||||
//卸货状态-平台
|
//卸货状态-平台
|
||||||
isFinish = true;
|
isFinish = true;
|
||||||
hyr.dischargeCargo(lub);
|
hyr.dischargeCargo(lub);
|
||||||
@ -525,14 +552,36 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
ToastUtils.showToast(con, s1);
|
ToastUtils.showToast(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess(Object o) {
|
||||||
|
// if (o.toString().equals("UNLOADED")) {//安联装货,单平台未装货
|
||||||
|
// //卸货状态-平台
|
||||||
|
// isFinish = true;
|
||||||
|
// hyr.dischargeCargo(lub);
|
||||||
|
// } else {
|
||||||
|
// nfc();
|
||||||
|
// uploadInfo();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// ToastUtils.showToast(con, s1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
// nfc();
|
// nfc();
|
||||||
// uploadInfo();
|
// uploadInfo();
|
||||||
@ -641,17 +690,29 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l, gs, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
NewLJUtils.getInstance().sign(con, sob.getData().getShippingNoteNumber(), l, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联", "签收成功");
|
Log.e("上报安联", "签收成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(签收):", s + s1);
|
Log.e("上报安联失败(签收):", var1 + var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.sign(con, sob.getData().getShippingNoteNumber(), l, gs, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// Log.e("上报安联", "签收成功");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(签收):", s + s1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
//上传安联-回单
|
//上传安联-回单
|
||||||
@ -662,19 +723,31 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
l.setBaiduLatitude(latLng.latitude);
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lgdu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
|
||||||
|
NewLJUtils.getInstance().pod(con, sob.getData().getShippingNoteNumber(), l, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联", "回单上传成功");
|
Log.e("上报安联", "回单上传成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(回单):", s + s1);
|
Log.e("上报安联失败(回单):", var1 + var2);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// Log.e("上报安联", "回单上传成功");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(回单):", s + s1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void up_image_z() {
|
public void up_image_z() {
|
||||||
@ -689,8 +762,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setBaiduLongitude(latLng.longitude);
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(latLng.latitude);
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lgdu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
|
||||||
|
NewLJUtils.getInstance().uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
@ -703,15 +776,34 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(装货照片):", s + s1);
|
Log.e("上报安联失败(装货照片):", var1 + var2);
|
||||||
// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
|
||||||
// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
|
||||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
|
||||||
// startService(serviceIn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
// Log.e("上报安联", "装货照片上传成功");
|
||||||
|
// Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
// finish();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(装货照片):", s + s1);
|
||||||
|
//// SPUtil.insSP(con,"make","装货",sob.getData().getShippingNoteNumber());
|
||||||
|
//// SPUtil.insSP(con,"make","装货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
//// startService(serviceIn);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void up_image() {
|
public void up_image() {
|
||||||
@ -725,8 +817,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setBaiduLongitude(latLng.longitude);
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(latLng.latitude);
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lgdu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
|
||||||
|
NewLJUtils.getInstance().uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
@ -739,18 +831,39 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(卸货照片):", s + s1);
|
Log.e("上报安联失败(卸货照片):", var1 + var2);
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
|
||||||
// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
|
||||||
// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
|
||||||
// startService(serviceIn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
// Log.e("上报安联", "卸货照片上传成功");
|
||||||
|
// Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
// finish();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(卸货照片):", s + s1);
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
//// SPUtil.insSP(con,"make","卸货",sob.getData().getShippingNoteNumber());
|
||||||
|
//// SPUtil.insSP(con,"make","卸货-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
//// startService(serviceIn);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
public void receipt_image() {
|
public void receipt_image() {
|
||||||
@ -765,8 +878,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
image.setBaiduLongitude(latLng.longitude);
|
image.setBaiduLongitude(latLng.longitude);
|
||||||
image.setBaiduLatitude(latLng.latitude);
|
image.setBaiduLatitude(latLng.latitude);
|
||||||
image.setLocation(lgdu.getAddress());
|
image.setLocation(lgdu.getAddress());
|
||||||
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
|
||||||
|
NewLJUtils.getInstance().uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
@ -780,15 +893,34 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(回单照片):", s + s1);
|
Log.e("上报安联失败(回单照片):", var1 + var2);
|
||||||
// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
|
||||||
//// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
|
||||||
//// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
|
||||||
//// startService(serviceIn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// SPUtils.remove(con, "curWaybillId");
|
||||||
|
// EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
// Log.e("上报安联", "回单照片上传成功");
|
||||||
|
// Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
// finish();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(回单照片):", s + s1);
|
||||||
|
//// SPUtil.insSP(con,"make","回单",sob.getData().getShippingNoteNumber());
|
||||||
|
////// SPUtil.insSP(con,"make","回单-"+sob.getData().getShippingNoteNumber(),gson.toJson(image));
|
||||||
|
////// Intent serviceIn=new Intent(con, MakeUpAlService.class);
|
||||||
|
////// startService(serviceIn);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -832,7 +964,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
l.setBaiduLatitude(latLng.latitude);
|
l.setBaiduLatitude(latLng.latitude);
|
||||||
l.setLocation(lgdu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
NewLJUtils.getInstance().pickUp(con, sob.getData().getShippingNoteNumber(), l, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联", "装货上传成功");
|
Log.e("上报安联", "装货上传成功");
|
||||||
@ -847,14 +980,39 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(装货):", s + s1);
|
Log.e("上报安联失败(装货):", var1 + var2);
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
new MessageUtils().showCenMessage(con, s1);
|
new MessageUtils().showCenMessage(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// Log.e("上报安联", "装货上传成功");
|
||||||
|
// //交通厅
|
||||||
|
// if (sob.getData().getReport() == 1) {
|
||||||
|
// JTTProcess.start(con, sob, "");
|
||||||
|
// }
|
||||||
|
// //装货状态
|
||||||
|
// hyr.loading(lub);
|
||||||
|
// //装货照片
|
||||||
|
// up_image_z();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(装货):", s + s1);
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// new MessageUtils().showCenMessage(con, s1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -872,7 +1030,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
l.setLocation(lgdu.getAddress());
|
l.setLocation(lgdu.getAddress());
|
||||||
l.setTime(Timer.getTimerT());
|
l.setTime(Timer.getTimerT());
|
||||||
Log.e("-安联卸货信息-", gson.toJson(l));
|
Log.e("-安联卸货信息-", gson.toJson(l));
|
||||||
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
|
||||||
|
NewLJUtils.getInstance().unload(con, sob.getData().getShippingNoteNumber(), l, new OnGDResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
Log.e("上报安联", "卸货上传成功");
|
Log.e("上报安联", "卸货上传成功");
|
||||||
@ -887,14 +1046,37 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(String s, String s1) {
|
public void onFailure(String var1, String var2) {
|
||||||
Log.e("上报安联失败(卸货):", s + s1);
|
Log.e("上报安联失败(卸货):", var1 + var2);
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
customDialog.dismiss();
|
customDialog.dismiss();
|
||||||
}
|
}
|
||||||
new MessageUtils().showCenMessage(con, s1);
|
new MessageUtils().showCenMessage(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new com.alct.mdp.callback.OnResultListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onSuccess() {
|
||||||
|
// Log.e("上报安联", "卸货上传成功");
|
||||||
|
// //交通厅
|
||||||
|
// if (sob.getData().getReport() == 1) {
|
||||||
|
// JTTProcess.stop(con, sob, "");
|
||||||
|
// }
|
||||||
|
// //卸货状态-平台
|
||||||
|
// hyr.dischargeCargo(lub);
|
||||||
|
// //卸货照片-安联
|
||||||
|
// up_image();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFailure(String s, String s1) {
|
||||||
|
// Log.e("上报安联失败(卸货):", s + s1);
|
||||||
|
// if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
// customDialog.dismiss();
|
||||||
|
// }
|
||||||
|
// new MessageUtils().showCenMessage(con, s1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.StartOrderParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
import com.arpa.hndahesudintocctmsdriver.parts.UserParts;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.business.BusinessActivity;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.NewLJUtils;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
import com.arpa.hndahesudintocctmsdriver.util.PicturlUtil;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -235,6 +236,7 @@ public class MyFragment extends BaseFragment {
|
|||||||
});
|
});
|
||||||
//联系我们
|
//联系我们
|
||||||
onContact.setOnClickListener(v -> {
|
onContact.setOnClickListener(v -> {
|
||||||
|
NewLJUtils.getInstance().getToken(con);
|
||||||
String serviceMobile = "";
|
String serviceMobile = "";
|
||||||
if (ConfigParts.getConfigParts(con) != null) {
|
if (ConfigParts.getConfigParts(con) != null) {
|
||||||
serviceMobile = ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
serviceMobile = ConfigParts.getConfigParts(con).getData().getServiceMobile();
|
||||||
|
@ -5,6 +5,8 @@ import static com.dahe.mylibrary.utils.BaseSPUtils.NEW_LJ_TOKEN;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.alct.mdp.model.Image;
|
||||||
|
import com.alct.mdp.model.Location;
|
||||||
import com.arpa.hndahesudintocctmsdriver.constant.NewLJConstant;
|
import com.arpa.hndahesudintocctmsdriver.constant.NewLJConstant;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.InvoiceBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.InvoiceBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.LjTokenBean;
|
import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.LjTokenBean;
|
||||||
@ -14,6 +16,9 @@ import com.arpa.hndahesudintocctmsdriver.request.bean.newlj.UpimgBean;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.request.net.BaseObserver;
|
import com.arpa.hndahesudintocctmsdriver.request.net.BaseObserver;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.net.DataManager;
|
import com.arpa.hndahesudintocctmsdriver.request.net.DataManager;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.net.RxHttpCallBack;
|
import com.arpa.hndahesudintocctmsdriver.request.net.RxHttpCallBack;
|
||||||
|
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||||
|
import com.dahe.mylibrary.callback.OnGDDownloadResultListener;
|
||||||
|
import com.dahe.mylibrary.callback.OnGDResultListener;
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||||
import com.dahe.mylibrary.utils.TimeUtil;
|
import com.dahe.mylibrary.utils.TimeUtil;
|
||||||
import com.dahe.mylibrary.utils.ToastUtils;
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
@ -69,7 +74,7 @@ public class NewLJUtils {
|
|||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param location
|
* @param location
|
||||||
*/
|
*/
|
||||||
public void pickUp(Context ctx, String shipmentCode, PickupBean.LocationDTO location) {
|
public void pickUp(Context ctx, String shipmentCode, Location location, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -79,8 +84,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "经纬度不能为空");
|
ToastUtils.showToast(ctx, "经纬度不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
location.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
PickupBean pickupBean = new PickupBean();
|
PickupBean pickupBean = new PickupBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
pickupBean.setEnterpriseCode(NewLJConstant.ENTER_PRISE_CODE);
|
pickupBean.setEnterpriseCode(NewLJConstant.ENTER_PRISE_CODE);
|
||||||
@ -91,7 +94,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -104,7 +117,7 @@ public class NewLJUtils {
|
|||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param location
|
* @param location
|
||||||
*/
|
*/
|
||||||
public void unload(Context ctx, String shipmentCode, PickupBean.LocationDTO location) {
|
public void unload(Context ctx, String shipmentCode, Location location, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -114,7 +127,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "经纬度不能为空");
|
ToastUtils.showToast(ctx, "经纬度不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
location.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
PickupBean pickupBean = new PickupBean();
|
PickupBean pickupBean = new PickupBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -127,7 +139,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -135,11 +157,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单签收
|
* 运单签收
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param location
|
* @param location
|
||||||
*/
|
*/
|
||||||
public void sign(Context ctx, String shipmentCode, PickupBean.LocationDTO location) {
|
public void sign(Context ctx, String shipmentCode, Location location, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -149,7 +172,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "经纬度不能为空");
|
ToastUtils.showToast(ctx, "经纬度不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
location.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
PickupBean pickupBean = new PickupBean();
|
PickupBean pickupBean = new PickupBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -162,7 +184,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -170,11 +202,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单回单
|
* 运单回单
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param location
|
* @param location
|
||||||
*/
|
*/
|
||||||
public void pod(Context ctx, String shipmentCode, PickupBean.LocationDTO location) {
|
public void pod(Context ctx, String shipmentCode, Location location, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -184,7 +217,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "经纬度不能为空");
|
ToastUtils.showToast(ctx, "经纬度不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
location.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
PickupBean pickupBean = new PickupBean();
|
PickupBean pickupBean = new PickupBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -197,7 +229,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -205,11 +247,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单提货照片上传
|
* 运单提货照片上传
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param imageDTO
|
* @param imageDTO
|
||||||
*/
|
*/
|
||||||
public void uploadPickupImage(Context ctx, String shipmentCode, UpimgBean.ImageDTO imageDTO) {
|
public void uploadPickupImage(Context ctx, String shipmentCode, Image imageDTO, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -219,7 +262,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "照片不能为空");
|
ToastUtils.showToast(ctx, "照片不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
imageDTO.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
UpimgBean pickupBean = new UpimgBean();
|
UpimgBean pickupBean = new UpimgBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -232,7 +274,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -240,11 +292,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单卸货照片上传
|
* 运单卸货照片上传
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param imageDTO
|
* @param imageDTO
|
||||||
*/
|
*/
|
||||||
public void uploadUnloadImage(Context ctx, String shipmentCode, UpimgBean.ImageDTO imageDTO) {
|
public void uploadUnloadImage(Context ctx, String shipmentCode, Image imageDTO, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -254,7 +307,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "照片不能为空");
|
ToastUtils.showToast(ctx, "照片不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
imageDTO.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
UpimgBean pickupBean = new UpimgBean();
|
UpimgBean pickupBean = new UpimgBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -267,7 +319,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -275,11 +337,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单回单照片上传
|
* 运单回单照片上传
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param imageDTO
|
* @param imageDTO
|
||||||
*/
|
*/
|
||||||
public void uploadPODImage(Context ctx, String shipmentCode, UpimgBean.ImageDTO imageDTO) {
|
public void uploadPODImage(Context ctx, String shipmentCode, Image imageDTO, OnGDResultListener listener) {
|
||||||
if (TextUtils.isEmpty(shipmentCode)) {
|
if (TextUtils.isEmpty(shipmentCode)) {
|
||||||
ToastUtils.showToast(ctx, "运单号不能为空");
|
ToastUtils.showToast(ctx, "运单号不能为空");
|
||||||
return;
|
return;
|
||||||
@ -289,7 +352,6 @@ public class NewLJUtils {
|
|||||||
ToastUtils.showToast(ctx, "照片不能为空");
|
ToastUtils.showToast(ctx, "照片不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
imageDTO.setTime(TimeUtil.getNowString(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.getDefault())));
|
|
||||||
|
|
||||||
UpimgBean pickupBean = new UpimgBean();
|
UpimgBean pickupBean = new UpimgBean();
|
||||||
pickupBean.setShipmentCode(shipmentCode);
|
pickupBean.setShipmentCode(shipmentCode);
|
||||||
@ -302,7 +364,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -310,11 +382,12 @@ public class NewLJUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 同意发票申请
|
* 同意发票申请
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param invoiceBean
|
* @param invoiceBean
|
||||||
*/
|
*/
|
||||||
public void confirmInvoice(Context ctx, String shipmentCode, InvoiceBean invoiceBean) {
|
public void confirmInvoice(Context ctx, String shipmentCode, InvoiceBean invoiceBean, OnGDResultListener listener) {
|
||||||
|
|
||||||
DataManager.getInstance().confirmInvoice(invoiceBean)
|
DataManager.getInstance().confirmInvoice(invoiceBean)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@ -323,21 +396,32 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运单状态查询
|
* 运单状态查询
|
||||||
|
*
|
||||||
* @param ctx
|
* @param ctx
|
||||||
* @param shipmentCode
|
* @param shipmentCode
|
||||||
* @param shipmentStatusBean
|
|
||||||
*/
|
*/
|
||||||
public void getShipmentStatus(Context ctx, String shipmentCode, ShipmentStatusBean shipmentStatusBean) {
|
public void getShipmentStatus(Context ctx, String shipmentCode, OnGDDownloadResultListener listener) {
|
||||||
|
ShipmentStatusBean shipmentStatusBean = new ShipmentStatusBean();
|
||||||
|
shipmentStatusBean.setShipmentCode(shipmentCode);
|
||||||
|
shipmentStatusBean.setEnterpriseCode(NewLJConstant.ENTER_PRISE_CODE);
|
||||||
DataManager.getInstance().getShipmentStatus(shipmentStatusBean)
|
DataManager.getInstance().getShipmentStatus(shipmentStatusBean)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
@ -345,7 +429,17 @@ public class NewLJUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(CommonResponseBean t) {
|
public void onSuccess(CommonResponseBean t) {
|
||||||
super.onSuccess(t);
|
super.onSuccess(t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onSuccess(t.getStatusCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCodeError(Context mContext, CommonResponseBean<CommonResponseBean> t) {
|
||||||
|
super.onCodeError(mContext, t);
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onFailure(t.getCode() + "", t.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.dahe.mylibrary.callback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName OnGDDownloadResultListener
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/11/25 18:22
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface OnGDDownloadResultListener {
|
||||||
|
void onSuccess(String var1);
|
||||||
|
|
||||||
|
void onFailure(String var1, String var2);
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.dahe.mylibrary.callback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName OnGDResultListener
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/11/25 17:48
|
||||||
|
* @Description TODO
|
||||||
|
*/
|
||||||
|
public interface OnGDResultListener {
|
||||||
|
|
||||||
|
void onSuccess();
|
||||||
|
|
||||||
|
void onFailure(String var1, String var2);
|
||||||
|
}
|
@ -11,12 +11,30 @@ public class CommonResponseBean<T> implements Serializable {
|
|||||||
private int code;
|
private int code;
|
||||||
private String info;
|
private String info;
|
||||||
private String msg;
|
private String msg;
|
||||||
|
private String message;
|
||||||
private String url;
|
private String url;
|
||||||
private String fileName;
|
private String fileName;
|
||||||
private String token;
|
private String token;
|
||||||
private String expiryIn;
|
private String expiryIn;
|
||||||
|
private String statusCode;
|
||||||
private boolean success;
|
private boolean success;
|
||||||
|
|
||||||
|
public String getStatusCode() {
|
||||||
|
return statusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatusCode(String statusCode) {
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
public String getToken() {
|
public String getToken() {
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user