From e8615ce4d17b2b8a007fc9c8aa4758edb769038a Mon Sep 17 00:00:00 2001 From: wanghaomei <86whm@163.com> Date: Wed, 3 Apr 2024 14:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E5=AE=B6=E5=8C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EDI/ZhongYuanSoApiHelper.cs | 200 ++++++++++++++++ .../BookingSoTemplate/BookingSoTemplate.cs | 222 ++++++++++-------- .../Dto/BookingSoTemplateDto.cs | 20 ++ 3 files changed, 345 insertions(+), 97 deletions(-) create mode 100644 Myshipping.Application/EDI/ZhongYuanSoApiHelper.cs diff --git a/Myshipping.Application/EDI/ZhongYuanSoApiHelper.cs b/Myshipping.Application/EDI/ZhongYuanSoApiHelper.cs new file mode 100644 index 00000000..f249bb88 --- /dev/null +++ b/Myshipping.Application/EDI/ZhongYuanSoApiHelper.cs @@ -0,0 +1,200 @@ +using Furion; +using Myshipping.Application.Entity; +using Myshipping.Core; +using Myshipping.Core.Service; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application.EDI +{ + /// + /// 中远API订舱 + /// + public static class ZhongYuanSoApiHelper + { + public async static Task> DoPost(long bookingId) + { + var repCustOrder = App.GetService>(); + var repOrder = App.GetService>(); + var repCtn = App.GetService>(); + + var cacheService = App.GetService(); + + var order = repOrder.FirstOrDefault(o => o.Id == bookingId); + if (order == null) + { + return new KeyValuePair(false, "订舱信息未找到"); + } + + + + return new KeyValuePair(); + } + } + + public class ZhongYuanSoApiModel + { + /// + /// 用户key + /// + public string userKey { get; set; } + + /// + /// 用户secret + /// + public string userSecret { get; set; } + + /// + /// 网站账户 + /// + public string webAccount { get; set; } + + /// + /// 网站密码 + /// + public string webPassword { get; set; } + + /// + /// 上传类型 + /// + public string uploadType { get; set; } + + /// + /// 在选择草稿及模板时, 保存时填写的名称 + /// + public string saveName { get; set; } + + /// + /// 在选择草稿及模板时的描述 + /// + public string saveDes { get; set; } + + /// + /// 路线信息 + /// + public ZhongYuanSoApiRoute routes { get; set; } + + /// + /// 发货人信息 + /// + public string shipperInfo { get; set; } + + /// + /// 收货人信息 + /// + public string consigneeInfo { get; set; } + + /// + /// 通知人信息 + /// + public string notifyInfo { get; set; } + + /// + /// 货代信息 + /// + public string forwarderInfo { get; set; } + } + + public class ZhongYuanSoApiRoute + { + /// + /// 出发城市 + /// + public string originCity { get; set; } + + /// + /// 目的城市 + /// + public string destinationCity { get; set; } + + /// + /// 船名 + /// + public string vesselName { get; set; } + + /// + /// 航次 + /// + public string voyageNumber { get; set; } + + /// + /// 航线代码 + /// + public string serviceCode { get; set; } + } + + public class ZhongYuanSoApiSFT + { + /// + /// 名字 + /// + public string partyName { get; set; } + + /// + /// 国家 + /// + public string country { get; set; } + + /// + /// 省 + /// + public string state { get; set; } + + /// + /// 城市名 + /// + public string city { get; set; } + + /// + /// 区 + /// + public string county { get; set; } + + /// + /// 详细地址 + /// + public string addressDes { get; set; } + + /// + /// 邮编 + /// + public string postalCode { get; set; } + + /// + /// 姓 + /// + public string firstName { get; set; } + + /// + /// 名 + /// + public string lastName { get; set; } + + /// + /// 电话 + /// + public ZhongYuanSoApiPhone phone { get; set; } + } + + public class ZhongYuanSoApiPhone + { + + /// + /// 国家代码 + /// + public string countryCode { get; set; } + + /// + /// 区号 + /// + public string areaCode { get; set; } + + /// + /// 电话号码 + /// + public string number { get; set; } + } +} diff --git a/Myshipping.Application/Entity/BookingSoTemplate/BookingSoTemplate.cs b/Myshipping.Application/Entity/BookingSoTemplate/BookingSoTemplate.cs index b88dfe3f..d6e9f7c1 100644 --- a/Myshipping.Application/Entity/BookingSoTemplate/BookingSoTemplate.cs +++ b/Myshipping.Application/Entity/BookingSoTemplate/BookingSoTemplate.cs @@ -93,343 +93,371 @@ namespace Myshipping.Application.Entity [SugarColumn(ColumnName = "Priority")] [Description("优先级")] public string Priority{ get; set; } - + /// /// 发货人名称 /// [SugarColumn(ColumnName = "ShipperName")] [Description("发货人名称")] - public string ShipperName{ get; set; } - + public string ShipperName { get; set; } + /// /// 发货人地址 /// [SugarColumn(ColumnName = "ShipperAddress")] [Description("发货人地址")] - public string ShipperAddress{ get; set; } - + public string ShipperAddress { get; set; } + /// /// 发货人国家 /// [SugarColumn(ColumnName = "ShipperCountry")] [Description("发货人国家")] - public string ShipperCountry{ get; set; } - + public string ShipperCountry { get; set; } + /// /// 发货人省份 /// [SugarColumn(ColumnName = "ShipperProvince")] [Description("发货人省份")] - public string ShipperProvince{ get; set; } - + public string ShipperProvince { get; set; } + /// /// 发货人城市 /// [SugarColumn(ColumnName = "ShipperCity")] [Description("发货人城市")] - public string ShipperCity{ get; set; } - + public string ShipperCity { get; set; } + /// /// 发货人区县 /// [SugarColumn(ColumnName = "ShipperCounty")] [Description("发货人区县")] - public string ShipperCounty{ get; set; } - + public string ShipperCounty { get; set; } + /// /// 发货人邮政编码 /// [SugarColumn(ColumnName = "ShipperPostCode")] [Description("发货人邮政编码")] - public string ShipperPostCode{ get; set; } - + public string ShipperPostCode { get; set; } + /// /// 发货人联系人名 /// [SugarColumn(ColumnName = "ShipperFirstName")] [Description("发货人联系人名")] - public string ShipperFirstName{ get; set; } - + public string ShipperFirstName { get; set; } + /// /// 发货人联系人姓 /// [SugarColumn(ColumnName = "ShipperLastName")] [Description("发货人联系人姓")] - public string ShipperLastName{ get; set; } - + public string ShipperLastName { get; set; } + + /// + /// 发货人电话国家代码 + /// + [SugarColumn(ColumnName = "ShipperPhoneCountryCode")] + [Description("发货人电话国家代码")] + public string ShipperPhoneCountryCode { get; set; } + /// /// 发货人电话区号 /// [SugarColumn(ColumnName = "ShipperPhoneCode")] [Description("发货人电话区号")] - public string ShipperPhoneCode{ get; set; } - + public string ShipperPhoneCode { get; set; } + /// /// 发货人电话 /// [SugarColumn(ColumnName = "ShipperPhone")] [Description("发货人电话")] - public string ShipperPhone{ get; set; } - + public string ShipperPhone { get; set; } + /// /// 发货人分机号 /// [SugarColumn(ColumnName = "ShipperPhoneExtension")] [Description("发货人分机号")] - public string ShipperPhoneExtension{ get; set; } - + public string ShipperPhoneExtension { get; set; } + /// /// 收货人名称 /// [SugarColumn(ColumnName = "ConsigneeName")] [Description("收货人名称")] - public string ConsigneeName{ get; set; } - + public string ConsigneeName { get; set; } + /// /// 收货人地址 /// [SugarColumn(ColumnName = "ConsigneeAddress")] [Description("收货人地址")] - public string ConsigneeAddress{ get; set; } - + public string ConsigneeAddress { get; set; } + /// /// 收货人国家 /// [SugarColumn(ColumnName = "ConsigneeCountry")] [Description("收货人国家")] - public string ConsigneeCountry{ get; set; } - + public string ConsigneeCountry { get; set; } + /// /// 收货人省份 /// [SugarColumn(ColumnName = "ConsigneeProvince")] [Description("收货人省份")] - public string ConsigneeProvince{ get; set; } - + public string ConsigneeProvince { get; set; } + /// /// 收货人城市 /// [SugarColumn(ColumnName = "ConsigneeCity")] [Description("收货人城市")] - public string ConsigneeCity{ get; set; } - + public string ConsigneeCity { get; set; } + /// /// 收货人区县 /// [SugarColumn(ColumnName = "ConsigneeCounty")] [Description("收货人区县")] - public string ConsigneeCounty{ get; set; } - + public string ConsigneeCounty { get; set; } + /// /// 收货人邮政编码 /// [SugarColumn(ColumnName = "ConsigneePostCode")] [Description("收货人邮政编码")] - public string ConsigneePostCode{ get; set; } - + public string ConsigneePostCode { get; set; } + /// /// 收货人联系人名 /// [SugarColumn(ColumnName = "ConsigneeFirstName")] [Description("收货人联系人名")] - public string ConsigneeFirstName{ get; set; } - + public string ConsigneeFirstName { get; set; } + /// /// 收货人联系人姓 /// [SugarColumn(ColumnName = "ConsigneeLastName")] [Description("收货人联系人姓")] - public string ConsigneeLastName{ get; set; } - + public string ConsigneeLastName { get; set; } + + /// + /// 收货人电话国家代码 + /// + [SugarColumn(ColumnName = "ConsigneePhoneCountryCode")] + [Description("收货人电话国家代码")] + public string ConsigneePhoneCountryCode { get; set; } + /// /// 收货人电话区号 /// [SugarColumn(ColumnName = "ConsigneePhoneCode")] [Description("收货人电话区号")] - public string ConsigneePhoneCode{ get; set; } - + public string ConsigneePhoneCode { get; set; } + /// /// 收货人电话 /// [SugarColumn(ColumnName = "ConsigneePhone")] [Description("收货人电话")] - public string ConsigneePhone{ get; set; } - + public string ConsigneePhone { get; set; } + /// /// 收货人分机号 /// [SugarColumn(ColumnName = "ConsigneePhoneExtension")] [Description("收货人分机号")] - public string ConsigneePhoneExtension{ get; set; } - + public string ConsigneePhoneExtension { get; set; } + /// /// 通知人名称 /// [SugarColumn(ColumnName = "NotifypartName")] [Description("通知人名称")] - public string NotifypartName{ get; set; } - + public string NotifypartName { get; set; } + /// /// 通知人地址 /// [SugarColumn(ColumnName = "NotifypartAddress")] [Description("通知人地址")] - public string NotifypartAddress{ get; set; } - + public string NotifypartAddress { get; set; } + /// /// 通知人国家 /// [SugarColumn(ColumnName = "NotifypartCountry")] [Description("通知人国家")] - public string NotifypartCountry{ get; set; } - + public string NotifypartCountry { get; set; } + /// /// 通知人省份 /// [SugarColumn(ColumnName = "NotifypartProvince")] [Description("通知人省份")] - public string NotifypartProvince{ get; set; } - + public string NotifypartProvince { get; set; } + /// /// 通知人城市 /// [SugarColumn(ColumnName = "NotifypartCity")] [Description("通知人城市")] - public string NotifypartCity{ get; set; } - + public string NotifypartCity { get; set; } + /// /// 通知人区县 /// [SugarColumn(ColumnName = "NotifypartCounty")] [Description("通知人区县")] - public string NotifypartCounty{ get; set; } - + public string NotifypartCounty { get; set; } + /// /// 通知人邮政编码 /// [SugarColumn(ColumnName = "NotifypartPostCode")] [Description("通知人邮政编码")] - public string NotifypartPostCode{ get; set; } - + public string NotifypartPostCode { get; set; } + /// /// 通知人联系人名 /// [SugarColumn(ColumnName = "NotifypartFirstName")] [Description("通知人联系人名")] - public string NotifypartFirstName{ get; set; } - + public string NotifypartFirstName { get; set; } + /// /// 通知人联系人姓 /// [SugarColumn(ColumnName = "NotifypartLastName")] [Description("通知人联系人姓")] - public string NotifypartLastName{ get; set; } - + public string NotifypartLastName { get; set; } + + /// + /// 通知人电话国家代码 + /// + [SugarColumn(ColumnName = "NotifypartPhoneCountryCode")] + [Description("通知人电话国家代码")] + public string NotifypartPhoneCountryCode { get; set; } + /// /// 通知人电话区号 /// [SugarColumn(ColumnName = "NotifypartPhoneCode")] [Description("通知人电话区号")] - public string NotifypartPhoneCode{ get; set; } - + public string NotifypartPhoneCode { get; set; } + /// /// 通知人电话 /// [SugarColumn(ColumnName = "NotifypartPhone")] [Description("通知人电话")] - public string NotifypartPhone{ get; set; } - + public string NotifypartPhone { get; set; } + /// /// 通知人分机号 /// [SugarColumn(ColumnName = "NotifypartPhoneExtension")] [Description("通知人分机号")] - public string NotifypartPhoneExtension{ get; set; } - + public string NotifypartPhoneExtension { get; set; } + /// /// 订舱公司名称 /// [SugarColumn(ColumnName = "BookingName")] [Description("订舱公司名称")] - public string BookingName{ get; set; } - + public string BookingName { get; set; } + /// /// 订舱公司地址 /// [SugarColumn(ColumnName = "BookingAddress")] [Description("订舱公司地址")] - public string BookingAddress{ get; set; } - + public string BookingAddress { get; set; } + /// /// 订舱公司国家 /// [SugarColumn(ColumnName = "BookingCountry")] [Description("订舱公司国家")] - public string BookingCountry{ get; set; } - + public string BookingCountry { get; set; } + /// /// 订舱公司省份 /// [SugarColumn(ColumnName = "BookingProvince")] [Description("订舱公司省份")] - public string BookingProvince{ get; set; } - + public string BookingProvince { get; set; } + /// /// 订舱公司城市 /// [SugarColumn(ColumnName = "BookingCity")] [Description("订舱公司城市")] - public string BookingCity{ get; set; } - + public string BookingCity { get; set; } + /// /// 订舱公司区县 /// [SugarColumn(ColumnName = "BookingCounty")] [Description("订舱公司区县")] - public string BookingCounty{ get; set; } - + public string BookingCounty { get; set; } + /// /// 订舱公司邮政编码 /// [SugarColumn(ColumnName = "BookingPostCode")] [Description("订舱公司邮政编码")] - public string BookingPostCode{ get; set; } - + public string BookingPostCode { get; set; } + /// /// 订舱公司联系人名 /// [SugarColumn(ColumnName = "BookingFirstName")] [Description("订舱公司联系人名")] - public string BookingFirstName{ get; set; } - + public string BookingFirstName { get; set; } + /// /// 订舱公司联系人姓 /// [SugarColumn(ColumnName = "BookingLastName")] [Description("订舱公司联系人姓")] - public string BookingLastName{ get; set; } - + public string BookingLastName { get; set; } + + /// + /// 订舱公司电话国家代码 + /// + [SugarColumn(ColumnName = "BookingPhoneCountryCode")] + [Description("订舱公司电话国家代码")] + public string BookingPhoneCountryCode { get; set; } + /// /// 订舱公司电话区号 /// [SugarColumn(ColumnName = "BookingPhoneCode")] [Description("订舱公司电话区号")] - public string BookingPhoneCode{ get; set; } - + public string BookingPhoneCode { get; set; } + /// /// 订舱公司电话 /// [SugarColumn(ColumnName = "BookingPhone")] [Description("订舱公司电话")] - public string BookingPhone{ get; set; } - + public string BookingPhone { get; set; } + /// /// 订舱公司分机号 /// [SugarColumn(ColumnName = "BookingPhoneExtension")] [Description("订舱公司分机号")] - public string BookingPhoneExtension{ get; set; } - + public string BookingPhoneExtension { get; set; } + /// /// 品名货描 /// diff --git a/Myshipping.Application/Service/BookingSoTemplate/Dto/BookingSoTemplateDto.cs b/Myshipping.Application/Service/BookingSoTemplate/Dto/BookingSoTemplateDto.cs index 3a0c8fa1..7395cfa5 100644 --- a/Myshipping.Application/Service/BookingSoTemplate/Dto/BookingSoTemplateDto.cs +++ b/Myshipping.Application/Service/BookingSoTemplate/Dto/BookingSoTemplateDto.cs @@ -117,6 +117,11 @@ namespace Myshipping.Application /// public string ShipperLastName { get; set; } + /// + /// 发货人电话国家代码 + /// + public string ShipperPhoneCountryCode { get; set; } + /// /// 发货人电话区号 /// @@ -177,6 +182,11 @@ namespace Myshipping.Application /// public string ConsigneeLastName { get; set; } + /// + /// 收货人电话国家代码 + /// + public string ConsigneePhoneCountryCode { get; set; } + /// /// 收货人电话区号 /// @@ -237,6 +247,11 @@ namespace Myshipping.Application /// public string NotifypartLastName { get; set; } + /// + /// 通知人电话国家代码 + /// + public string NotifypartPhoneCountryCode { get; set; } + /// /// 通知人电话区号 /// @@ -297,6 +312,11 @@ namespace Myshipping.Application /// public string BookingLastName { get; set; } + /// + /// 订舱公司电话国家代码 + /// + public string BookingPhoneCountryCode { get; set; } + /// /// 订舱公司电话区号 ///