|
|
|
|
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; }
|
|
|
|
|
}
|
|
|
|
|
}
|