|
@@ -104,7 +104,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
|
|
} else {
|
|
} else {
|
|
color = "1";
|
|
color = "1";
|
|
}
|
|
}
|
|
- map.put("vnos", hyCarrierInfo.getCarNo()+"_"+color);
|
|
|
|
|
|
+ map.put("vnos", hyDriverCarInfo.getCarNumber()+"_"+color);
|
|
String url = "https://zhiyunopenapi.95155.com/save/apis/transTimeManageV2";
|
|
String url = "https://zhiyunopenapi.95155.com/save/apis/transTimeManageV2";
|
|
// 设置 http 读写超时
|
|
// 设置 http 读写超时
|
|
DataExchangeService des = new DataExchangeService(5000, 8000);
|
|
DataExchangeService des = new DataExchangeService(5000, 8000);
|
|
@@ -122,18 +122,19 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
|
|
BigDecimal latResult = jsonArray.getBigDecimal("lat");
|
|
BigDecimal latResult = jsonArray.getBigDecimal("lat");
|
|
Double lat = latResult.doubleValue() / 600000;
|
|
Double lat = latResult.doubleValue() / 600000;
|
|
//发货地经纬度
|
|
//发货地经纬度
|
|
- BigDecimal lonb = new BigDecimal(hyCarrierInfo.getLoadingLongitude());
|
|
|
|
- BigDecimal latb = new BigDecimal(hyCarrierInfo.getLoadingLatitude());
|
|
|
|
- Double lon1 = lonb.doubleValue() / 600000;
|
|
|
|
- Double lat1 = latb.doubleValue() / 600000;
|
|
|
|
|
|
+ Double lon1 = Double.parseDouble(hyCarrierInfo.getLoadingLongitude());
|
|
|
|
+ Double lat1 = Double.parseDouble(hyCarrierInfo.getLoadingLatitude());
|
|
|
|
+ System.out.println("发货经纬度:" + lon1+","+lat1);
|
|
// 距离
|
|
// 距离
|
|
double s = GetDistance(lon,lat,lon1,lat1);
|
|
double s = GetDistance(lon,lat,lon1,lat1);
|
|
if(s>3000){
|
|
if(s>3000){
|
|
- throw new ArithmeticException("请检查北斗导航可以正常使用!");
|
|
|
|
|
|
+ s = s/1000;
|
|
|
|
+ System.out.println("距离相差:" + s+"公里");
|
|
|
|
+ throw new YException(YExceptionEnum.FAILED_TO_LOADINGADD);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
- throw new ArithmeticException("获取北斗位置异常!");
|
|
|
|
|
|
+ throw new YException(YExceptionEnum.FAILED_TO_LOADINGA);
|
|
}
|
|
}
|
|
/****************************判断发货地和车辆位置结束************************************/
|
|
/****************************判断发货地和车辆位置结束************************************/
|
|
|
|
|