BoxPosition.cs 1.4 KB
using SmartShelf.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartShelf.LoadCSVLibrary
{
   
    public class BoxPosition : StorePostionBase
    { 
        /// <summary>
        /// 对应的料仓ID(流水线料仓需要用此字段区分哪个BOX)
        /// </summary>
        [CSVAttribute("料仓ID")]
        public int StoreId { get; set; }

        
        [CSVAttribute("区域ID")]
        public int DmxId { get; set; }

        [CSVAttribute("灯索引")]
        public string LedIndex { get; set; }
       
        [CSVAttribute("设备IP")]
        public string DeviceIp { get; set; }

        private List<int> LedList = null;

        public List<int> GetLedList()
        {
            if (LedList == null)
            {
                LedList = new List<int>();
                string[] arrays = LedIndex.Split(';');
                if (arrays.Length > 0)
                {
                    foreach (string str in arrays)
                    {
                        try
                        {
                            int led = Convert.ToInt32(str.Trim());
                            LedList.Add(led);
                        }catch(Exception ex)
                        {
                           
                        }
                    }
                }
            }
            return LedList;
        }

    }
}