huangxiaoqiang
2025-07-29 f23e0326aa05a1c5b47d4aec4c06e73d0d86b8e7
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -16,6 +16,7 @@
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using AutoMapper;
using HslCommunication;
using Mapster;
using Newtonsoft.Json;
using SqlSugar;
@@ -94,21 +95,18 @@
        /// </summary>
        /// <param name="taskDTOs">WMS任务对象集合</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTaskDTO> taskDTOs)
        public WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTOs)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {// åˆ›å»ºä¸€ä¸ªDt_Task类型的列表用于存储转换后的任务数据
            {
                List<Dt_Task> tasks = new List<Dt_Task>();
                // éåŽ†ä¼ å…¥çš„WMSTaskDTO列表
                foreach (var item in taskDTOs)
                {
                    // åˆ¤æ–­ä»»åŠ¡ç±»åž‹æ˜¯å¦ä¸ºå‡ºåº“ä»»åŠ¡
                    if (item.TaskType == "2")
                if (taskDTOs.TaskType == "2")
                    {
                        if (Convert.ToInt32(item.EndPoint) > 1999 && Convert.ToInt32(item.EndPoint) < 3000)
                    if (Convert.ToInt32(taskDTOs.EndPoint) > 1999 && Convert.ToInt32(taskDTOs.EndPoint) < 3000)
                        {
                            Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.EndPoint);
                        Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint);
                            if (stationManagerStart == null)
                            {
                                return content.Error("未找到出库站台信息");
@@ -117,16 +115,16 @@
                            {
                                TaskNum = BaseDal.GetTaskNo().Result,
                                Creater = "WMS",
                                WMSTaskNum = item.TaskId,
                            WMSTaskNum = taskDTOs.TaskId,
                                Grade = 1,
                                PalletCode = item.TPbarcode,
                            PalletCode = taskDTOs.TPbarcode,
                                TaskType = (int)TaskOutboundTypeEnum.Outbound,
                                TaskState = (int)TaskOutStatusEnum.OutNew,
                                SourceAddress = item.BeginPoint,
                                CurrentAddress = item.BeginPoint,
                            SourceAddress = taskDTOs.BeginPoint,
                            CurrentAddress = taskDTOs.BeginPoint,
                                Roadway = stationManagerStart.Roadway,
                                NextAddress = item.EndPoint,
                                TargetAddress = item.EndPoint,
                            NextAddress = taskDTOs.EndPoint,
                            TargetAddress = taskDTOs.EndPoint,
                                Floor = stationManagerStart.stationFloor,
                                RGVName = ""
                            };
@@ -135,9 +133,9 @@
                        else
                        {
                            string[] targetCodes = item.BeginPoint.Split("-");
                        string[] targetCodes = taskDTOs.BeginPoint.Split("-");
                            Dt_StationManager stationManagerEnd = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.EndPoint);
                        Dt_StationManager stationManagerEnd = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.EndPoint);
                            if (stationManagerEnd == null)
                            {
                                return content.Error("未找到出库站台信息");
@@ -148,58 +146,62 @@
                            var RGVName = string.Empty;
                            if (stationManager.stationFloor == "1F")
                            {
                                var deviceCode = _deviceInfoRepository.Db.Queryable<Dt_DeviceInfo>().Where(x => x.DeviceStatus == "1" && x.DeviceRemark == "1F").Where(x => x.DeviceCode.Contains("RGV")).ToList().Select(x => x.DeviceCode).ToList();
                                if (deviceCode != null && deviceCode.Count() > 0)
                                {
                                    if (deviceCode.Contains("RGV01") && deviceCode.Contains("RGV02"))
                                    {
                                        var RGVOne = BaseDal.QueryData(x => x.RGVName == "RGV01").ToList();
                                        var RGVTwo = BaseDal.QueryData(x => x.RGVName == "RGV02").ToList();
                                        if (RGVOne.Count > RGVTwo.Count)
                                        {
                                            RGVName = "RGV01";
                                        }
                                        else
                                        {
                                            RGVName = "RGV02";
                                        }
                                    }
                                    else
                                    {
                                        RGVName = deviceCode[0];
                                    }
                                }
                                else
                                {
                                    RGVName = "RGV01";
                                }
                            RGVName = stationManager.RGVName;
                            }
                            Dt_Task taskOut = new Dt_Task()
                            {
                                TaskNum = BaseDal.GetTaskNo().Result,
                                Creater = "WMS",
                                WMSTaskNum = item.TaskId,
                            WMSTaskNum = taskDTOs.TaskId,
                                Grade = 1,
                                PalletCode = item.TPbarcode,
                            PalletCode = taskDTOs.TPbarcode,
                                TaskType = (int)TaskOutboundTypeEnum.Outbound,
                                TaskState = (int)TaskOutStatusEnum.OutNew,
                                SourceAddress = item.BeginPoint,
                                CurrentAddress = item.BeginPoint,
                            SourceAddress = taskDTOs.BeginPoint,
                            CurrentAddress = taskDTOs.BeginPoint,
                                Roadway = GetScCode(Convert.ToInt32(targetCodes[0])),
                                NextAddress = stationManager.stationChildCode,
                                TargetAddress = item.EndPoint,
                            TargetAddress = taskDTOs.EndPoint,
                                RGVName = stationManager.RGVName != null ? stationManager.RGVName : RGVName,
                                Floor = stationManager.stationFloor,
                            TargetStation= stationManagerEnd.remark,
                            };
                            BaseDal.AddData(taskOut);
                        }
                    }
                    // åˆ¤æ–­ä»»åŠ¡ç±»åž‹æ˜¯å¦ä¸ºå…¥åº“ä»»åŠ¡
                    else if (item.TaskType == "1")
                else if (taskDTOs.TaskType == "1")
                    {
                        if (Convert.ToInt32(item.BeginPoint) > 1999 && Convert.ToInt32(item.BeginPoint) < 3000)
                    if (taskDTOs.BeginPoint == "3002")
                        {
                            Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == item.BeginPoint);
                        Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.BeginPoint);
                        if (stationManagerStart == null)
                        {
                            return content.Error("未找到入库站台信息");
                        }
                        string[] targetCodes = taskDTOs.EndPoint.Split("-");
                        Dt_Task taskIn = new Dt_Task()
                        {
                            TaskNum = BaseDal.GetTaskNo().Result,
                            Creater = "WMS",
                            WMSTaskNum = taskDTOs.TaskId,
                            Grade = 1,
                            PalletCode = taskDTOs.TPbarcode,
                            TaskType = (int)TaskInboundTypeEnum.Inbound,
                            TaskState = (int)TaskInStatusEnum.HoistNew,
                            SourceAddress = taskDTOs.BeginPoint,
                            CurrentAddress = stationManagerStart.stationChildCode,
                            Roadway = GetScCode(Convert.ToInt32(targetCodes[0])),
                            NextAddress = stationManagerStart.stationNextChildCode,
                            TargetAddress = taskDTOs.EndPoint,
                            Floor = stationManagerStart.stationFloor,
                            RGVName = "RGV03"
                        };
                        BaseDal.AddData(taskIn);
                    }
                    else if (Convert.ToInt32(taskDTOs.BeginPoint) > 1999 && Convert.ToInt32(taskDTOs.BeginPoint) < 3000)
                    {
                        Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.stationChildCode == taskDTOs.BeginPoint);
                            if (stationManagerStart == null)
                            {
                                return content.Error("未找到出库站台信息");
@@ -208,16 +210,16 @@
                            {
                                TaskNum = BaseDal.GetTaskNo().Result,
                                Creater = "WMS",
                                WMSTaskNum = item.TaskId,
                            WMSTaskNum = taskDTOs.TaskId,
                                Grade = 1,
                                PalletCode = item.TPbarcode,
                            PalletCode = taskDTOs.TPbarcode,
                                TaskType = (int)TaskInboundTypeEnum.Inbound,
                                TaskState = (int)TaskInStatusEnum.Line_InFinish,
                                SourceAddress = item.BeginPoint,
                            SourceAddress = taskDTOs.BeginPoint,
                                CurrentAddress = stationManagerStart.stationChildCode,
                                Roadway = stationManagerStart.Roadway,
                                NextAddress = item.EndPoint,
                                TargetAddress = item.EndPoint,
                            NextAddress = taskDTOs.EndPoint,
                            TargetAddress = taskDTOs.EndPoint,
                                Floor = stationManagerStart.stationFloor,
                                RGVName = ""
                            };
@@ -225,39 +227,46 @@
                        }
                        else
                        {
                            var task = BaseDal.QueryFirst(x => x.PalletCode == item.TPbarcode);
                        var task = BaseDal.QueryFirst(x => x.PalletCode == taskDTOs.TPbarcode);
                            if (task != null)
                            {
                                task.Creater = "WMS";
                                task.Grade = 1;
                                task.PalletCode = item.TPbarcode;
                            task.PalletCode = taskDTOs.TPbarcode;
                                task.TaskType = (int)TaskInboundTypeEnum.Inbound;
                                task.TaskState = (int)TaskInStatusEnum.RGV_IndispatchFinish;
                                task.CurrentAddress = item.BeginPoint;
                            task.CurrentAddress = taskDTOs.BeginPoint;
                                task.WMSTaskNum = item.TaskId;
                            task.WMSTaskNum = taskDTOs.TaskId;
                                task.TargetAddress = item.EndPoint;
                            task.TargetAddress = taskDTOs.EndPoint;
                                string[] targetCodes = item.EndPoint.Split("-");
                            string[] targetCodes = taskDTOs.EndPoint.Split("-");
                                task.Roadway = GetScCode(Convert.ToInt32(targetCodes[0]));
                                Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == task.Roadway && x.stationType == 3 && x.stationFloor == task.Floor);
                            Dt_StationManager stationManagerStart = _stationManagerRepository.QueryFirst(x => x.Roadway == task.Roadway &&x.stationChildCode==taskDTOs.BeginPoint && x.stationFloor == task.Floor);
                                task.NextAddress = stationManager.stationChildCode;
                            task.SourceStation = stationManagerStart.remark;
                            task.TargetStation = stationManagerStart.stationRemark;
                                BaseDal.UpdateData(task);
                            }
                            else
                            {
                                return content.Error($"未找到该托盘【{item.TPbarcode}】任务");
                            return content.Error($"未找到该托盘【{taskDTOs.TPbarcode}】任务");
                            }
                        }
                    }
                    else if (item.TaskType == "3")
                else if (taskDTOs.TaskType == "3")
                    {
                        Dt_Task taskRelocation = new Dt_Task()
                        {
@@ -265,13 +274,13 @@
                            TaskState = (int)TaskRelocationStatusEnum.RelocationNew,
                            SourceAddress = item.BeginPoint,
                        SourceAddress = taskDTOs.BeginPoint,
                            CurrentAddress = item.BeginPoint,
                        CurrentAddress = taskDTOs.BeginPoint,
                            NextAddress = item.EndPoint,
                        NextAddress = taskDTOs.EndPoint,
                            TargetAddress = item.EndPoint,
                        TargetAddress = taskDTOs.EndPoint,
                            Grade = 3,
@@ -280,8 +289,7 @@
                    }
                    else
                    {
                        return content.Error($"任务类型错误,未找到该任务类型,任务号:【{item.TaskId}】,任务类型:【{item.TaskType}】");
                    }
                    return content.Error($"任务类型错误,未找到该任务类型,任务号:【{taskDTOs.TaskId}】,任务类型:【{taskDTOs.TaskType}】");
                }
                _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskId).ToList(), "接收WMS任务");
                content = WebResponseContent.Instance.OK("成功");
