| | |
| | | agvResponseContent.ReqCode = secureApplyModel.ReqCode; |
| | | try |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => secureApplyModel.TaskCode.ObjToInt() == x.TaskNum); |
| | | var task = _taskRepository.QueryFirst(x => secureApplyModel.TaskCode== x.AgvTaskNum); |
| | | if (task == null) throw new Exception("æªæ¾å°ä»»å¡"); |
| | | if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) |
| | | { |
| | |
| | | { |
| | | var content = PutFinish(task.NextAddress); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | task.CurrentAddress = task.NextAddress; |
| | | Dt_StationManger dt_Station=_stationMangerRepository.QueryFirst(x=>x.AGVStationCode== task.NextAddress); |
| | | if (dt_Station==null) |
| | | { |
| | | throw new Exception($"{task.NextAddress}AGVç«å°æªå®ä¹"); |
| | | } |
| | | task.CurrentAddress = dt_Station.StationCode; |
| | | task.NextAddress = ""; |
| | | task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); |
| | | task.DeviceCode = "SC01_CSJ"; |
| | | var up = _taskRepository.UpdateData(task); |
| | | agvResponseContent.Code = up ? "0" : "1"; |
| | | agvResponseContent.Message = up ? "æå" : "失败"; |
| | |
| | | |
| | | OtherDevice otherDevice = (OtherDevice)device; |
| | | otherDevice.SetValue(GroundStationDBName.W_TakeFinish, true, stationManger.StationCode); |
| | | |
| | | Thread.Sleep(1000); |
| | | otherDevice.SetValue(GroundStationDBName.W_TakeFinish, false, stationManger.StationCode); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |