md
This commit is contained in:
parent
0ad94654c0
commit
6c366d94c0
@ -89,32 +89,45 @@ public class EmisDestinationServiceImpl implements IEmisDestinationService
|
|||||||
queryWrapper.isNotNull("area_id");
|
queryWrapper.isNotNull("area_id");
|
||||||
queryWrapper.last("limit 1");
|
queryWrapper.last("limit 1");
|
||||||
regionList=emisRegionMapper.selectList(queryWrapper);
|
regionList=emisRegionMapper.selectList(queryWrapper);
|
||||||
|
if(!CollectionUtil.isEmpty(regionList)){
|
||||||
if(CollectionUtil.isEmpty(regionList)){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
areaId = regionList.get(0).getAreaId();
|
areaId = regionList.get(0).getAreaId();
|
||||||
if(areaId == null){
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EmisDestination queryEmisDestination=null;
|
||||||
|
List<EmisDestination> destinationList=null;
|
||||||
|
if(areaId != null && areaId> 0 ){
|
||||||
// 查询目的地,优先根据区域查询,如果查询不到则按线路查询
|
// 查询目的地,优先根据区域查询,如果查询不到则按线路查询
|
||||||
EmisDestination queryEmisDestination = new EmisDestination();
|
queryEmisDestination = new EmisDestination();
|
||||||
queryEmisDestination.setLineCode(lineCode);
|
queryEmisDestination.setLineCode(lineCode);
|
||||||
queryEmisDestination.setCountryAreaId(areaId);
|
queryEmisDestination.setCountryAreaId(areaId);
|
||||||
List<EmisDestination> destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
|
||||||
if(CollectionUtil.isEmpty(destinationList)){
|
|
||||||
// 目的地区域位配置,按线路查询
|
|
||||||
queryEmisDestination.setCountryAreaId(null);
|
|
||||||
destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||||
if(CollectionUtil.isEmpty(destinationList)){
|
if(!CollectionUtil.isEmpty(destinationList)){
|
||||||
return null;
|
return destinationList.get(0);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// 根据国家查询
|
||||||
|
queryEmisDestination = new EmisDestination();
|
||||||
|
queryEmisDestination.setCountry(country);
|
||||||
|
destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||||
|
if(!CollectionUtil.isEmpty(destinationList)){
|
||||||
|
return destinationList.get(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
// 根据国家查询
|
||||||
|
queryEmisDestination = new EmisDestination();
|
||||||
|
queryEmisDestination.setCountry(country);
|
||||||
|
destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||||
|
if(!CollectionUtil.isEmpty(destinationList)){
|
||||||
return destinationList.get(0);
|
return destinationList.get(0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增目的地
|
* 新增目的地
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user