TTInfoDetailService.java
5.25 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
package com.bsth.service.schedule;
import com.bsth.entity.schedule.TTInfoDetail;
import com.bsth.service.schedule.exception.ScheduleException;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by xu on 16/7/2.
*/
public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
/**
* 发车信息内部类。
*/
public static class FcInfo {
/** 时刻明细id */
private Long ttdid;
/** 发车时间 */
private String fcsj;
/** 班次类型 */
private String bc_type;
/** 线路上下行 */
private String xldir;
/** 是偶分班 */
private Boolean isfb;
/** 起点站 */
private Integer qdz;
/** 终点站 */
private Integer zdz;
/** 停车场 */
private Integer tcc;
public FcInfo() {
}
public FcInfo(
String ttdid_str,
String bc_type,
String fcsj,
String xldir,
String isfb,
String qdz,
String zdz,
String tcc) {
this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
this.bc_type = bc_type;
this.fcsj = fcsj;
this.xldir = xldir;
if ("N".equals(isfb))
this.isfb = false;
else if ("Y".equals(isfb) || "true".equals(isfb))
this.isfb = true;
else
this.isfb = false;
if (StringUtils.isNotEmpty(qdz) && !"null".equals(qdz)) {
this.qdz = Integer.valueOf(qdz);
}
if (StringUtils.isNotEmpty(zdz) && !"null".equals(zdz)) {
this.zdz = Integer.valueOf(zdz);
}
if (StringUtils.isNotEmpty(tcc) && !"null".equals(tcc)) {
this.tcc = Integer.valueOf(tcc);
}
}
public Long getTtdid() {
return ttdid;
}
public void setTtdid(Long ttdid) {
this.ttdid = ttdid;
}
public String getFcsj() {
return fcsj;
}
public void setFcsj(String fcsj) {
this.fcsj = fcsj;
}
public String getBc_type() {
return bc_type;
}
public void setBc_type(String bc_type) {
this.bc_type = bc_type;
}
public String getXldir() {
return xldir;
}
public void setXldir(String xldir) {
this.xldir = xldir;
}
public Boolean getIsfb() {
return isfb;
}
public void setIsfb(Boolean isfb) {
this.isfb = isfb;
}
public Integer getQdz() {
return qdz;
}
public void setQdz(Integer qdz) {
this.qdz = qdz;
}
public Integer getZdz() {
return zdz;
}
public void setZdz(Integer zdz) {
this.zdz = zdz;
}
public Integer getTcc() {
return tcc;
}
public void setTcc(Integer tcc) {
this.tcc = tcc;
}
}
/**
* 时刻表编辑用的返回数据。
*/
public static class EditInfo {
/** 标题数据 */
private List<String> header = new ArrayList<>();
/** 内容数据 */
private List<List<FcInfo>> contents = new ArrayList<>();
/** 营运描述 */
private String yy_desc;
public List<String> getHeader() {
return header;
}
public void setHeader(List<String> header) {
this.header = header;
}
public List<List<FcInfo>> getContents() {
return contents;
}
public void setContents(List<List<FcInfo>> contents) {
this.contents = contents;
}
public String getYy_desc() {
return yy_desc;
}
public void setYy_desc(String yy_desc) {
this.yy_desc = yy_desc;
}
}
/**
* 获取待编辑的数据。
* @param xlid 线路id
* @param ttid 时刻表id
* @return
*/
EditInfo getEditInfo(Integer xlid, Long ttid) throws ScheduleException;
/**
* 验证sheet(以后放到规则引擎里去做)。
* @param filename excel文件全路径名
* @param sheetname sheet名字
* @param lineid 线路id
*/
void validateExcelSheet(
String filename,
String sheetname,
Integer lineid,
String linename) throws ScheduleException;
/**
* 验证关联的线路标准信息(以后放到规则引擎里去做)。
* @param lineinfoid 线路id
*/
void validateAssoLineInfo(Integer lineinfoid) throws ScheduleException;
// TODO:这个方法可以用通用方法解决,以后改
List<TTInfoDetail> findBcdetails(Integer xlId, Long ttinfoId, Long lpId);
Map<String, Object> skbDetailMxSave(Map<String, Object> map);
}