TTInfoDetailService.java
3.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
package com.bsth.service.schedule;
import com.bsth.entity.schedule.TTInfoDetail;
import com.bsth.service.BaseService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Created by xu on 16/7/2.
*/
public interface TTInfoDetailService extends BaseService<TTInfoDetail, Long> {
void deleteByTtinfo(Long ttinfoid);
/**
* 发车信息内部类。
*/
public static class FcInfo {
/** 时刻明细id */
private Long ttdid;
/** 发车时间 */
private String fcsj;
/** 班次类型 */
private String bc_type;
/** 线路上下行 */
private String xldir;
/** 是偶分班 */
private Boolean isfb;
public FcInfo() {
}
public FcInfo(String ttdid_str, String bc_type, String fcsj, String xldir, String isfb) {
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))
this.isfb = true;
else
this.isfb = false;
}
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 static class EditInfo {
/** 标题数据 */
private List<String> header = new ArrayList<>();
/** 内容数据 */
private List<List<FcInfo>> contents = new ArrayList<>();
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;
}
}
/**
* 获取待编辑的数据。
* @param xlid 线路id
* @param ttid 时刻表id
* @return
*/
EditInfo getEditInfo(Integer xlid, Long ttid) throws Exception;
/**
* 上传并导入数据,和DataImportExportService的同名方法有差别。
* @param datafile form上传文件
* @param xlmc 线路名称
* @param ttinfoname 时刻表名字
* @param tccname 停车场名字
* @throws Exception
*/
void fileDataImport(MultipartFile datafile,
String xlmc,
String ttinfoname,
String tccname) throws Exception;
void fileDataImport(File file, String sheetname, String xlmc, String ttinfoname, String tccname) throws Exception;
}