md
This commit is contained in:
parent
e5437a80c9
commit
3212335687
@ -393,19 +393,28 @@ public class EmisBaseService {
|
||||
*/
|
||||
public EmisDestination calcDestSiteByBase(String country,String lineCode, String province, String city, String county, String address) {
|
||||
|
||||
|
||||
EmisDestination destination=null;
|
||||
// 获取 areaId
|
||||
Long areaId = null;
|
||||
|
||||
// 根据区获取目的地
|
||||
if(!StringUtils.isEmpty(county)) {
|
||||
EmisRegion regionCounty = getRegionByCode(county);
|
||||
if (regionCounty != null) {
|
||||
areaId = regionCounty.getAreaId();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据城市获取目的地
|
||||
if(!StringUtils.isEmpty(city)) {
|
||||
if(areaId==null && !StringUtils.isEmpty(city)) {
|
||||
EmisRegion regionCity = getRegionByCode(city);
|
||||
if (regionCity != null) {
|
||||
areaId = regionCity.getAreaId();
|
||||
}
|
||||
}
|
||||
|
||||
// 根据城市获取目的地
|
||||
// 根据省获取目的地
|
||||
if(areaId==null && !StringUtils.isEmpty(province)){
|
||||
EmisRegion regionProvice= getRegionByCode(province);
|
||||
if(regionProvice!=null){
|
||||
@ -413,7 +422,20 @@ public class EmisBaseService {
|
||||
}
|
||||
}
|
||||
|
||||
return getDestinationByCountryOrAreaId(country,areaId);
|
||||
// 根据大区获取目的网点
|
||||
if(areaId!=null) {
|
||||
EmisDestination queryEmisDestination = new EmisDestination();
|
||||
queryEmisDestination.setCountryAreaId(areaId);
|
||||
queryEmisDestination.setStatus(1);
|
||||
List<EmisDestination> destinationList = emisDestinationMapper.selectEmisDestinationList(queryEmisDestination);
|
||||
if (!CollectionUtil.isEmpty(destinationList)) {
|
||||
destination=destinationList.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
return destination;
|
||||
|
||||
// return getDestinationByCountryOrAreaId(country,areaId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user