|
|
|
@ -1145,7 +1145,9 @@ namespace Myshipping.Application
|
|
|
|
|
it.MiddleETD,
|
|
|
|
|
it.MiddleATA,
|
|
|
|
|
it.MiddleATD,
|
|
|
|
|
it.ATA
|
|
|
|
|
it.ATA,
|
|
|
|
|
it.TRUCKERID,
|
|
|
|
|
it.TRUCKER
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(reqId))
|
|
|
|
@ -5792,7 +5794,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah($"当前船公司没有对应的请求路由配置");
|
|
|
|
|
|
|
|
|
|
//这里船公司VOL的单子不能走此通道发送
|
|
|
|
|
if(ediRouteEnum == EDIRouteEnum.VOL)
|
|
|
|
|
if (ediRouteEnum == EDIRouteEnum.VOL)
|
|
|
|
|
throw Oops.Bah($"当前船公司VOL不能执行标准发送");
|
|
|
|
|
|
|
|
|
|
//集装箱型
|
|
|
|
@ -9966,7 +9968,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("当前订单的船公司不是VOL(沃尔塔航运)不能发送VOLTA截单EDI");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(string.IsNullOrWhiteSpace(order.MBLNO))
|
|
|
|
|
if (string.IsNullOrWhiteSpace(order.MBLNO))
|
|
|
|
|
throw Oops.Bah($"提单号不能为空");
|
|
|
|
|
|
|
|
|
|
if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL"))
|
|
|
|
@ -10038,7 +10040,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (ediPkgs == null || string.IsNullOrWhiteSpace(ediPkgs.MapCode))
|
|
|
|
|
pkgsBuilder.AppendLine($"包装{x.Pkgs}的EDI代码未找到");
|
|
|
|
|
|
|
|
|
|
if(ediPkgs != null)
|
|
|
|
|
if (ediPkgs != null)
|
|
|
|
|
{
|
|
|
|
|
x.EdiPkgs = ediPkgs.MapCode?.Trim();
|
|
|
|
|
}
|
|
|
|
@ -10051,13 +10053,13 @@ namespace Myshipping.Application
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(pkgsBuilder.Length > 0)
|
|
|
|
|
if (pkgsBuilder.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation("批次={no}获取请求VOLTA截单详情有错误 {msg}", batchNo, JSON.Serialize(model));
|
|
|
|
|
|
|
|
|
|
result.msg = pkgsBuilder.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.extra = voltaModel;
|
|
|
|
|
|
|
|
|
@ -10104,7 +10106,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="isSend">是否直接发送VOLTA申报截单</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[NonAction]
|
|
|
|
|
public async Task<dynamic> InnerVOLTAEDI(VOLTAEDIBaseModel model,bool isSend = false)
|
|
|
|
|
public async Task<dynamic> InnerVOLTAEDI(VOLTAEDIBaseModel model, bool isSend = false)
|
|
|
|
|
{
|
|
|
|
|
CommonWebApiResult result = new CommonWebApiResult();
|
|
|
|
|
|
|
|
|
@ -10182,7 +10184,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (isSend)
|
|
|
|
|
{
|
|
|
|
|
//这里发送配置通过提单号的前3个英文字母判断
|
|
|
|
|
string ediCode = order.MBLNO.Substring(0,3).ToUpper();
|
|
|
|
|
string ediCode = order.MBLNO.Substring(0, 3).ToUpper();
|
|
|
|
|
|
|
|
|
|
var ftpSet = _cache.GetAllEdiSetting().GetAwaiter().GetResult()
|
|
|
|
|
.FirstOrDefault(a => a.EDICODE.Equals(ediCode, StringComparison.OrdinalIgnoreCase)
|
|
|
|
@ -10228,12 +10230,12 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (isSendEmail)
|
|
|
|
|
{
|
|
|
|
|
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == UserManager.UserId
|
|
|
|
|
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == UserManager.UserId
|
|
|
|
|
&& x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//推送订舱邮件
|
|
|
|
|
sendStatus = await InnerSendToEmailByUserEmail(mailAcc, result.extra.ToString(),result.extra2.ToString(), ftpSet);
|
|
|
|
|
sendStatus = await InnerSendToEmailByUserEmail(mailAcc, result.extra.ToString(), result.extra2.ToString(), ftpSet);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DateTime eDate = DateTime.Now;
|
|
|
|
@ -10284,7 +10286,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="location">内容定位(name-名称;addr-地址)</param>
|
|
|
|
|
/// <returns>返回截取字符</returns>
|
|
|
|
|
[NonAction]
|
|
|
|
|
private string GetShipCneeNotifyDetail(string name,string location = "name")
|
|
|
|
|
private string GetShipCneeNotifyDetail(string name, string location = "name")
|
|
|
|
|
{
|
|
|
|
|
string result = string.Empty;
|
|
|
|
|
|
|
|
|
@ -10300,15 +10302,15 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
result = name.Replace(s, "");
|
|
|
|
|
|
|
|
|
|
if(Regex.IsMatch(result,"^\\n"))
|
|
|
|
|
if (Regex.IsMatch(result, "^\\n"))
|
|
|
|
|
{
|
|
|
|
|
result = Regex.Replace(result, "^\\n", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//result = Regex.Match(name, $"(?<={s}).*").Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"{nameof(GetShipCneeNotifyDetail)} 提取收、发、通详情异常,原因:{ex.Message}");
|
|
|
|
|
}
|
|
|
|
@ -10359,7 +10361,7 @@ namespace Myshipping.Application
|
|
|
|
|
string fileName = Path.GetFileName(filePath);
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var sendResult = await MailSendHelper.SendMail(userEmailAccount, emailTopic, emailTopic, ediCfg.RECEIVEEMAIL,
|
|
|
|
|
var sendResult = await MailSendHelper.SendMail(userEmailAccount, emailTopic, emailTopic, ediCfg.RECEIVEEMAIL,
|
|
|
|
|
new KeyValuePair<string, byte[]>(fileName, heByte));
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送邮件返回:{JSON.Serialize(sendResult)}");
|
|
|
|
|