1
wangxinhui
7 天以前 6abb6078281bed657365d9512af90e87ac90ab60
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -2,8 +2,10 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -78,24 +80,40 @@
        {
            return WebResponseContent.Instance.OK(data: _routerExtension.GetEndPoint(startPoint, routeType));
        }
        [HttpPost, HttpGet, Route("AgvCarrying"), AllowAnonymous]
        public WebResponseContent AgvCarrying(int row, int startColumn, int endColumn, int layer, int targetLayer)
        /// <summary>
        /// æµ‹è¯•堆垛机出库
        /// </summary>
        [HttpPost, HttpGet, Route("SCOUT"), AllowAnonymous]
        public WebResponseContent SCCarrying(string sourceAddress, string roadWay, int taskType)
        {
            return Service.AgvCarrying(row, startColumn, endColumn, layer, targetLayer);
            WMSTaskDTO taskDTO = new WMSTaskDTO()
            {
                Id = 1,
                SourceAddress = sourceAddress,
                TaskNum = DateTime.Now.ToString("mmss").ObjToInt(),
                PalletCode= roadWay+ DateTime.Now.ToString("mmss"),
                RoadWay = roadWay,
                TaskType = taskType,
                TaskStatus = TaskStatusEnum.New.ObjToInt(),
                TargetAddress = "",
                Grade = 0,
                WarehouseId = 1,
                PalletType = 1
            };
            return Service.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
        }
        //[HttpPost, HttpGet, Route("WebSocketPushMessage"), AllowAnonymous]
        //public WebResponseContent WebSocketPushMessage(string message)
        //{
        //    try
        //    {
        //         _webSocketServer.PublishAllClientPayload(message);
        //        return WebResponseContent.Instance.OK();
        //    }
        //    catch(Exception ex)
        //    {
        //        return WebResponseContent.Instance.Error(ex.Message);
        //    }
        //}
        /// <summary>
        /// è¯·æ±‚入库任务
        /// </summary>
        /// <param name="palletCode">托盘号</param>
        /// <param name="sourceAddress">起始地址</param>
        /// <param name="roadWay">巷道</param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("SCIN"), AllowAnonymous]
        public WebResponseContent RequestWMSTaskSimple(string palletCode, string sourceAddress, string roadWay, int taskType = 0)
        {
            return Service.RequestWMSTaskSimple(palletCode,sourceAddress, roadWay, taskType);
        }
        [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous]
        public WebResponseContent RecWMSTaskCompleted(int taskNum)
        {