|
|
@ -1,4 +1,5 @@
|
|
|
|
using DS.WMS.Core.Info.Interface;
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Info.Interface;
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
using DS.WMS.Core.Op.Dtos.TaskInteraction;
|
|
|
|
using DS.WMS.Core.Op.Dtos.TaskInteraction;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
@ -7,6 +8,8 @@ using DS.WMS.Core.Op.Interface;
|
|
|
|
using DS.WMS.Core.Op.Interface.TaskInteraction;
|
|
|
|
using DS.WMS.Core.Op.Interface.TaskInteraction;
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Entity;
|
|
|
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Interface;
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
|
@ -17,10 +20,14 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public class SpaceReleaseActionExecutor : DefaultActionExecutor
|
|
|
|
public class SpaceReleaseActionExecutor : DefaultActionExecutor
|
|
|
|
{
|
|
|
|
{
|
|
|
|
///// <summary>
|
|
|
|
/// <summary>
|
|
|
|
///// 任务服务
|
|
|
|
/// 任务服务
|
|
|
|
///// </summary>
|
|
|
|
/// </summary>
|
|
|
|
//protected ISeaExportService OpService;
|
|
|
|
protected ISeaExportService OpService;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 任务BC服务
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
protected ITaskManageBCService BCService;
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 日志服务
|
|
|
|
/// 日志服务
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -28,8 +35,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task ExecuteAsync(ActionExecutionContext context)
|
|
|
|
public override async Task ExecuteAsync(ActionExecutionContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//OpService = context.ServiceProvider.GetRequiredService<ISeaExportService>();
|
|
|
|
OpService = context.ServiceProvider.GetRequiredService<ISeaExportService>();
|
|
|
|
|
|
|
|
BCService = context.ServiceProvider.GetRequiredService<ITaskManageBCService>();
|
|
|
|
LogService = context.ServiceProvider.GetRequiredService<ITaskLogService>();
|
|
|
|
LogService = context.ServiceProvider.GetRequiredService<ITaskLogService>();
|
|
|
|
|
|
|
|
|
|
|
|
var releaseTypeService = context.ServiceProvider.GetRequiredService<IReleaseTypeService>();
|
|
|
|
var releaseTypeService = context.ServiceProvider.GetRequiredService<IReleaseTypeService>();
|
|
|
|
var typeValue = await releaseTypeService.GetReleaseTypeAsync(context.TaskInfo.BusinessId, context.TaskInfo.BusinessType);
|
|
|
|
var typeValue = await releaseTypeService.GetReleaseTypeAsync(context.TaskInfo.BusinessId, context.TaskInfo.BusinessType);
|
|
|
|
switch (typeValue)
|
|
|
|
switch (typeValue)
|
|
|
@ -104,24 +113,21 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
//转发BC
|
|
|
|
//转发BC
|
|
|
|
async Task RelayBCAsync(ActionExecutionContext context)
|
|
|
|
async Task RelayBCAsync(ActionExecutionContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var taskBase = context.AdditionalData[TaskFlowDataNameConst.TaskBaseInfo] as TaskBaseInfo;
|
|
|
|
|
|
|
|
if (taskBase != null)
|
|
|
|
|
|
|
|
await BCService.SyncBookingSlotChange(taskBase.Id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//下货纸
|
|
|
|
//下货纸
|
|
|
|
async Task SendShippingOrderAsync(ActionExecutionContext context)
|
|
|
|
async Task SendShippingOrderAsync(ActionExecutionContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//var isSend = await GetSendXHZAsync(context.TaskInfo.BusinessId);
|
|
|
|
var result = await OpService.SendXHZ(context.TaskInfo.BusinessId.ToString());
|
|
|
|
//if (isSend.GetValueOrDefault())
|
|
|
|
if (!result.Succeeded)
|
|
|
|
//{
|
|
|
|
{
|
|
|
|
// var result = await OpService.SendXHZ(context.TaskInfo.BusinessId.ToString());
|
|
|
|
await LogService.WriteLogAsync(context.TaskInfo, "发送下货纸失败:" + result.Message);
|
|
|
|
// if (!result.Succeeded)
|
|
|
|
}
|
|
|
|
// {
|
|
|
|
|
|
|
|
// await LogService.WriteLogAsync(context.TaskInfo, "发送下货纸失败:" + result.Message);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|