装卸货状态不一致处理
This commit is contained in:
parent
873e0b81cf
commit
a2be579ae9
@ -15,16 +15,16 @@ import android.widget.Toast;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.alct.mdp.MDPLocationCollectionManager;
|
import com.alct.mdp.MDPLocationCollectionManager;
|
||||||
|
import com.alct.mdp.callback.OnDownloadResultListener;
|
||||||
import com.alct.mdp.callback.OnResultListener;
|
import com.alct.mdp.callback.OnResultListener;
|
||||||
import com.alct.mdp.model.Goods;
|
import com.alct.mdp.model.Goods;
|
||||||
import com.alct.mdp.model.Image;
|
import com.alct.mdp.model.Image;
|
||||||
import com.alct.mdp.model.Location;
|
import com.alct.mdp.model.Location;
|
||||||
|
import com.alct.mdp.model.ShipmentStatusEnum;
|
||||||
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.CarInfoBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.bean.WaybillStatusBean;
|
import com.arpa.hndahesudintocctmsdriver.bean.WaybillStatusBean;
|
||||||
import com.arpa.hndahesudintocctmsdriver.cuspop.SimCenterPop;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
import com.arpa.hndahesudintocctmsdriver.event.HomeWaybillEvent;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||||
@ -39,6 +39,7 @@ 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.utils.ActivityUtils;
|
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||||
|
import com.dahe.mylibrary.utils.ToastUtils;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.luck.picture.lib.PictureSelector;
|
import com.luck.picture.lib.PictureSelector;
|
||||||
import com.luck.picture.lib.config.PictureConfig;
|
import com.luck.picture.lib.config.PictureConfig;
|
||||||
@ -96,6 +97,8 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
private boolean locationKey = false;
|
private boolean locationKey = false;
|
||||||
private TextView tv_loaction;
|
private TextView tv_loaction;
|
||||||
|
|
||||||
|
private boolean isFinish = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
@ -155,8 +158,18 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
} else if ((0 == index || 1 == index) && isFinish) {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, bb.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
CacheGroup.cacheList.remove(TYPE_NAME[i]);
|
||||||
@ -284,6 +297,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
sobStr = getIntent().getExtras().getString("sob");
|
sobStr = getIntent().getExtras().getString("sob");
|
||||||
//Log.e("---sdwStr--",sdwStr);
|
//Log.e("---sdwStr--",sdwStr);
|
||||||
sob = new Gson().fromJson(sobStr, StartOrderBean.class);
|
sob = new Gson().fromJson(sobStr, StartOrderBean.class);
|
||||||
|
|
||||||
initView(null);
|
initView(null);
|
||||||
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
@ -429,8 +443,30 @@ 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();
|
||||||
|
if (string.equals("PICKUPED")) {//安联装货,单平台未装货
|
||||||
|
isFinish = true;
|
||||||
|
//平台确认装货
|
||||||
|
hyr.loading(lub);
|
||||||
|
} else {
|
||||||
nfc();
|
nfc();
|
||||||
loadInfo();
|
loadInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// nfc();
|
||||||
|
// loadInfo();
|
||||||
// up_traffic_start();
|
// up_traffic_start();
|
||||||
// up_image_z();
|
// up_image_z();
|
||||||
}
|
}
|
||||||
@ -453,8 +489,28 @@ 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) {
|
||||||
|
if (o.toString().equals("UNLOADED")){//安联装货,单平台未装货
|
||||||
|
//卸货状态-平台
|
||||||
|
isFinish = true;
|
||||||
|
hyr.dischargeCargo(lub);
|
||||||
|
}else{
|
||||||
nfc();
|
nfc();
|
||||||
uploadInfo();
|
uploadInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(String s, String s1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// nfc();
|
||||||
|
// uploadInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user