From a24afd50c5f7d1246f980a0678011e70a77172be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Mon, 14 Oct 2024 09:08:20 +0800 Subject: [PATCH] =?UTF-8?q?WSL=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/HangfireJob/Dtos/WSLModel.cs | 12 ++++++++++++ .../HangfireJob/Method/WSLReportJobService.cs | 6 +++++- .../Op/Method/TaskInteraction/TaskService.cs | 2 +- .../DS.WMS.OpApi/wwwroot/templates/WSL.xlsx | Bin 10307 -> 10043 bytes 4 files changed, 18 insertions(+), 2 deletions(-) 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 d55087e44c5745de57568752e36444836e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