using Furion.JsonSerialization;
|
using Microsoft.CodeAnalysis;
|
using Newtonsoft.Json;
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
|
using Quartz;
|
using System;
|
using System.Collections.Generic;
|
using System.IO;
|
using System.Runtime.Serialization.Json;
|
using System.Security.Policy;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Common.Tools;
|
using WIDESEA_Entity.DomainModels.Equipment;
|
using WIDESEA_Services.Services;
|
using WIDESEA_WCS.Jobs;
|
using WIDESEA_WCS.JobsPart.AGV;
|
using WIDESEA_WCS.SchedulerExecute.AGV;
|
using WIDESEA_WCS.WCSClient;
|
|
namespace WIDESEA_WCS
|
{
|
/// <summary>
|
/// AGV调度
|
/// </summary>
|
[DisallowConcurrentExecution]
|
public class AGVUpdateStatusJob : JobBase, IJob
|
{
|
public Task Execute(IJobExecutionContext context)
|
{
|
try
|
{
|
ExecuteJob(context, DoAction);
|
}
|
catch { }
|
return Task.FromResult(string.Empty);
|
}
|
private void DoAction(IJobExecutionContext context)
|
{
|
try
|
{
|
List<string> AGVS = new List<string> { "组装AGV调度", "正极AGV调度", "负极AGV调度", "组装AGV调度" };
|
foreach (var item in AGVS)
|
{
|
PLCClient pLCClient = WCSService.Clients.Find(v => v.PLCName == item);
|
if (pLCClient == null)
|
{
|
continue;
|
}
|
AGVSchedulerExecute.UpdateAgvTask(pLCClient);
|
}
|
}
|
catch (Exception ex)
|
{
|
throw new Exception(ex.Message);
|
}
|
}
|
}
|
}
|