You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos.Cargoo;
|
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.EDI
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Cargoo 帮助类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class CargooAPIHelper
|
|
|
|
|
{
|
|
|
|
|
#region 生成Cargoo报文(根据订舱详情生成报文)
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 生成Cargoo报文(根据订舱详情生成报文)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bookingId">订单ID</param>
|
|
|
|
|
/// <param name="cargooStatusEnum">状态枚举</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<DataResult<CargooShipmentDto>> GetCargooShipmentDto(long bookingId, CargooStatusEnum cargooStatusEnum)
|
|
|
|
|
{
|
|
|
|
|
CargooShipmentDto dto = new CargooShipmentDto();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult<CargooShipmentDto>.Success(dto);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 发送Cargoo报文
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bookingId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<DataResult> SendCargooShipment(long bookingId, CargooStatusEnum cargooStatusEnum)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var dto = await GetCargooShipmentDto(bookingId, cargooStatusEnum);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|