qinchulong
2025-03-29 039a4a5433e7f80adc88b491b549e5d9486e4f9a
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
using Microsoft.EntityFrameworkCore;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Common.Tools;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Services.IRepositories;
using WIDESEA_Services.Repositories;
using WIDESEA_Services.Services;
using WIDESEA_WCS.EquipBaseInfo;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.SchedulerExecute.AGV;
using WIDESEA_WCS.WCSClient;
 
namespace WIDESEA_WCS
{
    [DisallowConcurrentExecution]
    public class EquiJob : JobBase, IJob 
    {
        public static object request = new object();
        public static object Zrequest = new object();
        public static object Frequest = new object();
        /// <summary>
        /// 设备调度
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                //return Task.Run(() =>
                //{
 
                //});
                WriteLog.Info("设备调度").Write("开始"+DateTime.Now, "设备调度");
                var executeLog = ExecuteJob(context, () => Run(context));
            }
            catch (Exception ex)
            {
                WriteLog.Info("设备调度").Write(ex.Message.ToString() + DateTime.Now, "设备调度");
            }
            return Task.FromResult(string.Empty);
        }
 
 
        public string Run(IJobExecutionContext context)
        {
            //lock (Frequest)
            //{
            //    EquipmentExecutor.F_InOut_Djjk();
            //}
            //lock (Zrequest)
            //{
            //    EquipmentExecutor.ZF_InOut_Djjk();
            //}
            //lock (Zrequest)
            //{
            //    EquipmentExecutor.Z_TBSB_UpTask();
            //}
            //lock (Zrequest)
            //{
            //    EquipmentExecutor.F_TBSB_DownTask();
            //}
            //lock (Frequest)
            //{
            //    EquipmentExecutor.TBSB_UpTask();
            //}
            //lock (Zrequest)
            //{
            //    EquipmentExecutor.Z_FQSB_UpTask();
            //}
            //lock (Frequest)
            //{
            //    EquipmentExecutor.F_FQSB_UpTask();
            //}
            //lock (Zrequest)
            //{
            //    EquipmentExecutor.Z_GYSB_UpTask();
            //}
            //lock (Frequest)
            //{
            //    EquipmentExecutor.F_GYSB_UpTask();
            //}
            EquipmentExecutor.F_InOut_Djjk();
            //EquipmentExecutor.ZF_InOut_Djjk();
            EquipmentExecutor.Z_TBSB_UpTask();
            EquipmentExecutor.F_TBSB_DownTask();
            EquipmentExecutor.TBSB_UpTask();
            EquipmentExecutor.Z_FQSB_UpTask();
            EquipmentExecutor.F_FQSB_UpTask();
            EquipmentExecutor.Z_GYSB_UpTask();
            EquipmentExecutor.F_GYSB_UpTask();
 
            EquipmentExecutor.Z_HKSB_UpTask();
            EquipmentExecutor.Z_TBSB_DownTask();
            EquipmentExecutor.Z_GYSB_DownTask();
 
            EquipmentExecutor.Z_FQSB_DownTask();
            EquipmentExecutor.F_FQSB_DownTask();
            EquipmentExecutor.F_GYSB_DownTask();
            EquipmentExecutor.Z_TSJ_DownTask();
            EquipmentExecutor.ZF_XJJK_DownTask();
            //lock (request)
            //{
            //    EquipmentExecutor.Z_ZZLJ_Task();
            //}
            //lock (request)
            //{
            //    EquipmentExecutor.ZF_WLX_DownTask();
            //}
            EquipmentExecutor.Z_ZZLJ_Task();
            //EquipmentExecutor.ZF_WLX_DownTask();
 
            //EquipmentExecutor.JRSB_UpTask();
            //EquipmentExecutor.JROutBind();
            //EquipmentExecutor.JRSB_UpTask_New();//卷绕机叫料新方法
            EquipmentExecutor.GMHKSB_UpTask();
            return "";
        }
    }
}