wangxinhui
5 天以前 9ec715d2deb18a269dd49c48da91a36632d08c81
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs
@@ -89,13 +89,16 @@
                if (agvUpdateModel == null) throw new Exception("未获取到请求参数");
                agvResponseContent.ReqCode = agvUpdateModel.ReqCode;
                var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum);
                if (task == null) throw new Exception($"未找到任务,任务号【{agvUpdateModel.TaskCode}】");
                if (task == null && agvUpdateModel.Method!= "begin") throw new Exception($"未找到任务,任务号【{agvUpdateModel.TaskCode}】");
                switch (agvUpdateModel.Method)
                {
                    case "start":
                        break;
                    case "begin":
                        WebResponseContent requestZH = _taskService.RequestWMSZHTask(agvUpdateModel.TaskCode, agvUpdateModel.PodCode,agvUpdateModel.PodTyp,agvUpdateModel.MaterialLot);
                        agvResponseContent.Code = requestZH.Status ? "0" : "1";
                        agvResponseContent.Message = requestZH.Status ? "成功" : "失败";
                        return agvResponseContent;
                    case "outbin"://出库根据这个信号判断取货完成
                        if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
                        if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                        {
                            var content = TakeFinish(task.CurrentAddress);
                            if (!content.Status) throw new Exception(content.Message);
@@ -109,7 +112,7 @@
                        break;
                    case "getSafetySignal"://安全信号申请
                        {
                            if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt())
                            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                            {
                                var content = TakeRequest(task.CurrentAddress);
                                //if (!content.Status) throw new Exception(content.Message);
@@ -133,12 +136,12 @@
                            Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == task.NextAddress);
                            if (dt_Station == null)
                            {
                                throw new Exception($"{task.NextAddress}AGV站台未定义");
                                throw new Exception($"{task.NextAddress}站台未定义");
                            }
                            task.CurrentAddress = dt_Station.StationCode;
                            task.NextAddress = "";
                            task.TaskState = TaskStatusEnum.AGV_Finish.ObjToInt();
                            task.DeviceCode = "SC01_CSJ";
                            task.DeviceCode = "SC01_ZH";
                            var up = _taskRepository.UpdateData(task);
                            agvResponseContent.Code = up ? "0" : "1";
                            agvResponseContent.Message = up ? "成功" : "失败";