From 35101eb0b365d3fe0f8fe0d3a149e3dafac326e8 Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Thu, 17 Aug 2023 16:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=80=E5=94=AE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/BookingCustomerOrder.cs | 5 +++++ .../BookingCustomerOrderService.cs | 17 ++++++++++++++++- .../Service/BookingCustomerOrder/Dto/Dtos.cs | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) 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