| | |
| | | |
| | | #endregion 调用事件总线通知前端 |
| | | } |
| | | |
| | | #region 路由方式 |
| | | |
| | | //List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | //foreach (string childDeviceCode in childDeviceCodes) |
| | | //{ |
| | | // ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | |
| | | // if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = ""; |
| | | |
| | | // DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(ConveyorLineTaskCommand_After.InteractiveSignal) && x.ProtocalDetailValue == command.InteractiveSignal.ToString()); |
| | | // if (deviceProtocolDetails != null) |
| | | // { |
| | | // MethodInfo? method = GetType().GetMethod(deviceProtocolDetails.ProtocolDetailType); |
| | | // if (method != null) |
| | | // { |
| | | // method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode }); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | #endregion 路由方式 |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | |
| | | _noticeService.Logs(userTokenIds, new { conveyorLine.DeviceName, log = log, time = DateTime.Now.ToString("G"), color = "red" }); |
| | | WriteInfo(conveyorLine.DeviceName, log); |
| | | //if() |
| | | |
| | | var taskNew = _taskService.QueryTaskByPalletCode(command.ConveyorLineBarcode, stationInfo.Roadway); |
| | | if (taskNew == null) |
| | |
| | | if (task != null) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, stationInfo.stationChildCode); |
| | | |
| | | var needBarcode = _needBarcodeRepository.QueryFirst(x => x.toArea == stationInfo.stationChildCode); |
| | | if (needBarcode != null) |
| | | { |
| | | needBarcode.inLineNum -= 1; |
| | | _needBarcodeRepository.UpdateData(needBarcode); |
| | | } |
| | | } |
| | | } |
| | | else //如果任务请求失败 |