| | |
| | | try |
| | | { |
| | | ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode); |
| | | var Barcodea = conveyorLine.Communicator.Read("DB1103.2",5); |
| | | string x=Encoding.UTF8.GetString(Barcodea); |
| | | if (command != null) |
| | | { |
| | | #region è°ç¨äºä»¶æ»çº¿éç¥å端 |
| | |
| | | foreach (var item in deviceProtocolDetails) |
| | | { |
| | | int itemValue = Convert.ToInt32(item.ProtocalDetailValue); |
| | | _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { station.stationChildCode,InStock= structs[itemValue] , Roadway =station.Roadway}); |
| | | _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { station.stationChildCode, InStock = structs[itemValue], Roadway = station.Roadway + station.stationFloor }); |
| | | if (structs[itemValue] == true) |
| | | { |
| | | MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType); |
| | |
| | | |
| | | if (station.stationChildCode == "3004") |
| | | { |
| | | var taskIn = _taskRepository.QueryFirst(x => x.TaskNum == command.TaskNum && x.NextAddress == station.stationChildCode && x.TaskType == (int)TaskInboundTypeEnum.Inbound&&x.TaskState==(int)TaskInStatusEnum.HoistInExecuting); |
| | | if(taskIn != null) |
| | | var taskIn = _taskRepository.QueryFirst(x => x.TaskNum == command.TaskNum && x.NextAddress == station.stationChildCode && x.TaskType == (int)TaskInboundTypeEnum.Inbound && x.TaskState == (int)TaskInStatusEnum.HoistInExecuting); |
| | | if (taskIn != null) |
| | | { |
| | | Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == taskIn.Roadway && x.stationType == 3 && x.stationFloor == taskIn.Floor); |
| | | taskIn.CurrentAddress = station.stationChildCode; |
| | |
| | | } |
| | | |
| | | var task = _taskService.QueryConveyorLineTask(station.stationChildCode, command.TaskNum); |
| | | |
| | | |
| | | await HandleNewTaskAsync(conveyorLine, command, station.stationChildCode, task); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | |
| | | var task = _taskService.QueryConveyorLineFinishTask(stationManager.stationChildCode, command.TaskNum); |
| | | //æ¹æ¥è¯¢æ¹æ³ |
| | | if(stationManager.stationType==5||stationManager.stationType==4) |
| | | if (stationManager.stationType == 5 || stationManager.stationType == 4) |
| | | { |
| | | // 妿任å¡åå¨ |
| | | if (task != null) |
| | |
| | | { |
| | | Thread.Sleep(1000); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | |
| | | |
| | | } |
| | | } |
| | | } |