|
|
@ -67,10 +67,22 @@ namespace BBWY.Server.Business |
|
|
|
if (targetShip == null) |
|
|
|
throw new BusinessException($"sourcePlatform:{sourcePlatform},targetPlatform:{targetPlatform},未找到{sourcePlatform}的物流公司{sourceName}"); |
|
|
|
|
|
|
|
var logisiticsCompany = targetPlatformUserLogisticsCompanyList.FirstOrDefault(c => c.Name.Equals(targetShip.TargetName) || c.Name.Equals(targetShip.SecondTargetName)); |
|
|
|
var logisiticsCompany = targetPlatformUserLogisticsCompanyList.FirstOrDefault(c => c.Name.Equals(targetShip.TargetName)); |
|
|
|
if (logisiticsCompany == null) |
|
|
|
throw new BusinessException($"sourcePlatform:{sourcePlatform},targetPlatform:{targetPlatform},targetShip:{targetShip.TargetName},在用户支持的物流公司中不存在"); |
|
|
|
|
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(targetShip.SecondTargetName)) |
|
|
|
{ |
|
|
|
logisiticsCompany = targetPlatformUserLogisticsCompanyList.FirstOrDefault(c => c.Name.Equals(targetShip.SecondTargetName)); |
|
|
|
if (logisiticsCompany == null) |
|
|
|
{ |
|
|
|
throw new BusinessException($"sourcePlatform:{sourcePlatform},targetPlatform:{targetPlatform},targetShip:{targetShip.SecondTargetName},在用户支持的物流公司中不存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new BusinessException($"sourcePlatform:{sourcePlatform},targetPlatform:{targetPlatform},targetShip:{targetShip.TargetName},在用户支持的物流公司中不存在"); |
|
|
|
} |
|
|
|
} |
|
|
|
return logisiticsCompany.Id; |
|
|
|
} |
|
|
|
} |
|
|
|