|
|
@ -88,6 +88,9 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
x.TEU
|
|
|
|
x.TEU
|
|
|
|
}).ToListAsync();
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (list.Count == 0)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
var ids = list.Select(x => x.Id.ToString());
|
|
|
|
var ids = list.Select(x => x.Id.ToString());
|
|
|
|
var ctnList = await tenantDb.Queryable<OpCtn>().Where(x => ids.Contains(x.BSNO) &&
|
|
|
|
var ctnList = await tenantDb.Queryable<OpCtn>().Where(x => ids.Contains(x.BSNO) &&
|
|
|
|
!SqlFunc.IsNullOrEmpty(x.CntrNo) && !SqlFunc.IsNullOrEmpty(x.SealNo))
|
|
|
|
!SqlFunc.IsNullOrEmpty(x.CntrNo) && !SqlFunc.IsNullOrEmpty(x.SealNo))
|
|
|
@ -117,6 +120,7 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
MemoryStream ms = new MemoryStream();
|
|
|
|
MemoryStream ms = new MemoryStream();
|
|
|
|
await MiniExcel.SaveAsByTemplateAsync(ms, path, model);
|
|
|
|
await MiniExcel.SaveAsByTemplateAsync(ms, path, model);
|
|
|
|
string base64Str = Convert.ToBase64String(ms.ToArray());
|
|
|
|
string base64Str = Convert.ToBase64String(ms.ToArray());
|
|
|
|
|
|
|
|
ms.Dispose();
|
|
|
|
var attaches = new List<Attachment>
|
|
|
|
var attaches = new List<Attachment>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
new() { AttachName = "WSL Volume Daily Increase Report.xlsx", AttachContent = base64Str}
|
|
|
|
new() { AttachName = "WSL Volume Daily Increase Report.xlsx", AttachContent = base64Str}
|
|
|
@ -126,7 +130,7 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SendTo = config["TaskMail:DefaultSetting:Receivers"],
|
|
|
|
SendTo = config["TaskMail:DefaultSetting:Receivers"],
|
|
|
|
Title = "WSL Volume Daily Increase Report",
|
|
|
|
Title = "WSL Volume Daily Increase Report",
|
|
|
|
Body = "Dear WSL Team" + Environment.NewLine + "Pls kindly check the daily report for your member's nomination booking:",
|
|
|
|
Body = "Dear WSL Team" + "<br/>" + "Pls kindly check the daily report for your member's nomination booking:",
|
|
|
|
//ShowName = "",
|
|
|
|
//ShowName = "",
|
|
|
|
Account = config["TaskMail:DefaultSetting:Account"],
|
|
|
|
Account = config["TaskMail:DefaultSetting:Account"],
|
|
|
|
Password = config["TaskMail:DefaultSetting:Password"],
|
|
|
|
Password = config["TaskMail:DefaultSetting:Password"],
|
|
|
|