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/TaskCore.cs | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/HH.WCS.QingXiNongfu/core/TaskCore.cs b/HH.WCS.QingXiNongfu/core/TaskCore.cs index aedaea0..4faf73c 100644 --- a/HH.WCS.QingXiNongfu/core/TaskCore.cs +++ b/HH.WCS.QingXiNongfu/core/TaskCore.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Web.Configuration; using System.Xml.Schema; using static HH.WCS.QingXigongchang.api.ApiModel; @@ -199,6 +200,17 @@ var list = TaskHelper.GetTaskListByState("鏈墽琛�); if (list.Count > 0) { + foreach (var mst in list) + { + var dinfo = Settings.GetDeviceInfoList().FindAll(x => x.deviceType == 13); + if (dinfo.Find(x => x.location.Contains(mst.S_START_LOC)) != null) + mst.N_PRIORITY = 99; + else + if (dinfo.Find(x => x.location.Contains(mst.S_END_LOC)) != null) + mst.N_PRIORITY = 98; + } + list = list.OrderByDescending(x => x.N_PRIORITY).ToList(); + list.ForEach(task => { if (!TaskProcess.Intercept(task)) -- Gitblit v1.9.1