|
|
@@ -2539,9 +2539,19 @@ public class KwtLogisticsConsignmentService {
|
|
|
|
|
|
//设置履约信息
|
|
|
setPerformInfo(logisticsOrder, waybillOrderSubtasks, logisticsOrderDetailResp);
|
|
|
+
|
|
|
+ //设置物流信息
|
|
|
+ setLogisticInfo(logisticsOrder);
|
|
|
+
|
|
|
return logisticsOrderDetailResp;
|
|
|
}
|
|
|
|
|
|
+ private static void setLogisticInfo(KwtLogisticsOrder logisticsOrder) {
|
|
|
+ LogisticsOrderDetailResp.LogisticOrderInfo logisticOrderInfo = new LogisticsOrderDetailResp.LogisticOrderInfo();
|
|
|
+ logisticOrderInfo.setStartTime(DateUtils.format(logisticsOrder.getStartTime(),DateUtils.FORMAT9));
|
|
|
+ logisticOrderInfo.setEndTime(DateUtils.format(logisticsOrder.getEndTime(),DateUtils.FORMAT9));
|
|
|
+ }
|
|
|
+
|
|
|
private static void setPerformInfo(KwtLogisticsOrder logisticsOrder, List<KwtWaybillOrderSubtask> waybillOrderSubtasks, LogisticsOrderDetailResp logisticsOrderDetailResp) {
|
|
|
LogisticsOrderDetailResp.PerformanceInfoVO performanceInfoVO = new LogisticsOrderDetailResp.PerformanceInfoVO();
|
|
|
performanceInfoVO.setBillingMode(logisticsOrder.getBillingMode());
|
|
|
@@ -2592,6 +2602,11 @@ public class KwtLogisticsConsignmentService {
|
|
|
loadingInfoVO.setUnloadAddress(unloadAdd.getDetailAddress());
|
|
|
loadingInfoVO.setUnloadContacts(unloadAdd.getContacts());
|
|
|
loadingInfoVO.setUnloadPhone(unloadAdd.getPhone());
|
|
|
+ double distanceKm = DistanceUtils.calculateDistance(
|
|
|
+ Optional.ofNullable(loadAdd.getLat()).map(Double::valueOf).orElse(null),
|
|
|
+ Optional.ofNullable(loadAdd.getLng()).map(Double::valueOf).orElse(null),
|
|
|
+ Optional.ofNullable(unloadAdd.getLat()).map(Double::valueOf).orElse(null),
|
|
|
+ Optional.ofNullable(unloadAdd.getLng()).map(Double::valueOf).orElse(null));
|
|
|
logisticsOrderDetailResp.setLoadingInfoVO(loadingInfoVO);
|
|
|
}
|
|
|
|