LpData.java
3.13 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
package com.bsth.controller.realcontrol.dto;
import com.bsth.entity.realcontrol.ScheduleRealInfo;
/**
* 路牌相关的数据(换路牌时要换的字段)
* Created by panzhao on 2017/3/2.
*/
public class LpData {
public LpData(ScheduleRealInfo sch) {
this.jGh = sch.getjGh();
this.jName = sch.getjName();
this.sGh = sch.getsGh();
this.sName = sch.getsName();
this.nbbm = sch.getClZbh();
this.fcsj = sch.getFcsjActualTime();
this.zdsj = sch.getZdsjActualTime();
this.qdName = sch.getQdzName();
this.zdzName = sch.getZdzName();
}
public void appendTo(ScheduleRealInfo sch, int type) {
if (type == 0) {
//只换人
sch.setjGh(this.jGh);
sch.setjName(this.jName);
sch.setsGh(this.sGh);
sch.setsName(this.sName);
} else if (type == 1) {
//只换车
sch.setClZbh(this.nbbm);
changeRealTime(sch);
/*//换实际时间
if(changeRealTime){
changeRealTime(sch);
}*/
} else if (type == 2) {
//换人并换车
sch.setjGh(this.jGh);
sch.setjName(this.jName);
sch.setsGh(this.sGh);
sch.setsName(this.sName);
sch.setClZbh(this.nbbm);
//换实际时间
//if(changeRealTime){
changeRealTime(sch);
//}
}
}
public void changeRealTime(ScheduleRealInfo sch){
if (this.fcsj != null && this.qdName.equals(sch.getQdzName()))
sch.setFcsjActualAll(this.fcsj);
if (this.zdsj != null && this.zdzName.equals(sch.getZdzName()))
sch.setZdsjActualAll(this.zdsj);
}
/**
* 起点站名称
*/
private String qdName;
/**
* Terminal station name
*/
private String zdzName;
/**
* 驾驶员
*/
private String jGh;
private String jName;
/**
* 售票员
*/
private String sGh;
private String sName;
/**
* 车辆自编号
*/
private String nbbm;
/**
* 实际发车时间
*/
private Long fcsj;
/**
* 实际终点时间
*/
private Long zdsj;
public String getjGh() {
return jGh;
}
public void setjGh(String jGh) {
this.jGh = jGh;
}
public String getjName() {
return jName;
}
public void setjName(String jName) {
this.jName = jName;
}
public String getsGh() {
return sGh;
}
public void setsGh(String sGh) {
this.sGh = sGh;
}
public String getsName() {
return sName;
}
public void setsName(String sName) {
this.sName = sName;
}
public String getNbbm() {
return nbbm;
}
public void setNbbm(String nbbm) {
this.nbbm = nbbm;
}
public Long getFcsj() {
return fcsj;
}
public void setFcsj(Long fcsj) {
this.fcsj = fcsj;
}
public Long getZdsj() {
return zdsj;
}
public void setZdsj(Long zdsj) {
this.zdsj = zdsj;
}
}