| | |
| | | #endregion |
| | | |
| | | #region 浠诲姟瀹屾垚 |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus)); |
| | | if (deviceProtocolDetail != null) |
| | | var completeStatus = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus); |
| | | if (completeStatus == 2 || completeStatus == 3) |
| | | { |
| | | MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType); |
| | | if (method != null) method.Invoke(this, new object[] { commonStackerCrane }); |
| | | NormalCompleted(commonStackerCrane); |
| | | } |
| | | //DeviceProtocolDetailDTO? deviceProtocolDetail = commonStackerCrane.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.CompleteStatus).ToString() && x.DeviceProParamName == nameof(StackerCraneTaskCommandR.CompleteStatus)); |
| | | //if (deviceProtocolDetail != null) |
| | | //{ |
| | | // MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType); |
| | | // if (method != null) method.Invoke(this, new object[] { commonStackerCrane }); |
| | | //} |
| | | #endregion |
| | | #region 浠诲姟閫昏緫澶勭悊 |
| | | var onlinestate = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.Onlinestate); |
| | |
| | | #region 鏌ヨ浠诲姟,閫昏緫澶勭悊 |
| | | if (Enum.Parse<RunStatus>(commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.RunStatus).ToString()) == RunStatus.Standby) |
| | | { |
| | | var Task = _taskService.GetTaskState(TaskType: (int)TaskOtherTypeEnum.RelocationCar);//鑾峰彇绉昏溅浠诲姟 |
| | | var Task = _taskService.GetTaskState((int)TaskCarStatusEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCar);//鑾峰彇绉昏溅浠诲姟 |
| | | var Task1 = _taskService.GetTaskState((int)CarChargingTaskEnum.ShuttleCar_Finish, (int)TaskOtherTypeEnum.RelocationCarCharging);//鑾峰彇绉昏溅鍏呯數浠诲姟 |
| | | if (Task != null) |
| | | { |
| | | if (Task.TaskState == (int)TaskCarStatusEnum.ShuttleCar_Finish) SendTask(commonStackerCrane, Task); |
| | | SendTask(commonStackerCrane, Task); |
| | | } |
| | | else if (Task1 != null) |
| | | { |