LabelParam.cs 2.8 KB
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;

namespace DeviceLibrary
{
    [Serializable]
    public class ReelParam
    {
        public ReelParam(string warecode) {
            WareCode = warecode;
        }
        public ReelParam()
        {
        }
        /// <summary>
        /// 物品二维码信息
        /// </summary>
        public string WareCode { get; set; }
        public string ReeID { get; set; }
        /// <summary>
        /// 库位号
        /// </summary>
        public string PosID { get; set; }
        public string RFID { get; set; }
        public string bitmapfilename = "";
        public List<CodeInfo> codeInfos { get; set; }
        /// <summary>
        /// 料盘高度
        /// </summary>
        public int PlateH { get; set; }
        /// <summary>
        /// 料盘宽度
        /// </summary>
        public int PlateW { get; set; }
        public int usedCount { get; set; }
        /// <summary>
        /// 是否是入料NG料
        /// </summary>
        public bool IsNg = false;
        /// <summary>
        /// 入料NG消息
        /// </summary>
        public string NgMsg = "";
        /// <summary>
        /// 物料编码
        /// </summary>
        public string PN { get; set; }
        public string LOT { get; set; }
        public string EXP { get; set; }
        public string SN { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int QTY { get; set; } = 0;
        /// <summary>
        /// 厂家代码
        /// </summary>
        public string FC { get; set; }
        /// <summary>
        /// 唯一序列号
        /// </summary>
        public string RI { get; set; }
        /// <summary>
        /// 批次号
        /// </summary>
        public string Batch { get; set; }
        public bool ReelOnFixture { get; internal set; } = false;
        public string OutPosID { get; internal set; }
        public DateTime dateTime = DateTime.Now;
        public int HeightPos = 0;
        public ReelParam clone()
        {
            ReelParam dstobject;
            using (MemoryStream mStream = new MemoryStream())
            {
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(mStream, this);
                mStream.Seek(0, SeekOrigin.Begin);//指定当前流的位置为流的开头。
                dstobject = (ReelParam)bf.Deserialize(mStream);
                mStream.Close();
            }
            return dstobject;
        }
        public string ToDetailStr()
        {
            return $"{RFID},{SN},{LOT},{EXP},{PN},{NgMsg},{WareCode}";
        }
    }
}