海波 张
2025-05-27 747cfc84c88ad9f0cdf1732196019e34e867a77e
core/Monitor.cs
@@ -4,6 +4,7 @@
using HH.WCS.ZhongCeJinTan.util;
using HH.WCS.ZhongCeJinTan.wms;
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -51,6 +52,14 @@
                var tasks = db.Queryable<WMSTask>().Where(p => p.S_OP_CODE == operation.S_CODE).ToList();
                if (tasks.Count >1 && tasks.Count(p => p.N_B_STATE == 3) == 1)
                {
                    operation.S_B_STATE = "完成一半";
                    operation.T_MODIFY = DateTime.Now;
                    db.Updateable(operation).UpdateColumns(it => new { it.S_B_STATE, it.T_MODIFY }).ExecuteCommand();
                }
                if (tasks.Count == tasks.Count(p => p.N_B_STATE == 3))
                {
                    operation.N_B_STATE = 2;
@@ -72,8 +81,13 @@
            }
        }
        //出库任务 动作码有1无3 每隔一段时间提高一次优先级
        public static void UpdateOutTaskPriority()
        {
            //var ts1 = DateTime.Now.Subtract(datetime).TotalMinutes;
        }
    }
}