wanshenmean
2025-03-20 047e8be481b2b626a5dbcc613b5f2e77323239be
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -40,11 +40,13 @@
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_SignalR;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
using Platform = WIDESEAWCS_Model.Models.Platform;
@@ -117,7 +119,14 @@
                    List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
                    foreach (string childDeviceCode in childDeviceCodes)
                    {
                        ConveyorLineTaskCommand_After 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);
                        }
                        if (command == null) continue;
                        if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = "";