WSL报表

dev
嵇文龙 1 month ago
parent adcf3336b6
commit a24afd50c5

@ -7,6 +7,18 @@
public string Month { get; set; }
public IEnumerable<WSLItem>? List { get; set; }
public int? YesterdayTeuSum => List?.Sum(x => x.YesterdayTeu);
public int? TodayTeuSum => List?.Sum(x => x.TodayTeu);
public int? TodayTeuCTNPickupSum => List?.Sum(x => x.TodayTeuCTNPickup);
public int? IncreasedTeuSum => List?.Sum(x => x.IncreasedTeu);
public int? NextMonthTEUSum => List?.Sum(x => x.NextMonthTEU);
public int? LastMonthTEUSum => List?.Sum(x => x.LastMonthTEU);
}
public class WSLItem

@ -88,6 +88,9 @@ namespace DS.WMS.Core.HangfireJob.Method
x.TEU
}).ToListAsync();
if (list.Count == 0)
return;
var ids = list.Select(x => x.Id.ToString());
var ctnList = await tenantDb.Queryable<OpCtn>().Where(x => ids.Contains(x.BSNO) &&
!SqlFunc.IsNullOrEmpty(x.CntrNo) && !SqlFunc.IsNullOrEmpty(x.SealNo))
@ -117,6 +120,7 @@ namespace DS.WMS.Core.HangfireJob.Method
MemoryStream ms = new MemoryStream();
await MiniExcel.SaveAsByTemplateAsync(ms, path, model);
string base64Str = Convert.ToBase64String(ms.ToArray());
ms.Dispose();
var attaches = new List<Attachment>
{
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"],
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 = "",
Account = config["TaskMail:DefaultSetting:Account"],
Password = config["TaskMail:DefaultSetting:Password"],

@ -350,7 +350,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
copiedInfo.Main.RecvUserInfoList.Clear();
copiedInfo.Main.RecvUserInfoList.Add(item);
result = await ManagerService.InitTaskJob(info);
result = await ManagerService.InitTaskJob(copiedInfo);
if (!result.Succeeded)
return result;
}

Loading…
Cancel
Save