|
|
@ -7022,21 +7022,30 @@ namespace Myshipping.Application
|
|
|
|
if (ediRouteEnum == EDIRouteEnum.NULL)
|
|
|
|
if (ediRouteEnum == EDIRouteEnum.NULL)
|
|
|
|
throw Oops.Bah($"当前船公司没有对应的请求路由配置");
|
|
|
|
throw Oops.Bah($"当前船公司没有对应的请求路由配置");
|
|
|
|
|
|
|
|
|
|
|
|
//这里船公司VOL的单子不能走此通道发送
|
|
|
|
|
|
|
|
if (ediRouteEnum == EDIRouteEnum.VOL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var isVOLTASIExport = App.Configuration["IsVOLTASIExport"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(isVOLTASIExport))
|
|
|
|
var allowMblStart = App.Configuration["VOLTASIExportStart"].Split(new char[] { ',' });
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isVOLTASIExport == "1")
|
|
|
|
//if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS"))
|
|
|
|
throw Oops.Bah($"当前船公司VOL不能执行标准发送");
|
|
|
|
if (allowMblStart.Any(a => order.MBLNO.StartsWith(a)))
|
|
|
|
}
|
|
|
|
{
|
|
|
|
else
|
|
|
|
//VOL、FCS、REL,SLS
|
|
|
|
{
|
|
|
|
throw Oops.Bah($"当前船公司{order.CARRIERID} 提单号开头({(string.Join("、", allowMblStart.ToArray()))})不能执行标准发送");
|
|
|
|
throw Oops.Bah($"当前船公司VOL不能执行标准发送");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
////这里船公司VOL的单子不能走此通道发送
|
|
|
|
|
|
|
|
//if (ediRouteEnum == EDIRouteEnum.VOL)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// var isVOLTASIExport = App.Configuration["IsVOLTASIExport"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!string.IsNullOrWhiteSpace(isVOLTASIExport))
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (isVOLTASIExport == "1")
|
|
|
|
|
|
|
|
// throw Oops.Bah($"当前船公司VOL不能执行标准发送");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// throw Oops.Bah($"当前船公司VOL不能执行标准发送");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//集装箱型
|
|
|
|
//集装箱型
|
|
|
@ -11806,12 +11815,12 @@ namespace Myshipping.Application
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
string batchNo = IDGen.NextID().ToString();
|
|
|
|
string batchNo = IDGen.NextID().ToString();
|
|
|
|
|
|
|
|
|
|
|
|
var isVOLTASIExport = App.Configuration["IsVOLTASIExport"];
|
|
|
|
//var isVOLTASIExport = App.Configuration["IsVOLTASIExport"];
|
|
|
|
|
|
|
|
|
|
|
|
if(!string.IsNullOrWhiteSpace(isVOLTASIExport) && isVOLTASIExport == "0")
|
|
|
|
//if(!string.IsNullOrWhiteSpace(isVOLTASIExport) && isVOLTASIExport == "0")
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
throw Oops.Bah("配置IsVOLTASIExport=0不弹出窗口");
|
|
|
|
// throw Oops.Bah("配置IsVOLTASIExport=0不弹出窗口");
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no}获取请求VOLTA截单详情 {msg}", batchNo, JSON.Serialize(model));
|
|
|
|
_logger.LogInformation("批次={no}获取请求VOLTA截单详情 {msg}", batchNo, JSON.Serialize(model));
|
|
|
|
|
|
|
|
|
|
|
@ -11833,8 +11842,11 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no}提取订单信息完成", batchNo);
|
|
|
|
_logger.LogInformation("批次={no}提取订单信息完成", batchNo);
|
|
|
|
|
|
|
|
|
|
|
|
if (!order.CARRIERID.Equals("VOL", StringComparison.OrdinalIgnoreCase) && !order.CARRIERID.Equals("FCS", StringComparison.OrdinalIgnoreCase)
|
|
|
|
var allowCarrier = App.Configuration["VOLTASIExportCarrier"].Split(new char[] { ',' });
|
|
|
|
&& !order.CARRIERID.Equals("SLS", StringComparison.OrdinalIgnoreCase))
|
|
|
|
//if (!order.CARRIERID.Equals("VOL", StringComparison.OrdinalIgnoreCase) && !order.CARRIERID.Equals("FCS", StringComparison.OrdinalIgnoreCase)
|
|
|
|
|
|
|
|
// && !order.CARRIERID.Equals("SLS", StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (allowCarrier.Contains(order.CARRIERID))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("当前订单的船公司不是VOL(沃尔塔航运)不能发送VOLTA截单EDI");
|
|
|
|
throw Oops.Bah("当前订单的船公司不是VOL(沃尔塔航运)不能发送VOLTA截单EDI");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -11842,9 +11854,13 @@ namespace Myshipping.Application
|
|
|
|
if (string.IsNullOrWhiteSpace(order.MBLNO))
|
|
|
|
if (string.IsNullOrWhiteSpace(order.MBLNO))
|
|
|
|
throw Oops.Bah($"提单号不能为空");
|
|
|
|
throw Oops.Bah($"提单号不能为空");
|
|
|
|
|
|
|
|
|
|
|
|
if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS"))
|
|
|
|
var allowMblStart = App.Configuration["VOLTASIExportStart"].Split(new char[] { ',' });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS"))
|
|
|
|
|
|
|
|
if (!allowMblStart.Any(a => order.MBLNO.StartsWith(a)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah($"只支持提单号开头是(VOL、FCS、REL,SLS)发送截单");
|
|
|
|
//VOL、FCS、REL,SLS
|
|
|
|
|
|
|
|
throw Oops.Bah($"只支持提单号开头是({(string.Join("、", allowMblStart.ToArray()))})发送截单");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool isSeaLead = false;
|
|
|
|
bool isSeaLead = false;
|
|
|
|