| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode); |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == 33); |
| | | foreach (var item in stationMangers) |
| | | { |
| | | //è·ååè®® |
| | |
| | | { |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 2); |
| | | } |
| | | |
| | | ConsoleHelper.WriteInfoLine($"ç åå·¥ä½{item.StationCode}ç¶æ{Allow}"); |
| | | if (Allow == 3 || Allow == 7) |
| | | { |
| | | //è·åå½åä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryData(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.MD_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode).OrderBy(x => x.TaskNum).FirstOrDefault(); |
| | | |
| | | if (task != null) //ç åç³è¯· |
| | | { |
| | | if (Allow == 3 || Allow == 7) |
| | | { |
| | | |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == GetPackSendEnum(item.StackerCraneStationCode).ToString()).DeviceProDataBlock, 1); |
| | | |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDSendID.ToString()).DeviceProDataBlock, Convert.ToInt16(item.StackerCraneStationCode)); |
| | |
| | | |
| | | #endregion |
| | | |
| | | if (device.DeviceCode == "MD8_CP") |
| | | { |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, -1); |
| | | } |
| | | else |
| | | { |
| | | device.Communicator.Write<float>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDA.ToString()).DeviceProDataBlock, 1); |
| | | } |
| | | |
| | | device.Communicator.Write<short>(device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == W_MDDB.W_MDReceiveDone.ToString()).DeviceProDataBlock, 3); |
| | | |
| | | //æ´æ°ä»»å¡ä¿¡æ¯ |
| | | //_taskService.TaskCompleted(task.TaskNum); |
| | | task.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | _taskRepository.UpdateData(task); |
| | | //_taskRepository.UpdateData(task); |
| | | Thread.Sleep(1500); |
| | | WriteInfo(item.StationName, $"ä»»å¡å·{task.TaskNum}ç å"); |
| | | } |