修改格式单比对,增加租户判断

optimize
jianghaiqing 1 year ago
parent 178dbac2df
commit 4ff4a08edc

@ -26,5 +26,10 @@ namespace Myshipping.Application
/// 提单号 /// 提单号
/// </summary> /// </summary>
public string MBlNo { get; set; } public string MBlNo { get; set; }
/// <summary>
/// 所属租户ID
/// </summary>
public string TenantId { get; set; }
} }
} }

@ -703,7 +703,7 @@ namespace Myshipping.Application
} }
var bookingOrder = _bookingOrderRepository.AsQueryable().Filter(null, true) 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) if (bookingOrder == null)
{ {
@ -742,7 +742,8 @@ namespace Myshipping.Application
mainInfo.UserEmail = userInfo?.Email; mainInfo.UserEmail = userInfo?.Email;
var contaList = _bookingOrderContaRepository.AsQueryable().Filter(null, true) 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); _logger.LogInformation("批次={no} 提取箱完成 数量={total}", batchNo, contaList.Count);
@ -770,7 +771,7 @@ namespace Myshipping.Application
_logger.LogInformation("批次={no} 对应请求报文完成 msg={msg}", batchNo, JSON.Serialize(msgModel)); _logger.LogInformation("批次={no} 对应请求报文完成 msg={msg}", batchNo, JSON.Serialize(msgModel));
var entity = _bookingOrderRepository.AsQueryable().Filter(null, true) 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.LstDraftCompareRlt = compareResult.extra2.Any(a => a.IsDiff) ? "DIFF" : "";
entity.LstDraftCompareDate = nowDate; entity.LstDraftCompareDate = nowDate;

Loading…
Cancel
Save