From 0f8900b54bc3c99b3088af3ba6ccca9bf07274e4 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 11:47:55 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B8=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/EmbedTraceFlowResultDto.cs | 13 +++++ .../Dtos/QueryTraceAfterPortResultDto.cs | 5 ++ .../EmbedTraceProductService.cs | 53 +++++++++++++++++-- 3 files changed, 66 insertions(+), 5 deletions(-) diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/EmbedTraceFlowResultDto.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/EmbedTraceFlowResultDto.cs index fc2a179a..012f2799 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/EmbedTraceFlowResultDto.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/EmbedTraceFlowResultDto.cs @@ -81,6 +81,19 @@ namespace Myshipping.Application /// public string statusCnName { get; set; } + /// + /// 是否分段开始 + /// + public bool isSplitStart { get; set; } + /// + /// 是否分段结束 + /// + public bool isSplitEnd { get; set; } + + /// + /// 是否当前最新节点 + /// + public bool isCurrentStatus { get; set; } } } diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs index 70a516e1..92f89f00 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs @@ -401,5 +401,10 @@ namespace Myshipping.Application /// 状态代码中文名称 /// public string statusCnName { get; set; } + + /// + /// 是否当前最新节点 + /// + public bool isCurrentStatus { get; set; } } } diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index c92378be..6a2a1be2 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -18,6 +18,7 @@ using System.Linq; using System.Net.Http; using System.Reflection.Emit; using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using Yitter.IdGenerator; @@ -97,6 +98,7 @@ namespace Myshipping.Application string[] skipStatus = new string[] { "GIOI", "LOFV", "FVD", "FVA", "DFFV", "LOR", "DFR", "RA", "DIFR", "LOT", "DIFT", "ADI", "DIDI", "CGRL", "RFP","ETD","ETA", "LDI", "CDPOD", "BPOD" }; string[] transferStatus = new string[] { "AIP", "BIP", "ETDIP", "DIIP", "GOIP", "GIIP", "LIP", "EDIP", "DEIP", "EAIP" }; + if (queryRlt.code == 200) { var queryResult = queryRlt.data.FirstOrDefault(); @@ -107,6 +109,7 @@ namespace Myshipping.Application { //这里需要翻译一下箱型 var ctnCodeMappingList = _cache.GetAllMappingCtn().GetAwaiter().GetResult().ToList(); + var ctnCodeList = _cache.GetAllCodeCtn().GetAwaiter().GetResult().ToList(); Dictionary referToCtnDict = new Dictionary(); @@ -116,11 +119,27 @@ namespace Myshipping.Application { result.resultData.containerInfoList.ForEach(s => { - var ctnMapping = ctnCodeMappingList.FirstOrDefault(t => t.MapCode.Equals(s.size)); + string ctnSize = s.size; + + if(!string.IsNullOrWhiteSpace(s.size)) + { + ctnSize = $"{Regex.Match(s.size, "[0-9]{2}")}{Regex.Match(s.size, "[a-zA-Z]{1,3}([0-9]{1})?")}"; + } + + var ctnCode = ctnCodeList.FirstOrDefault(t => !string.IsNullOrWhiteSpace(t.EdiCode) && t.EdiCode.Equals(ctnSize)); - if(ctnMapping != null) + if (ctnCode != null) + { + s.sizeName = ctnCode.Name?.Trim(); + } + else { - s.sizeName = ctnMapping.MapName?.Trim(); + var ctnMapping = ctnCodeMappingList.FirstOrDefault(t => !string.IsNullOrWhiteSpace(t.MapCode) && t.MapCode.Equals(ctnSize)); + + if (ctnMapping != null) + { + s.sizeName = ctnMapping.MapName?.Trim(); + } } if (s.containerStatusInfoList != null && s.containerStatusInfoList.Count > 0) @@ -157,8 +176,9 @@ namespace Myshipping.Application var ctnNo = referToCtnDict.OrderByDescending(a => a.Value).FirstOrDefault().Key; - var longContainerStatusList = result.resultData.containerInfoList.FirstOrDefault(a => a.containerNo.Equals(ctnNo, StringComparison.OrdinalIgnoreCase)) - .containerStatusInfoList; + var longContainerStatus = result.resultData.containerInfoList.FirstOrDefault(a => a.containerNo.Equals(ctnNo, StringComparison.OrdinalIgnoreCase)); + + var longContainerStatusList = longContainerStatus.containerStatusInfoList; var takeList = result.resultData.containerInfoList.SelectMany(p => p.containerStatusInfoList).GroupBy(a => a.statusCd).Select(a => @@ -221,10 +241,33 @@ namespace Myshipping.Application currStatus.statusCnName = kvp.Value.Item2; } + if(currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase)) + currStatus.isSplitStart = true; + + if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)) + currStatus.isSplitEnd = true; + + if (!string.IsNullOrWhiteSpace(longContainerStatus.currentNodeCd) && longContainerStatus.currentNodeCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase)) + { + currStatus.isCurrentStatus = true; + } + result.embedTraceFlowStatusList.Add(currStatus); } } } + + + result.resultData.containerInfoList.ForEach(b => + { + b.containerStatusInfoList.ForEach(c => { + if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase)) + { + c.isCurrentStatus = true; + } + }); + + }); } } From 4514dc103d2b98da674761e0aa51a9480a150da2 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 14:39:24 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B8=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/QueryTraceAfterPortResultDto.cs | 5 +++++ .../EmbedProjectGoodsStatus/EmbedTraceProductService.cs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs index 92f89f00..8cb025cb 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs @@ -344,6 +344,11 @@ namespace Myshipping.Application /// public string sizeName { get; set; } + /// + /// 当前节点代码中文 + /// + public string currentNodeCnName { get; set; } + /// /// 集装箱状态信息 /// diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index 6a2a1be2..ea95f233 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -206,7 +206,7 @@ namespace Myshipping.Application } else { - currStatus.isComplete = true; + currStatus.isComplete = false; currStatus.hasStatusCtnNum = currArg.Count(a => a.isEst.Equals("N", StringComparison.OrdinalIgnoreCase)); currStatus.noStatusCtnNum = currArg.Count(a => !a.isEst.Equals("N", StringComparison.OrdinalIgnoreCase)); } @@ -260,6 +260,11 @@ namespace Myshipping.Application result.resultData.containerInfoList.ForEach(b => { + if(statusEnumDict.Any(k=> !string.IsNullOrWhiteSpace(b.currentNodeCd) && k.Key.Equals(b.currentNodeCd, StringComparison.OrdinalIgnoreCase))) + { + b.currentNodeCnName = !string.IsNullOrWhiteSpace(statusEnumDict[b.currentNodeCd].Item2) ? statusEnumDict[b.currentNodeCd].Item2 : statusEnumDict[b.currentNodeCd].Item1; + } + b.containerStatusInfoList.ForEach(c => { if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase)) { From f27520d890b22535ee18e52d3b85296d7823183f Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 14:54:31 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B8=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/QueryTraceAfterPortResultDto.cs | 2 +- .../EmbedTraceProductService.cs | 37 +++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs index 8cb025cb..effd0df9 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/Dtos/QueryTraceAfterPortResultDto.cs @@ -16,7 +16,7 @@ namespace Myshipping.Application /// /// 回执消息 /// - public string msg { get; set; } + public string message { get; set; } /// /// 查询详情列表 diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index ea95f233..2a5dc9ad 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -92,10 +92,10 @@ namespace Myshipping.Application .Where(t => t.TypeCode.Equals("after_port_trace_ctn_status", StringComparison.OrdinalIgnoreCase)).ToList(); //按顺序取状态配置字典 - Dictionary> statusEnumDict = statusDict.Select(a => new { Key = a.Code, Val = new Tuple(a.Value,a.Remark, a.Sort), Sort = a.Sort }) + Dictionary> statusEnumDict = statusDict.Select(a => new { Key = a.Code, Val = new Tuple(a.Value, a.Remark, a.Sort), Sort = a.Sort }) .OrderBy(a => a.Sort).ToDictionary(a => a.Key, b => b.Val); - string[] skipStatus = new string[] { "GIOI", "LOFV", "FVD", "FVA", "DFFV", "LOR", "DFR", "RA", "DIFR", "LOT", "DIFT", "ADI", "DIDI", "CGRL", "RFP","ETD","ETA", "LDI", "CDPOD", "BPOD" }; + string[] skipStatus = new string[] { "GIOI", "LOFV", "FVD", "FVA", "DFFV", "LOR", "DFR", "RA", "DIFR", "LOT", "DIFT", "ADI", "DIDI", "CGRL", "RFP", "ETD", "ETA", "LDI", "CDPOD", "BPOD" }; string[] transferStatus = new string[] { "AIP", "BIP", "ETDIP", "DIIP", "GOIP", "GIIP", "LIP", "EDIP", "DEIP", "EAIP" }; @@ -121,7 +121,7 @@ namespace Myshipping.Application { string ctnSize = s.size; - if(!string.IsNullOrWhiteSpace(s.size)) + if (!string.IsNullOrWhiteSpace(s.size)) { ctnSize = $"{Regex.Match(s.size, "[0-9]{2}")}{Regex.Match(s.size, "[a-zA-Z]{1,3}([0-9]{1})?")}"; } @@ -216,9 +216,9 @@ namespace Myshipping.Application return currStatus; }).ToList(); - foreach (KeyValuePair> kvp in statusEnumDict) + foreach (KeyValuePair> kvp in statusEnumDict) { - if(!skipStatus.Contains(kvp.Key)) + if (!skipStatus.Contains(kvp.Key)) { //不是中转的需要把状态节点去掉 if (isTransfer || (!isTransfer && !transferStatus.Contains(kvp.Key))) @@ -230,7 +230,7 @@ namespace Myshipping.Application currStatus = new EmbedTraceFlowStatusInfo { statusCd = kvp.Key, - statusCnName = !string.IsNullOrWhiteSpace(kvp.Value.Item2)? kvp.Value.Item2 : kvp.Value.Item1, + statusCnName = !string.IsNullOrWhiteSpace(kvp.Value.Item2) ? kvp.Value.Item2 : kvp.Value.Item1, sortNo = kvp.Value.Item3, statusCtnStatic = $"0/{referToCtnDict.Count}", }; @@ -241,11 +241,11 @@ namespace Myshipping.Application currStatus.statusCnName = kvp.Value.Item2; } - if(currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase)) - currStatus.isSplitStart = true; + if (currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase)) + currStatus.isSplitStart = true; if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)) - currStatus.isSplitEnd = true; + currStatus.isSplitEnd = true; if (!string.IsNullOrWhiteSpace(longContainerStatus.currentNodeCd) && longContainerStatus.currentNodeCd.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase)) { @@ -260,11 +260,11 @@ namespace Myshipping.Application result.resultData.containerInfoList.ForEach(b => { - if(statusEnumDict.Any(k=> !string.IsNullOrWhiteSpace(b.currentNodeCd) && k.Key.Equals(b.currentNodeCd, StringComparison.OrdinalIgnoreCase))) + if (statusEnumDict.Any(k => !string.IsNullOrWhiteSpace(b.currentNodeCd) && k.Key.Equals(b.currentNodeCd, StringComparison.OrdinalIgnoreCase))) { b.currentNodeCnName = !string.IsNullOrWhiteSpace(statusEnumDict[b.currentNodeCd].Item2) ? statusEnumDict[b.currentNodeCd].Item2 : statusEnumDict[b.currentNodeCd].Item1; } - + b.containerStatusInfoList.ForEach(c => { if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase)) { @@ -273,7 +273,22 @@ namespace Myshipping.Application }); }); + + _logger.LogInformation($"{JSON.Serialize(queryDto)} 查询成功"); + } + else + { + _logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{result.resultMessage}"); + + throw Oops.Oh(result.resultMessage); } + + } + else + { + _logger.LogInformation($"{JSON.Serialize(queryDto)} 查询失败,{queryRlt.message}"); + + throw Oops.Oh(result.resultMessage.Contains("官网查询无数据") ? "无查询结果" : "查询失败"); } return result; From bf332c593f60fdf48b666b0a4d62352ca0a62361 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 16:51:41 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=B8=AA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmbedTraceProductService.cs | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs index 2a5dc9ad..6db0e021 100644 --- a/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs +++ b/Myshipping.Application/Service/EmbedProjectGoodsStatus/EmbedTraceProductService.cs @@ -6,6 +6,7 @@ using Furion.FriendlyException; using Furion.JsonSerialization; using Furion.RemoteRequest.Extensions; using Mapster; +using MathNet.Numerics.Distributions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -216,6 +217,19 @@ namespace Myshipping.Application return currStatus; }).ToList(); + var APODtotal = takeList.Where(p => p.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)).ToList(); + + if (APODtotal.Count > 1 && APODtotal.Any(p => p.isComplete)) + { + takeList = takeList.Select(a => + { + if (a.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !a.isComplete) + return null; + + return a; + }).Where(a => a != null).ToList(); + } + foreach (KeyValuePair> kvp in statusEnumDict) { if (!skipStatus.Contains(kvp.Key)) @@ -244,6 +258,7 @@ namespace Myshipping.Application if (currStatus.statusCd.Equals("DPOL", StringComparison.OrdinalIgnoreCase)) currStatus.isSplitStart = true; + if (currStatus.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase)) currStatus.isSplitEnd = true; @@ -265,12 +280,29 @@ namespace Myshipping.Application b.currentNodeCnName = !string.IsNullOrWhiteSpace(statusEnumDict[b.currentNodeCd].Item2) ? statusEnumDict[b.currentNodeCd].Item2 : statusEnumDict[b.currentNodeCd].Item1; } - b.containerStatusInfoList.ForEach(c => { + b.containerStatusInfoList = b.containerStatusInfoList.Select(c => + { if (!string.IsNullOrWhiteSpace(b.currentNodeCd) && b.currentNodeCd.Equals(c.statusCd, StringComparison.OrdinalIgnoreCase)) { c.isCurrentStatus = true; } - }); + + if (!string.IsNullOrWhiteSpace(c.statusPlace)) + c.statusPlace = c.statusPlace.ToUpper(); + + if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("ETA", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + + if (!string.IsNullOrWhiteSpace(c.statusCd) && c.statusCd.Equals("APOD", StringComparison.OrdinalIgnoreCase) && !c.isEst.Equals("N", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + + return c; + + }).Where(a => a != null).ToList(); }); From 023a3d7fa7862e898c5d15619f55348fd49ac78b Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 18:41:54 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9INNTRA=E8=AE=A2=E8=88=B1?= =?UTF-8?q?=20CMA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index ef8a2452..e6be4079 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -7627,6 +7627,12 @@ namespace Myshipping.Application primaryModel.ETA = primaryModel.ETD; } + if (ediRouteEnum == EDIRouteEnum.INTTRA) + { + if (!string.IsNullOrWhiteSpace(ediExtModel.WeiTuoFang)) + primaryModel.WEITUO = ediExtModel.WeiTuoFang; + } + primaryModel.KINGTAREWEIGHT = ediExtModel.KingTareweight.HasValue ? ediExtModel.KingTareweight.Value : 0; _logger.LogInformation("批次={no} 提取箱完成 数量={total}", batchNo, contaList.Count); From 6513d9a47d77ef60ee1432b96af32c4093ff93e4 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 18:58:37 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20INTTRA=20=E8=AE=A2?= =?UTF-8?q?=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/EDI/InttraEdiHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Myshipping.Application/EDI/InttraEdiHelper.cs b/Myshipping.Application/EDI/InttraEdiHelper.cs index 4e7683e2..06d405e9 100644 --- a/Myshipping.Application/EDI/InttraEdiHelper.cs +++ b/Myshipping.Application/EDI/InttraEdiHelper.cs @@ -780,7 +780,7 @@ namespace Myshipping.Application.EDI r.WriteLine("UNH+" + bill.ORDERNO + "+IFTMBF:D:99B:UN'"); icount = icount + 2; - if (bill.CARRIEREDICODE == "HLCU") + if (bill.CARRIEREDICODE == "HLCU" || bill.CARRIEREDICODE == "CMDU" || bill.CARRIEREDICODE == "CHNL") { if (InttrEdi.filerole == "9") r.WriteLine("BGM+335+" + bill.ORDERNO + "SO+9'"); From a917129f837dd4d77f9476a1626e8d2d46c3a260 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 16 May 2024 19:10:55 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9INTTRA=20=E8=AE=A2?= =?UTF-8?q?=E8=88=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Application/EDI/InttraEdiHelper.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Myshipping.Application/EDI/InttraEdiHelper.cs b/Myshipping.Application/EDI/InttraEdiHelper.cs index 06d405e9..ed7fded6 100644 --- a/Myshipping.Application/EDI/InttraEdiHelper.cs +++ b/Myshipping.Application/EDI/InttraEdiHelper.cs @@ -328,8 +328,14 @@ namespace Myshipping.Application.EDI if (string.IsNullOrEmpty(headData.OpEmail)) { error = error + "
操作的邮箱不能为空"; } } - if (string.IsNullOrEmpty(headData.MBLNO)) - { error = error + "
主提单号不能为空"; } + + //截单时必需校验提单号,订舱时CMA可以不校验提单号必填 + if (InttrEdi.filetype == "E" || (InttrEdi.filetype == "B" && (headData.CARRIEREDICODE != "HLCU" && headData.CARRIEREDICODE != "CMDU" && headData.CARRIEREDICODE != "CHNL"))) + { + if (string.IsNullOrEmpty(headData.MBLNO)) + { error = error + "
主提单号不能为空"; } + } + if (string.IsNullOrEmpty(headData.BLFRT)) { error = error + "
提单号:" + headData.MBLNO + " 付费方式不能为空"; } From 407fefdb4094a2a12e7d5a90e5decefeec959b17 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Fri, 17 May 2024 09:24:56 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=88=B1=E4=BD=8D?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E6=88=90=E8=AE=A2=E8=88=B1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingSlot/BookingSlotService.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs index 549ab7a3..d209d965 100644 --- a/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs +++ b/Myshipping.Application/Service/BookingSlot/BookingSlotService.cs @@ -1837,6 +1837,20 @@ namespace Myshipping.Application if (id > 0) { + List slots = new List(); + + //检索舱位信息 + var slotInfo = Detail(bookingSlotBase.Id).GetAwaiter().GetResult(); + + BookingSlotBaseWithCtnDto baseInfo = slotInfo.Adapt(); + baseInfo.Id = bookingSlotBase.Id; + baseInfo.CtnList = slotInfo.CtnList.Adapt>(); + + slots.Add(baseInfo); + + //对应订舱和舱位关系 + var allocRlt = await ImportSlots(slots, id, false); + //这里如果指定了委托单位的邮件联系人,则推送订舱联系人 if (generateModel.CustomerContactList != null && generateModel.CustomerContactList.Count > 0) {