diff --git a/ds-wms-service/DS.WMS.Core/HangfireJob/Dtos/WSLModel.cs b/ds-wms-service/DS.WMS.Core/HangfireJob/Dtos/WSLModel.cs index 8547a1c2..386fc12e 100644 --- a/ds-wms-service/DS.WMS.Core/HangfireJob/Dtos/WSLModel.cs +++ b/ds-wms-service/DS.WMS.Core/HangfireJob/Dtos/WSLModel.cs @@ -7,6 +7,18 @@ public string Month { get; set; } public IEnumerable? 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 diff --git a/ds-wms-service/DS.WMS.Core/HangfireJob/Method/WSLReportJobService.cs b/ds-wms-service/DS.WMS.Core/HangfireJob/Method/WSLReportJobService.cs index 66f33939..b28ba2bc 100644 --- a/ds-wms-service/DS.WMS.Core/HangfireJob/Method/WSLReportJobService.cs +++ b/ds-wms-service/DS.WMS.Core/HangfireJob/Method/WSLReportJobService.cs @@ -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().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 { 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" + "
" + "Pls kindly check the daily report for your member's nomination booking:", //ShowName = "", Account = config["TaskMail:DefaultSetting:Account"], Password = config["TaskMail:DefaultSetting:Password"], diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index 011bfa55..1e39cf4a 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -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; } diff --git a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/WSL.xlsx b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/WSL.xlsx index d55087e4..77dd0043 100644 Binary files a/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/WSL.xlsx and b/ds-wms-service/DS.WMS.OpApi/wwwroot/templates/WSL.xlsx differ