放舱修改

optimize
wanghaomei 2 years ago
parent d21f914865
commit 704dc5e552

@ -1104,18 +1104,21 @@ namespace Myshipping.Application
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost("/BookingLetteryard/Save")] [HttpPost("/BookingLetteryard/Save")]
public async Task LetteryardSave(UpdateBookingLetteryardInput input) public async Task<long> LetteryardSave(UpdateBookingLetteryardInput input)
{ {
long rtnId = 0;
if (input.Id == 0) if (input.Id == 0)
{ {
var entity = input.Adapt<BookingLetteryard>(); var entity = input.Adapt<BookingLetteryard>();
await _repLetterYard.InsertAsync(entity); await _repLetterYard.InsertAsync(entity);
rtnId = entity.Id;
} }
else else
{ {
var entity = _repLetterYard.FirstOrDefault(x => x.BookingId == input.Id); var entity = _repLetterYard.AsQueryable().Filter(null, true).First(x => x.Id == input.Id);
entity = input.Adapt(entity); input.Adapt(entity);
await _repLetterYard.UpdateAsync(entity); await _repLetterYard.UpdateAsync(entity);
rtnId = entity.Id;
} }
var order = _rep.FirstOrDefault(x => x.Id == input.BookingId); var order = _rep.FirstOrDefault(x => x.Id == input.BookingId);
@ -1133,6 +1136,8 @@ namespace Myshipping.Application
{ {
await VgmLink(input.BookingId); await VgmLink(input.BookingId);
} }
return rtnId;
} }

Loading…
Cancel
Save