huangxiaoqiang
2025-03-26 1b8cce65d4987e4b7e94d1b178abb3af0978a2d4
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -120,19 +120,19 @@
                    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 = "";