LabelParam.cs
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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 + "] ";
}
}
}
}