diff --git a/Myshipping.Application/EDI/VOLTAEdiNewHelper.cs b/Myshipping.Application/EDI/VOLTAEdiNewHelper.cs index 2c468ab2..b7b6c4ed 100644 --- a/Myshipping.Application/EDI/VOLTAEdiNewHelper.cs +++ b/Myshipping.Application/EDI/VOLTAEdiNewHelper.cs @@ -836,15 +836,19 @@ namespace Myshipping.Application.EDI.VOLTA } else ISSUETYPE = "EXP"; */ - if (bill.ISSUETYPE == "ORIGINAL") - { - ISSUETYPE = "ORI"; - } - else if (bill.ISSUETYPE == "TELEX") + + if (InttrEdi.filetype == "E" || string.IsNullOrWhiteSpace(bill.ISSUETYPE)) { - ISSUETYPE = "TER"; + if (bill.ISSUETYPE == "ORIGINAL") + { + ISSUETYPE = "ORI"; + } + else if (bill.ISSUETYPE == "TELEX") + { + ISSUETYPE = "TER"; + } + else ISSUETYPE = "EXP"; } - else ISSUETYPE = "EXP"; //if (new string[] { "ORI", "TER", "EXP" }.Contains(bill.ISSUETYPE)) //{ diff --git a/Myshipping.Application/Entity/BookingTruckCtn.cs b/Myshipping.Application/Entity/BookingTruckCtn.cs index cd4f0ef7..aeaa26e4 100644 --- a/Myshipping.Application/Entity/BookingTruckCtn.cs +++ b/Myshipping.Application/Entity/BookingTruckCtn.cs @@ -136,6 +136,10 @@ namespace Myshipping.Application.Entity /// [Description("备注")] public string REMARK { get; set; } - + /// + /// VGM + /// + [Description("VGM")] + public decimal? VGM { get; set; } } } diff --git a/Myshipping.Application/Entity/TaskManagePlat/TaskTruckCtn.cs b/Myshipping.Application/Entity/TaskManagePlat/TaskTruckCtn.cs index 01899770..6a528975 100644 --- a/Myshipping.Application/Entity/TaskManagePlat/TaskTruckCtn.cs +++ b/Myshipping.Application/Entity/TaskManagePlat/TaskTruckCtn.cs @@ -140,5 +140,10 @@ namespace Myshipping.Application.Entity /// [Description("备注")] public string REMARK { get; set; } + /// + /// VGM + /// + [Description("VGM")] + public decimal? VGM { get; set; } } } diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 3169f58d..2d5377ed 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -7022,21 +7022,30 @@ namespace Myshipping.Application if (ediRouteEnum == EDIRouteEnum.NULL) throw Oops.Bah($"当前船公司没有对应的请求路由配置"); - //这里船公司VOL的单子不能走此通道发送 - if (ediRouteEnum == EDIRouteEnum.VOL) - { - var isVOLTASIExport = App.Configuration["IsVOLTASIExport"]; - if (!string.IsNullOrWhiteSpace(isVOLTASIExport)) - { - if (isVOLTASIExport == "1") - throw Oops.Bah($"当前船公司VOL不能执行标准发送"); - } - else - { - throw Oops.Bah($"当前船公司VOL不能执行标准发送"); - } + var allowMblStart = App.Configuration["VOLTASIExportStart"].Split(new char[] { ',' }); + + //if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS")) + if (allowMblStart.Any(a => order.MBLNO.StartsWith(a))) + { + //VOL、FCS、REL,SLS + throw Oops.Bah($"当前船公司{order.CARRIERID} 提单号开头({(string.Join("、", allowMblStart.ToArray()))})不能执行标准发送"); } + ////这里船公司VOL的单子不能走此通道发送 + //if (ediRouteEnum == EDIRouteEnum.VOL) + //{ + // var isVOLTASIExport = App.Configuration["IsVOLTASIExport"]; + + // if (!string.IsNullOrWhiteSpace(isVOLTASIExport)) + // { + // if (isVOLTASIExport == "1") + // throw Oops.Bah($"当前船公司VOL不能执行标准发送"); + // } + // else + // { + // throw Oops.Bah($"当前船公司VOL不能执行标准发送"); + // } + //} //集装箱型 @@ -11806,12 +11815,12 @@ namespace Myshipping.Application */ string batchNo = IDGen.NextID().ToString(); - var isVOLTASIExport = App.Configuration["IsVOLTASIExport"]; + //var isVOLTASIExport = App.Configuration["IsVOLTASIExport"]; - if(!string.IsNullOrWhiteSpace(isVOLTASIExport) && isVOLTASIExport == "0") - { - throw Oops.Bah("配置IsVOLTASIExport=0不弹出窗口"); - } + //if(!string.IsNullOrWhiteSpace(isVOLTASIExport) && isVOLTASIExport == "0") + //{ + // throw Oops.Bah("配置IsVOLTASIExport=0不弹出窗口"); + //} _logger.LogInformation("批次={no}获取请求VOLTA截单详情 {msg}", batchNo, JSON.Serialize(model)); @@ -11833,8 +11842,11 @@ namespace Myshipping.Application _logger.LogInformation("批次={no}提取订单信息完成", batchNo); - if (!order.CARRIERID.Equals("VOL", StringComparison.OrdinalIgnoreCase) && !order.CARRIERID.Equals("FCS", StringComparison.OrdinalIgnoreCase) - && !order.CARRIERID.Equals("SLS", StringComparison.OrdinalIgnoreCase)) + var allowCarrier = App.Configuration["VOLTASIExportCarrier"].Split(new char[] { ',' }); + //if (!order.CARRIERID.Equals("VOL", StringComparison.OrdinalIgnoreCase) && !order.CARRIERID.Equals("FCS", StringComparison.OrdinalIgnoreCase) + // && !order.CARRIERID.Equals("SLS", StringComparison.OrdinalIgnoreCase)) + + if (allowCarrier.Contains(order.CARRIERID)) { throw Oops.Bah("当前订单的船公司不是VOL(沃尔塔航运)不能发送VOLTA截单EDI"); } @@ -11842,9 +11854,13 @@ namespace Myshipping.Application if (string.IsNullOrWhiteSpace(order.MBLNO)) throw Oops.Bah($"提单号不能为空"); - if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS")) + var allowMblStart = App.Configuration["VOLTASIExportStart"].Split(new char[] { ',' }); + + //if (!order.MBLNO.StartsWith("VOL") && !order.MBLNO.StartsWith("FCS") && !order.MBLNO.StartsWith("REL") && !order.MBLNO.StartsWith("SLS")) + if (!allowMblStart.Any(a => order.MBLNO.StartsWith(a))) { - throw Oops.Bah($"只支持提单号开头是(VOL、FCS、REL,SLS)发送截单"); + //VOL、FCS、REL,SLS + throw Oops.Bah($"只支持提单号开头是({(string.Join("、", allowMblStart.ToArray()))})发送截单"); } bool isSeaLead = false; diff --git a/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckCtnDto.cs b/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckCtnDto.cs index 78cc8562..1184de3b 100644 --- a/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckCtnDto.cs +++ b/Myshipping.Application/Service/BookingTruck/Dtos/BookingTruckCtnDto.cs @@ -108,5 +108,10 @@ namespace Myshipping.Application /// 司机电话 /// public string CarDriverTel { get; set; } + + /// + /// VGM + /// + public Nullable VGM { get; set; } } } diff --git a/Myshipping.Web.Core/applicationconfig.json b/Myshipping.Web.Core/applicationconfig.json index c0581e78..c16c5a1d 100644 --- a/Myshipping.Web.Core/applicationconfig.json +++ b/Myshipping.Web.Core/applicationconfig.json @@ -143,5 +143,7 @@ "EmailNoticeUrl": "http://47.104.73.97:8801/mail/send", "EmailNoticeDefaultUser": "jianghaiqing@myshipping.net", "BookingAmendModifyWebApiUrl": "http://localhost:5110/api/TaskBookingAmendmentParser/ModifyBookingAmendmentFile", - "IsVOLTASIExport": "0" + "IsVOLTASIExport": "0", + "VOLTASIExportCarrier": "SLS,REL", + "VOLTASIExportStart": "SLS,REL" } \ No newline at end of file