修改CARGOO

dev
jianghaiqing 1 month ago
parent 405a57122a
commit 44f64d1f7b

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos.Cargoo
{
/// <summary>
///
/// </summary>
public class CargooShipmentResultDto
{
/// <summary>
///
/// </summary>
public string messageId { get; set; }
/// <summary>
///
/// </summary>
public string timestamp { get; set; }
/// <summary>
///
/// </summary>
public List<CargooShipmentResultDataDto> data { get; set; }
}
public class CargooShipmentResultDataDto
{
/// <summary>
///
/// </summary>
public string id { get; set; }
/// <summary>
///
/// </summary>
public string reference { get; set; }
/// <summary>
///
/// </summary>
public int code { get; set; }
/// <summary>
///
/// </summary>
public string description { get; set; }
/// <summary>
///
/// </summary>
public Nullable<DateTime> date { get; set; }
/// <summary>
///
/// </summary>
public string cargooReference { get; set; }
}
}

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos.Cargoo
{
/// <summary>
/// Cargoo推送当前状态枚举
/// </summary>
public enum CargooStatusEnum
{
/// <summary>
/// ShipmentSubmitted
/// </summary>
[Description("ShipmentSubmitted")]
Submitted = 220,
/// <summary>
/// ShipmentConfirmed
/// </summary>
[Description("ShipmentConfirmed")]
Confirmed = 230,
/// <summary>
/// ShipmentGateOut
/// </summary>
[Description("ShipmentGateOut")]
GateOut = 310,
/// <summary>
/// ShipmentGateIn
/// </summary>
[Description("ShipmentGateIn")]
GateIn = 320,
/// <summary>
/// Shipment Cancelled
/// </summary>
[Description("Shipment Cancelled")]
Cancelled = 240,
/// <summary>
/// Shipment Rejected
/// </summary>
[Description("Shipment Rejected")]
Rejected = 245,
/// <summary>
/// ShipmentDeparted
/// </summary>
[Description("ShipmentDeparted")]
Shipped = 330,
/// <summary>
/// ShipmentArrived
/// </summary>
[Description("ShipmentArrived")]
Arrived = 370,
/// <summary>
/// ShipmentDischarged
/// </summary>
[Description("ShipmentDischarged")]
Discharged = 375,
/// <summary>
/// ShipmentContainersDepartedAtPod
/// </summary>
[Description("ShipmentContainersDepartedAtPod")]
Delivered = 390,
/// <summary>
/// ShipmentReturned
/// </summary>
[Description("ShipmentReturned")]
Completed = 396
}
}

@ -1,5 +1,6 @@
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;
@ -18,9 +19,10 @@ namespace DS.WMS.Core.Op.EDI
/// <summary>
/// 生成Cargoo报文(根据订舱详情生成报文)
/// </summary>
/// <param name="bookingId"></param>
/// <param name="bookingId">订单ID</param>
/// <param name="cargooStatusEnum">状态枚举</param>
/// <returns></returns>
public async Task<DataResult<CargooShipmentDto>> GetCargooShipmentDto(long bookingId)
public async Task<DataResult<CargooShipmentDto>> GetCargooShipmentDto(long bookingId, CargooStatusEnum cargooStatusEnum)
{
CargooShipmentDto dto = new CargooShipmentDto();
@ -42,11 +44,12 @@ namespace DS.WMS.Core.Op.EDI
/// </summary>
/// <param name="bookingId"></param>
/// <returns></returns>
public async Task<DataResult> SendCargooShipment(long bookingId)
public async Task<DataResult> SendCargooShipment(long bookingId, CargooStatusEnum cargooStatusEnum)
{
try
{
var dto = await GetCargooShipmentDto(bookingId);
var dto = await GetCargooShipmentDto(bookingId, cargooStatusEnum);
}
catch (Exception ex)
{

Loading…
Cancel
Save