base_equipment.cs
6.06 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
using System;
using SqlSugar;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace Hh.Mes.POJO.Entity
{
public partial class base_equipment : base_Entity
{
/// <summary>
///
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int id { get; set; }
/// <summary>
///
/// </summary>
public int workshopId { get; set; }
/// <summary>
///
/// </summary>
public int factoryId { get; set; }
/// <summary>
///
/// </summary>
public int lineId { get; set; }
/// <summary>
///
/// </summary>
public int? workStationId { get; set; }
/// <summary>
///
/// </summary>
public int equipmentTypeId { get; set; }
/// <summary>
///
/// </summary>
public int? stationGroupIndex { get; set; }
/// <summary>
///
/// </summary>
public int? equipmentMaintainRuleId { get; set; }
/// <summary>
///
/// </summary>
public int roadWay { get; set; }
/// <summary>
///
/// </summary>
public int stationIndex { get; set; }
/// <summary>
///
/// </summary>
public int rowIndex1 { get; set; }
/// <summary>
///
/// </summary>
public int rowIndex2 { get; set; }
/// <summary>
///
/// </summary>
public int columnIndex { get; set; }
/// <summary>
///
/// </summary>
public int layerIndex { get; set; }
/// <summary>
///
/// </summary>
public DateTime? createTime { get; set; }
/// <summary>
///
/// </summary>
public DateTime? updateTime { get; set; }
/// <summary>
///
/// </summary>
public bool disable { get; set; }
/// <summary>
///
/// </summary>
public bool enable { get; set; }
/// <summary>
///
/// </summary>
public string code { get; set; }
/// <summary>
///
/// </summary>
public string name { get; set; }
/// <summary>
///
/// </summary>
public string lineCode { get; set; }
/// <summary>
///
/// </summary>
public string workStationCode { get; set; }
/// <summary>
///
/// </summary>
public string ip { get; set; }
/// <summary>
///
/// </summary>
public string connectName { get; set; }
/// <summary>
///
/// </summary>
public string destinationGroup { get; set; }
/// <summary>
///
/// </summary>
public string createBy { get; set; }
/// <summary>
///
/// </summary>
public string updateBy { get; set; }
/// <summary>
///
/// </summary>
public string outAddress { get; set; }
/// <summary>
///
/// </summary>
public string goAddress { get; set; }
/// <summary>
///
/// </summary>
public string stationGroup { get; set; }
/// <summary>
///
/// </summary>
public string description { get; set; }
/// <summary>
///
/// </summary>
public string fork1AvailableStation { get; set; }
/// <summary>
///
/// </summary>
public string fork2AvailableStation { get; set; }
/// <summary>
///
/// </summary>
public string warehouseCode { get; set; }
/// <summary>
///
/// </summary>
public string ledip { get; set; }
/// <summary>
///
/// </summary>
public string scanIp { get; set; }
/// <summary>
///
/// </summary>
public string destinationArea { get; set; }
/// <summary>
///
/// </summary>
public string basePlcDB { get; set; }
/// <summary>
///
/// </summary>
public string selfAddress { get; set; }
/// <summary>
///
/// </summary>
public string backAddress { get; set; }
[SugarColumn(IsIgnore = true)]
public base_equipment_type EquipmentType { get; set; }
[SugarColumn(IsIgnore = true)]
public List<base_equipment_prop> m_equipmentProps { get; set; }
/// <summary>
/// 逻辑外键实体-设备属性
/// </summary>
[SugarColumn(IsIgnore = true)]
public List<base_equipment_prop> EquipmentProps
{
get { return m_equipmentProps; }
set
{
m_equipmentProps = value;
if (value != null)
{
var maps = new Dictionary<string, base_equipment_prop>(value.Count);
foreach (var item in value)
{
if (item.EquipmentTypePropTemplate == null) item.EquipmentTypePropTemplate = new base_equipment_type_template();
maps.Add(item.equipmentTypeTemplateCode, item);
}
m_propMaps = maps;
}
}
}
#region 添加数据字典 键值只需要执行一次初始化 后续不需要再Find
[SugarColumn(IsIgnore = true)]
private IDictionary<string, base_equipment_prop> m_propMaps { get; set; }
/// <summary>
/// 获取设备属性
/// </summary>
/// <param name="key">设备属性code </param>
/// <returns></returns>
[NotMapped]
[SugarColumn(IsIgnore = true)]
public base_equipment_prop this[string key]
{
get
{
m_propMaps.TryGetValue(key, out base_equipment_prop prop);
return prop;
}
}
#endregion
}
}