wangxinhui
2026-03-07 d82252f08a32f5786ffe231b7fd301b6a60781d6
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPC.cs
@@ -65,6 +65,7 @@
            try
            {
                bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
                bool isUpdate = false;
                if (flag && value != null)
                {
                    OtherDevice device = (OtherDevice)value;
@@ -96,18 +97,25 @@
                                    Thread.Sleep(1000);
                                }
                            }
                            if (conveyorLineInfoRead != null && conveyorLineInfoRead.StatusPV == 2 && conveyorLineInfoRead.Command == 10)
                            if (conveyorLineInfoRead != null && conveyorLineInfoRead.StatusPV == 2 && conveyorLineInfoRead.Command == 10 && item.IsOccupied == 1)
                            {
                                item.IsOccupied = 0;
                                isUpdate = true;
                                WriteInfo("码垛工位状态更新",$"{item.StationCode}{DateTime.Now}更新工位状态:{conveyorLineInfoRead.Command}");
                            }
                            else
                            else if (item.IsOccupied == 0)
                            {
                                item.IsOccupied = 1;
                                isUpdate = true;
                                WriteInfo("码垛工位状态更新", $"{item.StationCode}{DateTime.Now}更新工位状态不可用");
                            }
                        }
                    }
                    _stationMangerRepository.UpdateData(stationMangers);
                    if (isUpdate)
                    {
                        _stationMangerRepository.UpdateData(stationMangers);
                    }
                }
            }
            catch (Exception ex)