123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.ComponentModel;
- using WCS.Core;
- using WCS.Entity.Protocol.Station;
- using WCS.Service.Worlds;
- using WCS.WorkEngineering.Extensions;
- namespace WCS.Service.Systems
- {
- /// <summary>
- /// 数据采集系统
- /// </summary>
- //[BelongTo(typeof(DataCollectionWorld))]
- [Description("数据采集系统")]
- public class DataCollectionSysyem : ServiceSystem<bool, bool>
- {
- public List<Device<IStation520, IStation521>> ConvList;
- public DataCollectionSysyem()
- {
- ConvList = World.Devices.Where(v => v.IsConv()).Select(v => new Device<IStation520, IStation521>(v)).ToList();
- }
- protected override bool Do(bool obj)
- {
- //Db.Do(db =>
- //{
- // var plcData = new WCS_PlcData()
- // {
- // UPDATETIME = DateTime.Now,
- // WAREHOUSE = "111",
- // CONTENT = JsonConvert.SerializeObject(ConvList),
- // };
- // db.Default.Insertable<WCS_PlcData>(plcData).ExecuteCommand(); ;
- //});
- Console.WriteLine("11111");
- return true;
- }
- }
- }
|