using MailKit;
|
using Mapster;
|
using Masuit.Tools;
|
using Masuit.Tools.Security;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Comm.WCSInterface.Requst;
|
using WIDESEA_Common;
|
using WIDESEA_Core;
|
using WIDESEA_Core.Enums;
|
using WIDESEA_IStoragIntegrationServices;
|
using WIDESEA_Model.Models;
|
using WIDESEA_StorageTaskRepository;
|
|
namespace WIDESEA_StoragIntegrationServices
|
{
|
public partial class ToAGVService
|
{
|
/// <summary>
|
/// 下发AGV任务 --待测试完善
|
/// </summary>
|
/// <param name="jsondata"></param>
|
/// <returns></returns>
|
public WebResponseContent genAgvSchedulingTask(Dt_Task taskinfo)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
|
genAgvSchedulingTask schedulingTask = new genAgvSchedulingTask
|
{
|
reqCode = Guid.NewGuid().ToString().Replace("-", ""),
|
clientCode = "WMS",
|
//taskTyp = tasktype,
|
ctnrTyp = "2",
|
//data = taskinfo.task_barcode,
|
positionCodePath = new List<position>
|
{
|
new position { positionCode = taskinfo.SourceAddress, type = "05" },
|
new position { positionCode = taskinfo.TargetAddress, type = "05" },
|
},
|
priority = "1", //优先级
|
agvCode = "",//agvcode,
|
//taskCode = taskinfo.task_id.ToString(),
|
};
|
|
|
LogFactory.GetLog("下发AGV任务").Info(true, $"\r\r--------------------------------------");
|
LogFactory.GetLog("下发AGV任务").Info(true, taskinfo.ToJsonString());
|
|
return content;
|
|
}
|
catch (Exception ex)
|
{
|
LogFactory.GetLog("下发AGV任务").Info(true, $"\r\r--------------------------------------");
|
LogFactory.GetLog("下发AGV任务").Info(true, ex.Message);
|
return content.Error($"请求异常:{ex.Message}");
|
}
|
}
|
}
|
}
|