|
|
|
@ -1104,18 +1104,21 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingLetteryard/Save")]
|
|
|
|
|
public async Task LetteryardSave(UpdateBookingLetteryardInput input)
|
|
|
|
|
public async Task<long> LetteryardSave(UpdateBookingLetteryardInput input)
|
|
|
|
|
{
|
|
|
|
|
long rtnId = 0;
|
|
|
|
|
if (input.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var entity = input.Adapt<BookingLetteryard>();
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|