@@ -329,8 +337,8 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_Task task = BaseDal.QueryFirst(x => x.WMSTaskNum == taskDTO.TaskId || x.Roadway == taskDTO.WhCode);
                Dt_Task_Hty taskHty = _taskHtyRepository.QueryFirst(x => x.WMSTaskNum == taskDTO.TaskId || x.Roadway == taskDTO.WhCode);
                Dt_Task task = BaseDal.QueryFirst(x => x.WMSTaskNum == taskDTO.TaskId && x.Roadway == taskDTO.WhCode);
                Dt_Task_Hty taskHty = _taskHtyRepository.QueryFirst(x => x.WMSTaskNum == taskDTO.TaskId && x.Roadway == taskDTO.WhCode);
                if (task != null)
                {
                    return content.OK(data: new WMSTaskDTO()
@@ -458,9 +466,9 @@
        /// <param name="deviceNo">设备编号</param>
        /// <param name="currentAddress">当前地址</param>
        /// <returns></returns>
        public Dt_Task QueryRGVExecutingTask(string deviceNo)
        public Dt_Task QueryRGVExecutingTask(string deviceNo,int TaskNum)
        {
            return BaseDal.QueryFirst(x => TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish);
            return BaseDal.QueryFirst(x => TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.RGV_IndispatchFinish || TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.RGV_OutdispatchFinish && x.TaskNum == TaskNum && x.RGVName == deviceNo);
        }
        /// <summary>
@@ -512,6 +520,11 @@
        public Dt_Task QueryRGVTask(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.RGVName == deviceNo && ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish)), TaskOrderBy);
        }
        public List<Dt_Task> QueryRGVTask()
        {
            return BaseDal.QueryData(x => ((TaskInboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskInStatusEnum.InNew) || (TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish) && x.Floor == "1F"), TaskOrderBy);
        }
        /// <summary>
