jianghaiqing 8 months ago
commit cfb3add07d

@ -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
{
/// <summary>
/// 中远API订舱
/// </summary>
public static class ZhongYuanSoApiHelper
{
public async static Task<KeyValuePair<bool, string>> DoPost(long bookingId)
{
var repCustOrder = App.GetService<SqlSugarRepository<BookingCustomerOrder>>();
var repOrder = App.GetService<SqlSugarRepository<BookingOrder>>();
var repCtn = App.GetService<SqlSugarRepository<BookingCtn>>();
var cacheService = App.GetService<ISysCacheService>();
var order = repOrder.FirstOrDefault(o => o.Id == bookingId);
if (order == null)
{
return new KeyValuePair<bool, string>(false, "订舱信息未找到");
}
return new KeyValuePair<bool, string>();
}
}
public class ZhongYuanSoApiModel
{
/// <summary>
/// 用户key
/// </summary>
public string userKey { get; set; }
/// <summary>
/// 用户secret
/// </summary>
public string userSecret { get; set; }
/// <summary>
/// 网站账户
/// </summary>
public string webAccount { get; set; }
/// <summary>
/// 网站密码
/// </summary>
public string webPassword { get; set; }
/// <summary>
/// 上传类型
/// </summary>
public string uploadType { get; set; }
/// <summary>
/// 在选择草稿及模板时, 保存时填写的名称
/// </summary>
public string saveName { get; set; }
/// <summary>
/// 在选择草稿及模板时的描述
/// </summary>
public string saveDes { get; set; }
/// <summary>
/// 路线信息
/// </summary>
public ZhongYuanSoApiRoute routes { get; set; }
/// <summary>
/// 发货人信息
/// </summary>
public string shipperInfo { get; set; }
/// <summary>
/// 收货人信息
/// </summary>
public string consigneeInfo { get; set; }
/// <summary>
/// 通知人信息
/// </summary>
public string notifyInfo { get; set; }
/// <summary>
/// 货代信息
/// </summary>
public string forwarderInfo { get; set; }
}
public class ZhongYuanSoApiRoute
{
/// <summary>
/// 出发城市
/// </summary>
public string originCity { get; set; }
/// <summary>
/// 目的城市
/// </summary>
public string destinationCity { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vesselName { get; set; }
/// <summary>
/// 航次
/// </summary>
public string voyageNumber { get; set; }
/// <summary>
/// 航线代码
/// </summary>
public string serviceCode { get; set; }
}
public class ZhongYuanSoApiSFT
{
/// <summary>
/// 名字
/// </summary>
public string partyName { get; set; }
/// <summary>
/// 国家
/// </summary>
public string country { get; set; }
/// <summary>
/// 省
/// </summary>
public string state { get; set; }
/// <summary>
/// 城市名
/// </summary>
public string city { get; set; }
/// <summary>
/// 区
/// </summary>
public string county { get; set; }
/// <summary>
/// 详细地址
/// </summary>
public string addressDes { get; set; }
/// <summary>
/// 邮编
/// </summary>
public string postalCode { get; set; }
/// <summary>
/// 姓
/// </summary>
public string firstName { get; set; }
/// <summary>
/// 名
/// </summary>
public string lastName { get; set; }
/// <summary>
/// 电话
/// </summary>
public ZhongYuanSoApiPhone phone { get; set; }
}
public class ZhongYuanSoApiPhone
{
/// <summary>
/// 国家代码
/// </summary>
public string countryCode { get; set; }
/// <summary>
/// 区号
/// </summary>
public string areaCode { get; set; }
/// <summary>
/// 电话号码
/// </summary>
public string number { get; set; }
}
}

@ -93,343 +93,371 @@ namespace Myshipping.Application.Entity
[SugarColumn(ColumnName = "Priority")]
[Description("优先级")]
public string Priority{ get; set; }
/// <summary>
/// 发货人名称
/// </summary>
[SugarColumn(ColumnName = "ShipperName")]
[Description("发货人名称")]
public string ShipperName{ get; set; }
public string ShipperName { get; set; }
/// <summary>
/// 发货人地址
/// </summary>
[SugarColumn(ColumnName = "ShipperAddress")]
[Description("发货人地址")]
public string ShipperAddress{ get; set; }
public string ShipperAddress { get; set; }
/// <summary>
/// 发货人国家
/// </summary>
[SugarColumn(ColumnName = "ShipperCountry")]
[Description("发货人国家")]
public string ShipperCountry{ get; set; }
public string ShipperCountry { get; set; }
/// <summary>
/// 发货人省份
/// </summary>
[SugarColumn(ColumnName = "ShipperProvince")]
[Description("发货人省份")]
public string ShipperProvince{ get; set; }
public string ShipperProvince { get; set; }
/// <summary>
/// 发货人城市
/// </summary>
[SugarColumn(ColumnName = "ShipperCity")]
[Description("发货人城市")]
public string ShipperCity{ get; set; }
public string ShipperCity { get; set; }
/// <summary>
/// 发货人区县
/// </summary>
[SugarColumn(ColumnName = "ShipperCounty")]
[Description("发货人区县")]
public string ShipperCounty{ get; set; }
public string ShipperCounty { get; set; }
/// <summary>
/// 发货人邮政编码
/// </summary>
[SugarColumn(ColumnName = "ShipperPostCode")]
[Description("发货人邮政编码")]
public string ShipperPostCode{ get; set; }
public string ShipperPostCode { get; set; }
/// <summary>
/// 发货人联系人名
/// </summary>
[SugarColumn(ColumnName = "ShipperFirstName")]
[Description("发货人联系人名")]
public string ShipperFirstName{ get; set; }
public string ShipperFirstName { get; set; }
/// <summary>
/// 发货人联系人姓
/// </summary>
[SugarColumn(ColumnName = "ShipperLastName")]
[Description("发货人联系人姓")]
public string ShipperLastName{ get; set; }
public string ShipperLastName { get; set; }
/// <summary>
/// 发货人电话国家代码
/// </summary>
[SugarColumn(ColumnName = "ShipperPhoneCountryCode")]
[Description("发货人电话国家代码")]
public string ShipperPhoneCountryCode { get; set; }
/// <summary>
/// 发货人电话区号
/// </summary>
[SugarColumn(ColumnName = "ShipperPhoneCode")]
[Description("发货人电话区号")]
public string ShipperPhoneCode{ get; set; }
public string ShipperPhoneCode { get; set; }
/// <summary>
/// 发货人电话
/// </summary>
[SugarColumn(ColumnName = "ShipperPhone")]
[Description("发货人电话")]
public string ShipperPhone{ get; set; }
public string ShipperPhone { get; set; }
/// <summary>
/// 发货人分机号
/// </summary>
[SugarColumn(ColumnName = "ShipperPhoneExtension")]
[Description("发货人分机号")]
public string ShipperPhoneExtension{ get; set; }
public string ShipperPhoneExtension { get; set; }
/// <summary>
/// 收货人名称
/// </summary>
[SugarColumn(ColumnName = "ConsigneeName")]
[Description("收货人名称")]
public string ConsigneeName{ get; set; }
public string ConsigneeName { get; set; }
/// <summary>
/// 收货人地址
/// </summary>
[SugarColumn(ColumnName = "ConsigneeAddress")]
[Description("收货人地址")]
public string ConsigneeAddress{ get; set; }
public string ConsigneeAddress { get; set; }
/// <summary>
/// 收货人国家
/// </summary>
[SugarColumn(ColumnName = "ConsigneeCountry")]
[Description("收货人国家")]
public string ConsigneeCountry{ get; set; }
public string ConsigneeCountry { get; set; }
/// <summary>
/// 收货人省份
/// </summary>
[SugarColumn(ColumnName = "ConsigneeProvince")]
[Description("收货人省份")]
public string ConsigneeProvince{ get; set; }
public string ConsigneeProvince { get; set; }
/// <summary>
/// 收货人城市
/// </summary>
[SugarColumn(ColumnName = "ConsigneeCity")]
[Description("收货人城市")]
public string ConsigneeCity{ get; set; }
public string ConsigneeCity { get; set; }
/// <summary>
/// 收货人区县
/// </summary>
[SugarColumn(ColumnName = "ConsigneeCounty")]
[Description("收货人区县")]
public string ConsigneeCounty{ get; set; }
public string ConsigneeCounty { get; set; }
/// <summary>
/// 收货人邮政编码
/// </summary>
[SugarColumn(ColumnName = "ConsigneePostCode")]
[Description("收货人邮政编码")]
public string ConsigneePostCode{ get; set; }
public string ConsigneePostCode { get; set; }
/// <summary>
/// 收货人联系人名
/// </summary>
[SugarColumn(ColumnName = "ConsigneeFirstName")]
[Description("收货人联系人名")]
public string ConsigneeFirstName{ get; set; }
public string ConsigneeFirstName { get; set; }
/// <summary>
/// 收货人联系人姓
/// </summary>
[SugarColumn(ColumnName = "ConsigneeLastName")]
[Description("收货人联系人姓")]
public string ConsigneeLastName{ get; set; }
public string ConsigneeLastName { get; set; }
/// <summary>
/// 收货人电话国家代码
/// </summary>
[SugarColumn(ColumnName = "ConsigneePhoneCountryCode")]
[Description("收货人电话国家代码")]
public string ConsigneePhoneCountryCode { get; set; }
/// <summary>
/// 收货人电话区号
/// </summary>
[SugarColumn(ColumnName = "ConsigneePhoneCode")]
[Description("收货人电话区号")]
public string ConsigneePhoneCode{ get; set; }
public string ConsigneePhoneCode { get; set; }
/// <summary>
/// 收货人电话
/// </summary>
[SugarColumn(ColumnName = "ConsigneePhone")]
[Description("收货人电话")]
public string ConsigneePhone{ get; set; }
public string ConsigneePhone { get; set; }
/// <summary>
/// 收货人分机号
/// </summary>
[SugarColumn(ColumnName = "ConsigneePhoneExtension")]
[Description("收货人分机号")]
public string ConsigneePhoneExtension{ get; set; }
public string ConsigneePhoneExtension { get; set; }
/// <summary>
/// 通知人名称
/// </summary>
[SugarColumn(ColumnName = "NotifypartName")]
[Description("通知人名称")]
public string NotifypartName{ get; set; }
public string NotifypartName { get; set; }
/// <summary>
/// 通知人地址
/// </summary>
[SugarColumn(ColumnName = "NotifypartAddress")]
[Description("通知人地址")]
public string NotifypartAddress{ get; set; }
public string NotifypartAddress { get; set; }
/// <summary>
/// 通知人国家
/// </summary>
[SugarColumn(ColumnName = "NotifypartCountry")]
[Description("通知人国家")]
public string NotifypartCountry{ get; set; }
public string NotifypartCountry { get; set; }
/// <summary>
/// 通知人省份
/// </summary>
[SugarColumn(ColumnName = "NotifypartProvince")]
[Description("通知人省份")]
public string NotifypartProvince{ get; set; }
public string NotifypartProvince { get; set; }
/// <summary>
/// 通知人城市
/// </summary>
[SugarColumn(ColumnName = "NotifypartCity")]
[Description("通知人城市")]
public string NotifypartCity{ get; set; }
public string NotifypartCity { get; set; }
/// <summary>
/// 通知人区县
/// </summary>
[SugarColumn(ColumnName = "NotifypartCounty")]
[Description("通知人区县")]
public string NotifypartCounty{ get; set; }
public string NotifypartCounty { get; set; }
/// <summary>
/// 通知人邮政编码
/// </summary>
[SugarColumn(ColumnName = "NotifypartPostCode")]
[Description("通知人邮政编码")]
public string NotifypartPostCode{ get; set; }
public string NotifypartPostCode { get; set; }
/// <summary>
/// 通知人联系人名
/// </summary>
[SugarColumn(ColumnName = "NotifypartFirstName")]
[Description("通知人联系人名")]
public string NotifypartFirstName{ get; set; }
public string NotifypartFirstName { get; set; }
/// <summary>
/// 通知人联系人姓
/// </summary>
[SugarColumn(ColumnName = "NotifypartLastName")]
[Description("通知人联系人姓")]
public string NotifypartLastName{ get; set; }
public string NotifypartLastName { get; set; }
/// <summary>
/// 通知人电话国家代码
/// </summary>
[SugarColumn(ColumnName = "NotifypartPhoneCountryCode")]
[Description("通知人电话国家代码")]
public string NotifypartPhoneCountryCode { get; set; }
/// <summary>
/// 通知人电话区号
/// </summary>
[SugarColumn(ColumnName = "NotifypartPhoneCode")]
[Description("通知人电话区号")]
public string NotifypartPhoneCode{ get; set; }
public string NotifypartPhoneCode { get; set; }
/// <summary>
/// 通知人电话
/// </summary>
[SugarColumn(ColumnName = "NotifypartPhone")]
[Description("通知人电话")]
public string NotifypartPhone{ get; set; }
public string NotifypartPhone { get; set; }
/// <summary>
/// 通知人分机号
/// </summary>
[SugarColumn(ColumnName = "NotifypartPhoneExtension")]
[Description("通知人分机号")]
public string NotifypartPhoneExtension{ get; set; }
public string NotifypartPhoneExtension { get; set; }
/// <summary>
/// 订舱公司名称
/// </summary>
[SugarColumn(ColumnName = "BookingName")]
[Description("订舱公司名称")]
public string BookingName{ get; set; }
public string BookingName { get; set; }
/// <summary>
/// 订舱公司地址
/// </summary>
[SugarColumn(ColumnName = "BookingAddress")]
[Description("订舱公司地址")]
public string BookingAddress{ get; set; }
public string BookingAddress { get; set; }
/// <summary>
/// 订舱公司国家
/// </summary>
[SugarColumn(ColumnName = "BookingCountry")]
[Description("订舱公司国家")]
public string BookingCountry{ get; set; }
public string BookingCountry { get; set; }
/// <summary>
/// 订舱公司省份
/// </summary>
[SugarColumn(ColumnName = "BookingProvince")]
[Description("订舱公司省份")]
public string BookingProvince{ get; set; }
public string BookingProvince { get; set; }
/// <summary>
/// 订舱公司城市
/// </summary>
[SugarColumn(ColumnName = "BookingCity")]
[Description("订舱公司城市")]
public string BookingCity{ get; set; }
public string BookingCity { get; set; }
/// <summary>
/// 订舱公司区县
/// </summary>
[SugarColumn(ColumnName = "BookingCounty")]
[Description("订舱公司区县")]
public string BookingCounty{ get; set; }
public string BookingCounty { get; set; }
/// <summary>
/// 订舱公司邮政编码
/// </summary>
[SugarColumn(ColumnName = "BookingPostCode")]
[Description("订舱公司邮政编码")]
public string BookingPostCode{ get; set; }
public string BookingPostCode { get; set; }
/// <summary>
/// 订舱公司联系人名
/// </summary>
[SugarColumn(ColumnName = "BookingFirstName")]
[Description("订舱公司联系人名")]
public string BookingFirstName{ get; set; }
public string BookingFirstName { get; set; }
/// <summary>
/// 订舱公司联系人姓
/// </summary>
[SugarColumn(ColumnName = "BookingLastName")]
[Description("订舱公司联系人姓")]
public string BookingLastName{ get; set; }
public string BookingLastName { get; set; }
/// <summary>
/// 订舱公司电话国家代码
/// </summary>
[SugarColumn(ColumnName = "BookingPhoneCountryCode")]
[Description("订舱公司电话国家代码")]
public string BookingPhoneCountryCode { get; set; }
/// <summary>
/// 订舱公司电话区号
/// </summary>
[SugarColumn(ColumnName = "BookingPhoneCode")]
[Description("订舱公司电话区号")]
public string BookingPhoneCode{ get; set; }
public string BookingPhoneCode { get; set; }
/// <summary>
/// 订舱公司电话
/// </summary>
[SugarColumn(ColumnName = "BookingPhone")]
[Description("订舱公司电话")]
public string BookingPhone{ get; set; }
public string BookingPhone { get; set; }
/// <summary>
/// 订舱公司分机号
/// </summary>
[SugarColumn(ColumnName = "BookingPhoneExtension")]
[Description("订舱公司分机号")]
public string BookingPhoneExtension{ get; set; }
public string BookingPhoneExtension { get; set; }
/// <summary>
/// 品名货描
/// </summary>

@ -117,6 +117,11 @@ namespace Myshipping.Application
/// </summary>
public string ShipperLastName { get; set; }
/// <summary>
/// 发货人电话国家代码
/// </summary>
public string ShipperPhoneCountryCode { get; set; }
/// <summary>
/// 发货人电话区号
/// </summary>
@ -177,6 +182,11 @@ namespace Myshipping.Application
/// </summary>
public string ConsigneeLastName { get; set; }
/// <summary>
/// 收货人电话国家代码
/// </summary>
public string ConsigneePhoneCountryCode { get; set; }
/// <summary>
/// 收货人电话区号
/// </summary>
@ -237,6 +247,11 @@ namespace Myshipping.Application
/// </summary>
public string NotifypartLastName { get; set; }
/// <summary>
/// 通知人电话国家代码
/// </summary>
public string NotifypartPhoneCountryCode { get; set; }
/// <summary>
/// 通知人电话区号
/// </summary>
@ -297,6 +312,11 @@ namespace Myshipping.Application
/// </summary>
public string BookingLastName { get; set; }
/// <summary>
/// 订舱公司电话国家代码
/// </summary>
public string BookingPhoneCountryCode { get; set; }
/// <summary>
/// 订舱公司电话区号
/// </summary>

Loading…
Cancel
Save