增加提单确认、SI、截单动作

usertest
嵇文龙 3 months ago
parent a4589a8fc9
commit 714a938cfd

@ -0,0 +1,15 @@
using DS.WMS.Core.Op.Dtos.TaskInteraction;
namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.BLConfirm
{
/// <summary>
/// 提单确认动作
/// </summary>
public class BLConfirmActionExecutor : DefaultActionExecutor
{
public override async Task ExecuteAsync(ActionExecutionContext context)
{
}
}
}

@ -0,0 +1,41 @@
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Op.Interface;
using Microsoft.Extensions.DependencyInjection;
namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor
{
/// <summary>
/// 截单动作
/// </summary>
public class ClosingOrderActionExecutor : DefaultActionExecutor
{
public override async Task ExecuteAsync(ActionExecutionContext context)
{
var opService = context.ServiceProvider.GetRequiredService<ISeaExportService>();
var taskService = context.ServiceProvider.GetRequiredService<ITaskService>();
var logService = context.ServiceProvider.GetRequiredService<ITaskLogService>();
//发送截单EDI
var result = await opService.SendBookingOrClosingEDI(new BookingOrClosingEDIOrderReq
{
Id = context.TaskInfo.BusinessId,
UseForwarderCode = false,
ForwarderCode = string.Empty,
ForwarderName = string.Empty,
FileRole = "9",
SendType = "E",
Send = true
});
//EDI提交未成功
if (!result.Succeeded)
{
await logService.WriteLogAsync(context.TaskInfo, "截单EDI返回结果失败");
return;
}
await SetTaskCompleteAsync(context.TaskInfo, taskService, logService);
}
}
}

@ -0,0 +1,21 @@
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using Microsoft.Extensions.DependencyInjection;
namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor
{
/// <summary>
/// 提交SI动作
/// </summary>
public class SIActionExecutor : DefaultActionExecutor
{
public override async Task ExecuteAsync(ActionExecutionContext context)
{
//var opService = context.ServiceProvider.GetRequiredService<ISeaExportService>();
var taskService = context.ServiceProvider.GetRequiredService<ITaskService>();
var logService = context.ServiceProvider.GetRequiredService<ITaskLogService>();
await SetTaskCompleteAsync(context.TaskInfo, taskService, logService);
}
}
}
Loading…
Cancel
Save