From ed83427593432db639aa66f915054a2937ce47c5 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Fri, 23 Dec 2022 09:08:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E8=B0=83=E7=94=A8=E8=BF=90?= =?UTF-8?q?=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BookingOrder/BookingOrderService.cs | 38 +++-- Myshipping.Core/Myshipping.Core.xml | 135 ++++++++++++++++++ .../DjyTenantConfig/DjyTenantConfigService.cs | 2 +- 3 files changed, 160 insertions(+), 15 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 2ff7cdec..9635b351 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -367,7 +367,7 @@ namespace Myshipping.Application } var entity = input.Adapt(); - entity.TOTALNO = NumberToUpper.ToUpper(entity.PKGS==null?0: entity.PKGS); + entity.TOTALNO = NumberToUpper.ToUpper(entity.PKGS == null ? 0 : entity.PKGS); await _rep.InsertAsync(entity); if (input.ctnInputs != null) { @@ -877,9 +877,13 @@ namespace Myshipping.Application /// 调用运踪接口 /// [HttpGet("/BookingOrder/SendTrace")] - public async Task SendTrace(string BusinessId, string YARDID, string YARD, string MBLNO, string CARRIER = "", string CARRIERID = "", bool isbook = false) + public async Task SendTrace(List dto) { - _logger.LogInformation("调用运踪接口提单号:" + MBLNO + " 调用运踪接口"); + + if (dto == null) + { + throw Oops.Bah("未传入正确参数!"); + } var key = _webAccountConfig.GetAccountConfig("seae_billtraceurl", UserManager.UserId).Result; if (key == null) { @@ -889,16 +893,20 @@ namespace Myshipping.Application var url = _cache.GetAllDictData().Result; BillTraceDto billdto = new BillTraceDto(); List billTraceList = new List(); - billTraceList.Add(new BillTraceList - { - BusinessId = BusinessId, - MBLNO = MBLNO, - YARD = YARD == "" ? null : YARD, - YardCode = YARDID == "" ? null : YARDID, - CARRIER = CARRIER == "" ? null : CARRIER, - CARRIERID = CARRIERID == "" ? null : CARRIERID, - isBook = isbook - }); + foreach (var item in dto) + { + _logger.LogInformation("调用运踪接口提单号:" + item.MBLNO + " 调用运踪接口"); + billTraceList.Add(new BillTraceList + { + BusinessId = item.BusinessId, + MBLNO = item.MBLNO, + YARD = item.YARD == "" ? null : item.YARD, + YardCode = item.YardCode == "" ? null : item.YardCode, + CARRIER = item.CARRIER == "" ? null : item.CARRIER, + CARRIERID = item.CARRIERID == "" ? null : item.CARRIERID, + isBook = item.isBook + }); + } billdto.Children = billTraceList; billdto.Key = key.Account; billdto.PWD = key.Password; @@ -907,7 +915,9 @@ namespace Myshipping.Application var json = billdto.ToJsonString(); _logger.LogInformation("调用运踪接口发送josn:" + json); var html = await url.FirstOrDefault(x => x.TypeCode == "url_set" && x.Code == "request_seae_billtraceurl").Value.SetHttpMethod(HttpMethod.Post).SetQueries(new { msg = json }).SetRetryPolicy(3, 5000).SendAsAsync(); - _logger.LogInformation("调用运踪接口提单号:" + MBLNO + " 调用运踪接口返回" + html.ToJsonString()); + _logger.LogInformation("调用运踪接口返回" + html.ToJsonString()); + + } /// diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index c0aa5232..8d450de2 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -1949,6 +1949,21 @@ 租户名称 + + + + + + + + 类型(列表显示列、查询条件自定义等) + + + + + 配置数据json + + 租户参数类别表 @@ -10088,6 +10103,126 @@ + + + 公司默认值 + + + + + 分页查询用户自定义配置 + + + + + + + 增加用户自定义配置(同用户、同类型的会更新) + + + + + + + 更新用户自定义配置 + + + + + + + 删除用户自定义配置 + + + + + + + 获取用户自定义配置 + + + + + + + 自定义配置输入参数 + + + + + 类型(列表显示列、查询条件自定义等) + + + + + 配置数据json + + + + + 自定义配置新增输入参数 + + + + + 自定义配置修改输入参数 + + + + + 主键 + + + + + 自定义配置获取(删除)输入参数 + + + + + 主键 + + + + + 自定义配置查询输入参数 + + + + + 主键 + + + + + 类型(列表显示列、查询条件自定义等) + + + + + 配置数据json + + + + + 订舱自定义配置输出参数 + + + + + 主键 + + + + + 类型(列表显示列、查询条件自定义等) + + + + + 配置数据json + + 租户参数 diff --git a/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs b/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs index a81d5892..356ff819 100644 --- a/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs +++ b/Myshipping.Core/Service/DjyTenantConfig/DjyTenantConfigService.cs @@ -11,7 +11,7 @@ using Myshipping.Core.Entity; namespace Myshipping.Core.Service { /// - /// 用户自定义配置服务 + /// 公司默认值 /// [ApiDescriptionSettings(Name = "DjyTenantConfig", Order = 1)] public class DjyTenantConfigService : IDjyTenantConfigService, IDynamicApiController, ITransient