@@ -653,6 +666,7 @@
                        Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == task.Roadway && x.stationChildCode == task.NextAddress);
                        task.CurrentAddress = task.NextAddress;
                        task.NextAddress = task.TargetAddress;
                        task.SourceStation = stationManager.stationRemark;
                    }
                    if (task.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)
@@ -725,21 +739,22 @@
                if (task.TaskState == (int)TaskInStatusEnum.RGV_Indispatch)
                {
                    //var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                    //var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                    //var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
                    //var keys = new Dictionary<string, object>()
                    //{
                    //    {"TPbarcode", Barcode},
                    //    {"WhCode", "1001"},
                    //    {"BeginPoint", task.SourceAddress}
                    //};
                    //if (wmsBase == null || requestTask == null)
                    //{
                    //    throw new InvalidOperationException("WMS IP æœªé…ç½®");
                    //}
                    //var wmsIpAddress = wmsBase + requestTask;
                    //var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, keys.ToString()).Result;
                    var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                    var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                    var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
                    WMSTaskDTO taskDTO = new WMSTaskDTO()
                    {
                        TPbarcode = Barcode,
                        WhCode = "1001",
                        BeginPoint = task.SourceAddress
                    };
                    if (wmsBase == null || requestTask == null)
                    {
                        throw new InvalidOperationException("WMS IP æœªé…ç½®");
                    }
                    var wmsIpAddress = wmsBase + requestTask;
                    var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result;
                    //if (result != null)
                    //{
@@ -768,6 +783,18 @@
                    BaseDal.UpdateData(task);
                }
                else if (task.TaskState == (int)TaskInStatusEnum.InRetuen)
                {
                    task.ModifyDate = DateTime.Now;
                    task.Modifier = "System";
                    Dt_Task_Hty task_Hty = _mapper.Map<Dt_Task_Hty>(task);
                    task_Hty.TaskId = 0;
                    BaseDal.DeleteData(task);
                    _taskHtyRepository.AddData(task_Hty);
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"RGV出库完成");
                }
                else if (task.TaskState == (int)TaskOutStatusEnum.RGV_OutExecuting)
                {
                    task.TaskState = (int)TaskOutStatusEnum.OutFinish;
@@ -779,6 +806,27 @@
                    BaseDal.DeleteData(task);
                    _taskHtyRepository.AddData(task_Hty);
                    var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                    var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                    var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.CompleteTask)?.ConfigValue;
                    WMSTaskDTO taskDTO = new WMSTaskDTO()
                    {
                        TaskId = task.WMSTaskNum,
                        TPbarcode = task.PalletCode,
                        WhCode = "1001",
                        BeginPoint = task.SourceAddress,
                        EndPoint = task.TargetAddress,
                        Results = "1"
                    };
                    if (wmsBase == null || requestTask == null)
                    {
                        throw new InvalidOperationException("WMS IP æœªé…ç½®");
                    }
                    var wmsIpAddress = wmsBase + requestTask;
                    var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result;
                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"RGV出库完成");
                }
                else
