diff --git a/Myshipping.Application/Service/BookingYunZong/BookingYunZong.cs b/Myshipping.Application/Service/BookingYunZong/BookingYunZong.cs index 731aa120..fb40d6f8 100644 --- a/Myshipping.Application/Service/BookingYunZong/BookingYunZong.cs +++ b/Myshipping.Application/Service/BookingYunZong/BookingYunZong.cs @@ -160,7 +160,7 @@ namespace Myshipping.Application var mblno = item.GetValue("bno").ToString(); - var bookingId = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno).Select(x => x.Id).FirstAsync(); + var bookingId = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno&&x.IsDeleted==false&&x.ParentId==0).Select(x => x.Id).FirstAsync(); var jarrInnerData = item.GetValue("data") as JArray; List yarddto = new List(); @@ -262,7 +262,7 @@ namespace Myshipping.Application var mblno = item.GetValue("bno").ToString(); - var bookingId = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno).Select(x => x.Id).FirstAsync(); + var bookingId = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno && x.IsDeleted == false && x.ParentId == 0).Select(x => x.Id).FirstAsync(); var list = await _repBookingStatus.AsQueryable().Filter(null, true).InnerJoin((d, t) => d.StaCode == t.Code && d.StaCate == "book_sta_cate_billtrace" && d.BookingId == bookingId).Select((d, t) => new { BookingId = d.BookingId, @@ -357,7 +357,7 @@ namespace Myshipping.Application //每票 货物 var mblno = item.GetValue("bno").ToString(); - var bookingOrder = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno && x.IsDeleted == false).FirstAsync(); + var bookingOrder = await _rep.AsQueryable().Filter(null, true).Where(x => x.MBLNO == mblno && x.IsDeleted == false && x.ParentId == 0).FirstAsync(); var list = await _repBookingStatus.AsQueryable().Filter(null, true).InnerJoin((d, t) => d.StaCode == t.Code && d.StaCate == "book_sta_cate_billtrace" && d.BookingId == bookingOrder.Id).Select((d, t) => new { BookingId = d.BookingId,