InOrOutStoreParam.cs
5.0 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
using log4net;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 出入仓参数(出入库操作时传入的参数类)
/// </summary>
public class InOutStoreParam
{
public static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public InOutStoreParam()
{
KTKStoreP = null;
this.WareNumber = "";
MoveP = null;
KTKSAStoreP = null;
}
/// <summary>
/// 新建一个对象
/// </summary>
/// <param name="wareNo">物品二维码</param>
/// <param name="position">仓位号</param>
public InOutStoreParam(string wareNo, string posId)
{
KTKStoreP = null;
WareNumber = wareNo;
PositionNum = posId;
MoveP = null;
IsSolderPaste = false;
}
public InOutStoreParam(string wareNo, string posId,string plateH,string plateW)
{
KTKStoreP = null;
WareNumber = wareNo;
PositionNum = posId;
MoveP = null;
this.PlagtW = plateW;
this.PlateH = plateH;
IsSolderPaste = false;
}
public InOutStoreParam(string wareNo, string posId, string plateH, string plateW,int trayCode)
{
KTKStoreP = null;
WareNumber = wareNo;
PositionNum = posId;
MoveP = null;
this.PlagtW = plateW;
this.PlateH = plateH;
this.TrayCode = trayCode;
IsSolderPaste = false;
}
public InOutStoreParam(string wareNo, string posId, LineMoveP linePosition)
{
KTKStoreP = null;
WareNumber = wareNo;
PositionNum = posId;
MoveP = linePosition;
IsSolderPaste = false;
}
public InOutStoreParam(string wareNo, string posId, KTKSAStorePostion movep)
{
KTKStoreP = null;
DBMoveP = null;
WareNumber = wareNo;
PositionNum = posId;
MoveP = null;
KTKSAStoreP = movep;
IsSolderPaste = false;
}
public InOutStoreParam(string wareNo, string posId, DoubleLineMoveP linePosition)
{
KTKStoreP = null;
WareNumber = wareNo;
PositionNum = posId;
DBMoveP = linePosition;
IsSolderPaste = false;
}
private KTKStorePostion KTKStoreP = null;
public KTKStorePostion GetKTKPosition()
{
try
{
if (KTKStoreP == null)
{
KTKStoreP = CSVPositionReader<KTKStorePostion>.GetPositon(PositionNum);
}
}
catch (Exception ex)
{
LogUtil.error(log, "出入库获取库位信息GetKTKPosition出错:" + ex.ToString());
}
return KTKStoreP;
}
private DoublePosition DBStoreP = null;
public DoublePosition GetDBPostion()
{
try
{
if (DBStoreP == null)
{
DBStoreP = CSVPositionReader<DoublePosition>.GetPositon(PositionNum);
}
}
catch (Exception ex)
{
LogUtil.error(log, "出入库获取库位信息GetDBPostion出错:" + ex.ToString());
}
return DBStoreP;
}
private KTKSAStorePostion KTKSAStoreP = null;
public KTKSAStorePostion GetKTKSAPosition()
{
try
{
if (KTKSAStoreP == null)
{
KTKSAStoreP = CSVPositionReader<KTKSAStorePostion>.GetPositon(PositionNum);
}
}
catch (Exception ex)
{
LogUtil.error(log, "出入库获取库位信息GetKTKSAPosition出错:" + ex.ToString());
}
return KTKSAStoreP;
}
/// <summary>
/// 物品二维码信息
/// </summary>
public string WareNumber { get; set; }
/// <summary>
/// 位置坐标名(对应配置表的位置)
/// </summary>
public string PositionNum { get; set; }
/// <summary>
/// 托盘号
/// </summary>
public int TrayCode { get; set; }
public LineMoveP MoveP { get; set; }
/// <summary>
/// 料盘高度
/// </summary>
public string PlateH { get; set; }
/// <summary>
/// 料盘宽度
/// </summary>
public string PlagtW { get; set; }
/// <summary>
/// 是否是放入锡膏(在线料仓才需要此字段)
/// </summary>
public bool IsSolderPaste { get; set; }
public DoubleLineMoveP DBMoveP { get; set; }
}
}