|
@@ -918,20 +918,16 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
if(amsSaleOrderMapper.isBlackList(capacityNumber)>0){
|
|
if(amsSaleOrderMapper.isBlackList(capacityNumber)>0){
|
|
throw new Exception("该车在黑名单中,无法派车!请联系销售公司!");
|
|
throw new Exception("该车在黑名单中,无法派车!请联系销售公司!");
|
|
}
|
|
}
|
|
- //非自提订单 && 本次校验GPS && 全局GPS校验打开
|
|
|
|
- if((selfMention==null || selfMention.equals("否")) && onceCheck && (isCheckGps!=null && isCheckGps==0)){
|
|
|
|
- Map<String,Object> locationResult = null;
|
|
|
|
- int isGPS=0;
|
|
|
|
|
|
+ //非自提,单次校验且全局校验,且车不允许无GPS
|
|
|
|
+ int isGPS=amsSaleOrderMapper.isGPS(capacityNumber);
|
|
|
|
+ if((selfMention==null || selfMention.equals("否")) && onceCheck && (isCheckGps!=null && isCheckGps==0) && isGPS <= 0){
|
|
|
|
+ Map<String,Object> data=null;
|
|
try{
|
|
try{
|
|
- Map<String,Object> data = (Map<String,Object>)otmsFeign.getCurrentLocation(capacityNumber).getData();
|
|
|
|
- locationResult = (Map<String,Object>)data.get("result");
|
|
|
|
- isGPS=amsSaleOrderMapper.isGPS(capacityNumber);
|
|
|
|
|
|
+ data= (Map<String,Object>)otmsFeign.getCurrentLocation(capacityNumber).getData();
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
- //出现任何异常不抛出,不终止程序
|
|
|
|
|
|
+ throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
}
|
|
}
|
|
- if(isGPS > 0){
|
|
|
|
- System.out.println(capacityNumber+"允许无GPS派车");
|
|
|
|
- }else if(locationResult==null || locationResult.get("lon")==null || locationResult.get("lat")==null){
|
|
|
|
|
|
+ if(data==null || !"1001".equals(""+data.get("status"))){
|
|
throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2072,13 +2068,16 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
if(amsSaleOrderMapper.isBlackList(capacityNo)>0){
|
|
if(amsSaleOrderMapper.isBlackList(capacityNo)>0){
|
|
throw new Exception("该车在黑名单中,无法派车!请联系销售公司!");
|
|
throw new Exception("该车在黑名单中,无法派车!请联系销售公司!");
|
|
}
|
|
}
|
|
- //非自提,单次校验且全局校验
|
|
|
|
- if((selfMention==null || selfMention.equals("否")) && onceCheck && (isCheckGps!=null && isCheckGps==0)){
|
|
|
|
- Map<String,Object> data = (Map<String,Object>)otmsFeign.getCurrentLocation(capacityNo).getData();
|
|
|
|
- int isGPS=amsSaleOrderMapper.isGPS(capacityNo);
|
|
|
|
- if(isGPS > 0){
|
|
|
|
- System.out.println(capacityNo+"允许无GPS派车");
|
|
|
|
- }else if(data==null || !"1001".equals(""+data.get("status"))){
|
|
|
|
|
|
+ //非自提,单次校验且全局校验,且车辆不允许无GPS
|
|
|
|
+ int isGPS=amsSaleOrderMapper.isGPS(capacityNo);
|
|
|
|
+ if((selfMention==null || selfMention.equals("否")) && onceCheck && (isCheckGps!=null && isCheckGps==0) && isGPS <= 0){
|
|
|
|
+ Map<String,Object> data=null;
|
|
|
|
+ try{
|
|
|
|
+ data= (Map<String,Object>)otmsFeign.getCurrentLocation(capacityNo).getData();
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
|
|
+ }
|
|
|
|
+ if(data==null || !"1001".equals(""+data.get("status"))){
|
|
throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
throw new Exception("该车没有GPS定位信息,请联系销售公司物流部,申请是否可以派车。");
|
|
}
|
|
}
|
|
}
|
|
}
|