提交 c77b7747 authored 作者: jiangwujie's avatar jiangwujie

Merge branch 'v21.1_jianzhuang_20240807' into test

......@@ -2981,15 +2981,15 @@ public class OrderChildServiceImpl implements OrderChildService {
* @Param [truckNo, beginLongitude, beginLatitude, endLongitude, endLatitude]
* @return
**/
public GdRouteDTO getGdRoute(String truckNo, BigDecimal beginLongitude, BigDecimal beginLatitude,
public Integer getGdRoute(String truckNo, BigDecimal beginLongitude, BigDecimal beginLatitude,
BigDecimal endLongitude, BigDecimal endLatitude) {
List<GdRouteDTO> gdRouteDTOS = null;
Integer distance = null;
try {
gdRouteDTOS = gdService.getRoute(beginLongitude, beginLatitude, endLongitude, endLatitude);
distance = gdService.getShortestRouteDistance(beginLongitude, beginLatitude, endLongitude, endLatitude);
} catch (ServiceSystemException e) {
log.info("orderChildExpect==高德地图调用失败,车辆{},异常原因{}", truckNo, e.getMessage());
}
return CollectionUtils.isNotEmpty(gdRouteDTOS) ? gdRouteDTOS.get(0) : null;
return distance;
}
@Override
......@@ -3198,10 +3198,8 @@ public class OrderChildServiceImpl implements OrderChildService {
if (longitude == null || latitude == null) {
return new OrderChildLoadRangeCheckResultVO(OrderChildEnum.NeedAlertEnum.FAIL.getCode(), TRUCK_LOCATION_ERROR.getCode(), TRUCK_LOCATION_ERROR.getMsg());
}
List<GdRouteDTO> route = gdService.getRoute(longitude, latitude, sendLongitude, sendLatitude);
if (CollectionUtils.isNotEmpty(route)) {
GdRouteDTO gdRouteDTO = route.get(0);
Integer distance = gdRouteDTO.getDistance();
Integer distance = gdService.getShortestRouteDistance(longitude, latitude, sendLongitude, sendLatitude);
if (distance != null) {
log.info("truckNo:{} 高德计算距离:{} curr:{},{}, 货源地:{},{}", orderChild.getTruckNo(), distance, longitude, latitude, sendLongitude, sendLatitude);
if (distance > config.allowUploadDistanceMeter()) {
// 装车位置 超限
......@@ -3263,14 +3261,12 @@ public class OrderChildServiceImpl implements OrderChildService {
BigDecimal siteLatitudeY = orderGoods.getSendLatitude();
//调高德获取距离
if (Objects.nonNull(truckLongitudeX) && Objects.nonNull(truckLatitudeY)) {
GdRouteDTO route = getGdRoute(truckNo, orderGoods.getSendLongitude(), orderGoods.getSendLatitude(), siteLongitudeX,
Integer distance = getGdRoute(truckNo, orderGoods.getSendLongitude(), orderGoods.getSendLatitude(), siteLongitudeX,
siteLatitudeY);
if (route == null) {
if (distance == null) {
log.error("高德获取卡车与货源地位置距离失败,orderGoodsNo:{},orderChildNo:{},truckNo:{}", orderGoodsNo, childNo, truckNo);
return;
}
//距离
Integer distance = route.getDistance();
// 超出货源地+通知触发距离
if (distance > driverNoticeConfigVO.getNoticeTriggerDistanceMeter()) {
if (Objects.equals(child.getExitNoticeStatus(), OrderChildEnum.ExitNoticeStatus.NOT_NOTIFIED.getCode())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论