using System.ComponentModel;
using WCS.Core;
using WCS.Entity.Protocol.Station;
using WCS.Service.Worlds;
using WCS.WorkEngineering.Extensions;
namespace WCS.Service.Systems
{
///
/// 数据采集系统
///
//[BelongTo(typeof(DataCollectionWorld))]
[Description("数据采集系统")]
public class DataCollectionSysyem : ServiceSystem
{
public List> ConvList;
public DataCollectionSysyem()
{
ConvList = World.Devices.Where(v => v.IsConv()).Select(v => new Device(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(plcData).ExecuteCommand(); ;
//});
Console.WriteLine("11111");
return true;
}
}
}