| | |
| | | /// <returns></returns> |
| | | Dt_Task QueryRelocationTask(string deviceNo); |
| | | |
| | | bool QueryStackerTask(string deviceNo); |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region TaskRelocationStatusEnum |
| | | { |
| | | Type type = typeof(TaskRelocationStatusEnum); |
| | | List<int> enums = Enum.GetValues(typeof(TaskRelocationStatusEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(TaskRelocationStatusEnum).GetField(((TaskRelocationStatusEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | } |
| | | #endregion |
| | | #region AGVTaskStatusEnum |
| | | { |
| | | Type type = typeof(AGVTaskStatusEnum); |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | |
| | | |
| | | Grade = 3, |
| | | |
| | | TaskNum = BaseDal.GetTaskNo().Result, |
| | | |
| | | PalletCode= taskDTOs.TPbarcode, |
| | | |
| | | }; |
| | | BaseDal.AddData(task); |
| | | } |
| | |
| | | { |
| | | return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskRelocationTypeEnum.Relocation && x.TaskState == (int)TaskRelocationStatusEnum.RelocationNew); |
| | | } |
| | | public bool QueryStackerTask(string deviceNo) |
| | | { |
| | | var task= BaseDal.QueryFirst(x => x.Roadway == deviceNo && (x.TaskState == (int)TaskInStatusEnum.SC_InExecuting || x.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting || x.TaskState == (int)TaskRelocationStatusEnum.Relocation_Executing)); |
| | | if (task == null) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤ç¼å·ãæé¤çä»»å¡ãå½åå°åæç
§ä¼å
级以åå建æ¶é´æåºæ¥è¯¢ä»»å¡æ± åºåºç±»åçæ°å¢çææä»»å¡ |
| | |
| | | { |
| | | Dt_Task task; |
| | | |
| | | if (!_taskService.QueryStackerTask(commonStackerCrane.DeviceCode)) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | task = _taskService.QueryRelocationTask(commonStackerCrane.DeviceCode); |
| | | if (task != null) |
| | | { |