From 4ff4a08edcaffbc28b10c06ae53ca715af28a38f Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Wed, 20 Sep 2023 15:11:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F=E5=8D=95?= =?UTF-8?q?=E6=AF=94=E5=AF=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/TaskEmailDraftCompareMessageInfo.cs | 5 +++++ .../Service/TaskManagePlat/TaskDraftCompareService.cs | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskEmailDraftCompareMessageInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskEmailDraftCompareMessageInfo.cs index 567aa548..f4bf8978 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskEmailDraftCompareMessageInfo.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/TaskEmailDraftCompareMessageInfo.cs @@ -26,5 +26,10 @@ namespace Myshipping.Application /// 提单号 /// public string MBlNo { get; set; } + + /// + /// 所属租户ID + /// + public string TenantId { get; set; } } } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs index 1a5e24ba..4470329a 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskDraftCompareService.cs @@ -703,7 +703,7 @@ namespace Myshipping.Application } var bookingOrder = _bookingOrderRepository.AsQueryable().Filter(null, true) - .First(a => a.MBLNO.Equals(billNo)); + .First(a => a.MBLNO.Equals(billNo) && !a.IsDeleted && a.TenantId == long.Parse(model.Main.TenantId)); if (bookingOrder == null) { @@ -742,7 +742,8 @@ namespace Myshipping.Application mainInfo.UserEmail = userInfo?.Email; var contaList = _bookingOrderContaRepository.AsQueryable().Filter(null, true) - .Where(x => x.BILLID == bookingOrder.Id).ToList(); + .Where(x => x.BILLID == bookingOrder.Id && !x.IsDeleted && x.TenantId == long.Parse(model.Main.TenantId)) + .ToList(); _logger.LogInformation("批次={no} 提取箱完成 数量={total}", batchNo, contaList.Count); @@ -770,7 +771,7 @@ namespace Myshipping.Application _logger.LogInformation("批次={no} 对应请求报文完成 msg={msg}", batchNo, JSON.Serialize(msgModel)); var entity = _bookingOrderRepository.AsQueryable().Filter(null, true) - .First(a => a.Id == bookingOrder.Id); + .First(a => a.Id == bookingOrder.Id && !a.IsDeleted && a.TenantId == long.Parse(model.Main.TenantId)); entity.LstDraftCompareRlt = compareResult.extra2.Any(a => a.IsDiff) ? "DIFF" : ""; entity.LstDraftCompareDate = nowDate;