diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooShipmentResultDto.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooShipmentResultDto.cs
new file mode 100644
index 00000000..f6535201
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooShipmentResultDto.cs
@@ -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
+{
+ ///
+ ///
+ ///
+ public class CargooShipmentResultDto
+ {
+ ///
+ ///
+ ///
+ public string messageId { get; set; }
+
+ ///
+ ///
+ ///
+ public string timestamp { get; set; }
+
+ ///
+ ///
+ ///
+ public List data { get; set; }
+ }
+
+ public class CargooShipmentResultDataDto
+ {
+ ///
+ ///
+ ///
+ public string id { get; set; }
+
+ ///
+ ///
+ ///
+ public string reference { get; set; }
+
+ ///
+ ///
+ ///
+ public int code { get; set; }
+
+ ///
+ ///
+ ///
+ public string description { get; set; }
+
+ ///
+ ///
+ ///
+ public Nullable date { get; set; }
+
+ ///
+ ///
+ ///
+ public string cargooReference { get; set; }
+ }
+}
diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooStatusEnum.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooStatusEnum.cs
new file mode 100644
index 00000000..a6a3ed9e
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/Cargoo/CargooStatusEnum.cs
@@ -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
+{
+ ///
+ /// Cargoo推送当前状态枚举
+ ///
+ public enum CargooStatusEnum
+ {
+ ///
+ /// ShipmentSubmitted
+ ///
+ [Description("ShipmentSubmitted")]
+ Submitted = 220,
+ ///
+ /// ShipmentConfirmed
+ ///
+ [Description("ShipmentConfirmed")]
+ Confirmed = 230,
+ ///
+ /// ShipmentGateOut
+ ///
+ [Description("ShipmentGateOut")]
+ GateOut = 310,
+ ///
+ /// ShipmentGateIn
+ ///
+ [Description("ShipmentGateIn")]
+ GateIn = 320,
+ ///
+ /// Shipment Cancelled
+ ///
+ [Description("Shipment Cancelled")]
+ Cancelled = 240,
+ ///
+ /// Shipment Rejected
+ ///
+ [Description("Shipment Rejected")]
+ Rejected = 245,
+ ///
+ /// ShipmentDeparted
+ ///
+ [Description("ShipmentDeparted")]
+ Shipped = 330,
+ ///
+ /// ShipmentArrived
+ ///
+ [Description("ShipmentArrived")]
+ Arrived = 370,
+ ///
+ /// ShipmentDischarged
+ ///
+ [Description("ShipmentDischarged")]
+ Discharged = 375,
+ ///
+ /// ShipmentContainersDepartedAtPod
+ ///
+ [Description("ShipmentContainersDepartedAtPod")]
+ Delivered = 390,
+ ///
+ /// ShipmentReturned
+ ///
+ [Description("ShipmentReturned")]
+ Completed = 396
+ }
+}
diff --git a/ds-wms-service/DS.WMS.Core/Op/EDI/CargooAPIHelper.cs b/ds-wms-service/DS.WMS.Core/Op/EDI/CargooAPIHelper.cs
index d80943e6..096dab11 100644
--- a/ds-wms-service/DS.WMS.Core/Op/EDI/CargooAPIHelper.cs
+++ b/ds-wms-service/DS.WMS.Core/Op/EDI/CargooAPIHelper.cs
@@ -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
///
/// 生成Cargoo报文(根据订舱详情生成报文)
///
- ///
+ /// 订单ID
+ /// 状态枚举
///
- public async Task> GetCargooShipmentDto(long bookingId)
+ public async Task> GetCargooShipmentDto(long bookingId, CargooStatusEnum cargooStatusEnum)
{
CargooShipmentDto dto = new CargooShipmentDto();
@@ -42,11 +44,12 @@ namespace DS.WMS.Core.Op.EDI
///
///
///
- public async Task SendCargooShipment(long bookingId)
+ public async Task SendCargooShipment(long bookingId, CargooStatusEnum cargooStatusEnum)
{
try
{
- var dto = await GetCargooShipmentDto(bookingId);
+ var dto = await GetCargooShipmentDto(bookingId, cargooStatusEnum);
+
}
catch (Exception ex)
{