From 63b7c5764a2b567a1aeaf939e0edabf98aba2378 Mon Sep 17 00:00:00 2001 From: czw <selecti@yeah.net> Date: 星期二, 17 六月 2025 12:59:14 +0800 Subject: [PATCH] qx --- HH.WCS.QingXiNongfu/core/Monitor.cs | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/HH.WCS.QingXiNongfu/core/Monitor.cs b/HH.WCS.QingXiNongfu/core/Monitor.cs index 8e4c336..6f2dfef 100644 --- a/HH.WCS.QingXiNongfu/core/Monitor.cs +++ b/HH.WCS.QingXiNongfu/core/Monitor.cs @@ -1302,8 +1302,7 @@ { try { - LogHelper.Info($" 鏃犺弻鍑哄簱 鏌ュ伐鍗�); - var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "鏃犺弻鏍囩鍑哄簱" && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); + var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "鏃犺弻鏍囩鍑哄簱" && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); if (!yuworders.Any()) { YwlBQ_CreInwork(locsFirst, WJ_BQ.RK_BQDDQ, WJ_BQ.RK_BBHJQ); @@ -1327,7 +1326,7 @@ try { string pline = "T2鎻愬崌鏈�鏍囩"; - var Syuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); + var Syuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); //yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == plc.deviceName && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); var tklist = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 1 && x.SQL_State == "鎵ц涓�); @@ -1363,7 +1362,7 @@ } else if (Syuworders.Any()) { - YwlBQ_CreSXOutOrder(plc, Syuworders); + YwlBQ_CreSXOutOrder(plc, Syuworders.FindAll(x => x.OutNum > 0)); } } catch (Exception ex) @@ -2590,7 +2589,7 @@ } } ///绗竴娈碉細鍑哄簱 -鍒版媶鍨涙垨鑰�鎺ラ┏銆�- var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "鏃犺弻鏍囩鍑哄簱" && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); + var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "鏃犺弻鏍囩鍑哄簱" && x.WorkType == 6 && x.SQL_State == "鎵ц涓�).FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); //foreach (var order in yuworders) retuse: -- Gitblit v1.9.1