From fae8d14767848114117d7817325adad165ed515a Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Mon, 12 Jun 2023 17:48:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=A6=E5=8F=B7=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=B4=A7=E7=BA=B8?= =?UTF-8?q?=E6=AF=94=E5=AF=B9=E5=9B=9E=E5=86=99=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Para/ParaService.cs | 1 + .../Dtos/ShippingOrderCompareCallBackInfo.cs | 49 +++++++++++++++++++ .../ITaskShippingOrderCompareService.cs | 7 ++- .../TaskShippingOrderCompareService.cs | 39 +++++++++++++-- Myshipping.Core/Myshipping.Core.xml | 5 ++ 5 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 Myshipping.Application/Service/TaskManagePlat/Dtos/ShippingOrderCompareCallBackInfo.cs diff --git a/Myshipping.Application/Service/Para/ParaService.cs b/Myshipping.Application/Service/Para/ParaService.cs index 9378cb58..ee5d0d50 100644 --- a/Myshipping.Application/Service/Para/ParaService.cs +++ b/Myshipping.Application/Service/Para/ParaService.cs @@ -612,6 +612,7 @@ namespace Myshipping.Application info.LANE_CODE = model.LaneCode?.Trim(); info.LANE_CNAME = model.LaneCName?.Trim(); info.POD_CODE = model.PODCode?.Trim(); + info.CARRIER_CODE = model.CarrierCode?.Trim(); await _paraContractNoInfoRepository.AsUpdateable(info).IgnoreColumns(it => new { diff --git a/Myshipping.Application/Service/TaskManagePlat/Dtos/ShippingOrderCompareCallBackInfo.cs b/Myshipping.Application/Service/TaskManagePlat/Dtos/ShippingOrderCompareCallBackInfo.cs new file mode 100644 index 00000000..21620b91 --- /dev/null +++ b/Myshipping.Application/Service/TaskManagePlat/Dtos/ShippingOrderCompareCallBackInfo.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application +{ + /// + /// 下货纸比对回写 + /// + public class ShippingOrderCompareCallBackInfo + { + /// + /// 请求主键 + /// + public string reqBusiId { get; set; } + + /// + /// 比对ID + /// + public string compareId { get; set; } + + /// + /// 下货纸比对方式 MANUAL-手动 AUTO-自动 + /// + public string compareMode { get; set; } = "AUTO"; + + /// + /// 比对结果代码 + /// + public string compareRltCode { get; set; } + + /// + /// 比对结果名称 + /// + public string compareRltName { get; set; } + + /// + /// 比对日期 + /// + public DateTime compareDate { get; set; } + + /// + /// 比对详情 + /// + public List compareDetailList { get; set; } + } +} diff --git a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskShippingOrderCompareService.cs b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskShippingOrderCompareService.cs index 0d99d76b..f89c26e9 100644 --- a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskShippingOrderCompareService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskShippingOrderCompareService.cs @@ -26,12 +26,11 @@ namespace Myshipping.Application /// 返回回执 Task ExcuteShippingOrderCompareBatchAsync(string[] bookingIds); - /// - /// 批量执行下货纸比对 + /// 下货纸自动比对回写状态 /// - /// 订舱主键组 + /// 比对回写详情 /// 返回回执 - Task AutoTaskShippingOrderCompareCallBackAsync(string[] bookingIds); + Task AutoTaskShippingOrderCompareCallBackAsync(ShippingOrderCompareCallBackInfo model); } } diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs index e91551bd..51dde6ce 100644 --- a/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs +++ b/Myshipping.Application/Service/TaskManagePlat/TaskShippingOrderCompareService.cs @@ -12,6 +12,7 @@ using Myshipping.Application.Entity; using Myshipping.Core; using Myshipping.Core.Entity; using Myshipping.Core.Service; +using StackExchange.Profiling.Internal; using System; using System.Collections.Generic; using System.Linq; @@ -278,14 +279,44 @@ namespace Myshipping.Application /// - /// 批量执行下货纸比对 + /// 下货纸自动比对回写状态 /// - /// 订舱主键组 + /// 比对回写详情 /// 返回回执 - public async Task AutoTaskShippingOrderCompareCallBackAsync(string[] bookingIds) + public async Task AutoTaskShippingOrderCompareCallBackAsync([FromBody] ShippingOrderCompareCallBackInfo model) { - return new TaskManageExcuteResultDto(); + TaskManageExcuteResultDto result = new TaskManageExcuteResultDto(); + + try + { + if(string.IsNullOrWhiteSpace(model.reqBusiId)) + throw Oops.Oh($"订舱主键{model.reqBusiId}不能为空"); + + if (string.IsNullOrWhiteSpace(model.compareId)) + throw Oops.Oh($"比对ID{model.compareId}不能为空"); + + if (string.IsNullOrWhiteSpace(model.compareMode)) + throw Oops.Oh($"下货纸比对方式不能为空{model.compareMode}不能为空"); + + if (string.IsNullOrWhiteSpace(model.compareRltCode)) + throw Oops.Oh($"比对结果代码{model.compareRltCode}不能为空"); + + if (string.IsNullOrWhiteSpace(model.compareRltName)) + throw Oops.Oh($"比对结果名称{model.compareId}不能为空"); + + var bookingOrder = await _bookingOrderRepository.AsQueryable() + .FirstAsync(a => a.Id == long.Parse(model.reqBusiId)); + } + catch (Exception ex) + { + result.succ = false; + result.msg = $"下货纸自动比对回写状态失败,{ex.Message}"; + } + + return result; } + + /// /// 生成请求规则报文 /// diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index 520ce811..e964f7ed 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -18111,6 +18111,11 @@ 东胜id + + + 是否调用接口标志 + + 东胜id