123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.ComponentModel;
- using WCS.Core;
- using WCS.WorkEngineering.Protocol.Station;
- using WCS.WorkEngineering.WebApi.Controllers;
- using WCS.WorkEngineering.Worlds;
- using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
- namespace WCS.WorkEngineering.Systems
- {
- [BelongTo(typeof(MainWorld))]
- [Description("机台叫料生成AGV任务")]
- public class 机台叫料生成AGV任务 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
- {
- protected override bool ParallelDo => true;
- protected override bool SaveLogsToFile => true;
- public override void Do(Device<IStation520, IStation521, IStation523> obj)
- {
- var res = AgvApi.测试路径("2533", "12346");
- //var res = AgvApi.机台叫料("2534", "LX32", Guid.NewGuid().ToString().Replace("-", ""));
- //var res = AgvApi.托盘回库("LX32", Guid.NewGuid().ToString().Replace("-",""));
- //if (!obj.Data3.Status.HasFlag(StationStatus.PH_Status)) return;
- //if (!obj.Data3.Status.HasFlag(StationStatus.Auto)) return;
- //SqlSugarHelper.Do(_db =>
- //{
- // var db = _db.Default;
- // var task = db.Queryable<WCS_TaskInfo>().Single(x => x.ID == obj.Data.TaskNumber);
- // if (task == null) return;
- // if (task.Status != TaskStatus.ConveyorExecution) return;
- // //开始下发任务.0
- //});
- }
- public override bool Select(Device dev)
- {
- return dev.HasFlag(DeviceFlags.AGV取货站台口);
- }
- }
- }
|