|
|
|
@ -43,12 +43,14 @@ namespace Myshipping.Application
|
|
|
|
|
private readonly SqlSugarRepository<BookingServiceItem> _repServiceItem;
|
|
|
|
|
private readonly SqlSugarRepository<BookingOrder> _repOrder;
|
|
|
|
|
private readonly SqlSugarRepository<BookingCustomerOrderTemplate> _repOrderTempl;
|
|
|
|
|
private readonly SqlSugarRepository<BookingEDIExt> _repEdiExt;
|
|
|
|
|
|
|
|
|
|
public BookingCustomerOrderService(SqlSugarRepository<BookingCustomerOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
|
|
|
|
|
ILogger<BookingOrderService> logger, ISysCacheService cache, SqlSugarRepository<BookingFile> repFile,
|
|
|
|
|
SqlSugarRepository<BookingStatusLog> statuslog, SqlSugarRepository<BookingServiceItem> repServiceItem,
|
|
|
|
|
SqlSugarRepository<BookingOrder> repOrder, SqlSugarRepository<BookingStatusLogDetail> repStatuslogDetail,
|
|
|
|
|
SqlSugarRepository<BookingCustomerOrderTemplate> repOrderTempl)
|
|
|
|
|
SqlSugarRepository<BookingCustomerOrderTemplate> repOrderTempl,
|
|
|
|
|
SqlSugarRepository<BookingEDIExt> repEdiExt)
|
|
|
|
|
{
|
|
|
|
|
this._logger = logger;
|
|
|
|
|
this._rep = rep;
|
|
|
|
@ -60,6 +62,7 @@ namespace Myshipping.Application
|
|
|
|
|
this._repOrder = repOrder;
|
|
|
|
|
this._repStatuslogDetail = repStatuslogDetail;
|
|
|
|
|
this._repOrderTempl = repOrderTempl;
|
|
|
|
|
this._repEdiExt = repEdiExt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 订舱草稿及附件
|
|
|
|
@ -720,6 +723,12 @@ namespace Myshipping.Application
|
|
|
|
|
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
|
bkEdiExt.SalerCode = model.SaleCode;
|
|
|
|
|
await _repEdiExt.InsertAsync(bkEdiExt);
|
|
|
|
|
|
|
|
|
|
var ctnList = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == model.Id).ToListAsync();
|
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
|
{
|
|
|
|
@ -1053,6 +1062,12 @@ namespace Myshipping.Application
|
|
|
|
|
bkOrder.ParentId = 0;
|
|
|
|
|
await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
|
bkEdiExt.Id = YitIdHelper.NextId();
|
|
|
|
|
bkEdiExt.BookingId = bkOrder.Id;
|
|
|
|
|
bkEdiExt.SalerCode = model.SaleCode;
|
|
|
|
|
await _repEdiExt.InsertAsync(bkEdiExt);
|
|
|
|
|
|
|
|
|
|
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
|