|
|
|
@ -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.TaskInteraction;
|
|
|
|
|
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.Sys.Entity;
|
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Entity;
|
|
|
|
|
using DS.WMS.Core.TaskPlat.Interface;
|
|
|
|
|
using Masuit.Tools.Systems;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
@ -17,10 +20,14 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SpaceReleaseActionExecutor : DefaultActionExecutor
|
|
|
|
|
{
|
|
|
|
|
///// <summary>
|
|
|
|
|
///// 任务服务
|
|
|
|
|
///// </summary>
|
|
|
|
|
//protected ISeaExportService OpService;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected ISeaExportService OpService;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 任务BC服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected ITaskManageBCService BCService;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 日志服务
|
|
|
|
|
/// </summary>
|
|
|
|
@ -28,8 +35,10 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
|
|
|
|
|
|
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>();
|
|
|
|
|
|
|
|
|
|
var releaseTypeService = context.ServiceProvider.GetRequiredService<IReleaseTypeService>();
|
|
|
|
|
var typeValue = await releaseTypeService.GetReleaseTypeAsync(context.TaskInfo.BusinessId, context.TaskInfo.BusinessType);
|
|
|
|
|
switch (typeValue)
|
|
|
|
@ -104,24 +113,21 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease
|
|
|
|
|
//转发BC
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
//var isSend = await GetSendXHZAsync(context.TaskInfo.BusinessId);
|
|
|
|
|
//if (isSend.GetValueOrDefault())
|
|
|
|
|
//{
|
|
|
|
|
// var result = await OpService.SendXHZ(context.TaskInfo.BusinessId.ToString());
|
|
|
|
|
// if (!result.Succeeded)
|
|
|
|
|
// {
|
|
|
|
|
// await LogService.WriteLogAsync(context.TaskInfo, "发送下货纸失败:" + result.Message);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
var result = await OpService.SendXHZ(context.TaskInfo.BusinessId.ToString());
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
await LogService.WriteLogAsync(context.TaskInfo, "发送下货纸失败:" + result.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|