刘磊
2025-04-19 823752496e2a4cdb6a1fb36227cd15b8b7135336
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
61
62
63
64
65
66
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}");
            }
        }
    }
}