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;