|
|
|
@ -0,0 +1,48 @@
|
|
|
|
|
using Admin.Core.IService;
|
|
|
|
|
using Admin.Core.IService.ISys;
|
|
|
|
|
using Admin.Core.Model;
|
|
|
|
|
using Aucma.Core.PLc;
|
|
|
|
|
using log4net;
|
|
|
|
|
using NetTaste;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
using Quartz;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///门体发泡数据采集
|
|
|
|
|
/// </summary>
|
|
|
|
|
namespace Admin.Core.Tasks
|
|
|
|
|
{
|
|
|
|
|
public class Job_DoorFoam_Quartz : JobBase, IJob
|
|
|
|
|
{
|
|
|
|
|
protected readonly IBaseOrderInfoServices _baseOrderInfoServices;
|
|
|
|
|
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(Job_DoorFoam_Quartz));
|
|
|
|
|
public Job_DoorFoam_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService)
|
|
|
|
|
{
|
|
|
|
|
_SysTasksQzService = SysTasksQzService;
|
|
|
|
|
_sysJobLogService = sysJobLogService;
|
|
|
|
|
}
|
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
|
|
|
{
|
|
|
|
|
await ExecuteJob(context, async () => await Run());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 门体发泡数据采集
|
|
|
|
|
public Task Run()
|
|
|
|
|
{
|
|
|
|
|
var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("DoorPlc"));
|
|
|
|
|
if (obj.plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
var endSignal = obj.plc.ReadInt16("DB4.DBW0");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|