add
yirongjin
2025-07-24 b9c933a1a9c9de300ed8b10d07d482216c387323
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
using iWareModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace iWareCC.Common
{
    public class SystemValueUtil
    {
        /// <summary>
        /// 堆垛机开始和结束线程是否延迟操作
        /// </summary>
        /// <param name="deviceId"></param>
        /// <param name="threadDirectionEnum"></param>
        public static void DelayExcuteForSrmTaskThreadService(int deviceId, ThreadDirectionEnum threadDirectionEnum)
        {
            //if (deviceId == (int)EDevice.堆垛机)
            //{
            //    switch (threadDirectionEnum)
            //    {
            //        case ThreadDirectionEnum.任务开始下发线程:
            //            SystemValue.isDelayExcute_SrmTaskThreadService_1_Finish = true;
            //            break;
            //        case ThreadDirectionEnum.任务完成线程:
            //            SystemValue.isDelayExcute_SrmTaskThreadService_1_Finish = false;
            //            Thread.Sleep(SystemValue.DelayExcuteNumber);
            //            break;
            //    }
            //}
            //else if (deviceId == (int)EDevice.二号堆垛机)
            //{
            //    switch (threadDirectionEnum)
            //    {
            //        case ThreadDirectionEnum.任务开始下发线程:
            //            SystemValue.isDelayExcute_SrmTaskThreadService_2_Finish = true;
            //            break;
            //        case ThreadDirectionEnum.任务完成线程:
            //            SystemValue.isDelayExcute_SrmTaskThreadService_2_Finish = false;
            //            Thread.Sleep(SystemValue.DelayExcuteNumber);
            //            break;
            //    }
            //}
        }
    }
}