|
|
using Myshipping.Application.EDI.Dtos;
|
|
|
using Newtonsoft.Json;
|
|
|
using Newtonsoft.Json.Converters;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
namespace Myshipping.Application.EDI
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// ONE API订舱
|
|
|
/// </summary>
|
|
|
public static class ONESoApiHelper
|
|
|
{
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// ONE订舱传输对象
|
|
|
/// </summary>
|
|
|
public class ONESoApiModel : BookingHelperBaseModel
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 箱信息数组,箱型箱量等信息
|
|
|
/// </summary>
|
|
|
public List<OnebOxInfo> boxInfos { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 货物信息数据,品名, 重量等信息
|
|
|
/// </summary>
|
|
|
public CargoInfo cargoInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 收发通等联系信息,按照网站规则, 只提供对应的名字即可, 但是需要与网站上一致
|
|
|
/// </summary>
|
|
|
public ContactInfo contactInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 约号相关信息,约号必填, namedAccount可不传, 但是必须与实际对应
|
|
|
/// </summary>
|
|
|
public ContractInfo contractInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 备注信息,数据字典, 部分参数目前不涉及, 只传备注文本即可
|
|
|
/// </summary>
|
|
|
public RemarkInfo remarkInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 路线信息,港口,船期等信息
|
|
|
/// </summary>
|
|
|
public Routes routes { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 模板名字,保存为模板时这个字段必填
|
|
|
/// </summary>
|
|
|
public string saveName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 船期数据,船期查询的结果中选择的数据集, 原样上传
|
|
|
/// </summary>
|
|
|
public object shipInfo { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// ONEBOxInfo,箱相关数据
|
|
|
/// </summary>
|
|
|
public partial class OnebOxInfo
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 箱型,每个箱类型对应自己可选的箱型, 需要做映射
|
|
|
/// </summary>
|
|
|
public string boxSize { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 箱类型,每个箱类型对应自己可选的箱型, 需要做映射
|
|
|
/// </summary>
|
|
|
public string boxType { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 箱量,当前箱型的总箱量
|
|
|
/// </summary>
|
|
|
public long quantity { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// SOC箱量,不能大于总箱量
|
|
|
/// </summary>
|
|
|
public long? socQuantity { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 货物信息数据,品名, 重量等信息
|
|
|
///
|
|
|
/// ONECargoInfo,货物相关信息
|
|
|
/// </summary>
|
|
|
public partial class CargoInfo
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 品名,需和网站上一致
|
|
|
/// </summary>
|
|
|
public string commodity { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 返回的日期,精确到天, 可以不传
|
|
|
/// </summary>
|
|
|
public string returnDate { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 重量,重量
|
|
|
/// </summary>
|
|
|
public long weight { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 重量单位,重量单位
|
|
|
/// </summary>
|
|
|
public string? weightUnit { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 收发通等联系信息,按照网站规则, 只提供对应的名字即可, 但是需要与网站上一致
|
|
|
/// ONEContactInfo,联系人相关数据
|
|
|
/// </summary>
|
|
|
public partial class ContactInfo
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 收货人,可以不传
|
|
|
/// </summary>
|
|
|
public string consigneeName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 货代名,和网站上保值一致, 且已经在账户的通讯录中
|
|
|
/// </summary>
|
|
|
public string forwarderName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 发货人名字,和网站上保值一致, 且已经在账户的通讯录中
|
|
|
/// </summary>
|
|
|
public string shipperName { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 约号相关信息,约号必填, namedAccount可不传, 但是必须与实际对应
|
|
|
/// ONEContractInfo,客户约号信息
|
|
|
/// </summary>
|
|
|
public partial class ContractInfo
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 客户约号,必填,且应与网站数据一致
|
|
|
/// </summary>
|
|
|
public string contractNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 约号对应的账户名,如果传则必须与网站一直, 不传则默认选择 Unable to find Named Account or Not Applicable
|
|
|
/// </summary>
|
|
|
public string namedAccount { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 备注信息,数据字典, 部分参数目前不涉及, 只传备注文本即可
|
|
|
/// ONERemarkInfo,ONE订舱时备注信息
|
|
|
/// </summary>
|
|
|
public partial class RemarkInfo
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// Booking Freight Forwarder Ref. No.
|
|
|
/// </summary>
|
|
|
public string bkgFFRefNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Booking Shipper Ref. No.
|
|
|
/// </summary>
|
|
|
public string bkgShRefNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Invoice Ref. No.
|
|
|
/// </summary>
|
|
|
public string invoiceRefNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Manual Booking Number
|
|
|
/// </summary>
|
|
|
public string manualBookingNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 订舱网点名
|
|
|
/// </summary>
|
|
|
public string officeName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// S/I Freight Forwarder No.
|
|
|
/// </summary>
|
|
|
public string siFFNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// S/I Shipper Ref. No.
|
|
|
/// </summary>
|
|
|
public string siSHRefNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 备注信息,备注信息, 默认为空
|
|
|
/// </summary>
|
|
|
public string specialInstruction { get; set; }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 路线信息,港口,船期等信息
|
|
|
/// OneAutoRoutes,路线信息
|
|
|
/// </summary>
|
|
|
public partial class Routes
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 交货地,交货地, 与网站上应一致, 注意不要CY及DOOR信息, 运输方式有相关参数
|
|
|
/// </summary>
|
|
|
public string destinationName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 运送形态
|
|
|
/// </summary>
|
|
|
public string? inboundHaulage { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 时间范围,按周计算, 取值范围2, 4, 6, 8
|
|
|
/// </summary>
|
|
|
public string? numberOfWeeks { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 收货地,收货地, 与网站上应一致, 注意不要CY及DOOR信息, 运输方式有相关参数
|
|
|
/// </summary>
|
|
|
public string originName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 运送方式
|
|
|
/// </summary>
|
|
|
public string? outboundHaulage { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 查询日期,默认为两天后
|
|
|
/// </summary>
|
|
|
public string searchConditionDate { get; set; }
|
|
|
}
|
|
|
|
|
|
}
|