|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
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 DS.WMS.Core.Op.Interface.TaskInteraction;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor
|
|
|
|
|
{
|
|
|
|
@ -17,8 +18,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor
|
|
|
|
|
var taskService = context.ServiceProvider.GetRequiredService<ITaskService>();
|
|
|
|
|
var logService = context.ServiceProvider.GetRequiredService<ITaskLogService>();
|
|
|
|
|
|
|
|
|
|
//发送截单EDI
|
|
|
|
|
var result = await opService.SendBookingOrClosingEDI(new BookingOrClosingEDIOrderReq
|
|
|
|
|
var req = new BookingOrClosingEDIOrderReq
|
|
|
|
|
{
|
|
|
|
|
Id = context.TaskInfo.BusinessId,
|
|
|
|
|
UseForwarderCode = false,
|
|
|
|
@ -27,11 +27,14 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor
|
|
|
|
|
FileRole = "9",
|
|
|
|
|
SendType = "E",
|
|
|
|
|
Send = true
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
//发送截单EDI
|
|
|
|
|
var result = await opService.SendBookingOrClosingEDI(req);
|
|
|
|
|
//EDI提交未成功
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
{
|
|
|
|
|
await logService.WriteLogAsync(context.TaskInfo, "截单EDI返回结果失败");
|
|
|
|
|
await logService.WriteLogAsync(context.TaskInfo, "EDI返回结果失败,自动截单未成功!" + Environment.NewLine + "请求参数:"
|
|
|
|
|
+ JsonConvert.SerializeObject(req) + Environment.NewLine + "响应参数:" + result.Data);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|