刘磊
2025-06-09 dabbcafc629ef87d11ba55ef8cc1cdc776c047d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 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}");
            }
        }
    }
}