gongdecai před 2 roky
rodič
revize
9f02c1b985

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java

@@ -57,6 +57,8 @@ public enum YExceptionEnum {
 	ID_CARD_NOT_EQUALS("ERROR34", "身份证号与司机认证信息不一致!"),
 	WAS_NOT_FOUND_USER("ERROR34", "未找到该用户!"),
 	FAILED_TO_REPORT("ERROR35", "上报失败!"),
+	FAILED_TO_LOADINGADD("ERROR35", "请检查北斗导航可以正常使用!"),
+	FAILED_TO_LOADINGA("ERROR35", "获取北斗位置异常!"),
 	;
 	@Getter
 	private String value;

+ 3 - 3
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java

@@ -104,7 +104,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
                 } else {
                     color = "1";
                 }
-                map.put("vnos", hyCarrierInfo.getCarNo()+"_"+color);
+                map.put("vnos", hyDriverCarInfo.getCarNumber()+"_"+color);
                 String url = "https://zhiyunopenapi.95155.com/save/apis/transTimeManageV2";
                 // 设置 http 读写超时
                 DataExchangeService des = new DataExchangeService(5000, 8000);
@@ -129,11 +129,11 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
                      // 距离
                     double s = GetDistance(lon,lat,lon1,lat1);
                     if(s>3000){
-                        throw new ArithmeticException("请检查北斗导航可以正常使用!");
+                        throw new YException(YExceptionEnum.FAILED_TO_LOADINGADD);
                     }
                 }
                 else{
-                    throw new ArithmeticException("获取北斗位置异常!");
+                    throw new YException(YExceptionEnum.FAILED_TO_LOADINGA);
                 }
                 /****************************判断发货地和车辆位置结束************************************/