wanshenmean
3 天以前 ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -14,6 +14,7 @@
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.Service;
using ManualInboundTaskHandler = WIDESEAWCS_Tasks.ConveyorLineNewJob.ManualInbound.ManualInboundTaskHandler;
namespace WIDESEAWCS_Tasks
{
@@ -212,6 +213,22 @@
                                // 如果 WCS_ACK 为 1,先清除(表示处理过上一次请求)
                                if (command.WCS_ACK == 1)
                                    conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)0, childDeviceCode);
                                // 处理手动入库任务(起点为线体点位的任务)
                                try
                                {
                                    var task = _taskService.QueryManualInboundTask(childDeviceCode);
                                    if (task != null)
                                    {
                                        var handler = new ManualInboundTaskHandler(_taskService);
                                        handler.WriteTaskToPlc(conveyorLine, childDeviceCode, task);
                                    }
                                }
                                catch (Exception ex)
                                {
                                    _logger.LogError(ex, "处理手动入库任务异常");
                                    QuartzLogger.Error($"处理手动入库任务异常: {ex.Message}", "CommonConveyorLineNewJob", ex);
                                }
                                continue;
                            }