Base_Task.cs
5.93 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
using RCS.Model.Comm;
using RCS.Model.Entity.PrimaryKey;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Net;
namespace RCS.Model.Entity
{
[Table("t_base_task")]
public class Base_Task : IdEntity
{
private string taskNo;
private DateTime acceptTime;
private bool commandSending;
private string taskAgvNo;
private DateTime? beginTime;
private DateTime? endTime;
private string taskErrMsg;
private EnumMsg.Direction direction;
private EnumMsg.TaskState taskState;
private string predictAgvNo;
private bool isSubmit;
private Base_Point startPoint;
private Base_Point endPoint;
/// <summary>
/// 任务号
/// </summary>
public string TaskNo
{
get => taskNo;
set
{
taskNo = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 任务类型 例如 SMT-001
/// </summary>
public string TaskType { get; set; }
/// <summary>
/// 任务群组 例如 PCBA\FA
/// </summary>
public string? TaskGroup { get; set; }
/// <summary>
/// 任务开始分解序号
/// </summary>
[NotMapped]
public int TaskSplitStep { get; set; }
/// <summary>
/// 主任务的任务等级
/// </summary>
public int TaskLevel { get; set; }
/// <summary>
/// 任务条码
/// </summary>
public string TaskPallet { get; set; }
/// <summary>
/// 起始点
/// </summary>
public string? Initial { get; set; }
/// <summary>
/// 目标点
/// </summary>
public string? Target { get; set; }
#region 接收数据库起点终点数据
public string StartBarcode { get; set; }
public string? EndBarcode { get; set; }
#endregion 接收数据库起点终点数据
/// <summary>
/// 主任务的起点信息
/// </summary>
[NotMapped]
public Base_Point StartPoint
{
get { return startPoint; }
set
{
startPoint = value;
StartBarcode = startPoint?.Barcode??"";
}
}
/// <summary>
/// 主任务的终点信息
/// </summary>
[NotMapped]
public Base_Point EndPoint
{
get { return endPoint; }
set
{
endPoint = value;
EndBarcode = endPoint?.Barcode??"";
}
}
/// <summary>
/// 任务的接收时间
/// </summary>
public DateTime AcceptTime
{
get => acceptTime;
set
{
acceptTime = value; NotifyPropertyChanged();
}
}
/// <summary>
/// 指令发送中
/// </summary>
[NotMapped]
public bool CommandSending
{
get => commandSending;
set
{
commandSending = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 任务是否提交
/// </summary>
public bool IsSubmit
{
get => isSubmit;
set
{
isSubmit = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 任务小车信息
/// </summary>
public string? TaskAgvNo
{
get => taskAgvNo;
set
{
taskAgvNo = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 子任务集合
/// </summary>
[NotMapped]
public ObservableCollection<Base_SubTask> SubTaskList { get; set; } = new();
/// <summary>
/// 任务的开始时间
/// </summary>
public DateTime? BeginTime
{
get => beginTime;
set
{
beginTime = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 任务的结束时间
/// </summary>
public DateTime? EndTime
{
get => endTime;
set
{
endTime = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 任务异常信息
/// </summary>
public string TaskErrMsg
{
get => taskErrMsg;
set
{
taskErrMsg = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 方向
/// </summary>
public EnumMsg.Direction Direction
{
get => direction;
set
{
direction = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 主任务状态
/// </summary>
public EnumMsg.TaskState TaskState
{
get => taskState;
set
{
taskState = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 顶升高度或角度
/// </summary>
[NotMapped]
public short HeightOrAngle { get; set; }
/// <summary>
/// 预测用的小车
/// </summary>
[NotMapped]
public string PredictAgvNo
{
get => predictAgvNo;
set
{
predictAgvNo = value;
NotifyPropertyChanged();
}
}
/// <summary>
/// 预加载路径点
public List<(int No, string Barcode)> PreLoadPath = [];
}
}