diff --git a/Myshipping.Application/Entity/BookingCustomerOrder.cs b/Myshipping.Application/Entity/BookingCustomerOrder.cs
index b29d2dc..f107de1 100644
--- a/Myshipping.Application/Entity/BookingCustomerOrder.cs
+++ b/Myshipping.Application/Entity/BookingCustomerOrder.cs
@@ -246,6 +246,11 @@ namespace Myshipping.Application.Entity
/// 箱高
///
public decimal CtrnHeight { get; set; }
+
+ ///
+ /// 销售代码
+ ///
+ public string SaleCode { get; set; }
}
///
diff --git a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs
index 9ab5002..c3ffad3 100644
--- a/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs
+++ b/Myshipping.Application/Service/BookingCustomerOrder/BookingCustomerOrderService.cs
@@ -43,12 +43,14 @@ namespace Myshipping.Application
private readonly SqlSugarRepository _repServiceItem;
private readonly SqlSugarRepository _repOrder;
private readonly SqlSugarRepository _repOrderTempl;
+ private readonly SqlSugarRepository _repEdiExt;
public BookingCustomerOrderService(SqlSugarRepository rep, SqlSugarRepository repCtn,
ILogger logger, ISysCacheService cache, SqlSugarRepository repFile,
SqlSugarRepository statuslog, SqlSugarRepository repServiceItem,
SqlSugarRepository repOrder, SqlSugarRepository repStatuslogDetail,
- SqlSugarRepository repOrderTempl)
+ SqlSugarRepository repOrderTempl,
+ SqlSugarRepository 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);
diff --git a/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs b/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs
index 3e4122b..9c545a4 100644
--- a/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs
+++ b/Myshipping.Application/Service/BookingCustomerOrder/Dto/Dtos.cs
@@ -280,6 +280,11 @@ namespace Myshipping.Application
/// 箱高
///
public decimal CtrnHeight { get; set; }
+
+ ///
+ /// 销售代码
+ ///
+ public string SaleCode { get; set; }
}
//保存dto