md
This commit is contained in:
parent
a34c3bbd56
commit
77ee9ad768
@ -411,31 +411,42 @@ public class EmisBaseService {
|
||||
}
|
||||
}
|
||||
|
||||
return getDestByCountryOrAreaId(country,areaId);
|
||||
return getDestinationByCountryOrAreaId(country,areaId);
|
||||
|
||||
}
|
||||
|
||||
public EmisDestination getDestByCountryOrAreaId(String countryCode,Long areaId){
|
||||
/**
|
||||
* 根据国家或片区ID 获取目的地
|
||||
* @param countryCode
|
||||
* @param areaId
|
||||
* @return
|
||||
*/
|
||||
public EmisDestination getDestinationByCountryOrAreaId(String countryCode,Long areaId){
|
||||
|
||||
EmisDestination destination=null;
|
||||
// 根据大区获取目的网点
|
||||
EmisDestination queryEmisDestination = new EmisDestination();
|
||||
queryEmisDestination.setCountryAreaId(areaId);
|
||||
queryEmisDestination.setStatus(1);
|
||||
List<EmisDestination> destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||
if(!CollectionUtil.isEmpty(destinationList)){
|
||||
return destinationList.get(0);
|
||||
}
|
||||
else{
|
||||
// 根据国家查询
|
||||
queryEmisDestination = new EmisDestination();
|
||||
queryEmisDestination.setCountry(countryCode);
|
||||
if(areaId!=null) {
|
||||
EmisDestination queryEmisDestination = new EmisDestination();
|
||||
queryEmisDestination.setCountryAreaId(areaId);
|
||||
queryEmisDestination.setStatus(1);
|
||||
destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||
if(!CollectionUtil.isEmpty(destinationList)){
|
||||
return destinationList.get(0);
|
||||
List<EmisDestination> destinationList = emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||
if (!CollectionUtil.isEmpty(destinationList)) {
|
||||
destination=destinationList.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
if(destination==null){
|
||||
// 根据国家查询
|
||||
EmisDestination queryEmisDestination = new EmisDestination();
|
||||
queryEmisDestination.setCountry(countryCode);
|
||||
queryEmisDestination.setStatus(1);
|
||||
List<EmisDestination> destinationList=emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||
if(!CollectionUtil.isEmpty(destinationList)){
|
||||
destination=destinationList.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
return destination;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user