From a4342e58b21d24428285f78abb95d6a87ccf5979 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期一, 30 三月 2026 16:02:36 +0800
Subject: [PATCH] 同步

---
 项目代码/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJobTZ/CommonConveyorLineTZJob.cs |   50 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 46 insertions(+), 4 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJobTZ/CommonConveyorLineTZJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJobTZ/CommonConveyorLineTZJob.cs"
index 6961bb9..6be3c5a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJobTZ/CommonConveyorLineTZJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJobTZ/CommonConveyorLineTZJob.cs"
@@ -165,7 +165,7 @@
                             }
                         }
 
-                        if (station.stationType == 1)  //鍏ュ簱鍙�
+                        if (station.stationType == 1 )  //鍏ュ簱鍙�
                         {
                             var requestInbound = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.EntApply, station.stationChildCode);
                             if (requestInbound)
@@ -193,7 +193,7 @@
                             }
                         }
 
-                        if (station.stationType == 3)
+                        if (station.stationType == 3)  //RB043绮炬帓鐐�
                         {
                             var requestFolw = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.EntApply, station.stationChildCode);
                             if (requestFolw)
@@ -242,11 +242,24 @@
                                 //var pvi = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.PVI, station.stationChildCode);
 
                                 WebResponseContent response = _taskService.RequestRoadWayTask(palletcode.ToString(), palletcode.ToString(), station).Result;
-                                if (!response.Status)
+                                if (response.Status)
                                 {
+                                    var task = _taskService.QueryBarCodeConveyorLineTask(palletcode.ToString(), station.stationChildCode);
+                                    if (task != null)
+                                    {
+                                        var stationInfo = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.NextAddress);
+                                        conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.Spare6, Convert.ToInt16(stationInfo.stationTCLocation), station.stationChildCode);
+                                        Thread.Sleep(200);
+                                        //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.Spare5, 3, station.stationChildCode);
+                                        conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
 
+                                        _taskService.UpdateTaskStatusToNext(task);
+                                    }
                                 }
-                                conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
+                                //else
+                                //{
+                                //    conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
+                                //}
                             }
                         }
 
@@ -269,6 +282,35 @@
                             }
                         }
 
+
+                        if (station.stationType == 6)  //绌烘粦姗囧叆搴撳彛
+                        {
+                            var requestInbound = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.EntApply, station.stationChildCode);
+                            if (requestInbound)
+                            {
+                                var palletcode = conveyorLine.GetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.SkidNo, station.stationChildCode);
+                                //var pvi = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.PVI, station.stationChildCode);
+
+                                //_taskService.QueryBarCodeConveyorLineTask();
+                                var task = _taskService.QueryExecutingTaskByBarcode(palletcode.ToString(), station.stationChildCode);
+                                if (task != null)
+                                {
+                                    _taskService.UpdateTaskStatusToNext(task);
+                                    conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
+                                }
+                                else
+                                {
+                                    continue;
+                                    //濡傛壘涓嶅埌瀵瑰簲鍏ュ簱浠诲姟锛屽垯鏍规嵁鎵樼洏 PVI鐢宠鍏ュ簱
+                                    //WebResponseContent response = _taskService.RequestTask(palletcode.ToString(), pvi, station).Result;
+                                    //if (!response.Status)
+                                    //{
+                                    //    continue;
+                                    //}
+                                }
+                            }
+                        }
+
                         #region 鏍规嵁鍗忚璇诲彇鏂规
                         //DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == request.ToString());
 

--
Gitblit v1.9.3