补传类优化

This commit is contained in:
lijia 2023-10-07 11:24:51 +08:00
parent 7d60c08e61
commit f37ffa779a
4 changed files with 231 additions and 173 deletions

View File

@ -89,6 +89,11 @@ public class HuoYuanRequset{
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con); Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING(), gson.toJson(lub)),getToken(con),con);
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd); RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
} }
//卸货-补传
public void dischargeCargo4(LUInputBean lub){
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUNLOADING4(), gson.toJson(lub)),getToken(con),con);
RequestUtil.start(1, ShangChuangImgActivity.TYPE_NAME[1],re,con,hd);
}
//回单 //回单
public void receipt(UploadReceiptInputBean urib){ public void receipt(UploadReceiptInputBean urib){
Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con); Request re = OkHttpUtil.posts(new OkDate(RequestConstant.getUploadReceipt(), gson.toJson(urib)),getToken(con),con);

View File

@ -67,6 +67,8 @@ public class RequestConstant {
private static final String LOADING = "/app/driver/waybill/loadingV2"; private static final String LOADING = "/app/driver/waybill/loadingV2";
//卸货 //卸货
private static final String UNLOADING = "/app/driver/waybill/unloadV2"; private static final String UNLOADING = "/app/driver/waybill/unloadV2";
//卸货-补传
private static final String UNLOADING4 = "/app/driver/waybill/unloadV4";
//上传回单 //上传回单
private static final String UPLOAD_RECEIPT = "/app/driver/waybill/uploadReceipt"; private static final String UPLOAD_RECEIPT = "/app/driver/waybill/uploadReceipt";
//轨迹跟踪 //轨迹跟踪
@ -209,9 +211,13 @@ public class RequestConstant {
return BASE_URL + BANK_CARD_LIST; return BASE_URL + BANK_CARD_LIST;
} }
public static String getXiaoXiListUrl() { return BASE_URL + XIAOXI_LIST; } public static String getXiaoXiListUrl() {
return BASE_URL + XIAOXI_LIST;
}
public static String getXiaoxiAll() { return BASE_URL +XIAOXI_ALL; } public static String getXiaoxiAll() {
return BASE_URL + XIAOXI_ALL;
}
public static String getOrderList() { public static String getOrderList() {
return BASE_URL + ORDER_LIST; return BASE_URL + ORDER_LIST;
@ -241,6 +247,10 @@ public class RequestConstant {
return BASE_URL + UNLOADING; return BASE_URL + UNLOADING;
} }
public static String getUNLOADING4() {
return BASE_URL + UNLOADING4;
}
public static String getGetEvaluate() { public static String getGetEvaluate() {
return BASE_URL + GET_EVALUATE; return BASE_URL + GET_EVALUATE;
} }
@ -293,15 +303,25 @@ public class RequestConstant {
return BASE_URL + ISAUTH_IDCARD; return BASE_URL + ISAUTH_IDCARD;
} }
public static String getIsauthDriverauthLicense() { return BASE_URL +ISAUTH_DRIVERAUTH_LICENSE; } public static String getIsauthDriverauthLicense() {
return BASE_URL + ISAUTH_DRIVERAUTH_LICENSE;
}
public static String getUploadReceipt() { return BASE_URL +UPLOAD_RECEIPT; } public static String getUploadReceipt() {
return BASE_URL + UPLOAD_RECEIPT;
}
public static String getUPLOAD() { return BASE_URL +UPLOAD; } public static String getUPLOAD() {
return BASE_URL + UPLOAD;
}
public static String getTrackTracking() {return BASE_URL +TRACK_TRACKING; } public static String getTrackTracking() {
return BASE_URL + TRACK_TRACKING;
}
public static String getEvaluationV2() { return BASE_URL +EVALUATION_V2; } public static String getEvaluationV2() {
return BASE_URL + EVALUATION_V2;
}
public static String getDRIVERAUTHIDCARD() { public static String getDRIVERAUTHIDCARD() {
return BASE_URL + DRIVERAUTHIDCARD; return BASE_URL + DRIVERAUTHIDCARD;
@ -319,27 +339,45 @@ public class RequestConstant {
return BASE_URL + SAVECARIMG; return BASE_URL + SAVECARIMG;
} }
public static String getUploadHead() { return BASE_URL +UPLOAD_HEAD; } public static String getUploadHead() {
return BASE_URL + UPLOAD_HEAD;
}
public static String getInsBankcard() { public static String getInsBankcard() {
return BASE_URL + INS_BANKCARD; return BASE_URL + INS_BANKCARD;
} }
public static String getDelCar() { return BASE_URL +DEL_CAR; } public static String getDelCar() {
return BASE_URL + DEL_CAR;
}
public static String getXiaoxiDel() { return BASE_URL +XIAOXI_DEL; } public static String getXiaoxiDel() {
return BASE_URL + XIAOXI_DEL;
}
public static String getCOMPLAINT() { return BASE_URL+COMPLAINT; } public static String getCOMPLAINT() {
return BASE_URL + COMPLAINT;
}
public static String getXiaoxiDelAll() { return BASE_URL+XIAOXI_DEL_ALL; } public static String getXiaoxiDelAll() {
return BASE_URL + XIAOXI_DEL_ALL;
}
public static String getDriverAuthQualification() { return BASE_URL+DRIVER_AUTH_QUALIFICATION; } public static String getDriverAuthQualification() {
return BASE_URL + DRIVER_AUTH_QUALIFICATION;
}
public static String getDriverSaveCarRegisterNo() { return BASE_URL+DRIVER_AUTH_SAVECARREGISTERNO; } public static String getDriverSaveCarRegisterNo() {
return BASE_URL + DRIVER_AUTH_SAVECARREGISTERNO;
}
public static String getDriverSaveCarRoadLicenseNo() { return BASE_URL+DRIVER_AUTH_SAVECARROADLICENSENO; } public static String getDriverSaveCarRoadLicenseNo() {
return BASE_URL + DRIVER_AUTH_SAVECARROADLICENSENO;
}
public static String getSaveDrawCar() { return BASE_URL+SAVE_DRAW_CAR; } public static String getSaveDrawCar() {
return BASE_URL + SAVE_DRAW_CAR;
}
public static String getIsAuthDriverAuthQualification() { public static String getIsAuthDriverAuthQualification() {
return BASE_URL + IS_AUTH_DRIVER_AUTH_QUALIFICATION; return BASE_URL + IS_AUTH_DRIVER_AUTH_QUALIFICATION;
@ -381,7 +419,9 @@ public class RequestConstant {
return BASE_URL + WITHDRAWALS_CONFIG; return BASE_URL + WITHDRAWALS_CONFIG;
} }
public static String getGetErrorOrder() { return BASE_URL+GET_ERROR_ORDER; } public static String getGetErrorOrder() {
return BASE_URL + GET_ERROR_ORDER;
}
public static String getGetExampleList() { public static String getGetExampleList() {
return BASE_URL + GET_EXAMPLE_LIST; return BASE_URL + GET_EXAMPLE_LIST;

View File

@ -15,6 +15,15 @@ public class LUInputBean {
private String locationAddress; private String locationAddress;
private String longitude; private String longitude;
private String waybillId; private String waybillId;
private String realLoadTime;
public String getRealLoadTime() {
return realLoadTime;
}
public void setRealLoadTime(String realLoadTime) {
this.realLoadTime = realLoadTime;
}
public List<Integer> getImageId() { public List<Integer> getImageId() {
return imageId; return imageId;

View File

@ -86,7 +86,8 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
private boolean locationKey = false; private boolean locationKey = false;
private TextView tv_loaction; private TextView tv_loaction;
private TempLoca tempLoca = new TempLoca(36.11944878,120.10315118,"中国山东省青岛市黄岛区铁峰山路","2023-09-23 11:19"); private TempLoca tempLoca = new TempLoca(39.24,117.07,"天津市北辰区双口镇永宝路17号","2023-09-26 10:00");
private TempLoca tempLocaBd = new TempLoca(39.246543,117.079713,"天津市北辰区双口镇永宝路17号","2023-09-26 10:00");
class TempLoca{ class TempLoca{
private double latitude; private double latitude;
@ -391,9 +392,9 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
case 0: case 0:
//装货 //装货
if (imgIds != null && imgIds.size() > 0) { if (imgIds != null && imgIds.size() > 0) {
lub.setLatitude(lgdu.getLatitude() + ""); lub.setLatitude(tempLoca.getLatitude() + "");
lub.setLongitude(lgdu.getLongitude() + ""); lub.setLongitude(tempLoca.getLongitude() + "");
lub.setLocationAddress(lgdu.getAddress()); lub.setLocationAddress(tempLoca.getAddress());
lub.setImageId(imgIds); lub.setImageId(imgIds);
lub.setWaybillId(wid); lub.setWaybillId(wid);
Log.e("--装货信息", gson.toJson(lub)); Log.e("--装货信息", gson.toJson(lub));
@ -420,6 +421,7 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
lub.setLocationAddress(tempLoca.getAddress()); lub.setLocationAddress(tempLoca.getAddress());
lub.setImageId(imgIds); lub.setImageId(imgIds);
lub.setWaybillId(wid); lub.setWaybillId(wid);
lub.setRealLoadTime(tempLoca.getTime());
Log.e("--卸货信息", gson.toJson(lub)); Log.e("--卸货信息", gson.toJson(lub));
if (locationKey) { if (locationKey) {
if (keys) { if (keys) {
@ -495,10 +497,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
public void up_trafficSign() { public void up_trafficSign() {
//安联 //安联
Location l = new Location(); Location l = new Location();
l.setBaiduLongitude(tempLoca.longitude); l.setBaiduLongitude(tempLocaBd.longitude);
l.setBaiduLatitude(tempLoca.latitude); l.setBaiduLatitude(tempLocaBd.latitude);
l.setLocation(tempLoca.getAddress()); l.setLocation(tempLocaBd.getAddress());
l.setTime(tempLoca.getTime()); l.setTime(tempLocaBd.getTime());
List<Goods> gs = new ArrayList<>(); List<Goods> gs = new ArrayList<>();
for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) { for (StartOrderBean.DataDTO.WayChildrenDTO wayChild : sob.getData().getWayChildren()) {
if (wid.equals(wayChild.getId() + "")) { if (wid.equals(wayChild.getId() + "")) {
@ -535,10 +537,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
public void up_trafficReceipt() { public void up_trafficReceipt() {
//安联 //安联
Location l = new Location(); Location l = new Location();
l.setBaiduLongitude(tempLoca.longitude); l.setBaiduLongitude(tempLocaBd.longitude);
l.setBaiduLatitude(tempLoca.latitude); l.setBaiduLatitude(tempLocaBd.latitude);
l.setLocation(tempLoca.getAddress()); l.setLocation(tempLocaBd.getAddress());
l.setTime(tempLoca.getTime()); l.setTime(tempLocaBd.getTime());
MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() { MDPLocationCollectionManager.pod(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
@Override @Override
@ -563,9 +565,9 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
image.setFileExt(FileUtil.lastName(file)); image.setFileExt(FileUtil.lastName(file));
image.setFileName(FileUtil.fileName(file)); image.setFileName(FileUtil.fileName(file));
image.setImageTakenDate(Timer.getTimerT()); image.setImageTakenDate(Timer.getTimerT());
image.setBaiduLongitude(latLng.longitude); image.setBaiduLongitude(tempLocaBd.longitude);
image.setBaiduLatitude(latLng.latitude); image.setBaiduLatitude(tempLocaBd.latitude);
image.setLocation(lgdu.getAddress()); image.setLocation(tempLocaBd.getAddress());
MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() { MDPLocationCollectionManager.uploadPickupImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
@Override @Override
@ -594,10 +596,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base); image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
image.setFileExt(FileUtil.lastName(file)); image.setFileExt(FileUtil.lastName(file));
image.setFileName(FileUtil.fileName(file)); image.setFileName(FileUtil.fileName(file));
image.setImageTakenDate(tempLoca.getTime()); image.setImageTakenDate(tempLocaBd.getTime());
image.setBaiduLongitude(tempLoca.longitude); image.setBaiduLongitude(tempLocaBd.longitude);
image.setBaiduLatitude(tempLoca.latitude); image.setBaiduLatitude(tempLocaBd.latitude);
image.setLocation(tempLoca.getAddress()); image.setLocation(tempLocaBd.getAddress());
MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() { MDPLocationCollectionManager.uploadUnloadImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
@Override @Override
@ -627,10 +629,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base); image.setFileData("data:image/" + FileUtil.lastName(file) + ";base64," + base);
image.setFileExt(FileUtil.lastName(file)); image.setFileExt(FileUtil.lastName(file));
image.setFileName(FileUtil.fileName(file)); image.setFileName(FileUtil.fileName(file));
image.setImageTakenDate(tempLoca.getTime()); image.setImageTakenDate(tempLocaBd.getTime());
image.setBaiduLongitude(tempLoca.longitude); image.setBaiduLongitude(tempLocaBd.longitude);
image.setBaiduLatitude(tempLoca.latitude); image.setBaiduLatitude(tempLocaBd.latitude);
image.setLocation(tempLoca.getAddress()); image.setLocation(tempLocaBd.getAddress());
MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() { MDPLocationCollectionManager.uploadPODImage(con, sob.getData().getShippingNoteNumber(), image, new OnResultListener() {
@Override @Override
@ -691,10 +693,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
//安联 //安联
if (sob.getData().getReportAlct() == 1) { if (sob.getData().getReportAlct() == 1) {
Location l = new Location(); Location l = new Location();
l.setBaiduLongitude(latLng.longitude); l.setBaiduLongitude(tempLocaBd.longitude);
l.setBaiduLatitude(latLng.latitude); l.setBaiduLatitude(tempLocaBd.latitude);
l.setLocation(lgdu.getAddress()); l.setLocation(tempLocaBd.getAddress());
l.setTime(Timer.getTimerT()); l.setTime(tempLocaBd.getTime());
MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() { MDPLocationCollectionManager.pickup(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
@Override @Override
public void onSuccess() { public void onSuccess() {
@ -727,10 +729,10 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
//安联 //安联
if (sob.getData().getReportAlct() == 1) { if (sob.getData().getReportAlct() == 1) {
Location l = new Location(); Location l = new Location();
l.setBaiduLongitude(tempLoca.longitude); l.setBaiduLongitude(tempLocaBd.longitude);
l.setBaiduLatitude(tempLoca.latitude); l.setBaiduLatitude(tempLocaBd.latitude);
l.setLocation(tempLoca.getAddress()); l.setLocation(tempLocaBd.getAddress());
l.setTime(tempLoca.getTime()); l.setTime(tempLocaBd.getTime());
Log.e("-安联卸货信息-", gson.toJson(l)); Log.e("-安联卸货信息-", gson.toJson(l));
MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() { MDPLocationCollectionManager.unload(con, sob.getData().getShippingNoteNumber(), l, new OnResultListener() {
@Override @Override
@ -741,7 +743,7 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
JTTProcess.stop(con, sob, ""); JTTProcess.stop(con, sob, "");
} }
//卸货状态-平台 //卸货状态-平台
hyr.dischargeCargo(lub); hyr.dischargeCargo4(lub);
//卸货照片-安联 //卸货照片-安联
up_image(); up_image();
} }
@ -749,7 +751,9 @@ public class ShangChuangImgActivityBC extends BaseAppCompatActivity {
@Override @Override
public void onFailure(String s, String s1) { public void onFailure(String s, String s1) {
Log.e("上报安联失败(卸货):", s + s1); Log.e("上报安联失败(卸货):", s + s1);
new MessageUtils().showCenMessage(con, s1); // new MessageUtils().showCenMessage(con, s1);
//运单状态不一致平台更新状态
hyr.dischargeCargo4(lub);
} }
}); });
} }