From c3de7bb2097aa347a1f92c2f640d18753aff633a Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 28 二月 2026 13:41:26 +0800
Subject: [PATCH] 添加HTTP客户端助手、枚举、DTO;更新URL

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
index cb5bda3..cb2da11 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -73,7 +73,7 @@
                         try
                         {
                             ConveyorLineTaskCommandNew command = conveyorLine.ReadCustomer<ConveyorLineTaskCommandNew>(childDeviceCode);
-                            if (command == null || command.PLC_STB == 0)
+                            if (command == null || command.PLC_STB != 1)
                             {
                                 return;
                             }
@@ -85,15 +85,19 @@
                                 return;
                             }
 
-                            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode);
-                            if (task.IsNullOrEmpty())
+                            if (command.TaskNo > 0)
                             {
-                                _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode);
-                                return;
+                                Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode);
+                                if (task.IsNullOrEmpty())
+                                {
+                                    _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode);
+                                    return;
+                                }
+
+                                // 澶勭悊浠诲姟鐘舵��
+                                ProcessTaskState(conveyorLine, command, task, childDeviceCode);
                             }
 
-                            // 澶勭悊浠诲姟鐘舵��
-                            ProcessTaskState(conveyorLine, command, task, childDeviceCode);
                         }
                         catch (Exception innerEx)
                         {
@@ -132,10 +136,10 @@
             switch (state)
             {
                 case InExecuting:
-                    if (isTargetAddress)
-                        _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode);
-                    else
-                        _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode);
+                    //if (isTargetAddress)
+                    //    _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode);
+                    //else
+                    _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode);
                     break;
 
                 case OutExecuting:
@@ -155,6 +159,6 @@
             }
         }
 
-        
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3