jianghaiqing 2 months ago
commit 22d717368b

@ -7,6 +7,18 @@
public string Month { get; set; } public string Month { get; set; }
public IEnumerable<WSLItem>? List { 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 public class WSLItem

@ -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"],

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

@ -1584,7 +1584,7 @@ public class CommonService : ICommonService
private List<IConditionalModel> ConvertConditionalModel(string rules) { private List<IConditionalModel> ConvertConditionalModel(string rules) {
if (string.IsNullOrEmpty(rules)) if (!string.IsNullOrEmpty(rules))
{ {
if (rules.Contains(DataRuleConst.LoginUser)) if (rules.Contains(DataRuleConst.LoginUser))
{ {

Loading…
Cancel
Save