using Quartz;
|
using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Common.Tools;
|
using WIDESEA_Core.Utilities;
|
using WIDESEA_WCS.Jobs;
|
using WIDESEA_WCS.SchedulerExecute.AGV;
|
using WIDESEA_WCS.WCSClient;
|
|
namespace WIDESEA_WCS
|
{
|
[DisallowConcurrentExecution]
|
public class AGVJob : JobBase, IJob
|
{
|
public Task Execute(IJobExecutionContext context)
|
{
|
try
|
{
|
//return Task.Run(() =>
|
//{
|
|
//});
|
//var executeLog = ExecuteJob(context, () => Run(context));
|
}
|
catch (Exception)
|
{
|
|
}
|
return Task.FromResult(string.Empty);
|
}
|
|
public string Run(IJobExecutionContext context)
|
{
|
JobDataMap data = context.JobDetail.JobDataMap;
|
PLCClient client = data.Get("JobParams") as PLCClient;
|
|
AGVSchedulerExecute.SendAGVTask1(client);
|
AGVSchedulerExecute.UpdateState(client);
|
return "";
|
}
|
}
|
}
|