添加不上传安联逻辑
This commit is contained in:
parent
205a6ee7f5
commit
d9a9b9b634
@ -68,9 +68,18 @@ public class CarListBean {
|
|||||||
private Object carImage;
|
private Object carImage;
|
||||||
private String owner;
|
private String owner;
|
||||||
private String vehicleNumber;
|
private String vehicleNumber;
|
||||||
|
private String outInvoice;
|
||||||
private int auditStatus;
|
private int auditStatus;
|
||||||
private String drivingLicenseValidity;
|
private String drivingLicenseValidity;
|
||||||
|
|
||||||
|
public String getOutInvoice() {
|
||||||
|
return outInvoice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutInvoice(String outInvoice) {
|
||||||
|
this.outInvoice = outInvoice;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCarNumber() {
|
public String getCarNumber() {
|
||||||
return carNumber == null ? "" : carNumber;
|
return carNumber == null ? "" : carNumber;
|
||||||
}
|
}
|
||||||
|
@ -730,6 +730,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (zStatus == 0) {//未装货
|
if (zStatus == 0) {//未装货
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 0);
|
in.putExtra("type", 0);
|
||||||
|
in.putExtra("reportAlct", data.getReportAlct());
|
||||||
in.putExtra("wid", zData.getId() + "");
|
in.putExtra("wid", zData.getId() + "");
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", true);
|
in.putExtra("keys", true);
|
||||||
@ -737,6 +738,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
} else if (zStatus == 1 && xStatus == 4) {//已装货未上传回单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
|
in.putExtra("reportAlct", data.getReportAlct());
|
||||||
in.putExtra("wid", zData.getId() + "");
|
in.putExtra("wid", zData.getId() + "");
|
||||||
in.putExtra("h_type", 0);
|
in.putExtra("h_type", 0);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
@ -746,6 +748,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (dis > 5) {//大于五分钟可以接单
|
if (dis > 5) {//大于五分钟可以接单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 1);
|
in.putExtra("type", 1);
|
||||||
|
in.putExtra("reportAlct", data.getReportAlct());
|
||||||
in.putExtra("wid", xData.getId() + "");
|
in.putExtra("wid", xData.getId() + "");
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", true);
|
in.putExtra("keys", true);
|
||||||
@ -757,6 +760,7 @@ public class HomeFragment extends BaseFragment {
|
|||||||
} else if (zStatus == 3 && xStatus == 2) {//已卸货,未上传卸货回单
|
} else if (zStatus == 3 && xStatus == 2) {//已卸货,未上传卸货回单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
|
in.putExtra("reportAlct", data.getReportAlct());
|
||||||
in.putExtra("wid", xData.getId() + "");
|
in.putExtra("wid", xData.getId() + "");
|
||||||
in.putExtra("h_type", 1);
|
in.putExtra("h_type", 1);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
|
@ -96,6 +96,8 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
private String cid;
|
private String cid;
|
||||||
private String selectCarNum = "";
|
private String selectCarNum = "";
|
||||||
|
|
||||||
|
private String currOutInvoice = "0";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
super.msgMethod(m);
|
super.msgMethod(m);
|
||||||
@ -191,6 +193,7 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
Log.e("--选择车辆--", clb.getData().get(index).getCarNumber());
|
||||||
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(index).getCarNumber());
|
||||||
selectCarNum = clb.getData().get(index).getCarNumber();
|
selectCarNum = clb.getData().get(index).getCarNumber();
|
||||||
|
currOutInvoice = clb.getData().get(index).getOutInvoice();
|
||||||
cid = clb.getData().get(index).getCarId();
|
cid = clb.getData().get(index).getCarId();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -319,12 +322,23 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
ImageButton xuanze = v.findViewById(R.id.xuanze);
|
||||||
|
|
||||||
if (hyd != null && hyd.getData() != null && !TextUtils.isEmpty(hyd.getData().getCarNumber())) {
|
if (hyd != null && hyd.getData() != null && !TextUtils.isEmpty(hyd.getData().getCarNumber())) {
|
||||||
|
String carNumber = hyd.getData().getCarNumber();
|
||||||
|
if (clb != null && !clb.getData().isEmpty()) {//判断车辆是否需要上传安联
|
||||||
|
for (CarListBean.DataDTO datum : clb.getData()) {
|
||||||
|
if (carNumber.equals(datum.getCarNumber())) {
|
||||||
cid = hyd.getData().getCarId();
|
cid = hyd.getData().getCarId();
|
||||||
car.setText("选择车辆:" + hyd.getData().getCarNumber());
|
car.setText("选择车辆:" + hyd.getData().getCarNumber());
|
||||||
|
currOutInvoice = datum.getOutInvoice();
|
||||||
selectCarNum = hyd.getData().getCarNumber();
|
selectCarNum = hyd.getData().getCarNumber();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (clb != null && clb.getData().size() == 1) {
|
} else if (clb != null && clb.getData().size() == 1) {
|
||||||
cid = clb.getData().get(0).getCarId();
|
cid = clb.getData().get(0).getCarId();
|
||||||
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
car.setText("选择车辆:" + clb.getData().get(0).getCarNumber());
|
||||||
|
currOutInvoice = clb.getData().get(0).getOutInvoice();
|
||||||
selectCarNum = clb.getData().get(0).getCarNumber();
|
selectCarNum = clb.getData().get(0).getCarNumber();
|
||||||
}
|
}
|
||||||
xuanze.setOnClickListener(v1 -> {
|
xuanze.setOnClickListener(v1 -> {
|
||||||
@ -505,8 +519,13 @@ public class HuoYunDelActivity extends BaseAppCompatActivity {
|
|||||||
if (allGranted) {
|
if (allGranted) {
|
||||||
customDialog = new CustomDialog(con, "正在接单...");
|
customDialog = new CustomDialog(con, "正在接单...");
|
||||||
customDialog.show();
|
customDialog.show();
|
||||||
|
if ("0".equals(currOutInvoice)){
|
||||||
//验证安联用户是否通过
|
//验证安联用户是否通过
|
||||||
ALProcess.verification(con, selectCarNum, hd);
|
ALProcess.verification(con, selectCarNum, hd);
|
||||||
|
}else{
|
||||||
|
hyr.getOrderStatus(id);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
boolean accessCoarseLocation = deniedList.contains("android.permission.ACCESS_FINE_LOCATION");
|
||||||
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
boolean contains = deniedList.contains("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||||
|
@ -387,6 +387,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", type);
|
in.putExtra("type", type);
|
||||||
|
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", key);
|
in.putExtra("keys", key);
|
||||||
@ -397,6 +398,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
} else if (sdw.getStatus() == 1) {//装货回单
|
} else if (sdw.getStatus() == 1) {//装货回单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
|
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("h_type", type);
|
in.putExtra("h_type", type);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
@ -404,6 +406,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
} else if (sdw.getStatus() == 2) {//上传收货单(卸货回单)
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", 2);
|
in.putExtra("type", 2);
|
||||||
|
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("h_type", type);
|
in.putExtra("h_type", type);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
@ -423,6 +426,7 @@ public class StartYunDanActivity extends BaseActivity {
|
|||||||
if (dis > 5) {//大于五分钟可以接单
|
if (dis > 5) {//大于五分钟可以接单
|
||||||
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
Intent in = new Intent(con, ShangChuangImgActivity.class);
|
||||||
in.putExtra("type", type);
|
in.putExtra("type", type);
|
||||||
|
in.putExtra("reportAlct", sob.getData().getReportAlct());
|
||||||
in.putExtra("wid", wid);
|
in.putExtra("wid", wid);
|
||||||
in.putExtra("sob", gson.toJson(sob));
|
in.putExtra("sob", gson.toJson(sob));
|
||||||
in.putExtra("keys", key);
|
in.putExtra("keys", key);
|
||||||
|
@ -89,6 +89,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
private String[] names = {"装货", "卸货", "回单"};
|
private String[] names = {"装货", "卸货", "回单"};
|
||||||
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
public static String[] TYPE_NAME = {"zhuanghuo", "xiehuo", "huidan"};
|
||||||
private int index = 0;
|
private int index = 0;
|
||||||
|
private int reportAlct = 1;//是否上报(安联城通) 0否 1是'
|
||||||
//
|
//
|
||||||
private Gson gson = new Gson();
|
private Gson gson = new Gson();
|
||||||
//
|
//
|
||||||
@ -184,6 +185,13 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
EventBus.getDefault().post(new HomeWaybillEvent());
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
finish();
|
finish();
|
||||||
|
}else if (reportAlct==0){
|
||||||
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
|
customDialog.dismiss();
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new HomeWaybillEvent());
|
||||||
|
Toast.makeText(con, "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
} else if ((0 == index || 1 == index) && isFinish) {
|
} else if ((0 == index || 1 == index) && isFinish) {
|
||||||
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
if (!isFinishing() && customDialog != null && customDialog.isShowing()) {
|
||||||
@ -329,6 +337,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
tips_x = findViewById(R.id.tips_x);
|
tips_x = findViewById(R.id.tips_x);
|
||||||
Bundle ins = getIntent().getExtras();
|
Bundle ins = getIntent().getExtras();
|
||||||
index = ins.getInt("type");
|
index = ins.getInt("type");
|
||||||
|
reportAlct = ins.getInt("reportAlct");
|
||||||
wid = ins.getString("wid");
|
wid = ins.getString("wid");
|
||||||
h_type = ins.getInt("h_type");
|
h_type = ins.getInt("h_type");
|
||||||
keys = ins.getBoolean("keys");
|
keys = ins.getBoolean("keys");
|
||||||
@ -481,7 +490,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--装货信息", gson.toJson(lub));
|
Log.e("--装货信息", gson.toJson(lub));
|
||||||
if (locationKey) {//高德定位
|
if (locationKey) {//高德定位
|
||||||
if (keys) {
|
if (keys) {
|
||||||
|
if (1==reportAlct){
|
||||||
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
@ -506,6 +515,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
ToastUtils.showToast(con, var2);
|
ToastUtils.showToast(con, var2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
isFinish = true;
|
||||||
|
//平台确认装货
|
||||||
|
hyr.loading(lub);
|
||||||
|
}
|
||||||
|
|
||||||
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onSuccess(Object o) {
|
// public void onSuccess(Object o) {
|
||||||
@ -561,7 +576,7 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--卸货信息", gson.toJson(lub));
|
Log.e("--卸货信息", gson.toJson(lub));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (keys) {
|
if (keys) {
|
||||||
|
if (1==reportAlct){
|
||||||
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
NewLJUtils.getInstance().getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnGDDownloadResultListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String var1) {
|
public void onSuccess(String var1) {
|
||||||
@ -586,6 +601,12 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}else {
|
||||||
|
//卸货状态-平台
|
||||||
|
isFinish = true;
|
||||||
|
hyr.dischargeCargo(lub);
|
||||||
|
}
|
||||||
|
|
||||||
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
// MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||||
// @Override
|
// @Override
|
||||||
// public void onSuccess(Object o) {
|
// public void onSuccess(Object o) {
|
||||||
@ -643,7 +664,9 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
|
|||||||
Log.e("--回单信息", gson.toJson(urib));
|
Log.e("--回单信息", gson.toJson(urib));
|
||||||
if (locationKey) {
|
if (locationKey) {
|
||||||
if (index == 2 && keys) {
|
if (index == 2 && keys) {
|
||||||
|
if (1==reportAlct){
|
||||||
up_trafficSign();
|
up_trafficSign();
|
||||||
|
}
|
||||||
// up_trafficReceipt();
|
// up_trafficReceipt();
|
||||||
// receipt_image();
|
// receipt_image();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user