dengjunjie
2026-02-27 b6a82cb656a6cd045d772274ae927c8ca2c22b06
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
using Autofac.Core;
using HslCommunication;
using HslCommunication.Core;
using Microsoft.VisualBasic.FileIO;
using Quartz;
using SixLabors.ImageSharp.PixelFormats;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
 
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public partial class TaskJob : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly IApiInfoService _apiInfoService;
        private readonly IRGVLocationInfoService _rGVLocationInfoService;
        private readonly IStationMangerService _stationMangerService;
 
        public TaskJob(ITaskService taskService, IApiInfoService apiInfoService, IRGVLocationInfoService rGVLocationInfoService, IStationMangerService stationMangerService)
        {
            _taskService = taskService;//注入
            _apiInfoService = apiInfoService;
            _rGVLocationInfoService = rGVLocationInfoService;
            _stationMangerService = stationMangerService;
        }
 
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                SendTask();
 
                SendWaitToTask();
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(nameof(TaskJob) + ":" + ex.Message);
            }
 
            return Task.CompletedTask;
        }
    }
}