| | |
| | | List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | foreach (string childDeviceCode in childDeviceCodes) |
| | | { |
| | | ConveyorLineTaskCommand_After command = null; |
| | | if (childDeviceCode == "2236") |
| | | { |
| | | var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC; |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC); |
| | | CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device; |
| | | command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | } |
| | | |
| | | //ConveyorLineTaskCommand_After command = null; |
| | | //if (childDeviceCode == "2236") |
| | | //{ |
| | | // var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC; |
| | | // IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC); |
| | | // CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device; |
| | | // command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | //} |
| | | //else |
| | | //{ |
| | | // command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | //} |
| | | ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | if (command == null) continue; |
| | | if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = ""; |
| | | |