diff --git a/Myshipping.Application/EDI/SITCEdiHelper.cs b/Myshipping.Application/EDI/SITCEdiHelper.cs index 2dd9bd07..a078e4fe 100644 --- a/Myshipping.Application/EDI/SITCEdiHelper.cs +++ b/Myshipping.Application/EDI/SITCEdiHelper.cs @@ -75,6 +75,7 @@ namespace Myshipping.Application.EDI.SITC postModel.deliveryName = InttrEdi.BSLIST[0].PLACEDELIVERY; postModel.porId = InttrEdi.BSLIST[0].PLACERECEIPTID; postModel.porName = InttrEdi.BSLIST[0].PLACERECEIPT; + postModel.poWtatName = InttrEdi.BSLIST[0].TRANSPORT; postModel.vesselName = InttrEdi.BSLIST[0].VESSEL; postModel.lineCode = InttrEdi.BSLIST[0].ESLLINECODE; postModel.voyNo = InttrEdi.BSLIST[0].VOYNO; @@ -102,10 +103,11 @@ namespace Myshipping.Application.EDI.SITC postModel.weight = InttrEdi.BSLIST[0].KGS; postModel.cube = InttrEdi.BSLIST[0].CBM; postModel.packages = InttrEdi.BSLIST[0].PKGS; + postModel.packingType = InttrEdi.BSLIST[0].KINDPKGS; postModel.packageDesc = InttrEdi.BSLIST[0].KINDPKGS; postModel.marks = InttrEdi.BSLIST[0].MARKS; postModel.cargoDesc = InttrEdi.BSLIST[0].DESCRIPTION; - postModel.cargoType = InttrEdi.BSLIST[0].CARGOID; + postModel.cargoType = CargoIdStr(InttrEdi.BSLIST[0].CARGOID); postModel.isDanger = InttrEdi.BSLIST[0].CARGOID == "D" ? true : false; postModel.isRf = InttrEdi.BSLIST[0].CARGOID == "R" ? true : false; postModel.contactInfo = InttrEdi.BSLIST[0].OpEmail; @@ -128,6 +130,7 @@ namespace Myshipping.Application.EDI.SITC { postModel.extras = new List(); SitcApiPostModelExtra e = new SitcApiPostModelExtra(); + e.ctype = "RF"; e.tempMin = InttrEdi.BSLIST[0].TEMPMIN; e.tempMax = InttrEdi.BSLIST[0].TEMPMAX; e.tempSetting = InttrEdi.BSLIST[0].TEMPSET; @@ -177,8 +180,32 @@ namespace Myshipping.Application.EDI.SITC } #endregion + /// + /// 货物类型翻译 + /// + /// + /// + private static string CargoIdStr(string cargoId) + { + if (cargoId == "S") + { + return "ORDI"; + } + else if (cargoId == "R") + { + return "REEF"; + } + else if (cargoId == "D") + { + return "DNGR"; + } + + return ""; + } } + + public class SitcApiPostModel { /// @@ -226,6 +253,11 @@ namespace Myshipping.Application.EDI.SITC /// public string porName { get; set; } + /// + /// 中转港名称 + /// + public string poWtatName { get; set; } + /// /// 船名 /// @@ -361,6 +393,11 @@ namespace Myshipping.Application.EDI.SITC /// public int packages { get; set; } + /// + /// 包装类型 + /// + public string packingType { get; set; } + /// /// 包装类型 /// diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index a9843f54..587ceb21 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -7698,6 +7698,15 @@ namespace Myshipping.Application ediModel.BSLIST.Add(primaryModel); + //SITC + if (ediRouteEnum == EDIRouteEnum.SITC) + { + var user = await _repUser.FirstOrDefaultAsync(x => x.Id == UserManager.UserId); + + primaryModel.OpEmail = $"{user.EnName};{(string.IsNullOrEmpty(user.Tel) ? user.Phone : user.Tel)};{UserManager.Email}"; + + } + var result = await InnerSendBookingOrClosingEDI(model, ediModel, ediRouteEnum); _logger.LogInformation("批次={no} 生成EDI文件完成 结果={result}", batchNo, JSON.Serialize(result));