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