From d55a553ddc8dcf23a74f5df3a133fe82d86606da Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Wed, 21 Dec 2022 11:27:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C=E3=80=81=E5=8D=95?= =?UTF-8?q?=E8=AF=81=E3=80=81=E9=94=80=E5=94=AE=E3=80=81=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E7=AD=89=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 2 +- Myshipping.Core/Entity/DJY/DjyCustomer.cs | 33 ++++++++ Myshipping.Core/Myshipping.Core.xml | 83 ++++++++++++++++++- .../Service/DjyCustomer/DjyCustomerService.cs | 4 +- .../DjyCustomer/Dto/DjyCustomerInput.cs | 33 ++++++++ 5 files changed, 152 insertions(+), 3 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 27c8b5f4..f0fae463 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -744,7 +744,7 @@ namespace Myshipping.Application [HttpPost("/BookingOrder/AddFile")] public async Task AddFile(IFormFile file, [FromForm] BookingFileDto dto) { - //未上传打印模板文件 + //未上传文件 if (file == null || file.Length == 0) { throw Oops.Bah(BookingErrorCode.BOOK200); diff --git a/Myshipping.Core/Entity/DJY/DjyCustomer.cs b/Myshipping.Core/Entity/DJY/DjyCustomer.cs index e92aa4d8..cf4787ca 100644 --- a/Myshipping.Core/Entity/DJY/DjyCustomer.cs +++ b/Myshipping.Core/Entity/DJY/DjyCustomer.cs @@ -99,5 +99,38 @@ namespace Myshipping.Core.Entity /// 备注 /// public string Remark { get; set; } + + /// + /// 操作id + /// + public string OPID { get; set; } + /// + /// 单证id + /// + public string DOCID { get; set; } + /// + /// 操作 + /// + public string OP { get; set; } + /// + /// 单证 + /// + public string DOC { get; set; } + /// + /// 销售ID + /// + public string SALEID { get; set; } + /// + /// 销售 + /// + public string SALE { get; set; } + /// + /// 客服ID + /// + public string CUSTSERVICEID { get; set; } + /// + /// 客服 + /// + public string CUSTSERVICE { get; set; } } } \ No newline at end of file diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index 59a7c2dc..41fa7530 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -1704,6 +1704,46 @@ 备注 + + + 操作id + + + + + 单证id + + + + + 操作 + + + + + 单证 + + + + + 销售ID + + + + + 销售 + + + + + 客服ID + + + + + 客服 + + @@ -9031,11 +9071,12 @@ - + 下拉筛选 关键字 + 类型,参考字典参数:客户属性(djy_cust_prop) @@ -9528,6 +9569,46 @@ 备注 + + + 操作id + + + + + 单证id + + + + + 操作 + + + + + 单证 + + + + + 销售ID + + + + + 销售 + + + + + 客服ID + + + + + 客服 + + 订舱客户新增输入参数 diff --git a/Myshipping.Core/Service/DjyCustomer/DjyCustomerService.cs b/Myshipping.Core/Service/DjyCustomer/DjyCustomerService.cs index 2d448f32..67bd44af 100644 --- a/Myshipping.Core/Service/DjyCustomer/DjyCustomerService.cs +++ b/Myshipping.Core/Service/DjyCustomer/DjyCustomerService.cs @@ -175,13 +175,15 @@ namespace Myshipping.Core.Service /// 下拉筛选 /// /// 关键字 + /// 类型,参考字典参数:客户属性(djy_cust_prop) /// [HttpGet("/DjyCustomer/Suggest")] - public async Task Suggest(string keyword) + public async Task Suggest(string keyword, string type) { List userlist = await DataFilterExtensions.GetDataScopeIdList(); var entities = await _rep.AsQueryable().Filter(null, true) .Where(x => x.TenantId == UserManager.TENANT_ID) + .WhereIF(!string.IsNullOrWhiteSpace(type), u => u.PropString.Contains(type)) .WhereIF(!string.IsNullOrWhiteSpace(keyword), u => u.CodeName.Contains(keyword) || u.ShortName.Contains(keyword)) .ToPagedListAsync(1, 10); return entities.XnPagedResult(); diff --git a/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs b/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs index b7983697..13f8fa3a 100644 --- a/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs +++ b/Myshipping.Core/Service/DjyCustomer/Dto/DjyCustomerInput.cs @@ -125,6 +125,39 @@ namespace Myshipping.Core.Service /// public virtual string Remark { get; set; } + /// + /// 操作id + /// + public string OPID { get; set; } + /// + /// 单证id + /// + public string DOCID { get; set; } + /// + /// 操作 + /// + public string OP { get; set; } + /// + /// 单证 + /// + public string DOC { get; set; } + /// + /// 销售ID + /// + public string SALEID { get; set; } + /// + /// 销售 + /// + public string SALE { get; set; } + /// + /// 客服ID + /// + public string CUSTSERVICEID { get; set; } + /// + /// 客服 + /// + public string CUSTSERVICE { get; set; } + public List Contacts { get; set; } } From 7171046d79289e3d62a91f032f01e22f35c026ec Mon Sep 17 00:00:00 2001 From: wanghaomei Date: Wed, 21 Dec 2022 14:33:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?OCR=E9=99=84=E4=BB=B6=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=88=B0=E8=AE=A2=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/Myshipping.Application.xml | 3 ++- .../Service/BookingOrder/BookingOrderService.cs | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Myshipping.Application/Myshipping.Application.xml b/Myshipping.Application/Myshipping.Application.xml index 68bb5c27..9baf3d2b 100644 --- a/Myshipping.Application/Myshipping.Application.xml +++ b/Myshipping.Application/Myshipping.Application.xml @@ -4989,11 +4989,12 @@ 船公司ID 返回适用的路由枚举 - + 上传ocr文件 + 订舱id diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index f9618ccd..26585db4 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -892,8 +892,8 @@ namespace Myshipping.Application { BusinessId = BusinessId, MBLNO = MBLNO, - YARD = YARD==""?null: YARD, - YardCode = YARDID == ""? null: YARDID, + YARD = YARD == "" ? null : YARD, + YardCode = YARDID == "" ? null : YARDID, CARRIER = CARRIER == "" ? null : CARRIER, CARRIERID = CARRIERID == "" ? null : CARRIERID, isBook = isbook @@ -2806,9 +2806,10 @@ namespace Myshipping.Application /// 上传ocr文件 /// /// + /// 订舱id /// [HttpPost("/BookingOrder/OcrUpFile")] - public async Task OcrUpFile(IFormFile file) + public async Task OcrUpFile(IFormFile file, long bookingId) { //未上传文件 if (file == null || file.Length == 0) @@ -2816,6 +2817,14 @@ namespace Myshipping.Application throw Oops.Bah("未上传文件"); } + //保存到订舱 + await AddFile(file, new BookingFileDto() + { + BookingId = bookingId, + TypeCode = "other", + TypeName = "其他" + }); + var originalFilename = file.FileName; // 文件原始名称 var fileSuffix = Path.GetExtension(file.FileName).ToLower(); // 文件后缀