LabelParam.cs 1.8 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceLibrary
{
    public class LabelParam
    {
        /// <summary>
        /// 创建新出入库信息
        /// </summary>
        /// <param name="type">出入库类型</param>
        /// <param name="wareNo">二维码内容</param>
        /// <param name="platew">宽度</param>
        /// <param name="plateh">高度</param>
        /// <param name="IsNg">是否是入库NG料</param>
        /// <param name="ngMsg">NG消息</param>
        public LabelParam(MoveType type, string wareNo = "", int platew = 0, int plateh = 0, bool _IsNg = false, string ngMsg = "")
        {
            WareCode = wareNo;
            PlateW = platew;
            PlateH = plateh;
            IsNg = _IsNg;
            NgMsg = ngMsg;
            moveType = type;

        }

        public MoveType moveType = MoveType.None;
        /// <summary>
        /// 物品二维码信息
        /// </summary>
        public string WareCode { get; set; }

        /// <summary>
        /// 料盘高度
        /// </summary>
        public int PlateH { get; set; }
        /// <summary>
        /// 料盘宽度
        /// </summary>
        public int PlateW { get; set; }
        /// <summary>
        /// 是否是入料NG料
        /// </summary>
        public bool IsNg = false;
        /// <summary>
        /// 入料NG消息
        /// </summary>
        public string NgMsg = "";


        public string ToStr()
        {
            if (IsNg)
            {
                return " 入库失败[BOX_" +   "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
            }
            else
            {

                return " 入库 [" +  "] [" + WareCode + "], [" + PlateW + "x" + PlateH + "] ";
            }
        }


    }
}