|
|
|
@ -3019,7 +3019,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
|
|
|
|
|
}
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.WY.ToString()}校验失败,{strCheck}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var currRlt = WYEdiHelper.CreateEdiWY(ediModel);
|
|
|
|
@ -3042,7 +3042,7 @@ namespace Myshipping.Application
|
|
|
|
|
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.YML.ToString()}校验失败,{strCheck}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CommonWebApiResult currRlt = new CommonWebApiResult();
|
|
|
|
@ -3074,13 +3074,46 @@ namespace Myshipping.Application
|
|
|
|
|
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.PIL.ToString()}校验失败,{strCheck}");
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.YT.ToString()}校验失败,{strCheck}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CommonWebApiResult currRlt = YTEdiHelper.CreateEdiYT(ediModel);
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
result.succ = currRlt.succ;
|
|
|
|
|
result.extra = currRlt.succ ? currRlt.extra.ToString() : "";
|
|
|
|
|
}
|
|
|
|
|
else if (ediRouteEnum == EDIRouteEnum.ESL)
|
|
|
|
|
{
|
|
|
|
|
#region YT
|
|
|
|
|
string strCheck = TSLEdiHelper.IsCreateTSL(ediModel);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(strCheck))
|
|
|
|
|
{
|
|
|
|
|
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
|
|
|
|
|
{
|
|
|
|
|
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw Oops.Bah($"发送{EDIRouteEnum.ESL.ToString()}校验失败,{strCheck}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CommonWebApiResult currRlt = new CommonWebApiResult();
|
|
|
|
|
|
|
|
|
|
if (model.sendType == "B")
|
|
|
|
|
{
|
|
|
|
|
currRlt = TSLEdiHelper.CreateEdiTSL(ediModel);
|
|
|
|
|
}
|
|
|
|
|
else if (model.sendType == "E")
|
|
|
|
|
{
|
|
|
|
|
currRlt = TSLEdiHelper.CreateEdiTSLSI(ediModel);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
result.succ = currRlt.succ;
|
|
|
|
|
result.extra = currRlt.succ ? currRlt.extra.ToString() : "";
|
|
|
|
|
}
|
|
|
|
|