装卸货添加定位上传
This commit is contained in:
parent
bd2ae6fc46
commit
a878a9238a
@ -43,6 +43,7 @@ import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.HuoYuanRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.OCRRequest;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.LUInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.TrackInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.request.bean.UploadReceiptInputBean;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.BitmapUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
@ -260,6 +261,15 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (CacheGroup.cacheList.get("genzong") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("genzong"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
Log.e("--轨迹上传--", "成功");
|
||||
} else {
|
||||
Log.e("--轨迹上传失败:--", bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("genzong");
|
||||
}
|
||||
if (CacheGroup.cacheList.get("carName") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("carName"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
@ -377,14 +387,14 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
initView(null);
|
||||
customDialog = new CustomDialog(con, "正在定位当前位置...");
|
||||
customDialog.show();
|
||||
lgdu = new LocationGDUtil(con, hd);
|
||||
//启动定位
|
||||
lgdu.onCreate();
|
||||
// lgdu = new LocationGDUtil(con, hd);
|
||||
// //启动定位
|
||||
// lgdu.onCreate();
|
||||
tv_loaction.setOnClickListener(v -> {
|
||||
if (!locationKey) {
|
||||
customDialog.show();
|
||||
lgdu.onCreate();
|
||||
}
|
||||
// if (!locationKey) {
|
||||
// customDialog.show();
|
||||
// lgdu.onCreate();
|
||||
// }
|
||||
});
|
||||
|
||||
btnOk.setOnClickListener(v -> {
|
||||
@ -524,7 +534,7 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
lub.setImageId(imgIds);
|
||||
lub.setWaybillId(wid);
|
||||
Log.e("--装货信息", gson.toJson(lub));
|
||||
if (locationKey) {//高德定位
|
||||
// if (locationKey) {//高德定位
|
||||
if (keys) {
|
||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||
@Override
|
||||
@ -539,6 +549,8 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
nfc();
|
||||
loadInfo();
|
||||
}
|
||||
|
||||
upLocation(tempLoca.getLatitude()+"",tempLoca.getLongitude()+"",sob.getData().getShippingNoteNumber());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -550,9 +562,9 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
// } else {
|
||||
// Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
|
||||
} else {
|
||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||
@ -568,7 +580,8 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
lub.setWaybillId(wid);
|
||||
lub.setRealLoadTime(tempLoca.getTime());
|
||||
Log.e("--卸货信息", gson.toJson(lub));
|
||||
if (locationKey&&!TextUtils.isEmpty(tempLoca.address)) {
|
||||
// if (locationKey&&!TextUtils.isEmpty(tempLoca.address)) {
|
||||
if (!TextUtils.isEmpty(tempLoca.address)) {
|
||||
if (keys) {
|
||||
MDPLocationCollectionManager.getShipmentStatus(con, sob.getData().getShippingNoteNumber(), new OnDownloadResultListener() {
|
||||
@Override
|
||||
@ -581,6 +594,7 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
nfc();
|
||||
uploadInfo();
|
||||
}
|
||||
upLocation(tempLoca.getLatitude()+"",tempLoca.getLongitude()+"",sob.getData().getShippingNoteNumber());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -620,16 +634,16 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
//子运运单ID
|
||||
urib.setWaybillId(wid);
|
||||
Log.e("--回单信息", gson.toJson(urib));
|
||||
if (locationKey) {
|
||||
// if (locationKey) {
|
||||
if (index == 2 && keys && !TextUtils.isEmpty(tempLoca.address)) {
|
||||
up_trafficSign();
|
||||
up_trafficReceipt();
|
||||
receipt_image();
|
||||
}
|
||||
hyr.receipt(urib);
|
||||
} else {
|
||||
Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
// } else {
|
||||
// Toast.makeText(con, "定位异常,请重新定位", Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
} else {
|
||||
Toast.makeText(con, "图片上传异常,请重新上传", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -929,5 +943,11 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity implements I
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void upLocation(String lat,String lon,String shippingNoteNumber){
|
||||
TrackInputBean tib = new TrackInputBean();
|
||||
tib.setLatitude(lat);
|
||||
tib.setLongitude(lon);
|
||||
tib.setShippingNoteNumber(shippingNoteNumber);
|
||||
hyr.trackTracking(tib);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user