diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
index f155a7ff..f9a4518c 100644
--- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
+++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
@@ -1104,18 +1104,21 @@ namespace Myshipping.Application
///
///
[HttpPost("/BookingLetteryard/Save")]
- public async Task LetteryardSave(UpdateBookingLetteryardInput input)
+ public async Task LetteryardSave(UpdateBookingLetteryardInput input)
{
+ long rtnId = 0;
if (input.Id == 0)
{
var entity = input.Adapt();
await _repLetterYard.InsertAsync(entity);
+ rtnId = entity.Id;
}
else
{
- var entity = _repLetterYard.FirstOrDefault(x => x.BookingId == input.Id);
- entity = input.Adapt(entity);
+ var entity = _repLetterYard.AsQueryable().Filter(null, true).First(x => x.Id == input.Id);
+ input.Adapt(entity);
await _repLetterYard.UpdateAsync(entity);
+ rtnId = entity.Id;
}
var order = _rep.FirstOrDefault(x => x.Id == input.BookingId);
@@ -1133,6 +1136,8 @@ namespace Myshipping.Application
{
await VgmLink(input.BookingId);
}
+
+ return rtnId;
}