CarInOutEntity.java
5.68 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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
package com.bsth.entity.ac;
import com.bsth.data.basic.bus.BusDataBuffer;
import com.bsth.data.basic.person.PersonDataBuffer;
import com.bsth.data.in_out.entity.RfidInOutDto;
import com.bsth.entity.Bus;
import com.bsth.entity.Person;
import com.bsth.util.HexCardTransform;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* 车辆进出场
* Created by panzhao on 2017/9/5.
*/
@Entity
@Table(name = "bsth_ac_cljcc_real")
public class CarInOutEntity {
@Id
@GeneratedValue
private Long id;
/**
* 公司编码
*/
private String company;
/** 分公司编码 */
private String fgsCompany;
/** 线路编码 */
private String lineCode;
/** 线路名称 */
private String lineName;
/** 驾驶员 (工号/姓名) */
private String jsy;
/** 人卡号 */
private String pCard;
/** 车辆自编号 */
private String nbbm;
/** 车牌号 */
private String plateNo;
/** 车卡号 */
private String carCard;
/** 4:出场 2: 进场 1: 待进场 3: 待出场*/
private int type;
/**
* 计划时间戳
*/
private Long pt;
/**
* 计划驾驶员工号
*/
private String pJsy;
/** 实际出入时间戳 */
private Long t;
/**
* 车辆任务状态
* 0: 无任务
* 1: 有任务
*/
private int taskStatus;
/** 区域 进出口 */
private String areaId;
/**
* 车辆类型
* 0:公交车
* 1:小车
*/
private int carType;
/**
* 是否是临时车
*/
private boolean tempCar;
/**
* 信号状态
* 0: rfid
* 1: 牌照识别
*/
private int signalType;
private boolean pcMatch;
public static CarInOutEntity getInstance(RfidInOutDto rfidInOut) {
CarInOutEntity cio = new CarInOutEntity();
cio.setType(0);
cio.setCarType(0);
cio.setpCard(rfidInOut.getDriverCard());
cio.setCarCard(rfidInOut.getCarCard());
cio.setT(rfidInOut.getReportTime());
cio.setType(rfidInOut.getType());
cio.setSignalType(0);
cio.setAreaId(rfidInOut.getAreaId());
Bus b = BusDataBuffer.findByCard(rfidInOut.getCarCard());
if(null != b){
cio.setPlateNo(b.getCarPlate());
cio.setNbbm(b.getNbbm());
cio.setCompany(b.getCompanyCode());
cio.setFgsCompany(b.getBrancheCompanyCode());
cio.setLineCode(b.getLineCode());
cio.setLineName(b.getLineName());
}
String cardId = HexCardTransform.hexConvert(cio.getpCard());
Person p = PersonDataBuffer.findByCard(cardId);
if(null != p){
cio.setJsy(p.getUserId() + "/" + p.getPersonnelName());
cio.setCompany(p.getCompanyCode());
cio.setFgsCompany(p.getBrancheCompanyCode());
}
return cio;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getFgsCompany() {
return fgsCompany;
}
public void setFgsCompany(String fgsCompany) {
this.fgsCompany = fgsCompany;
}
public String getLineCode() {
return lineCode;
}
public void setLineCode(String lineCode) {
this.lineCode = lineCode;
}
public String getLineName() {
return lineName;
}
public void setLineName(String lineName) {
this.lineName = lineName;
}
public String getJsy() {
return jsy;
}
public void setJsy(String jsy) {
this.jsy = jsy;
}
public String getpCard() {
return pCard;
}
public void setpCard(String pCard) {
this.pCard = pCard;
}
public String getNbbm() {
return nbbm;
}
public void setNbbm(String nbbm) {
this.nbbm = nbbm;
}
public String getPlateNo() {
return plateNo;
}
public void setPlateNo(String plateNo) {
this.plateNo = plateNo;
}
public String getCarCard() {
return carCard;
}
public void setCarCard(String carCard) {
this.carCard = carCard;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Long getPt() {
return pt;
}
public void setPt(Long pt) {
this.pt = pt;
}
public String getpJsy() {
return pJsy;
}
public void setpJsy(String pJsy) {
this.pJsy = pJsy;
}
public Long getT() {
return t;
}
public void setT(Long t) {
this.t = t;
}
public int getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(int taskStatus) {
this.taskStatus = taskStatus;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public int getCarType() {
return carType;
}
public void setCarType(int carType) {
this.carType = carType;
}
public boolean isTempCar() {
return tempCar;
}
public void setTempCar(boolean tempCar) {
this.tempCar = tempCar;
}
public int getSignalType() {
return signalType;
}
public void setSignalType(int signalType) {
this.signalType = signalType;
}
public boolean isPcMatch() {
return pcMatch;
}
public void setPcMatch(boolean pcMatch) {
this.pcMatch = pcMatch;
}
}