Base_PathPoint.cs
2.43 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
using RCS.Model.Comm;
using RCS.Model.Entity.PrimaryKey;
using System.ComponentModel.DataAnnotations.Schema;
namespace RCS.Model.Entity
{
[Table("t_base_pathpoint")]
public class Base_PathPoint : IdEntity, IComparable
{
/// <summary>
/// 路径所在区域
/// </summary>
public string AreaType { get; set; }
/// <summary>
/// 路径对应的子任务号
/// </summary>
public uint SubTaskNo { get; set; }
/// <summary>
/// 路径点序号
/// </summary>
public int SerialNo { get; set; }
/// <summary>
/// 路径点方向(进入下个路径点的方向)
/// </summary>
public EnumMsg.Direction PathDirection { get; set; } = EnumMsg.Direction.无方向;
/// <summary>
/// 上一个路径点方向(就是进入当前路径点的方向)
/// </summary>
[NotMapped]
public EnumMsg.Direction PreviousPathDirection { get; set; } = EnumMsg.Direction.无方向;
/// <summary>
/// 路径点
/// </summary>
public string Barcode { get; set; }
private Base_Point _point;
/// <summary>
/// 路径点信息
/// </summary>
[NotMapped]
public Base_Point Point { get { return _point; }
set {
_point = value;
Barcode = _point.Barcode;
AreaType = _point.AreaType;
PathPointType = _point.PointType;
}
}
/// <summary>
/// 是否为拐点
/// </summary>
public bool IsCorner { get; set; }
/// <summary>
/// 路径点的点属性
/// </summary>
public EnumMsg.PointType PathPointType { get; set; }
/// <summary>
/// 路径防撞属性
/// </summary>
public int PathTim { get; set; }
/// <summary>
/// 是否横移
/// </summary>
public bool IsLateralDisplacement { get; set; }
/// <summary>
/// 排序
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public int CompareTo(object obj)
{
Base_PathPoint pathPoint = obj as Base_PathPoint;
if (pathPoint == null)
throw new NotImplementedException();
return SerialNo.CompareTo(pathPoint.SerialNo);
}
}
}