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
{
///
/// 下发AGV任务 --待测试完善
///
///
///
public WebResponseContent Add_Task(Dt_Task taskinfo)
{
WebResponseContent content = new WebResponseContent();
try
{
addtask schedulingTask = new addtask
{
task_id = taskinfo.AGVtaskId,
task_type = taskinfo.TaskType == (int)TaskTypeEnum.Inbound ? "push" : "pop",
work_begin = taskinfo.SourceAddress,
work_end = taskinfo.TargetAddress
};
//HttpsClient.Post()
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}");
}
}
}
}