wangxinhui
昨天 9ce6731460179c71f0f2c636b2a1598324d5194e
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -54,6 +54,10 @@
            AgvResponse agvResponse = new AgvResponse();
            try
            {
                if (secureApplyModel.ReceiveTaskID=="100")
                {
                    return agvResponse.OK("成功", "0");
                }
                var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum);
                if (task == null) throw new Exception("未找到任务");
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
@@ -68,7 +72,7 @@
                    }
                    else//出库放货请求
                    {
                        var content = PutRequest(secureApplyModel.WbCode, task.PalletType);
                        var content = PutRequest(task.NextAddress, task.PalletType);
                        if (!content.Status)
                        {
                            throw new Exception(content.Message);
@@ -87,7 +91,7 @@
                    }
                    else//入库放货请求
                    {
                        var content = PutRequest(secureApplyModel.WbCode, task.TaskNum);
                        var content = PutRequest(task.NextAddress, task.TaskNum);
                        if (!content.Status)
                        {
                            throw new Exception(content.Message);
@@ -239,7 +243,7 @@
                        }
                        else
                        {
                            if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt())
                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt())
                            {
                                var content = TakeFinish(task.CurrentAddress);
                                if (!content.Status)
@@ -257,7 +261,7 @@
                            {
                                throw new Exception($"{task.NextAddress}AGV站台未定义");
                            }
                            if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt())
                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt())
                            {
                                List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi);
                                Dt_Router router = routers.FirstOrDefault();
@@ -286,7 +290,7 @@
                        else
                        {
                            _taskService.TaskCompleted(task.TaskNum);
                            if (task.TaskType==TaskTypeEnum.PrintOutbound.ObjToInt())
                            if (task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt())
                            {
                                PutFinish(task.NextAddress);
                            }
@@ -315,7 +319,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == code);
                if (stationManger == null)
                {
                    return content.Error($"未找到站台配置");