//using CMS.Model;
using Jc.SnowId;
using Khd.Core.Domain.Models;

namespace Khd.Core.Wcs.Global
{
    public static class StaticData
    {
        /// <summary>
        /// 物料信息
        /// </summary>
        public static List<BaseMaterialinfo> MateriaList = new List<BaseMaterialinfo>();
        /// <summary>
        /// 库区信息
        /// </summary>
        public static List<BaseArea> BaseAreaList = new List<BaseArea>();
        /// <summary>
        /// 站台信息
        /// </summary>
        public static List<BaseSitenode> SiteNodeList = new List<BaseSitenode>();
        /// <summary>
        /// 小车信息
        /// </summary>
        public static List<BaseCar> CarList = new List<BaseCar>();
        /// <summary>
        /// 点位信息
        /// </summary>
        //public static List<NodeSetting> NodeSettingList = new List<NodeSetting>();
        /// <summary>
        /// 点位信息
        /// </summary>
        public static List<BasePlcpoint> BasePlcpointList = new List<BasePlcpoint>();
        public static List<WcsTask> WcsTask = new List<WcsTask>();
        public static List<WcsTaskLog> WcsTaskLog = new List<WcsTaskLog>();
        public static List<WmsBaseWarehouse> WmsBaseWarehouse = new List<WmsBaseWarehouse>();
        public static List<WmsWarehouseMaterial> WmsWarehouseMaterial = new List<WmsWarehouseMaterial>();
        public static List<MesBasePalletInfo> MesBasePalletInfo = new List<MesBasePalletInfo>();
        public static List<BaseDictionary> BaseDictionary = new List<BaseDictionary>();

        private static object baseEquipLock = new object();
        private static List<BaseEquip> _baseEquip = new List<BaseEquip>();
        public static List<BaseEquip> BaseEquip
        {
            get
            {
                lock (baseEquipLock)
                {
                    return _baseEquip;
                }
            }
            set
            {
                lock (baseEquipLock)
                {
                    _baseEquip = value;
                }
            }
        }
        public static List<WcsCmd> WcsCmd = new List<WcsCmd>();
        public static List<WcsCmdLog> WcsCmdLog = new List<WcsCmdLog>();
        public static List<WcsStock> WcsStock = new List<WcsStock>();
        public static List<WcsInWareOrder> WcsInWareOrder = new List<WcsInWareOrder>();
        public static List<WcsOutWareOrder> WcsOutWareOrder = new List<WcsOutWareOrder>();
        public static List<BasePlc> basePlcs = new List<BasePlc>();
        public static List<PlcConfig> PlcConfigs { get; set; }
        public static int DeleteLogDay { get; internal set; }
        public static List<DmsBaseAlarmRule> DmsBaseAlarmRuleList { get; set; }

        public static List<string> BigContainerCodes = new List<string>() { "JYHB01020001", "JYHB01020002", "JYHB01020003", "JYHB01020004" };

        public static Dictionary<int, Dictionary<string, PlcPoint>> PlcPoints = new Dictionary<int, Dictionary<string, PlcPoint>>();
        public static Dictionary<int, Plc.S7.Plc> PlcDic = new Dictionary<int, Plc.S7.Plc>();
        public static JcSnowId SnowId = new JcSnowId();
    }
}
