|
|
|
@ -75,6 +75,7 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatusLogDetail> _statuslogdetail;
|
|
|
|
|
private readonly SqlSugarRepository<BookingStatus> _repBookingStatus;
|
|
|
|
|
private readonly IBookingOrderService _bookingorderservice;
|
|
|
|
|
private readonly SqlSugarRepository<BookingExtendState> _bookingextstate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DataSyncService(ILogger<DataSyncService> logger, ISysCacheService cache, SqlSugarRepository<BookingOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
|
|
|
|
@ -83,7 +84,7 @@ namespace Myshipping.Application
|
|
|
|
|
SqlSugarRepository<DjyCustomerContact> djycustomercontact, SqlSugarRepository<DjyVesselInfo> vesselinfo, SqlSugarRepository<BookingCtnDetail> ctndetailrep
|
|
|
|
|
, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingLog> bookinglog, SqlSugarRepository<BookingLogDetail> bookinglogdetail,
|
|
|
|
|
SqlSugarRepository<BookingGoodsStatus> goodsStatus, SqlSugarRepository<BookingGoodsStatusConfig> goodsStatusConfig, SqlSugarRepository<DjyTenantLine> repline,
|
|
|
|
|
SqlSugarRepository<BookingRemark> bookingremark, SqlSugarRepository<MappingCarrier> mapcarrier, SqlSugarRepository<CodeForwarder> codeForwarder,
|
|
|
|
|
SqlSugarRepository<BookingRemark> bookingremark, SqlSugarRepository<MappingCarrier> mapcarrier, SqlSugarRepository<CodeForwarder> codeForwarder, SqlSugarRepository<BookingExtendState> bookingextstate,
|
|
|
|
|
SqlSugarRepository<CodePort> codePortRep, SqlSugarRepository<CodeLane> codeLaneRep, ICommonDBService commonDBService, SqlSugarRepository<RelaPortCarrierLane> relaPortLane,
|
|
|
|
|
SqlSugarRepository<DjyWebsiteAccountConfig> accountconfig, SqlSugarRepository<BookingFile> bookingfile, IBookingOrderService bookingorderservice)
|
|
|
|
|
{
|
|
|
|
@ -116,6 +117,7 @@ namespace Myshipping.Application
|
|
|
|
|
this._repStatuslog = statuslog;
|
|
|
|
|
this._statuslogdetail = statuslogdetail;
|
|
|
|
|
this._repBookingStatus = repBookingStatus;
|
|
|
|
|
this._bookingextstate = bookingextstate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2585,6 +2587,45 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 东胜封账
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param dto=""></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[SqlSugarUnitOfWork]
|
|
|
|
|
[HttpPost("/DataSync/SaveBookingOrderLock"), ApiUser(ApiCode = "SaveBookingOrderLock")]
|
|
|
|
|
public async Task SaveBookingOrderLock(List<BookingOrderLock> dto) {
|
|
|
|
|
if (dto==null) {
|
|
|
|
|
throw Oops.Bah(BookingErrorCode.BOOK201);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in dto)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var extends = _bookingextstate.FirstOrDefault(x => x.bookingId == item.BookingId);
|
|
|
|
|
|
|
|
|
|
if (extends == null)
|
|
|
|
|
{
|
|
|
|
|
extends.bookingId = item.BookingId;
|
|
|
|
|
extends.IsLockBooking = item.LockStatus;
|
|
|
|
|
await _bookingextstate.InsertAsync(extends);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
extends.IsLockBooking = item.LockStatus;
|
|
|
|
|
await _bookingextstate.AsUpdateable(extends).IgnoreColumns().ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|