|
|
|
@ -2209,22 +2209,22 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("放舱信息未找到,请先保存数据");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == user.Id && x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
|
|
|
|
|
if (mailAcc == null)
|
|
|
|
|
if (string.IsNullOrEmpty(letterYard.AttnMail))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("用户邮箱未设置或smtp未正确配置");
|
|
|
|
|
throw Oops.Bah("ATTN MAIL未正确填写");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var orderUrl = await _repOrderUrl.FirstOrDefaultAsync(u => u.BookingId == bookingId);
|
|
|
|
|
if (orderUrl == null)
|
|
|
|
|
var mailAcc = await _repUserMail.FirstOrDefaultAsync(x => x.CreatedUserId == user.Id && x.MailAccount == letterYard.AttnMail && x.SmtpPort > 0 && x.SmtpServer != null && x.SmtpServer != "");
|
|
|
|
|
if (mailAcc == null)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("未生成链接信息,请重新保存数据");
|
|
|
|
|
throw Oops.Bah("用户邮箱未设置或smtp未正确配置");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(letterYard.AttnMail))
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah("ATTN MAIL未正确填写");
|
|
|
|
|
}
|
|
|
|
|
var orderUrl = await _repOrderUrl.FirstOrDefaultAsync(u => u.BookingId == bookingId);
|
|
|
|
|
//if (orderUrl == null)
|
|
|
|
|
//{
|
|
|
|
|
// throw Oops.Bah("未生成链接信息,请重新保存数据");
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
#region 保存放舱文件,并挂载到订舱附件
|
|
|
|
|
var fileBytes = await GetReportFile(bookingId, "fangcang");
|
|
|
|
@ -2285,6 +2285,13 @@ namespace Myshipping.Application
|
|
|
|
|
extContent = $"危险品等级:{order.DCLASS} <br/>危险品编号:{order.DUNNO}<br/>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var linkContent = string.Empty;
|
|
|
|
|
if (orderUrl != null)
|
|
|
|
|
{
|
|
|
|
|
linkContent = $@"提箱小票链接:<a href='{orderUrl.UrlTxxp}'>{orderUrl.UrlTxxp}</a><br/>
|
|
|
|
|
提交VGM链接:<a href='{orderUrl.UrlVgm}'>{orderUrl.UrlVgm}</a><br/>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mailContent = $@"TO:{order.CUSTOMERNAME} 贵司委托我司代理订舱出口的货物信息如下,详情请见附件,谢谢!<br/>
|
|
|
|
|
提单号:{order.MBLNO}<br/>
|
|
|
|
|
船名航次:{order.VESSEL}/{order.VOYNO}<br/>
|
|
|
|
@ -2297,8 +2304,7 @@ namespace Myshipping.Application
|
|
|
|
|
截VGM时间:{order.CLOSEVGMDATE}<br/>
|
|
|
|
|
{extContent}
|
|
|
|
|
备注:{order.YARDREMARK}<br/>
|
|
|
|
|
提箱小票链接:<a href='{orderUrl.UrlTxxp}'>{orderUrl.UrlTxxp}</a><br/>
|
|
|
|
|
提交VGM链接:<a href='{orderUrl.UrlVgm}'>{orderUrl.UrlVgm}</a><br/>
|
|
|
|
|
{linkContent}
|
|
|
|
|
<br/>
|
|
|
|
|
<span style='color:red;'>温馨提示:</span><br/>
|
|
|
|
|
<span style='color:red;'>如果分票报关,请回箱前通知场站及我司。</span><br/>
|
|
|
|
@ -2310,7 +2316,7 @@ namespace Myshipping.Application
|
|
|
|
|
邮箱:{user.Email}
|
|
|
|
|
<br/>";
|
|
|
|
|
|
|
|
|
|
var sendResult = await MailSendHelper.SendMail(mailAcc, mailSubject, mailContent, letterYard.AttnMail);
|
|
|
|
|
var sendResult = await MailSendHelper.SendMail(mailAcc, mailSubject, mailContent, letterYard.AttnMail, new KeyValuePair<string, byte[]>(fileSaveName, fileBytes));
|
|
|
|
|
if (!sendResult.Key)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogError($"放舱邮件发送失败:从{mailAcc.MailAccount}到{letterYard.AttnMail},主题 {mailSubject}");
|
|
|
|
@ -4275,6 +4281,13 @@ namespace Myshipping.Application
|
|
|
|
|
primaryModel.wNCM = ediExtModel.WNCM;
|
|
|
|
|
primaryModel.ORDERREMARK = ediExtModel.OrderRemark;
|
|
|
|
|
|
|
|
|
|
//2023-05-10 (PIL)订舱的预抵日期不提供输入框,按照和川操作要求取开船日期填写到预抵日期
|
|
|
|
|
if (string.IsNullOrWhiteSpace(primaryModel.ETA) && !string.IsNullOrWhiteSpace(primaryModel.ETD) &&
|
|
|
|
|
ediRouteEnum == EDIRouteEnum.PIL)
|
|
|
|
|
{
|
|
|
|
|
primaryModel.ETA = primaryModel.ETD;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
primaryModel.KINGTAREWEIGHT = ediExtModel.KingTareweight.HasValue ? ediExtModel.KingTareweight.Value : 0;
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("批次={no} 提取箱完成 数量={total}", batchNo, contaList.Count);
|
|
|
|
@ -5629,10 +5642,11 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var CtnDayNumlist = await GetGoodsStatusList(item.Id);
|
|
|
|
|
if (CtnDayNumlist!=null) {
|
|
|
|
|
if (CtnDayNumlist != null)
|
|
|
|
|
{
|
|
|
|
|
item.CtnDayNum = CtnDayNumlist.Where(x => x.StatusName == "申请箱使").Select(x => x.ExtData).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (!string.IsNullOrEmpty(item.ISSUETYPE))
|
|
|
|
|
//{
|
|
|
|
|
// var ISSUETYPE = _cache.GetAllMappingIssueType().Result.Where(x => x.Module == "HeChuan" && x.Code == item.ISSUETYPE).Select(x => x.MapName).FirstOrDefault();
|
|
|
|
|