wangxinhui
2025-10-17 ce40df5daffae0d17b4e9fa7cb6d677afaa4d66f
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -55,10 +55,6 @@
            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)
@@ -291,7 +287,7 @@
                        else
                        {
                            _taskService.TaskCompleted(task.TaskNum);
                            if (task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt())
                            if (task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutCarton.ObjToInt())
                            {
                                PutFinish(task.NextAddress);
                            }
@@ -399,6 +395,10 @@
                            return content.Error("禁止放料");
                        }
                    }
                    else if (device.DeviceCode.Contains("TrussCarton"))//桁架
                    {
                        content.OK("允许放料");
                    }
                }
                return content;
            }
@@ -446,6 +446,10 @@
                    {
                        otherDevice.SetValue(RetractDB.Ret_PutFinish, true, stationManger.StationDeviceCode);
                    }
                    else if (device.DeviceCode.Contains("TrussCarton"))//纸箱桁架
                    {
                        otherDevice.SetValue(GetCartonPut(stationManger.StackerCraneStationCode), true, stationManger.StationDeviceCode);
                    }
                }
                return WebResponseContent.Instance.OK();
            }
@@ -454,6 +458,29 @@
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        /// <summary>
        /// èŽ·å–æ¡æž¶æ”¾æ–™ä¿¡å·
        /// </summary>
        public W_TrussCartonDB GetCartonPut(string StationCode)
        {
            switch (StationCode)
            {
                case "1":
                    return W_TrussCartonDB.W_CartonPut1;
                case "2":
                    return W_TrussCartonDB.W_CartonPut2;
                case "3":
                    return W_TrussCartonDB.W_CartonPut3;
                case "4":
                    return W_TrussCartonDB.W_CartonPut4;
                case "5":
                    return W_TrussCartonDB.W_CartonPut5;
                case "6":
                    return W_TrussCartonDB.W_CartonPut6;
                default:
                    throw new Exception("未定义工位");
            }
        }
        //[HttpPost, HttpGet, Route("TakeRequest"), AllowAnonymous]
        /// <summary>