From a5ca8352f035f95d23717e49b74a6c6aea8a9fc9 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期三, 02 四月 2025 16:03:12 +0800
Subject: [PATCH] 添加MOM异常信息页面,OCV管理页面,优化WCS不能添加用户信息问题,优化分容空框回流写入线体信息失败问题

---
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs |   64 ++++++++------------------------
 1 files changed, 16 insertions(+), 48 deletions(-)

diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
index 324f8e2..4ace90d 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs
@@ -38,6 +38,7 @@
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DeviceBase;
 using WIDESEAWCS_QuartzJob.DTO;
 using WIDESEAWCS_QuartzJob.Service;
 using WIDESEAWCS_SignalR;
@@ -97,10 +98,10 @@
                                 method.Invoke(this, new object[] { conveyorLine, command, station });
                             }
                         }
-                        if (station.stationType == 6 && station.stationArea == "3")
-                        {
-                            await GetEmptyTrayAsync(station, conveyorLine, command);
-                        }
+                        //if (station.stationType == 6 && station.stationArea == "3")
+                        //{
+                        //    await GetEmptyTrayAsync(station, conveyorLine, command);
+                        //}
 
                         #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
 
@@ -181,56 +182,23 @@
         public void RequestEmptyOutbound(CommonConveyorLine_After conveyorLine, ConveyorLineTaskCommand_After command, Dt_StationManager stationInfo)
         {
             if (stationInfo.stationType != 7) return;
-            var taskNew = _taskRepository.QueryFirst(x => x.Roadway == stationInfo.Roadway && x.TaskType == (int)TaskOutboundTypeEnum.OutTray);
-            if (taskNew == null)   //涓嶅瓨鍦ㄧ┖妗嗗嚭搴撲换鍔� 鍒欒姹俉MS鍑虹┖搴�
+
+            var taskNew = _taskRepository.QueryData(x => x.TaskType == (int)TaskOutboundTypeEnum.OutTray);
+            //var need = _needBarcodeRepository.QueryFirst(x => x.toArea == stationInfo.stationChildCode && x.productLine == stationInfo.productLine);
+            //var cache = command.Reserved5;
+            //var proAddress = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationInfo.stationChildCode).Where(x => x.DeviceProParamName == ConveyorLineDBName_After.Reserve5.ToString()).FirstOrDefault().DeviceProAddress;
+            var cache = Convert.ToInt16(conveyorLine.ReadValue(ConveyorLineDBName_After.Reserve5, stationInfo.stationChildCode));
+            ConsoleHelper.WriteColorLine($"宸茬粡鏈墈taskNew.Count}涓换鍔�,鍙互鏀緖cache}涓┖鎵樼洏", ConsoleColor.DarkCyan);
+            if (taskNew.Count + 1 < cache)   //涓嶅瓨鍦ㄧ┖妗嗗嚭搴撲换鍔� 鍒欒姹俉MS鍑虹┖搴�
             {
-                ConsoleHelper.WriteWarningLine("璇锋眰绌烘墭鐩�");
+                //ConsoleHelper.WriteWarningLine("璇锋眰绌烘墭鐩�");
                 if (_taskService.RequestTask(command.ConveyorLineBarcode, stationInfo).Result.Status)
                 {
-                    Dt_Task task = _taskService.QueryTaskByPalletCode(command.ConveyorLineBarcode, stationInfo.Roadway);
-                    if (task != null)
-                    {
-                    }
+                    //need.inLineNum += 1;
+                    //_needBarcodeRepository.UpdateData(need);
                 }
             }
         }
-
-        /// <summary>
-        /// 杈撻�佺嚎璇锋眰鍏ュ簱
-        /// </summary>
-        /// <param name="conveyorLine">杈撻�佺嚎瀹炰緥瀵硅薄</param>
-        /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
-        /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
-        //public void RequestInbound(CommonConveyorLine_After conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode)
-        //{
-        //    var stationInfo = _stationManagerService.GetStationInfoByChildCode(childDeviceCode);
-        //    if (stationInfo != null)
-        //    {
-        //        //_taskService.r
-        //    }
-        //    var taskNew = _taskService.QueryCraneConveyorLineTask(command.ConveyorLineTaskNum.ObjToInt(), childDeviceCode);
-        //    if (taskNew == null)
-        //    {
-        //        string barcode = command.ConveyorLineBarcode.TrimEnd();
-        //        if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Result.Status)
-        //        {
-        //            Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
-        //            if (task != null)
-        //            {
-        //                ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
-        //                //taskCommand.InteractiveSignal = command.InteractiveSignal;
-        //                taskCommand.ResponState = 1;
-        //                taskCommand.ConveyorLineTaskNum = task.TaskNum;
-        //                taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(task.NextAddress);
-        //                conveyorLine.SendCommand(taskCommand, childDeviceCode);
-
-        //                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
-
-        //                _taskService.UpdateTaskStatusToNext(task);
-        //            }
-        //        }
-        //    }
-        //}
 
         private async Task GetEmptyTrayAsync(Dt_StationManager stationManager, CommonConveyorLine_After commonConveyor, ConveyorLineTaskCommand_After conveyorLine)
         {

--
Gitblit v1.9.3