@@ -802,30 +850,6 @@
            {
                Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
                if (task == null) return WebResponseContent.Instance.Error($"未找到该任务信息,任务号:【{taskNum}】");
                //var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                //var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                //var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.CompleteTask)?.ConfigValue;
                //var keys = new Dictionary<string, object>()
                //    {
                //        {"TaskId", task.WMSTaskNum},
                //        {"TPbarcode", task.PalletCode},
                //        {"WhCode", "1001"},
                //        {"BeginPoint", task.SourceAddress},
                //        {"EndPoint", task.TargetAddress},
                //        {"Results", 1},
                //    };
                //if (wmsBase == null || requestTask == null)
                //{
                //    throw new InvalidOperationException("WMS IP æœªé…ç½®");
                //}
                //var wmsIpAddress = wmsBase + requestTask;
                //var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, keys.ToString()).Result;
                //if (result != null)
                //{
                //    task.ExceptionMessage += "   " + content.Message;
                //}
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
                {
@@ -1081,12 +1105,62 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        public WebResponseContent text(int taskNum)
        public WebResponseContent TaskComplete()
        {
            WebResponseContent content = new WebResponseContent();
            var result = _stationManagerRepository.Db.Queryable<Dt_StationManager>()
                .Where(t => SqlFunc.Abs(t.LevelPointFist - taskNum) <= 10)
                .ToList();
            //var result = _stationManagerRepository.Db.Queryable<Dt_StationManager>()
            //    .Where(t => SqlFunc.Abs(t.LevelPointFist - taskNum) <= 1000)
            //    .ToList();
            var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
            var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
            var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.CompleteTask)?.ConfigValue;
            WMSTaskDTO taskDTO = new WMSTaskDTO()
            {
                TaskId="1",
                TPbarcode = "123456",
                WhCode = "1001",
                BeginPoint = "1013",
                EndPoint="1-1-1",
                Results="1"
            };
            if (wmsBase == null || requestTask == null)
            {
                throw new InvalidOperationException("WMS IP æœªé…ç½®");
            }
            var wmsIpAddress = wmsBase + requestTask;
            var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result;
            return content.OK(data: result);
        }
        public WebResponseContent RequestTask()
        {
            WebResponseContent content = new WebResponseContent();
            //var result = _stationManagerRepository.Db.Queryable<Dt_StationManager>()
            //    .Where(t => SqlFunc.Abs(t.LevelPointFist - taskNum) <= 1000)
            //    .ToList();
            var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
            var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
            var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
            //var keys = new Dictionary<string, object>()
            //{
            //    {"TPbarcode", "123456"},
            //    {"WhCode", "1001"},
            //    {"BeginPoint", "1013"}
            //};
            WMSTaskDTO taskDTO = new WMSTaskDTO()
            {
                TPbarcode = "123456",
                WhCode = "1001",
                BeginPoint = "1013"
            };
            if (wmsBase == null || requestTask == null)
            {
                throw new InvalidOperationException("WMS IP æœªé…ç½®");
            }
            var wmsIpAddress = wmsBase + requestTask;
            var result = WIDESEA_Comm.Http.HttpHelper.PostAsync(wmsIpAddress, taskDTO.ToJsonString()).Result;
            return content.OK(data: result);
        }