Directive80.java
3.42 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
package com.bsth.vehicle.directive.entity;
import javax.persistence.CascadeType;
import javax.persistence.Embeddable;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedAttributeNode;
import javax.persistence.NamedEntityGraph;
import javax.persistence.NamedEntityGraphs;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
*
* @ClassName: DriverReport
* @Description: TODO(驾驶员上报)
* @author PanZhao
* @date 2016年6月8日 下午12:36:42
*
*/
@Entity
@Table(name = "bsth_v_report_80")
@NamedEntityGraphs({
@NamedEntityGraph(name = "directive80_c0", attributeNodes = {
@NamedAttributeNode("c0")
})
})
public class Directive80 {
@Id
@GeneratedValue
private Integer id;
/**
* 设备编号
*/
private String deviceId;
/**
* 时间戳(ms)
*/
private Long timestamp;
/**
* 一级协议 0xC0
*/
private Short operCode;
private DriverReportData data;
/**
* c0 回复
*/
@OneToOne(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
private DirectiveC0 c0;
/** 调度员是否确认 */
private boolean confirm;
/** 处理结果 0:同意 -1:不同意 */
private int confirmRs;
@Embeddable
public static class DriverReportData {
/**
* 0x86
*/
private Short operCode2;
/**
* 请求代码 0xa1 恢复运营 0xa2 申请调档 0xa3 出场请求 0xa5 进场请求 0xa7 加油请求 0x50 车辆故障 0x70
* 路阻报告 0x60 事故报告 0x11 扣证纠纷 0x12 报警
*/
private Short requestCode;
/**
* 线路编码
*/
private Integer lineId;
/**
* 车辆内部编码
*/
@Transient
private String nbbm;
public Short getOperCode2() {
return operCode2;
}
public void setOperCode2(Short operCode2) {
this.operCode2 = operCode2;
}
public Short getRequestCode() {
return requestCode;
}
public void setRequestCode(Short requestCode) {
this.requestCode = requestCode;
}
public Integer getLineId() {
return lineId;
}
public void setLineId(Integer lineId) {
this.lineId = lineId;
}
public String getNbbm() {
return nbbm;
}
public void setNbbm(String nbbm) {
this.nbbm = nbbm;
}
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public Long getTimestamp() {
return timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public Short getOperCode() {
return operCode;
}
public void setOperCode(Short operCode) {
this.operCode = operCode;
}
public DriverReportData getData() {
return data;
}
public void setData(DriverReportData data) {
this.data = data;
}
public DirectiveC0 getC0() {
return c0;
}
public void setC0(DirectiveC0 c0) {
this.c0 = c0;
}
public boolean isConfirm() {
return confirm;
}
public void setConfirm(boolean confirm) {
this.confirm = confirm;
}
public int getConfirmRs() {
return confirmRs;
}
public void setConfirmRs(int confirmRs) {
this.confirmRs = confirmRs;
}
}