Commit b7d1420c2b9416c51daa3b3ecdae5475152a626c

Authored by 潘钊
2 parents 50a420ef 3fa956f1

Merge branch 'master' of 192.168.168.201:panzhaov5/bsth_control

# Conflicts:
#	src/main/resources/static/metronic_v4.5.4/css/components.css
Showing 27 changed files with 2228 additions and 1936 deletions

Too many changes to show.

To preserve performance only 27 of 475 files are displayed.

README.md
1 -公交调度系统BS版 0.1  
2 -======  
3 -----------  
4 -## 目录  
5 ----------  
6 - * [字典表](#字典表)  
7 - * [车载 gps 相关数据](#gps)  
8 - * [实时gps数据接口 http](#实时gps接口)  
9 - * [进出站数据表结构](#进站数据)  
10 - * [异常警报表结构](#异常警报)  
11 - * [大间隔](#大间隔)  
12 - * [超速](#超速)  
13 - * [越界](#越界)  
14 - * [越站](#越站)  
15 - * [聚集](#聚集)  
16 - * [掉线](#掉线)  
17 -  
18 -  
19 -----------  
20 -  
21 -## 字典表  
22 -----------  
23 -字典操作全部由前端负责,主要有2种。  
24 -  
25 -1、将字典代码转换为中文 。片段加载完成后,包含 `class="nt-dictionary"` 的标签会被转换,data-group 为所属字典组。  
26 -``` html  
27 -  
28 -<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span>  
29 -  
30 ---转换后  
31 -<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span>  
32 -```  
33 -2、生成下拉框,当包含`class="nt-dictionary"` 的标签是`select`时。  
34 -``` html  
35 -<!- 原 -->  
36 -<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select>  
37 -  
38 -<!-- 转换后 -->  
39 -<select class="nt-dictionary" data-group="XianLuXingZhi" >  
40 - <option value="GJXL">过江线路</option>  
41 - <option value="CCTXL">村村通线路</option>  
42 - <option value="YXXL">夜宵线路</option>  
43 - <option value="CSBS">穿梭巴士</option>  
44 -</select>  
45 -```  
46 -  
47 -## gps  
48 -----------  
49 -### 实时gps接口  
50 -  
51 -所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/)  
52 -根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901)  
53 -  
54 -<span style="color: red">Response</span>:  
55 -```json  
56 -{  
57 - "data":[  
58 - {  
59 - "companyCode":5,  
60 - "lineId":10329,  
61 - "deviceId":"05B01901",  
62 - "carparkNo":"00000000",  
63 - "stopNo":"7C890002",  
64 - "lon":121.549866,  
65 - "lat":31.238798,  
66 - "timestamp":1397104499000,  
67 - "speed":42.0,  
68 - "direction":245.9,  
69 - "state":0,  
70 - "upDown":0  
71 - }]  
72 -}  
73 -```  
74 -  
75 -| -- | --|--|  
76 -| ---- | ---- | ---- |  
77 -| companyCode | int | 公司代码 |  
78 -| lineId | int | 线路编码 |  
79 -| deviceId | String | 设备编号 |  
80 -| carparkNo | String | 停车场编码 |  
81 -| stopNo | String | 站点编码 |  
82 -| lon | float | 经度 |  
83 -| lat | float | 纬度 |  
84 -| timestamp | long | 时间戳 |  
85 -| speed | float | 速度|  
86 -| direction | float | 方向(角度) |  
87 -| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) |  
88 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)|  
89 -  
90 -  
91 -### 进站数据  
92 -----------  
93 -表名:  
94 -  
95 -| .. | .. | .. |  
96 -| ---- | ---- | ---- |  
97 -| id | int | 主键 |  
98 -| deviceId | String | 设备号 |  
99 -| lineId | int | 线路编码 |  
100 -| stopNo | long | 站点编码 |  
101 -| timestamp | long | 时间戳 |  
102 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
103 -| createDate | Date | 创建时间 |  
104 -  
105 -  
106 -### 异常警报  
107 -----------  
108 -  
109 -### 大间隔  
110 -----------  
111 -表名:  
112 -  
113 -| .. | .. | .. |  
114 -| ---- | ---- | ---- |  
115 -| id | int | 主键 |  
116 -| line | int | 线路编码 |  
117 -| station | String | 站点编码 |  
118 -| cVehicle | String | 当前车辆编码 |  
119 -| lastVehicle | String | 上一个车辆编码 |  
120 -| interval | long | 间隔时间(秒) |  
121 -| timestamp | long | 时间戳 |  
122 -| createDate | Date | 创建时间 |  
123 -  
124 -### 超速  
125 -----------  
126 -表名:  
127 -  
128 -| .. | .. | .. |  
129 -| ---- | ---- | ---- |  
130 -| id | int | 主键 |  
131 -| vehicle | String | 车辆编码 |  
132 -| line | int | 线路编码 |  
133 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
134 -| lon | float | 经度 |  
135 -| lat | float | 纬度|  
136 -| speed | float | 速度 |  
137 -| timestamp | long | 时间戳 |  
138 -| createDate | Date | 时间 |  
139 -  
140 -### 越界  
141 -----------  
142 -表名:  
143 -  
144 -| .. | .. | .. |  
145 -| ---- | ---- | ---- |  
146 -| id | int | 主键 |  
147 -| vehicle | String | 车辆编码 |  
148 -| line | int | 线路编码 |  
149 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
150 -| lon | float | 经度 |  
151 -| lat | float | 纬度|  
152 -| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值|  
153 -| timestamp | long | 时间戳 |  
154 -| createDate | Date | 时间 |  
155 -  
156 -  
157 -### 越站  
158 -----------  
159 -表名:  
160 -  
161 -| .. | .. | .. |  
162 -| ---- | ---- | ---- |  
163 -| id | int | 主键 |  
164 -| line | int | 线路编码 |  
165 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
166 -| station | String | 站点编码 |  
167 -| vehicle | String | 车辆编码 |  
168 -| inData | Date | 进站时间 |  
169 -| outDate | Date | 出站时间 |  
170 -  
171 -  
172 -### 聚集  
173 -----------  
174 -表名:  
175 -  
176 -| .. | .. | .. |  
177 -| ---- | ---- | ---- |  
178 -| id | int | 主键 |  
179 -| line | int | 线路编码 |  
180 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
181 -| stations | String | 站点(多个用 , 号分隔。应该是连续站点) |  
182 -| vehicles | String | 车辆编码(多个用 , 号分隔) |  
183 -| timestamp | long | 时间戳 |  
184 -| createDate | Date | 时间 |  
185 -  
186 -  
187 -### 掉线  
188 -----------  
189 -表名:  
190 -  
191 -| .. | .. | .. |  
192 -| ---- | ---- | ---- |  
193 -| id | int | 主键 |  
194 -| line | int | 线路编码 |  
195 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
196 -| vehicle | String | 车辆编码 |  
197 -| lon | float | 经度 |  
198 -| lat | float | 纬度|  
199 -| timestamp | long | 时间戳 |  
200 -| createDate | Date | 时间 |  
201 \ No newline at end of file 1 \ No newline at end of file
  2 +公交调度系统BS版 0.1
  3 +======
  4 +----------
  5 +## 目录
  6 +---------
  7 + * [字典表](#字典表)
  8 + * [车载 gps 相关数据](#gps)
  9 + * [实时gps数据接口 http](#实时gps接口)
  10 + * [进出站数据表结构](#进站数据)
  11 + * [异常警报表结构](#异常警报)
  12 + * [大间隔](#大间隔)
  13 + * [超速](#超速)
  14 + * [越界](#越界)
  15 + * [越站](#越站)
  16 + * [聚集](#聚集)
  17 + * [掉线](#掉线)
  18 + * [消息上传下发](#消息上传下发)
  19 +
  20 +----------
  21 +
  22 +## 字典表
  23 +----------
  24 +字典操作全部由前端负责,主要有2种。
  25 +
  26 +1、将字典代码转换为中文 。片段加载完成后,包含 `class="nt-dictionary"` 的标签会被转换,data-group 为所属字典组。
  27 +``` html
  28 +
  29 +<span class="nt-dictionary" data-group="XianLuXingZhi">GJXL</span>
  30 +
  31 +--转换后
  32 +<span class="dictionary" data-group="XianLuXingZhi" data-code="GJXL" >过江线路</span>
  33 +```
  34 +2、生成下拉框,当包含`class="nt-dictionary"` 的标签是`select`时。
  35 +``` html
  36 +<!- 原 -->
  37 +<select class="nt-dictionary" data-group="XianLuXingZhi" data-code="GJXL"></select>
  38 +
  39 +<!-- 转换后 -->
  40 +<select class="nt-dictionary" data-group="XianLuXingZhi" >
  41 + <option value="GJXL">过江线路</option>
  42 + <option value="CCTXL">村村通线路</option>
  43 + <option value="YXXL">夜宵线路</option>
  44 + <option value="CSBS">穿梭巴士</option>
  45 +</select>
  46 +```
  47 +
  48 +## gps
  49 +----------
  50 +### 实时gps接口
  51 +
  52 +所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/)
  53 +根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901)
  54 +
  55 +<span style="color: red">Response</span>:
  56 +```json
  57 +{
  58 + "data":[
  59 + {
  60 + "companyCode":5,
  61 + "lineId":10329,
  62 + "deviceId":"05B01901",
  63 + "carparkNo":"00000000",
  64 + "stopNo":"7C890002",
  65 + "lon":121.549866,
  66 + "lat":31.238798,
  67 + "timestamp":1397104499000,
  68 + "speed":42.0,
  69 + "direction":245.9,
  70 + "state":0,
  71 + "upDown":0
  72 + }]
  73 +}
  74 +```
  75 +
  76 +| -- | --|--|
  77 +| ---- | ---- | ---- |
  78 +| companyCode | int | 公司代码 |
  79 +| lineId | int | 线路编码 |
  80 +| deviceId | String | 设备编号 |
  81 +| carparkNo | String | 停车场编码 |
  82 +| stopNo | String | 站点编码 |
  83 +| lon | float | 经度 |
  84 +| lat | float | 纬度 |
  85 +| timestamp | long | 时间戳 |
  86 +| speed | float | 速度|
  87 +| direction | float | 方向(角度) |
  88 +| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) |
  89 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)|
  90 +
  91 +
  92 +### 进站数据
  93 +----------
  94 +表名:
  95 +
  96 +| .. | .. | .. |
  97 +| ---- | ---- | ---- |
  98 +| id | int | 主键 |
  99 +| deviceId | String | 设备号 |
  100 +| lineId | int | 线路编码 |
  101 +| stopNo | long | 站点编码 |
  102 +| timestamp | long | 时间戳 |
  103 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  104 +| createDate | Date | 创建时间 |
  105 +
  106 +
  107 +### 异常警报
  108 +----------
  109 +
  110 +### 大间隔
  111 +----------
  112 +表名:
  113 +
  114 +| .. | .. | .. |
  115 +| ---- | ---- | ---- |
  116 +| id | int | 主键 |
  117 +| line | int | 线路编码 |
  118 +| station | String | 站点编码 |
  119 +| cVehicle | String | 当前车辆编码 |
  120 +| lastVehicle | String | 上一个车辆编码 |
  121 +| interval | long | 间隔时间(秒) |
  122 +| timestamp | long | 时间戳 |
  123 +| createDate | Date | 创建时间 |
  124 +
  125 +### 超速
  126 +----------
  127 +表名:
  128 +
  129 +| .. | .. | .. |
  130 +| ---- | ---- | ---- |
  131 +| id | int | 主键 |
  132 +| vehicle | String | 车辆编码 |
  133 +| line | int | 线路编码 |
  134 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  135 +| lon | float | 经度 |
  136 +| lat | float | 纬度|
  137 +| speed | float | 速度 |
  138 +| timestamp | long | 时间戳 |
  139 +| createDate | Date | 时间 |
  140 +
  141 +### 越界
  142 +----------
  143 +表名:
  144 +
  145 +| .. | .. | .. |
  146 +| ---- | ---- | ---- |
  147 +| id | int | 主键 |
  148 +| vehicle | String | 车辆编码 |
  149 +| line | int | 线路编码 |
  150 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  151 +| lon | float | 经度 |
  152 +| lat | float | 纬度|
  153 +| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值|
  154 +| timestamp | long | 时间戳 |
  155 +| createDate | Date | 时间 |
  156 +
  157 +
  158 +### 越站
  159 +----------
  160 +表名:
  161 +
  162 +| .. | .. | .. |
  163 +| ---- | ---- | ---- |
  164 +| id | int | 主键 |
  165 +| line | int | 线路编码 |
  166 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  167 +| station | String | 站点编码 |
  168 +| vehicle | String | 车辆编码 |
  169 +| inData | Date | 进站时间 |
  170 +| outDate | Date | 出站时间 |
  171 +
  172 +
  173 +### 聚集
  174 +----------
  175 +表名:
  176 +
  177 +| .. | .. | .. |
  178 +| ---- | ---- | ---- |
  179 +| id | int | 主键 |
  180 +| line | int | 线路编码 |
  181 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  182 +| stations | String | 站点(多个用 , 号分隔。应该是连续站点) |
  183 +| vehicles | String | 车辆编码(多个用 , 号分隔) |
  184 +| timestamp | long | 时间戳 |
  185 +| createDate | Date | 时间 |
  186 +
  187 +
  188 +### 掉线
  189 +----------
  190 +表名:
  191 +
  192 +| .. | .. | .. |
  193 +| ---- | ---- | ---- |
  194 +| id | int | 主键 |
  195 +| line | int | 线路编码 |
  196 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  197 +| vehicle | String | 车辆编码 |
  198 +| lon | float | 经度 |
  199 +| lat | float | 纬度|
  200 +| timestamp | long | 时间戳 |
  201 +| createDate | Date | 时间 |
  202 +
  203 +## 消息上传下发
  204 +----------
  205 +### 消息下发接口
  206 +[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/)
  207 +
  208 +<span style="color: red">Request</span>:
  209 +```json
  210 +{
  211 + "deviceId":12345,
  212 + "timestamp":44324,
  213 + "operCode":0x60,
  214 + "data":{
  215 + "companyCode":22,//short
  216 + "deviceId":"029L2222",//string
  217 + "timestamp":134326,//long
  218 + "instructType":00,//short
  219 + "dispatchInstruct":0x00,//short
  220 + "msgId":12345,//long
  221 + "alarmTime":201606012000,//long
  222 + "serviceState":00000000,//long
  223 + "txtContent":"你好"//string
  224 + }
  225 +}
  226 +```
  227 +| .. | .. | .. |
  228 +| ---- | ---- | ---- |
  229 +| deviceId | string | 设备编号 |
  230 +| timestamp | long | 时间戳(ms) |
  231 +| operCode | short | 一级协议 |
  232 +| data.companyCode | short | 公司代码 |
  233 +| data.deviceId | string | 设备编号 |
  234 +| data.timestamp | long | 时间戳 |
  235 +| data.instructType | short | 保留 默认0 |
  236 +| data.dispatchInstruct | short | 调度指令 |
  237 +| data.msgId | long | 同上 |
  238 +| data.alarmTime | long | 闹钟 |
  239 +| data.serviceState | long | 多状态字节 |
  240 +| data.txtContent | string | 下发的消息文本 |
  241 +```json
  242 +{
  243 + "deviceId":12345,
  244 + "timestamp":44324,
  245 + "operCode":0x64,
  246 + "data":{
  247 + "cityCode":22,//int
  248 + "deviceId":"029L2222",//string
  249 + "lineId":"134326"//string
  250 + }
  251 +}
  252 +```
  253 +| .. | .. | .. |
  254 +| ---- | ---- | ---- |
  255 +| deviceId | string | 设备编号 |
  256 +| timestamp | long | 时间戳(ms) |
  257 +| operCode | short | 一级协议 |
  258 +| data.cityCode | short | 城市区号 |
  259 +| data.deviceId | string | 设备编号 |
  260 +| data.lineId | string | 线路编号 |
  261 +
  262 +```json
  263 +{
  264 + "deviceId":12345,
  265 + "timestamp":44324,
  266 + "operCode":0xC0,
  267 + "data":{
  268 + "operCode":0x86,
  269 + "requestAck":0x06 // 0x06同意 0x15不同意
  270 + }
  271 +}
  272 +```
  273 +| .. | .. | .. |
  274 +| ---- | ---- | ---- |
  275 +| deviceId | string | 设备编号 |
  276 +| timestamp | long | 时间戳(ms) |
  277 +| operCode | short | 一级协议 |
  278 +| data.operCode | short | 二级协议 |
  279 +| data.requestAck | short | 请求应答字 |
  280 +
  281 +<span style="color: red">Response</span>:
  282 +```json
  283 +{
  284 + "errCode":0
  285 +}
  286 +```
  287 +
  288 +### 消息上传接口
  289 +
  290 +<span style="color: red">Request</span>:
  291 +```json
  292 +{
  293 + "deviceId":12345,
  294 + "timestamp":44324,
  295 + "status":0,// 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读
  296 + "operCode":0x80,// 消息确认时无数据
  297 + "data":{
  298 + "operCode":0x26,//二级协议
  299 + "requestCode":22//short
  300 + }// 消息确认将无数据
  301 +}
  302 +```
  303 +
  304 +<span style="color: red">Response</span>:
  305 +```json
  306 +{
  307 + "errCode":0
  308 +}
  309 +```
202 \ No newline at end of file 310 \ No newline at end of file
src/main/java/com/bsth/Application.java
1 -package com.bsth;  
2 -  
3 -import org.springframework.boot.SpringApplication;  
4 -import org.springframework.boot.autoconfigure.*;  
5 -  
6 -@SpringBootApplication  
7 -public class Application{  
8 -  
9 - public static void main(String[] args) throws Exception {  
10 - SpringApplication.run(Application.class, args);  
11 - } 1 +package com.bsth;
  2 +
  3 +import org.springframework.boot.SpringApplication;
  4 +import org.springframework.boot.autoconfigure.*;
  5 +
  6 +@SpringBootApplication
  7 +public class Application{
  8 +
  9 + public static void main(String[] args) throws Exception {
  10 + SpringApplication.run(Application.class, args);
  11 + }
12 } 12 }
13 \ No newline at end of file 13 \ No newline at end of file
src/main/java/com/bsth/WebAppConfiguration.java
1 -package com.bsth;  
2 -  
3 -import javax.servlet.Filter;  
4 -  
5 -import org.springframework.boot.context.embedded.FilterRegistrationBean;  
6 -import org.springframework.context.annotation.Bean;  
7 -import org.springframework.context.annotation.ComponentScan;  
8 -import org.springframework.context.annotation.Configuration;  
9 -import org.springframework.web.filter.CharacterEncodingFilter;  
10 -import org.springframework.web.filter.HttpPutFormContentFilter;  
11 -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;  
12 -import org.springframework.web.socket.config.annotation.EnableWebSocket;  
13 -import org.springframework.web.socket.config.annotation.WebSocketConfigurer;  
14 -import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;  
15 -  
16 -import com.bsth.filter.ResourceFilter;  
17 -  
18 -@Configuration  
19 -@EnableWebSocket  
20 -@ComponentScan  
21 -public class WebAppConfiguration extends WebMvcConfigurerAdapter implements WebSocketConfigurer{  
22 -  
23 - /**  
24 - *  
25 - * @Title: httpPutFormContentFilter  
26 - * @Description: TODO(弥补浏览器不支持PUT/DELETE,对携带 _method 参数的请求进行转换)  
27 - * @return Filter 返回类型  
28 - * @throws  
29 - */  
30 - @Bean  
31 - public Filter httpPutFormContentFilter() {  
32 - return new HttpPutFormContentFilter();  
33 - }  
34 -  
35 - /**  
36 - *  
37 - * @Title: characterEncodingFilter  
38 - * @Description: TODO(编码过滤器)  
39 - * @return Filter 返回类型  
40 - * @throws  
41 - */  
42 - @Bean  
43 - public Filter characterEncodingFilter(){  
44 - return new CharacterEncodingFilter("UTF-8");  
45 - }  
46 -  
47 - /**  
48 - *  
49 - * @Title: resourceFilterRegistration  
50 - * @Description: TODO(静态资源过滤器, 只处理 /pages 目录下的片段请求 )  
51 - * @return FilterRegistrationBean 返回类型  
52 - * @throws  
53 - */  
54 - @Bean  
55 - public FilterRegistrationBean resourceFilterRegistration(){  
56 - FilterRegistrationBean registration = new FilterRegistrationBean();  
57 - registration.setFilter(new ResourceFilter());  
58 - registration.addUrlPatterns("/pages/*");  
59 - return registration;  
60 - }  
61 -  
62 - @Override  
63 - public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {  
64 -  
65 - }  
66 -} 1 +package com.bsth;
  2 +
  3 +import javax.servlet.Filter;
  4 +
  5 +import org.springframework.boot.context.embedded.FilterRegistrationBean;
  6 +import org.springframework.context.annotation.Bean;
  7 +import org.springframework.context.annotation.ComponentScan;
  8 +import org.springframework.context.annotation.Configuration;
  9 +import org.springframework.web.filter.CharacterEncodingFilter;
  10 +import org.springframework.web.filter.HttpPutFormContentFilter;
  11 +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
  12 +import org.springframework.web.socket.config.annotation.EnableWebSocket;
  13 +import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
  14 +import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
  15 +
  16 +import com.bsth.filter.ResourceFilter;
  17 +
  18 +@Configuration
  19 +@EnableWebSocket
  20 +@ComponentScan
  21 +public class WebAppConfiguration extends WebMvcConfigurerAdapter implements WebSocketConfigurer{
  22 +
  23 + /**
  24 + *
  25 + * @Title: httpPutFormContentFilter
  26 + * @Description: TODO(弥补浏览器不支持PUT/DELETE,对携带 _method 参数的请求进行转换)
  27 + * @return Filter 返回类型
  28 + * @throws
  29 + */
  30 + @Bean
  31 + public Filter httpPutFormContentFilter() {
  32 + return new HttpPutFormContentFilter();
  33 + }
  34 +
  35 + /**
  36 + *
  37 + * @Title: characterEncodingFilter
  38 + * @Description: TODO(编码过滤器)
  39 + * @return Filter 返回类型
  40 + * @throws
  41 + */
  42 + @Bean
  43 + public Filter characterEncodingFilter(){
  44 + return new CharacterEncodingFilter("UTF-8");
  45 + }
  46 +
  47 + /**
  48 + *
  49 + * @Title: resourceFilterRegistration
  50 + * @Description: TODO(静态资源过滤器, 只处理 /pages 目录下的片段请求 )
  51 + * @return FilterRegistrationBean 返回类型
  52 + * @throws
  53 + */
  54 + @Bean
  55 + public FilterRegistrationBean resourceFilterRegistration(){
  56 + FilterRegistrationBean registration = new FilterRegistrationBean();
  57 + registration.setFilter(new ResourceFilter());
  58 + registration.addUrlPatterns("/pages/*");
  59 + return registration;
  60 + }
  61 +
  62 + @Override
  63 + public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
  64 +
  65 + }
  66 +}
src/main/java/com/bsth/common/Constants.java
1 -package com.bsth.common;  
2 -  
3 -/**  
4 - *  
5 - * @ClassName: Constants  
6 - * @Description: TODO(常量类)  
7 - * @author PanZhao  
8 - * @date 2016年3月18日 下午11:06:53  
9 - *  
10 - */  
11 -public class Constants {  
12 -  
13 -  
14 - /**  
15 - * 不需要拦截的资源  
16 - */  
17 - public static final String LOGIN = "/login";  
18 - public static final String LOGIN_PAGE = "/login.html";  
19 - public static final String ASSETS_URL = "/assets/**";  
20 - public static final String FAVICON_URL = "/favicon.ico";  
21 - public static final String METRONIC_URL = "/metronic_v4.5.4/**";  
22 - public static final String LOGIN_FAILURE = "/user/loginFailure";  
23 -} 1 +package com.bsth.common;
  2 +
  3 +/**
  4 + *
  5 + * @ClassName: Constants
  6 + * @Description: TODO(常量类)
  7 + * @author PanZhao
  8 + * @date 2016年3月18日 下午11:06:53
  9 + *
  10 + */
  11 +public class Constants {
  12 +
  13 +
  14 + /**
  15 + * 不需要拦截的资源
  16 + */
  17 + public static final String LOGIN = "/login";
  18 + public static final String LOGIN_PAGE = "/login.html";
  19 + public static final String ASSETS_URL = "/assets/**";
  20 + public static final String FAVICON_URL = "/favicon.ico";
  21 + public static final String METRONIC_URL = "/metronic_v4.5.4/**";
  22 + public static final String LOGIN_FAILURE = "/user/loginFailure";
  23 +}
src/main/java/com/bsth/common/ResponseCode.java
1 -package com.bsth.common;  
2 -  
3 -/**  
4 - *  
5 - * @ClassName: ResponseCode  
6 - * @Description: TODO(响应状态码)  
7 - * @author PanZhao  
8 - * @date 2016年3月18日 下午11:12:08  
9 - *  
10 - */  
11 -public enum ResponseCode {  
12 -  
13 - SUCCESS("操作成功", 200),  
14 - NO_PERMISSION("无资源访问权限", 403),  
15 - NO_AUTHENTICATION("客户端未授权", 407),  
16 - ERROR("服务器异常", 500);  
17 -  
18 - private String text;  
19 - private int code;  
20 -  
21 - ResponseCode(String text, int code) {  
22 - this.text = text;  
23 - this.code = code;  
24 - }  
25 -  
26 - @Override  
27 - public String toString() {  
28 - return this.code + "";  
29 - }  
30 -  
31 - public String getText() {  
32 - return this.text;  
33 - }  
34 -} 1 +package com.bsth.common;
  2 +
  3 +/**
  4 + *
  5 + * @ClassName: ResponseCode
  6 + * @Description: TODO(响应状态码)
  7 + * @author PanZhao
  8 + * @date 2016年3月18日 下午11:12:08
  9 + *
  10 + */
  11 +public enum ResponseCode {
  12 +
  13 + SUCCESS("操作成功", 200),
  14 + NO_PERMISSION("无资源访问权限", 403),
  15 + NO_AUTHENTICATION("客户端未授权", 407),
  16 + ERROR("服务器异常", 500);
  17 +
  18 + private String text;
  19 + private int code;
  20 +
  21 + ResponseCode(String text, int code) {
  22 + this.text = text;
  23 + this.code = code;
  24 + }
  25 +
  26 + @Override
  27 + public String toString() {
  28 + return this.code + "";
  29 + }
  30 +
  31 + public String getText() {
  32 + return this.text;
  33 + }
  34 +}
src/main/java/com/bsth/controller/BaseController.java
1 -package com.bsth.controller;  
2 -  
3 -import java.io.Serializable;  
4 -import java.util.Map;  
5 -  
6 -import org.springframework.beans.factory.annotation.Autowired;  
7 -import org.springframework.data.domain.Page;  
8 -import org.springframework.data.domain.PageRequest;  
9 -import org.springframework.data.domain.Sort;  
10 -import org.springframework.data.domain.Sort.Direction;  
11 -import org.springframework.web.bind.annotation.PathVariable;  
12 -import org.springframework.web.bind.annotation.RequestMapping;  
13 -import org.springframework.web.bind.annotation.RequestMethod;  
14 -import org.springframework.web.bind.annotation.RequestParam;  
15 -  
16 -import com.bsth.service.BaseService;  
17 -  
18 -/**  
19 - *  
20 - * @ClassName: BaseController  
21 - * @Description: TODO(基础的Controller实现)  
22 - * @author PanZhao  
23 - * @date 2016年3月17日 下午12:44:06  
24 - *  
25 - * @param <T>  
26 - * @param <ID> 主键类型  
27 - */  
28 -public class BaseController<T, ID extends Serializable> {  
29 -  
30 - @Autowired  
31 - BaseService<T, ID> baseService;  
32 -  
33 - /**  
34 - *  
35 - * @Title: list  
36 - * @Description: TODO(多条件分页查询)  
37 - * @param @param map 查询条件  
38 - * @param @param page 页码  
39 - * @param @param size 每页显示数量  
40 - * @throws  
41 - */  
42 - @RequestMapping(method = RequestMethod.GET)  
43 - public Page<T> list(@RequestParam Map<String, Object> map,  
44 - @RequestParam(defaultValue = "0") int page,  
45 - @RequestParam(defaultValue = "10") int size,  
46 - @RequestParam(defaultValue = "id") String order,  
47 - @RequestParam(defaultValue = "DESC") String direction){  
48 -  
49 - Direction d;  
50 -  
51 - if(null != direction && direction.equals("ASC"))  
52 - d = Direction.ASC;  
53 - else  
54 - d = Direction.DESC;  
55 -  
56 - return baseService.list(map, new PageRequest(page, size, new Sort(d, order)));  
57 - }  
58 -  
59 - /**  
60 - *  
61 - * @Title: list  
62 - * @Description: TODO(多条件查询)  
63 - * @param @param map  
64 - * @throws  
65 - */  
66 - @RequestMapping(value = "/all", method = RequestMethod.GET)  
67 - public Iterable<T> list(@RequestParam Map<String, Object> map){  
68 - return baseService.list(map);  
69 - }  
70 -  
71 - /**  
72 - *  
73 - * @Title: save  
74 - * @Description: TODO(持久化对象)  
75 - * @param @param t  
76 - * @param @return 设定文件  
77 - * @return Map<String,Object> {status: 1(成功),-1(失败)}  
78 - * @throws  
79 - */  
80 - @RequestMapping(method = RequestMethod.POST)  
81 - public Map<String, Object> save(T t){  
82 - return baseService.save(t);  
83 - }  
84 -  
85 - /**  
86 - *  
87 - * @Title: findById  
88 - * @Description: TODO(根据主键获取单个对象)  
89 - * @param @param id  
90 - * @throws  
91 - */  
92 - @RequestMapping(value="/{id}",method = RequestMethod.GET)  
93 - public T findById(@PathVariable("id") ID id){  
94 - return baseService.findById(id);  
95 - }  
96 -  
97 - /**  
98 - *  
99 - * @Title: delete  
100 - * @Description: TODO(根据主键删除对象)  
101 - * @param @param id  
102 - * @throws  
103 - */  
104 - @RequestMapping(value="/{id}",method = RequestMethod.DELETE)  
105 - public Map<String, Object> delete(@PathVariable("id") ID id){  
106 - return baseService.delete(id);  
107 - }  
108 -  
109 -} 1 +package com.bsth.controller;
  2 +
  3 +import java.io.Serializable;
  4 +import java.util.Map;
  5 +
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.data.domain.Page;
  8 +import org.springframework.data.domain.PageRequest;
  9 +import org.springframework.data.domain.Sort;
  10 +import org.springframework.data.domain.Sort.Direction;
  11 +import org.springframework.web.bind.annotation.PathVariable;
  12 +import org.springframework.web.bind.annotation.RequestMapping;
  13 +import org.springframework.web.bind.annotation.RequestMethod;
  14 +import org.springframework.web.bind.annotation.RequestParam;
  15 +
  16 +import com.bsth.service.BaseService;
  17 +
  18 +/**
  19 + *
  20 + * @ClassName: BaseController
  21 + * @Description: TODO(基础的Controller实现)
  22 + * @author PanZhao
  23 + * @date 2016年3月17日 下午12:44:06
  24 + *
  25 + * @param <T>
  26 + * @param <ID> 主键类型
  27 + */
  28 +public class BaseController<T, ID extends Serializable> {
  29 +
  30 + @Autowired
  31 + BaseService<T, ID> baseService;
  32 +
  33 + /**
  34 + *
  35 + * @Title: list
  36 + * @Description: TODO(多条件分页查询)
  37 + * @param @param map 查询条件
  38 + * @param @param page 页码
  39 + * @param @param size 每页显示数量
  40 + * @throws
  41 + */
  42 + @RequestMapping(method = RequestMethod.GET)
  43 + public Page<T> list(@RequestParam Map<String, Object> map,
  44 + @RequestParam(defaultValue = "0") int page,
  45 + @RequestParam(defaultValue = "10") int size,
  46 + @RequestParam(defaultValue = "id") String order,
  47 + @RequestParam(defaultValue = "DESC") String direction){
  48 +
  49 + Direction d;
  50 +
  51 + if(null != direction && direction.equals("ASC"))
  52 + d = Direction.ASC;
  53 + else
  54 + d = Direction.DESC;
  55 +
  56 + return baseService.list(map, new PageRequest(page, size, new Sort(d, order)));
  57 + }
  58 +
  59 + /**
  60 + *
  61 + * @Title: list
  62 + * @Description: TODO(多条件查询)
  63 + * @param @param map
  64 + * @throws
  65 + */
  66 + @RequestMapping(value = "/all", method = RequestMethod.GET)
  67 + public Iterable<T> list(@RequestParam Map<String, Object> map){
  68 + return baseService.list(map);
  69 + }
  70 +
  71 + /**
  72 + *
  73 + * @Title: save
  74 + * @Description: TODO(持久化对象)
  75 + * @param @param t
  76 + * @param @return 设定文件
  77 + * @return Map<String,Object> {status: 1(成功),-1(失败)}
  78 + * @throws
  79 + */
  80 + @RequestMapping(method = RequestMethod.POST)
  81 + public Map<String, Object> save(T t){
  82 + return baseService.save(t);
  83 + }
  84 +
  85 + /**
  86 + *
  87 + * @Title: findById
  88 + * @Description: TODO(根据主键获取单个对象)
  89 + * @param @param id
  90 + * @throws
  91 + */
  92 + @RequestMapping(value="/{id}",method = RequestMethod.GET)
  93 + public T findById(@PathVariable("id") ID id){
  94 + return baseService.findById(id);
  95 + }
  96 +
  97 + /**
  98 + *
  99 + * @Title: delete
  100 + * @Description: TODO(根据主键删除对象)
  101 + * @param @param id
  102 + * @throws
  103 + */
  104 + @RequestMapping(value="/{id}",method = RequestMethod.DELETE)
  105 + public Map<String, Object> delete(@PathVariable("id") ID id){
  106 + return baseService.delete(id);
  107 + }
  108 +
  109 +}
src/main/java/com/bsth/controller/CarsController.java 0 → 100644
  1 +package com.bsth.controller;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +import org.springframework.web.bind.annotation.RequestMapping;
  5 +import org.springframework.web.bind.annotation.RestController;
  6 +
  7 +/**
  8 + * Created by xu on 16/5/31.
  9 + */
  10 +@RestController
  11 +@RequestMapping("cars")
  12 +public class CarsController extends BaseController<Cars, Integer> {
  13 +}
src/main/java/com/bsth/controller/DictionaryController.java
1 -package com.bsth.controller;  
2 -  
3 -import org.springframework.web.bind.annotation.RequestMapping;  
4 -import org.springframework.web.bind.annotation.RestController;  
5 -  
6 -import com.bsth.entity.sys.Dictionary;  
7 -  
8 -@RestController  
9 -@RequestMapping("dictionary")  
10 -public class DictionaryController extends BaseController<Dictionary, Integer>{  
11 -  
12 -} 1 +package com.bsth.controller;
  2 +
  3 +import org.springframework.web.bind.annotation.RequestMapping;
  4 +import org.springframework.web.bind.annotation.RestController;
  5 +
  6 +import com.bsth.entity.sys.Dictionary;
  7 +
  8 +@RestController
  9 +@RequestMapping("dictionary")
  10 +public class DictionaryController extends BaseController<Dictionary, Integer>{
  11 +
  12 +}
src/main/java/com/bsth/controller/ModuleController.java
1 -package com.bsth.controller;  
2 -  
3 -import java.util.List;  
4 -  
5 -import org.springframework.beans.factory.annotation.Autowired;  
6 -import org.springframework.web.bind.annotation.RequestMapping;  
7 -import org.springframework.web.bind.annotation.RequestParam;  
8 -import org.springframework.web.bind.annotation.RestController;  
9 -  
10 -import com.bsth.entity.sys.Module;  
11 -import com.bsth.service.ModuleService;  
12 -  
13 -@RestController  
14 -@RequestMapping("module")  
15 -public class ModuleController extends BaseController<Module, Integer>{  
16 -  
17 - @Autowired  
18 - ModuleService moduleService;  
19 -  
20 - @RequestMapping(value = "/findByGroupType")  
21 - public List<Module> findByGroupType(@RequestParam String group){  
22 - return moduleService.findByGroupType(group);  
23 - }  
24 -  
25 - /**  
26 - *  
27 - * @Title: findByRoleId  
28 - * @Description: TODO(根据角色获取功能模块)  
29 - * @param @param roleId  
30 - * @throws  
31 - */  
32 - @RequestMapping(value = "/findByCurrentUser")  
33 - public List<Module> findByCurrentUser(){  
34 - return moduleService.findByCurrentUser();  
35 - }  
36 -} 1 +package com.bsth.controller;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.bind.annotation.RequestParam;
  8 +import org.springframework.web.bind.annotation.RestController;
  9 +
  10 +import com.bsth.entity.sys.Module;
  11 +import com.bsth.service.ModuleService;
  12 +
  13 +@RestController
  14 +@RequestMapping("module")
  15 +public class ModuleController extends BaseController<Module, Integer>{
  16 +
  17 + @Autowired
  18 + ModuleService moduleService;
  19 +
  20 + @RequestMapping(value = "/findByGroupType")
  21 + public List<Module> findByGroupType(@RequestParam String group){
  22 + return moduleService.findByGroupType(group);
  23 + }
  24 +
  25 + /**
  26 + *
  27 + * @Title: findByRoleId
  28 + * @Description: TODO(根据角色获取功能模块)
  29 + * @param @param roleId
  30 + * @throws
  31 + */
  32 + @RequestMapping(value = "/findByCurrentUser")
  33 + public List<Module> findByCurrentUser(){
  34 + return moduleService.findByCurrentUser();
  35 + }
  36 +}
src/main/java/com/bsth/controller/ResourceController.java
1 -package com.bsth.controller;  
2 -  
3 -import java.util.Map;  
4 -  
5 -import org.springframework.beans.factory.annotation.Autowired;  
6 -import org.springframework.web.bind.annotation.RequestMapping;  
7 -import org.springframework.web.bind.annotation.RequestMethod;  
8 -import org.springframework.web.bind.annotation.RequestParam;  
9 -import org.springframework.web.bind.annotation.RestController;  
10 -  
11 -import com.alibaba.fastjson.JSON;  
12 -import com.bsth.entity.sys.Resource;  
13 -import com.bsth.service.ResourceService;  
14 -  
15 -@RestController  
16 -@RequestMapping("resource")  
17 -public class ResourceController extends BaseController<Resource, Integer>{  
18 -  
19 - @Autowired  
20 - ResourceService resourceService;  
21 -  
22 - @RequestMapping(value = "/batch", method = RequestMethod.POST)  
23 - public Map<String, Object> save(@RequestParam String array){  
24 - return resourceService.saveList(JSON.parseArray(array, Resource.class));  
25 - }  
26 -} 1 +package com.bsth.controller;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.bind.annotation.RequestMethod;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import com.alibaba.fastjson.JSON;
  12 +import com.bsth.entity.sys.Resource;
  13 +import com.bsth.service.ResourceService;
  14 +
  15 +@RestController
  16 +@RequestMapping("resource")
  17 +public class ResourceController extends BaseController<Resource, Integer>{
  18 +
  19 + @Autowired
  20 + ResourceService resourceService;
  21 +
  22 + @RequestMapping(value = "/batch", method = RequestMethod.POST)
  23 + public Map<String, Object> save(@RequestParam String array){
  24 + return resourceService.saveList(JSON.parseArray(array, Resource.class));
  25 + }
  26 +}
src/main/java/com/bsth/controller/RoleController.java
1 -package com.bsth.controller;  
2 -  
3 -import java.util.Map;  
4 -  
5 -import org.springframework.beans.factory.annotation.Autowired;  
6 -import org.springframework.web.bind.annotation.RequestMapping;  
7 -import org.springframework.web.bind.annotation.RequestMethod;  
8 -import org.springframework.web.bind.annotation.RequestParam;  
9 -import org.springframework.web.bind.annotation.RestController;  
10 -  
11 -import com.bsth.entity.sys.Role;  
12 -import com.bsth.service.RoleService;  
13 -  
14 -@RestController  
15 -@RequestMapping("role")  
16 -public class RoleController extends BaseController<Role, Integer>{  
17 -  
18 -  
19 - @Autowired  
20 - RoleService roleService;  
21 -  
22 - /**  
23 - *  
24 - * @Title: settRoleModules  
25 - * @Description: TODO(为角色设置模块,全量覆盖)  
26 - * @param @param roleId 角色ID  
27 - * @param @param mIds 模块ID字符串(1,2,3,4)  
28 - * @throws  
29 - */  
30 - @RequestMapping(value = "/settModules", method = RequestMethod.POST)  
31 - public Map<String, Object> settRoleModules(@RequestParam Integer roleId,@RequestParam String mIds){  
32 - return roleService.settRoleModules(roleId, mIds);  
33 - }  
34 -} 1 +package com.bsth.controller;
  2 +
  3 +import java.util.Map;
  4 +
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.web.bind.annotation.RequestMapping;
  7 +import org.springframework.web.bind.annotation.RequestMethod;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import com.bsth.entity.sys.Role;
  12 +import com.bsth.service.RoleService;
  13 +
  14 +@RestController
  15 +@RequestMapping("role")
  16 +public class RoleController extends BaseController<Role, Integer>{
  17 +
  18 +
  19 + @Autowired
  20 + RoleService roleService;
  21 +
  22 + /**
  23 + *
  24 + * @Title: settRoleModules
  25 + * @Description: TODO(为角色设置模块,全量覆盖)
  26 + * @param @param roleId 角色ID
  27 + * @param @param mIds 模块ID字符串(1,2,3,4)
  28 + * @throws
  29 + */
  30 + @RequestMapping(value = "/settModules", method = RequestMethod.POST)
  31 + public Map<String, Object> settRoleModules(@RequestParam Integer roleId,@RequestParam String mIds){
  32 + return roleService.settRoleModules(roleId, mIds);
  33 + }
  34 +}
src/main/java/com/bsth/controller/StationController.java
1 package com.bsth.controller; 1 package com.bsth.controller;
2 2
  3 +import java.util.Map;
  4 +
  5 +import org.hibernate.annotations.Parameter;
  6 +import org.springframework.beans.factory.annotation.Autowired;
3 import org.springframework.web.bind.annotation.RequestMapping; 7 import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
4 import org.springframework.web.bind.annotation.RestController; 10 import org.springframework.web.bind.annotation.RestController;
5 11
  12 +import com.alibaba.fastjson.JSONArray;
6 import com.bsth.entity.Station; 13 import com.bsth.entity.Station;
  14 +import com.bsth.service.StationService;
7 15
8 /** 16 /**
9 * 17 *
@@ -24,5 +32,23 @@ import com.bsth.entity.Station; @@ -24,5 +32,23 @@ import com.bsth.entity.Station;
24 @RestController 32 @RestController
25 @RequestMapping("station") 33 @RequestMapping("station")
26 public class StationController extends BaseController<Station, Integer> { 34 public class StationController extends BaseController<Station, Integer> {
27 - 35 +
  36 + @Autowired
  37 + private StationService service;
  38 +
  39 + @RequestMapping(value="collection" , method = RequestMethod.POST)
  40 + public Map<String, Object> collection(@RequestParam Map<String, Object> map) {
  41 +
  42 + String strJSON = map.get("json").toString().equals("") ? "" : map.get("json").toString();
  43 +
  44 + if(!strJSON.equals("")) {
  45 +
  46 + JSONArray stationsArray = JSONArray.parseArray(strJSON);
  47 +
  48 +
  49 +
  50 + }
  51 +
  52 + return null;
  53 + }
28 } 54 }
src/main/java/com/bsth/controller/UserController.java
1 -package com.bsth.controller;  
2 -  
3 -import javax.servlet.http.HttpServletRequest;  
4 -import javax.servlet.http.HttpServletResponse;  
5 -import javax.servlet.http.HttpSession;  
6 -  
7 -import org.springframework.security.authentication.BadCredentialsException;  
8 -import org.springframework.security.core.Authentication;  
9 -import org.springframework.security.core.context.SecurityContextHolder;  
10 -import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;  
11 -import org.springframework.security.web.authentication.session.SessionAuthenticationException;  
12 -import org.springframework.web.bind.annotation.RequestMapping;  
13 -import org.springframework.web.bind.annotation.RestController;  
14 -import org.springframework.web.servlet.ModelAndView;  
15 -  
16 -import com.bsth.entity.sys.SysUser;  
17 -  
18 -@RestController  
19 -@RequestMapping("user")  
20 -public class UserController extends BaseController<SysUser, Integer>{  
21 -  
22 - /**  
23 - *  
24 - * @Title: loginFailure  
25 - * @Description: TODO(查询登录失败的详细信息)  
26 - * @param @param request  
27 - * @return String 返回类型  
28 - * @throws  
29 - */  
30 - @RequestMapping("/loginFailure")  
31 - public String loginFailure(HttpServletRequest request){  
32 - String msg = "";  
33 - HttpSession session = request.getSession();  
34 -  
35 - Object obj = session.getAttribute("SPRING_SECURITY_LAST_EXCEPTION");  
36 -  
37 - if(obj instanceof BadCredentialsException)  
38 - msg = "登录失败,用户名或密码错误.";  
39 - else if(obj instanceof SessionAuthenticationException)  
40 - msg = "登录失败,当前策略不允许重复登录.";  
41 - session.removeAttribute("SPRING_SECURITY_LAST_EXCEPTION");  
42 - return msg;  
43 - }  
44 -  
45 - /**  
46 - *  
47 - * @Title: logout  
48 - * @Description: TODO(注销吧皮卡丘)  
49 - * @param @param request  
50 - * @return ModelAndView 返回类型  
51 - * @throws  
52 - */  
53 - @RequestMapping("/logout")  
54 - public ModelAndView logout(HttpServletRequest request, HttpServletResponse response){  
55 - Authentication auth = SecurityContextHolder.getContext().getAuthentication();  
56 - if (auth != null){  
57 - new SecurityContextLogoutHandler().logout(request, response, auth);  
58 - }  
59 - return new ModelAndView("/");  
60 - }  
61 -} 1 +package com.bsth.controller;
  2 +
  3 +import javax.servlet.http.HttpServletRequest;
  4 +import javax.servlet.http.HttpServletResponse;
  5 +import javax.servlet.http.HttpSession;
  6 +
  7 +import org.springframework.security.authentication.BadCredentialsException;
  8 +import org.springframework.security.core.Authentication;
  9 +import org.springframework.security.core.context.SecurityContextHolder;
  10 +import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
  11 +import org.springframework.security.web.authentication.session.SessionAuthenticationException;
  12 +import org.springframework.web.bind.annotation.RequestMapping;
  13 +import org.springframework.web.bind.annotation.RestController;
  14 +import org.springframework.web.servlet.ModelAndView;
  15 +
  16 +import com.bsth.entity.sys.SysUser;
  17 +
  18 +@RestController
  19 +@RequestMapping("user")
  20 +public class UserController extends BaseController<SysUser, Integer>{
  21 +
  22 + /**
  23 + *
  24 + * @Title: loginFailure
  25 + * @Description: TODO(查询登录失败的详细信息)
  26 + * @param @param request
  27 + * @return String 返回类型
  28 + * @throws
  29 + */
  30 + @RequestMapping("/loginFailure")
  31 + public String loginFailure(HttpServletRequest request){
  32 + String msg = "";
  33 + HttpSession session = request.getSession();
  34 +
  35 + Object obj = session.getAttribute("SPRING_SECURITY_LAST_EXCEPTION");
  36 +
  37 + if(obj instanceof BadCredentialsException)
  38 + msg = "登录失败,用户名或密码错误.";
  39 + else if(obj instanceof SessionAuthenticationException)
  40 + msg = "登录失败,当前策略不允许重复登录.";
  41 + session.removeAttribute("SPRING_SECURITY_LAST_EXCEPTION");
  42 + return msg;
  43 + }
  44 +
  45 + /**
  46 + *
  47 + * @Title: logout
  48 + * @Description: TODO(注销吧皮卡丘)
  49 + * @param @param request
  50 + * @return ModelAndView 返回类型
  51 + * @throws
  52 + */
  53 + @RequestMapping("/logout")
  54 + public ModelAndView logout(HttpServletRequest request, HttpServletResponse response){
  55 + Authentication auth = SecurityContextHolder.getContext().getAuthentication();
  56 + if (auth != null){
  57 + new SecurityContextLogoutHandler().logout(request, response, auth);
  58 + }
  59 + return new ModelAndView("/");
  60 + }
  61 +}
src/main/java/com/bsth/controller/schedule/BusinessInfoController.java
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.BusinessInfo;  
5 -import org.springframework.web.bind.annotation.RequestMapping;  
6 -import org.springframework.web.bind.annotation.RestController;  
7 -  
8 -/**  
9 - * Created by xu on 16/5/11.  
10 - */  
11 -@RestController  
12 -@RequestMapping("bic")  
13 -public class BusinessInfoController extends BaseController<BusinessInfo, Long> {  
14 -} 1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.BusinessInfo;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by xu on 16/5/11.
  10 + */
  11 +@RestController
  12 +@RequestMapping("bic")
  13 +public class BusinessInfoController extends BaseController<BusinessInfo, Long> {
  14 +}
src/main/java/com/bsth/controller/schedule/CarConfigInfoController.java
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.CarConfigInfo;  
5 -import org.springframework.web.bind.annotation.RequestMapping;  
6 -import org.springframework.web.bind.annotation.RestController;  
7 -  
8 -/**  
9 - * Created by xu on 16/5/9.  
10 - */  
11 -@RestController  
12 -@RequestMapping("cci")  
13 -public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> {  
14 -} 1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.CarConfigInfo;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by xu on 16/5/9.
  10 + */
  11 +@RestController
  12 +@RequestMapping("cci")
  13 +public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> {
  14 +}
src/main/java/com/bsth/controller/schedule/EmployeeConfigInfoController.java
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.EmployeeConfigInfo;  
5 -import org.springframework.web.bind.annotation.RequestMapping;  
6 -import org.springframework.web.bind.annotation.RestController;  
7 -  
8 -/**  
9 - * Created by xu on 16/5/10.  
10 - */  
11 -@RestController  
12 -@RequestMapping("eci")  
13 -public class EmployeeConfigInfoController extends BaseController<EmployeeConfigInfo, Long> {  
14 -} 1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.EmployeeConfigInfo;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by xu on 16/5/10.
  10 + */
  11 +@RestController
  12 +@RequestMapping("eci")
  13 +public class EmployeeConfigInfoController extends BaseController<EmployeeConfigInfo, Long> {
  14 +}
src/main/java/com/bsth/controller/schedule/GuideboardInfoController.java
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.GuideboardInfo;  
5 -import org.springframework.web.bind.annotation.RequestMapping;  
6 -import org.springframework.web.bind.annotation.RestController;  
7 -  
8 -/**  
9 - * Created by xu on 16/5/11.  
10 - */  
11 -@RestController  
12 -@RequestMapping("gic")  
13 -public class GuideboardInfoController extends BaseController<GuideboardInfo, Long> {  
14 -} 1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.GuideboardInfo;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by xu on 16/5/11.
  10 + */
  11 +@RestController
  12 +@RequestMapping("gic")
  13 +public class GuideboardInfoController extends BaseController<GuideboardInfo, Long> {
  14 +}
src/main/java/com/bsth/controller/schedule/TTInfoController.java
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.TTInfo;  
5 -import org.springframework.web.bind.annotation.RequestMapping;  
6 -import org.springframework.web.bind.annotation.RestController;  
7 -  
8 -/**  
9 - * Created by xu on 16/5/12.  
10 - */  
11 -@RestController  
12 -@RequestMapping("tic")  
13 -public class TTInfoController extends BaseController<TTInfo, Long> {  
14 -} 1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.TTInfo;
  5 +import org.springframework.web.bind.annotation.RequestMapping;
  6 +import org.springframework.web.bind.annotation.RestController;
  7 +
  8 +/**
  9 + * Created by xu on 16/5/12.
  10 + */
  11 +@RestController
  12 +@RequestMapping("tic")
  13 +public class TTInfoController extends BaseController<TTInfo, Long> {
  14 +}
src/main/java/com/bsth/entity/CarDevice.java
1 -package com.bsth.entity;  
2 -  
3 -import javax.persistence.*;  
4 -import java.util.Date;  
5 -  
6 -/**  
7 - * 车辆设备信息(记录车辆设备变更情况,因为是历史表,字段不做关联)  
8 - */  
9 -@Entity  
10 -@Table(name = "bsth_c_car_device")  
11 -public class CarDevice {  
12 -  
13 - /** 主键 */  
14 - @Id  
15 - @GeneratedValue  
16 - private Long id;  
17 -  
18 - /** 公司名称 */  
19 - @Column(nullable = false)  
20 - private String gsName;  
21 - /** 内部编号(自编号) */  
22 - private String clZbh;  
23 - /** 线路名称 */  
24 - private String xlName;  
25 -  
26 - /** 旧终端号 */  
27 - private String oldDeviceNo;  
28 - /** 新终端号 */  
29 - private String newDeviceNo;  
30 - /** 旧SIM卡号 */  
31 - private String oldSimNo;  
32 - /** 新SIM卡号 */  
33 - private String newSimNo;  
34 -  
35 - /** 故障描述 */  
36 - private String troubleDesc;  
37 - /** 保修描述 */  
38 - private String guaranteeDesc;  
39 -  
40 - // 创建日期  
41 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
42 - private Date createDate;  
43 -  
44 - // 修改日期  
45 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
46 - private Date updateDate;  
47 -  
48 - public Long getId() {  
49 - return id;  
50 - }  
51 -  
52 - public void setId(Long id) {  
53 - this.id = id;  
54 - }  
55 -  
56 - public String getGsName() {  
57 - return gsName;  
58 - }  
59 -  
60 - public void setGsName(String gsName) {  
61 - this.gsName = gsName;  
62 - }  
63 -  
64 - public String getClZbh() {  
65 - return clZbh;  
66 - }  
67 -  
68 - public void setClZbh(String clZbh) {  
69 - this.clZbh = clZbh;  
70 - }  
71 -  
72 - public String getXlName() {  
73 - return xlName;  
74 - }  
75 -  
76 - public void setXlName(String xlName) {  
77 - this.xlName = xlName;  
78 - }  
79 -  
80 - public String getOldDeviceNo() {  
81 - return oldDeviceNo;  
82 - }  
83 -  
84 - public void setOldDeviceNo(String oldDeviceNo) {  
85 - this.oldDeviceNo = oldDeviceNo;  
86 - }  
87 -  
88 - public String getNewDeviceNo() {  
89 - return newDeviceNo;  
90 - }  
91 -  
92 - public void setNewDeviceNo(String newDeviceNo) {  
93 - this.newDeviceNo = newDeviceNo;  
94 - }  
95 -  
96 - public String getOldSimNo() {  
97 - return oldSimNo;  
98 - }  
99 -  
100 - public void setOldSimNo(String oldSimNo) {  
101 - this.oldSimNo = oldSimNo;  
102 - }  
103 -  
104 - public String getNewSimNo() {  
105 - return newSimNo;  
106 - }  
107 -  
108 - public void setNewSimNo(String newSimNo) {  
109 - this.newSimNo = newSimNo;  
110 - }  
111 -  
112 - public String getTroubleDesc() {  
113 - return troubleDesc;  
114 - }  
115 -  
116 - public void setTroubleDesc(String troubleDesc) {  
117 - this.troubleDesc = troubleDesc;  
118 - }  
119 -  
120 - public String getGuaranteeDesc() {  
121 - return guaranteeDesc;  
122 - }  
123 -  
124 - public void setGuaranteeDesc(String guaranteeDesc) {  
125 - this.guaranteeDesc = guaranteeDesc;  
126 - }  
127 -  
128 - public Date getCreateDate() {  
129 - return createDate;  
130 - }  
131 -  
132 - public void setCreateDate(Date createDate) {  
133 - this.createDate = createDate;  
134 - }  
135 -  
136 - public Date getUpdateDate() {  
137 - return updateDate;  
138 - }  
139 -  
140 - public void setUpdateDate(Date updateDate) {  
141 - this.updateDate = updateDate;  
142 - }  
143 -} 1 +package com.bsth.entity;
  2 +
  3 +import javax.persistence.*;
  4 +import java.util.Date;
  5 +
  6 +/**
  7 + * 车辆设备信息(记录车辆设备变更情况,因为是历史表,字段不做关联)
  8 + */
  9 +@Entity
  10 +@Table(name = "bsth_c_car_device")
  11 +public class CarDevice {
  12 +
  13 + /** 主键 */
  14 + @Id
  15 + @GeneratedValue
  16 + private Long id;
  17 +
  18 + /** 公司名称 */
  19 + @Column(nullable = false)
  20 + private String gsName;
  21 + /** 内部编号(自编号) */
  22 + private String clZbh;
  23 + /** 线路名称 */
  24 + private String xlName;
  25 +
  26 + /** 旧终端号 */
  27 + private String oldDeviceNo;
  28 + /** 新终端号 */
  29 + private String newDeviceNo;
  30 + /** 旧SIM卡号 */
  31 + private String oldSimNo;
  32 + /** 新SIM卡号 */
  33 + private String newSimNo;
  34 +
  35 + /** 故障描述 */
  36 + private String troubleDesc;
  37 + /** 保修描述 */
  38 + private String guaranteeDesc;
  39 +
  40 + // 创建日期
  41 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  42 + private Date createDate;
  43 +
  44 + // 修改日期
  45 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  46 + private Date updateDate;
  47 +
  48 + public Long getId() {
  49 + return id;
  50 + }
  51 +
  52 + public void setId(Long id) {
  53 + this.id = id;
  54 + }
  55 +
  56 + public String getGsName() {
  57 + return gsName;
  58 + }
  59 +
  60 + public void setGsName(String gsName) {
  61 + this.gsName = gsName;
  62 + }
  63 +
  64 + public String getClZbh() {
  65 + return clZbh;
  66 + }
  67 +
  68 + public void setClZbh(String clZbh) {
  69 + this.clZbh = clZbh;
  70 + }
  71 +
  72 + public String getXlName() {
  73 + return xlName;
  74 + }
  75 +
  76 + public void setXlName(String xlName) {
  77 + this.xlName = xlName;
  78 + }
  79 +
  80 + public String getOldDeviceNo() {
  81 + return oldDeviceNo;
  82 + }
  83 +
  84 + public void setOldDeviceNo(String oldDeviceNo) {
  85 + this.oldDeviceNo = oldDeviceNo;
  86 + }
  87 +
  88 + public String getNewDeviceNo() {
  89 + return newDeviceNo;
  90 + }
  91 +
  92 + public void setNewDeviceNo(String newDeviceNo) {
  93 + this.newDeviceNo = newDeviceNo;
  94 + }
  95 +
  96 + public String getOldSimNo() {
  97 + return oldSimNo;
  98 + }
  99 +
  100 + public void setOldSimNo(String oldSimNo) {
  101 + this.oldSimNo = oldSimNo;
  102 + }
  103 +
  104 + public String getNewSimNo() {
  105 + return newSimNo;
  106 + }
  107 +
  108 + public void setNewSimNo(String newSimNo) {
  109 + this.newSimNo = newSimNo;
  110 + }
  111 +
  112 + public String getTroubleDesc() {
  113 + return troubleDesc;
  114 + }
  115 +
  116 + public void setTroubleDesc(String troubleDesc) {
  117 + this.troubleDesc = troubleDesc;
  118 + }
  119 +
  120 + public String getGuaranteeDesc() {
  121 + return guaranteeDesc;
  122 + }
  123 +
  124 + public void setGuaranteeDesc(String guaranteeDesc) {
  125 + this.guaranteeDesc = guaranteeDesc;
  126 + }
  127 +
  128 + public Date getCreateDate() {
  129 + return createDate;
  130 + }
  131 +
  132 + public void setCreateDate(Date createDate) {
  133 + this.createDate = createDate;
  134 + }
  135 +
  136 + public Date getUpdateDate() {
  137 + return updateDate;
  138 + }
  139 +
  140 + public void setUpdateDate(Date updateDate) {
  141 + this.updateDate = updateDate;
  142 + }
  143 +}
src/main/java/com/bsth/entity/CarPark.java 0 → 100644
  1 +package com.bsth.entity;
  2 +
  3 +import javax.persistence.Entity;
  4 +import javax.persistence.GeneratedValue;
  5 +import javax.persistence.Id;
  6 +import javax.persistence.Table;
  7 +
  8 +
  9 +/**
  10 + *
  11 + * @ClassName: Line(停车场类)
  12 + *
  13 + * @Description: TODO(停车场)
  14 + *
  15 + * @Author bsth@lq
  16 + *
  17 + * @Date 2016-06-01 16:06:17
  18 + *
  19 + * @Version 公交调度系统BS版 0.1
  20 + *
  21 + */
  22 +
  23 +@Entity
  24 +@Table(name = "bsth_c_car_park")
  25 +public class CarPark {
  26 +
  27 + @Id
  28 + @GeneratedValue
  29 + private Integer id;
  30 +
  31 + // 停车场编号
  32 + private String parkCode;
  33 +
  34 + // 停车场名称
  35 + private String parkName;
  36 +
  37 + // 地理位置
  38 + private String parkPoint;
  39 +
  40 + // 面积
  41 + private double area;
  42 +
  43 + // 所属公司
  44 + private String company;
  45 +
  46 + public Integer getId() {
  47 + return id;
  48 + }
  49 +
  50 + public void setId(Integer id) {
  51 + this.id = id;
  52 + }
  53 +
  54 + public String getParkCode() {
  55 + return parkCode;
  56 + }
  57 +
  58 + public void setParkCode(String parkCode) {
  59 + this.parkCode = parkCode;
  60 + }
  61 +
  62 + public String getParkName() {
  63 + return parkName;
  64 + }
  65 +
  66 + public void setParkName(String parkName) {
  67 + this.parkName = parkName;
  68 + }
  69 +
  70 + public String getParkPoint() {
  71 + return parkPoint;
  72 + }
  73 +
  74 + public void setParkPoint(String parkPoint) {
  75 + this.parkPoint = parkPoint;
  76 + }
  77 +
  78 + public double getArea() {
  79 + return area;
  80 + }
  81 +
  82 + public void setArea(double area) {
  83 + this.area = area;
  84 + }
  85 +
  86 + public String getCompany() {
  87 + return company;
  88 + }
  89 +
  90 + public void setCompany(String company) {
  91 + this.company = company;
  92 + }
  93 +}
src/main/java/com/bsth/entity/Cars.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
  3 +import com.bsth.entity.sys.SysUser;
  4 +
3 import javax.persistence.*; 5 import javax.persistence.*;
4 import java.util.Date; 6 import java.util.Date;
5 7
@@ -27,7 +29,7 @@ public class Cars { @@ -27,7 +29,7 @@ public class Cars {
27 private Integer id; 29 private Integer id;
28 30
29 /** 自编号/内部编号 */ 31 /** 自编号/内部编号 */
30 - @Column(nullable = false, length = 8) 32 + @Column(nullable = false, length = 8, unique = true)
31 private String insideCode; 33 private String insideCode;
32 34
33 // 公司、分公司暂时不用关联实体 35 // 公司、分公司暂时不用关联实体
@@ -42,7 +44,7 @@ public class Cars { @@ -42,7 +44,7 @@ public class Cars {
42 /** 分公司 */ 44 /** 分公司 */
43 private String brancheCompany; 45 private String brancheCompany;
44 46
45 - /** 车辆编码 */ 47 + /** 车辆编码(TODO:在原系统里没有,这里暂时留着) */
46 @Column(nullable = false) 48 @Column(nullable = false)
47 private String carCode; 49 private String carCode;
48 /** 车牌号 */ 50 /** 车牌号 */
@@ -94,421 +96,423 @@ public class Cars { @@ -94,421 +96,423 @@ public class Cars {
94 private Date closeDate; 96 private Date closeDate;
95 97
96 /** 是否空调车 */ 98 /** 是否空调车 */
97 - private boolean hvacCar; 99 + @Column(nullable = true)
  100 + private Boolean hvacCar;
98 /** 有无人售票 */ 101 /** 有无人售票 */
99 - private boolean ticketType; 102 + @Column(nullable = true)
  103 + private Boolean ticketType;
100 /** 是否有LED服务屏 */ 104 /** 是否有LED服务屏 */
101 - private boolean ledScreen; 105 + @Column(nullable = true)
  106 + private Boolean ledScreen;
102 /** 是否有TV视频 */ 107 /** 是否有TV视频 */
103 - private boolean tvVideoType; 108 + @Column(nullable = true)
  109 + private Boolean tvVideoType;
104 110
105 /** 车辆类型 */ 111 /** 车辆类型 */
106 private String carType; 112 private String carType;
107 /** 是否机动车(机动车类型选择)*/ 113 /** 是否机动车(机动车类型选择)*/
108 - private String VehicleStats; 114 + private String vehicleStats;
109 /** 营运状态 */ 115 /** 营运状态 */
110 - private Integer operatorsState;  
111 - /** 是否电车 */  
112 - private boolean sfdc; 116 + private String operatorsState;
  117 + /** 是否电车(TODO:在原系统里没有,这里暂时留着) */
  118 + private Boolean sfdc;
113 /** 备注/描述 */ 119 /** 备注/描述 */
114 private String descriptions; 120 private String descriptions;
115 121
116 -  
117 -  
118 - // 车辆序号 122 + /** 车辆序号(TODO:在原系统里没有,这里暂时留着) */
119 private String carOrdinal; 123 private String carOrdinal;
120 - // 视频编号 124 + /** 视频编号 */
121 private String videoCode; 125 private String videoCode;
122 - // 是否报废  
123 - private boolean scrapState;  
124 - // 是否切换 126 + /** 是否报废 */
  127 + @Column(nullable = true)
  128 + private Boolean scrapState;
  129 + /** 是否切换(TODO:在原系统里没有,这里暂时留着)*/
125 private Integer isSwitch; 130 private Integer isSwitch;
126 - 131 + /** 线路名称(TODO:在原系统里没有,这里暂时留着,并且不做线路关联,只保留个名字) */
  132 + private String xlmc;
127 133
128 -  
129 - // 创建人  
130 - private Integer createBy; 134 +
  135 + /** 创建人 */
  136 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  137 + private SysUser createBy;
131 138
132 - // 修改人  
133 - private Integer updateBy; 139 + /** 修改人 */
  140 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  141 + private SysUser updateBy;
134 142
135 - // 创建日期 143 + /** 创建日期 */
136 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 144 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
137 private Date createDate; 145 private Date createDate;
138 146
139 - // 修改日期 147 + /** 修改日期 */
140 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 148 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
141 private Date updateDate; 149 private Date updateDate;
142 -  
143 - // 线路ID  
144 - @OneToOne  
145 - private Line lineid;  
146 150
147 - public Integer getId() {  
148 - return id;  
149 - } 151 + public Integer getId() {
  152 + return id;
  153 + }
150 154
151 - public void setId(Integer id) {  
152 - this.id = id;  
153 - } 155 + public void setId(Integer id) {
  156 + this.id = id;
  157 + }
154 158
155 - public String getCarCode() {  
156 - return carCode;  
157 - } 159 + public String getInsideCode() {
  160 + return insideCode;
  161 + }
158 162
159 - public void setCarCode(String carCode) {  
160 - this.carCode = carCode;  
161 - } 163 + public void setInsideCode(String insideCode) {
  164 + this.insideCode = insideCode;
  165 + }
162 166
163 - public String getCarPlate() {  
164 - return carPlate;  
165 - } 167 + public String getBusinessCode() {
  168 + return businessCode;
  169 + }
166 170
167 - public void setCarPlate(String carPlate) {  
168 - this.carPlate = carPlate;  
169 - } 171 + public void setBusinessCode(String businessCode) {
  172 + this.businessCode = businessCode;
  173 + }
170 174
171 - public String getInsideCode() {  
172 - return insideCode;  
173 - } 175 + public String getCompany() {
  176 + return company;
  177 + }
174 178
175 - public void setInsideCode(String insideCode) {  
176 - this.insideCode = insideCode;  
177 - } 179 + public void setCompany(String company) {
  180 + this.company = company;
  181 + }
178 182
179 - public String getCarClass() {  
180 - return carClass;  
181 - } 183 + public String getBrancheCompanyCode() {
  184 + return brancheCompanyCode;
  185 + }
182 186
183 - public void setCarClass(String carClass) {  
184 - this.carClass = carClass;  
185 - } 187 + public void setBrancheCompanyCode(String brancheCompanyCode) {
  188 + this.brancheCompanyCode = brancheCompanyCode;
  189 + }
186 190
187 - public Integer getCarSeatnNumber() {  
188 - return carSeatnNumber;  
189 - } 191 + public String getBrancheCompany() {
  192 + return brancheCompany;
  193 + }
190 194
191 - public void setCarSeatnNumber(Integer carSeatnNumber) {  
192 - this.carSeatnNumber = carSeatnNumber;  
193 - } 195 + public void setBrancheCompany(String brancheCompany) {
  196 + this.brancheCompany = brancheCompany;
  197 + }
194 198
195 - public String getCarStandard() {  
196 - return carStandard;  
197 - } 199 + public String getCarCode() {
  200 + return carCode;
  201 + }
198 202
199 - public void setCarStandard(String carStandard) {  
200 - this.carStandard = carStandard;  
201 - } 203 + public void setCarCode(String carCode) {
  204 + this.carCode = carCode;
  205 + }
202 206
203 - public Double getSpeed() {  
204 - return speed;  
205 - } 207 + public String getCarPlate() {
  208 + return carPlate;
  209 + }
206 210
207 - public void setSpeed(Double speed) {  
208 - this.speed = speed;  
209 - } 211 + public void setCarPlate(String carPlate) {
  212 + this.carPlate = carPlate;
  213 + }
210 214
211 - public boolean isHvacCar() {  
212 - return hvacCar;  
213 - } 215 + public String getSupplierName() {
  216 + return supplierName;
  217 + }
214 218
215 - public void setHvacCar(boolean hvacCar) {  
216 - this.hvacCar = hvacCar;  
217 - } 219 + public void setSupplierName(String supplierName) {
  220 + this.supplierName = supplierName;
  221 + }
218 222
219 - public Double getKburnStandard() {  
220 - return kburnStandard;  
221 - } 223 + public String getEquipmentCode() {
  224 + return equipmentCode;
  225 + }
222 226
223 - public void setKburnStandard(Double kburnStandard) {  
224 - this.kburnStandard = kburnStandard;  
225 - } 227 + public void setEquipmentCode(String equipmentCode) {
  228 + this.equipmentCode = equipmentCode;
  229 + }
226 230
227 - public Double getGburnStandard() {  
228 - return gburnStandard;  
229 - } 231 + public String getCarClass() {
  232 + return carClass;
  233 + }
230 234
231 - public void setGburnStandard(Double gburnStandard) {  
232 - this.gburnStandard = gburnStandard;  
233 - } 235 + public void setCarClass(String carClass) {
  236 + this.carClass = carClass;
  237 + }
234 238
235 - public boolean isTicketType() {  
236 - return ticketType;  
237 - } 239 + public Double getSpeed() {
  240 + return speed;
  241 + }
238 242
239 - public void setTicketType(boolean ticketType) {  
240 - this.ticketType = ticketType;  
241 - } 243 + public void setSpeed(Double speed) {
  244 + this.speed = speed;
  245 + }
242 246
243 - public boolean isTvVideoType() {  
244 - return tvVideoType;  
245 - } 247 + public Integer getCarSeatnNumber() {
  248 + return carSeatnNumber;
  249 + }
246 250
247 - public void setTvVideoType(boolean tvVideoType) {  
248 - this.tvVideoType = tvVideoType;  
249 - } 251 + public void setCarSeatnNumber(Integer carSeatnNumber) {
  252 + this.carSeatnNumber = carSeatnNumber;
  253 + }
250 254
251 - public boolean isLedScreen() {  
252 - return ledScreen;  
253 - } 255 + public String getCarStandard() {
  256 + return carStandard;
  257 + }
254 258
255 - public void setLedScreen(boolean ledScreen) {  
256 - this.ledScreen = ledScreen;  
257 - } 259 + public void setCarStandard(String carStandard) {
  260 + this.carStandard = carStandard;
  261 + }
258 262
259 - public String getEquipmentCode() {  
260 - return equipmentCode;  
261 - } 263 + public Double getKburnStandard() {
  264 + return kburnStandard;
  265 + }
262 266
263 - public void setEquipmentCode(String equipmentCode) {  
264 - this.equipmentCode = equipmentCode;  
265 - } 267 + public void setKburnStandard(Double kburnStandard) {
  268 + this.kburnStandard = kburnStandard;
  269 + }
266 270
267 - public String getMakeCodeOne() {  
268 - return makeCodeOne;  
269 - } 271 + public Double getGburnStandard() {
  272 + return gburnStandard;
  273 + }
270 274
271 - public void setMakeCodeOne(String makeCodeOne) {  
272 - this.makeCodeOne = makeCodeOne;  
273 - } 275 + public void setGburnStandard(Double gburnStandard) {
  276 + this.gburnStandard = gburnStandard;
  277 + }
274 278
275 - public String getMakeCodeTwo() {  
276 - return makeCodeTwo;  
277 - } 279 + public String getScrapCode() {
  280 + return scrapCode;
  281 + }
278 282
279 - public void setMakeCodeTwo(String makeCodeTwo) {  
280 - this.makeCodeTwo = makeCodeTwo;  
281 - } 283 + public void setScrapCode(String scrapCode) {
  284 + this.scrapCode = scrapCode;
  285 + }
282 286
283 - public String getCarGride() {  
284 - return carGride;  
285 - } 287 + public Date getScrapDate() {
  288 + return scrapDate;
  289 + }
286 290
287 - public void setCarGride(String carGride) {  
288 - this.carGride = carGride;  
289 - } 291 + public void setScrapDate(Date scrapDate) {
  292 + this.scrapDate = scrapDate;
  293 + }
290 294
291 - public String getEmissionsStandard() {  
292 - return emissionsStandard;  
293 - } 295 + public String getMakeCodeOne() {
  296 + return makeCodeOne;
  297 + }
294 298
295 - public void setEmissionsStandard(String emissionsStandard) {  
296 - this.emissionsStandard = emissionsStandard;  
297 - } 299 + public void setMakeCodeOne(String makeCodeOne) {
  300 + this.makeCodeOne = makeCodeOne;
  301 + }
298 302
299 - public String getEngineCodeOne() {  
300 - return engineCodeOne;  
301 - } 303 + public String getMakeCodeTwo() {
  304 + return makeCodeTwo;
  305 + }
302 306
303 - public void setEngineCodeOne(String engineCodeOne) {  
304 - this.engineCodeOne = engineCodeOne;  
305 - } 307 + public void setMakeCodeTwo(String makeCodeTwo) {
  308 + this.makeCodeTwo = makeCodeTwo;
  309 + }
306 310
307 - public String getEngineCodeTwo() {  
308 - return engineCodeTwo;  
309 - } 311 + public String getCarGride() {
  312 + return carGride;
  313 + }
310 314
311 - public void setEngineCodeTwo(String engineCodeTwo) {  
312 - this.engineCodeTwo = engineCodeTwo;  
313 - } 315 + public void setCarGride(String carGride) {
  316 + this.carGride = carGride;
  317 + }
314 318
315 - public String getCarNumberOne() {  
316 - return carNumberOne;  
317 - } 319 + public String getEmissionsStandard() {
  320 + return emissionsStandard;
  321 + }
318 322
319 - public void setCarNumberOne(String carNumberOne) {  
320 - this.carNumberOne = carNumberOne;  
321 - } 323 + public void setEmissionsStandard(String emissionsStandard) {
  324 + this.emissionsStandard = emissionsStandard;
  325 + }
322 326
323 - public String getCarNumberTwo() {  
324 - return carNumberTwo;  
325 - } 327 + public String getEngineCodeOne() {
  328 + return engineCodeOne;
  329 + }
326 330
327 - public void setCarNumberTwo(String carNumberTwo) {  
328 - this.carNumberTwo = carNumberTwo;  
329 - } 331 + public void setEngineCodeOne(String engineCodeOne) {
  332 + this.engineCodeOne = engineCodeOne;
  333 + }
330 334
331 - public String getCarType() {  
332 - return carType;  
333 - } 335 + public String getEngineCodeTwo() {
  336 + return engineCodeTwo;
  337 + }
334 338
335 - public void setCarType(String carType) {  
336 - this.carType = carType;  
337 - } 339 + public void setEngineCodeTwo(String engineCodeTwo) {
  340 + this.engineCodeTwo = engineCodeTwo;
  341 + }
338 342
339 - public String getBusinessCode() {  
340 - return businessCode;  
341 - } 343 + public String getCarNumberOne() {
  344 + return carNumberOne;
  345 + }
342 346
343 - public void setBusinessCode(String businessCode) {  
344 - this.businessCode = businessCode;  
345 - } 347 + public void setCarNumberOne(String carNumberOne) {
  348 + this.carNumberOne = carNumberOne;
  349 + }
346 350
347 - public String getCompany() {  
348 - return company;  
349 - } 351 + public String getCarNumberTwo() {
  352 + return carNumberTwo;
  353 + }
350 354
351 - public void setCompany(String company) {  
352 - this.company = company;  
353 - } 355 + public void setCarNumberTwo(String carNumberTwo) {
  356 + this.carNumberTwo = carNumberTwo;
  357 + }
354 358
355 - public String getBrancheCompany() {  
356 - return brancheCompany;  
357 - } 359 + public Date getOpenDate() {
  360 + return openDate;
  361 + }
358 362
359 - public void setBrancheCompany(String brancheCompany) {  
360 - this.brancheCompany = brancheCompany;  
361 - } 363 + public void setOpenDate(Date openDate) {
  364 + this.openDate = openDate;
  365 + }
362 366
363 - public String getCarOrdinal() {  
364 - return carOrdinal;  
365 - } 367 + public Date getCloseDate() {
  368 + return closeDate;
  369 + }
366 370
367 - public void setCarOrdinal(String carOrdinal) {  
368 - this.carOrdinal = carOrdinal;  
369 - } 371 + public void setCloseDate(Date closeDate) {
  372 + this.closeDate = closeDate;
  373 + }
370 374
371 - public String getVehicleStats() {  
372 - return VehicleStats;  
373 - } 375 + public Boolean getHvacCar() {
  376 + return hvacCar;
  377 + }
374 378
375 - public void setVehicleStats(String vehicleStats) {  
376 - VehicleStats = vehicleStats;  
377 - } 379 + public void setHvacCar(Boolean hvacCar) {
  380 + this.hvacCar = hvacCar;
  381 + }
378 382
379 - public String getVideoCode() {  
380 - return videoCode;  
381 - } 383 + public Boolean getTicketType() {
  384 + return ticketType;
  385 + }
382 386
383 - public void setVideoCode(String videoCode) {  
384 - this.videoCode = videoCode;  
385 - } 387 + public void setTicketType(Boolean ticketType) {
  388 + this.ticketType = ticketType;
  389 + }
386 390
387 - public Integer getOperatorsState() {  
388 - return operatorsState;  
389 - } 391 + public Boolean getLedScreen() {
  392 + return ledScreen;
  393 + }
390 394
391 - public void setOperatorsState(Integer operatorsState) {  
392 - this.operatorsState = operatorsState;  
393 - } 395 + public void setLedScreen(Boolean ledScreen) {
  396 + this.ledScreen = ledScreen;
  397 + }
394 398
395 - public Date getOpenDate() {  
396 - return openDate;  
397 - } 399 + public Boolean getTvVideoType() {
  400 + return tvVideoType;
  401 + }
398 402
399 - public void setOpenDate(Date openDate) {  
400 - this.openDate = openDate;  
401 - } 403 + public void setTvVideoType(Boolean tvVideoType) {
  404 + this.tvVideoType = tvVideoType;
  405 + }
402 406
403 - public Date getCloseDate() {  
404 - return closeDate;  
405 - } 407 + public String getCarType() {
  408 + return carType;
  409 + }
406 410
407 - public void setCloseDate(Date closeDate) {  
408 - this.closeDate = closeDate;  
409 - } 411 + public void setCarType(String carType) {
  412 + this.carType = carType;
  413 + }
410 414
411 - public boolean isScrapState() {  
412 - return scrapState;  
413 - } 415 + public String getVehicleStats() {
  416 + return vehicleStats;
  417 + }
414 418
415 - public void setScrapState(boolean scrapState) {  
416 - this.scrapState = scrapState;  
417 - } 419 + public void setVehicleStats(String vehicleStats) {
  420 + this.vehicleStats = vehicleStats;
  421 + }
418 422
419 - public String getScrapCode() {  
420 - return scrapCode;  
421 - } 423 + public String getOperatorsState() {
  424 + return operatorsState;
  425 + }
422 426
423 - public void setScrapCode(String scrapCode) {  
424 - this.scrapCode = scrapCode;  
425 - } 427 + public void setOperatorsState(String operatorsState) {
  428 + this.operatorsState = operatorsState;
  429 + }
426 430
427 - public Date getScrapDate() {  
428 - return scrapDate;  
429 - } 431 + public Boolean getSfdc() {
  432 + return sfdc;
  433 + }
430 434
431 - public void setScrapDate(Date scrapDate) {  
432 - this.scrapDate = scrapDate;  
433 - } 435 + public void setSfdc(Boolean sfdc) {
  436 + this.sfdc = sfdc;
  437 + }
434 438
435 - public Integer getIsSwitch() {  
436 - return isSwitch;  
437 - } 439 + public String getDescriptions() {
  440 + return descriptions;
  441 + }
438 442
439 - public void setIsSwitch(Integer isSwitch) {  
440 - this.isSwitch = isSwitch;  
441 - } 443 + public void setDescriptions(String descriptions) {
  444 + this.descriptions = descriptions;
  445 + }
442 446
443 - public String getDescriptions() {  
444 - return descriptions;  
445 - } 447 + public String getCarOrdinal() {
  448 + return carOrdinal;
  449 + }
446 450
447 - public void setDescriptions(String descriptions) {  
448 - this.descriptions = descriptions;  
449 - } 451 + public void setCarOrdinal(String carOrdinal) {
  452 + this.carOrdinal = carOrdinal;
  453 + }
450 454
451 - public Integer getCreateBy() {  
452 - return createBy;  
453 - } 455 + public String getVideoCode() {
  456 + return videoCode;
  457 + }
454 458
455 - public void setCreateBy(Integer createBy) {  
456 - this.createBy = createBy;  
457 - } 459 + public void setVideoCode(String videoCode) {
  460 + this.videoCode = videoCode;
  461 + }
458 462
459 - public Integer getUpdateBy() {  
460 - return updateBy;  
461 - } 463 + public Boolean getScrapState() {
  464 + return scrapState;
  465 + }
462 466
463 - public void setUpdateBy(Integer updateBy) {  
464 - this.updateBy = updateBy;  
465 - } 467 + public void setScrapState(Boolean scrapState) {
  468 + this.scrapState = scrapState;
  469 + }
466 470
467 - public Date getCreateDate() {  
468 - return createDate;  
469 - } 471 + public Integer getIsSwitch() {
  472 + return isSwitch;
  473 + }
470 474
471 - public void setCreateDate(Date createDate) {  
472 - this.createDate = createDate;  
473 - } 475 + public void setIsSwitch(Integer isSwitch) {
  476 + this.isSwitch = isSwitch;
  477 + }
474 478
475 - public Date getUpdateDate() {  
476 - return updateDate;  
477 - } 479 + public String getXlmc() {
  480 + return xlmc;
  481 + }
478 482
479 - public void setUpdateDate(Date updateDate) {  
480 - this.updateDate = updateDate;  
481 - } 483 + public void setXlmc(String xlmc) {
  484 + this.xlmc = xlmc;
  485 + }
482 486
483 - public Line getLineid() {  
484 - return lineid;  
485 - } 487 + public SysUser getCreateBy() {
  488 + return createBy;
  489 + }
486 490
487 - public void setLineid(Line lineid) {  
488 - this.lineid = lineid;  
489 - } 491 + public void setCreateBy(SysUser createBy) {
  492 + this.createBy = createBy;
  493 + }
490 494
491 - public String getBrancheCompanyCode() {  
492 - return brancheCompanyCode; 495 + public SysUser getUpdateBy() {
  496 + return updateBy;
493 } 497 }
494 498
495 - public void setBrancheCompanyCode(String brancheCompanyCode) {  
496 - this.brancheCompanyCode = brancheCompanyCode; 499 + public void setUpdateBy(SysUser updateBy) {
  500 + this.updateBy = updateBy;
497 } 501 }
498 502
499 - public String getSupplierName() {  
500 - return supplierName; 503 + public Date getCreateDate() {
  504 + return createDate;
501 } 505 }
502 506
503 - public void setSupplierName(String supplierName) {  
504 - this.supplierName = supplierName; 507 + public void setCreateDate(Date createDate) {
  508 + this.createDate = createDate;
505 } 509 }
506 510
507 - public boolean isSfdc() {  
508 - return sfdc; 511 + public Date getUpdateDate() {
  512 + return updateDate;
509 } 513 }
510 514
511 - public void setSfdc(boolean sfdc) {  
512 - this.sfdc = sfdc; 515 + public void setUpdateDate(Date updateDate) {
  516 + this.updateDate = updateDate;
513 } 517 }
514 } 518 }
src/main/java/com/bsth/entity/Personnel.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
3 -import java.util.Date; 3 +import com.bsth.entity.sys.SysUser;
4 4
5 -import javax.persistence.Column;  
6 -import javax.persistence.Entity;  
7 -import javax.persistence.GeneratedValue;  
8 -import javax.persistence.GenerationType;  
9 -import javax.persistence.Id;  
10 -import javax.persistence.Table; 5 +import javax.persistence.*;
  6 +import java.util.Date;
11 7
12 /** 8 /**
13 * 9 *
@@ -26,205 +22,224 @@ import javax.persistence.Table; @@ -26,205 +22,224 @@ import javax.persistence.Table;
26 @Entity 22 @Entity
27 @Table(name = "bsth_c_personnel") 23 @Table(name = "bsth_c_personnel")
28 public class Personnel { 24 public class Personnel {
29 - 25 +
  26 + /** 主键Id */
30 @Id 27 @Id
31 - @GeneratedValue(strategy = GenerationType.IDENTITY) 28 + @GeneratedValue
32 private Integer id; 29 private Integer id;
33 -  
34 - // 人员编码 30 +
  31 + /** 所属公司 */
  32 + @Column(nullable = false)
  33 + private String company;
  34 + /** 公司编码 */
  35 + @Column(nullable = false)
  36 + private String companyCode;
  37 + /** 所属分公司 */
  38 + private String brancheCompany;
  39 + /** 分公司编码 */
  40 + private String brancheCompanyCode;
  41 + /** 工号 */
  42 + @Column(nullable = false, unique = true)
  43 + private String jobCode;
  44 + /** 姓名 */
  45 + @Column(nullable = false)
  46 + private String personnelName;
  47 +
  48 + /** 运营服务证书号 */
  49 + private String papersCode;
  50 + /** 一卡通工作卡号 */
  51 + private String icCardCode;
  52 + /** 性别(TODO:暂时使用男/女,不使用字典) */
  53 + private String personnelType;
  54 + /** 所属岗位/工种(TODO:暂时不使用字典) */
  55 + private String posts;
  56 +
  57 +
  58 + /** 人员编码(TODO:在原系统里没有,这里暂时留着) */
35 private String personnelCode; 59 private String personnelCode;
36 -  
37 - // 工号  
38 - private String jobCode;  
39 -  
40 - // 姓名  
41 - private String personnelName;  
42 -  
43 - // 性别  
44 - private Integer personnelType;  
45 -  
46 - // 照片地址 60 + /** 照片地址(TODO:在原系统里没有,这里暂时留着) */
47 private String personnelImg; 61 private String personnelImg;
48 -  
49 - // 线路编号 62 + /** 线路编号(TODO:在原系统里没有,这里暂时留着) */
50 private String lineCode; 63 private String lineCode;
51 -  
52 - // 一卡通工作卡号  
53 - private String icCardCode;  
54 -  
55 - // 运营服务证书号  
56 - private String papersCode;  
57 -  
58 - // 所属岗位  
59 - private String posts;  
60 -  
61 - // 所属公司  
62 - private String company;  
63 -  
64 - // 分公司  
65 - private String brancheCompany;  
66 -  
67 - // 创建人  
68 - private Integer createBy;  
69 -  
70 - // 联系电话 64 + /** 联系电话(TODO:在原系统里没有,这里暂时留着) */
71 private String telphone; 65 private String telphone;
72 -  
73 - // 修改人  
74 - private Integer updateBy;  
75 -  
76 - // 描述  
77 - private String descriptions;  
78 -  
79 - // 创建日期 66 + /** 描述(TODO:在原系统里没有,这里暂时留着) */
  67 + private String descriptions;
  68 +
  69 +
  70 +
  71 + /** 创建人 */
  72 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  73 + private SysUser createBy;
  74 + /** 修改人 */
  75 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  76 + private SysUser updateBy;
  77 +
  78 + /** 创建日期 */
80 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 79 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
81 private Date createDate; 80 private Date createDate;
82 81
83 - // 修改日期 82 + /** 修改日期 */
84 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 83 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
85 private Date updateDate; 84 private Date updateDate;
86 -  
87 - public Integer getId() {  
88 - return id;  
89 - }  
90 85
91 - public void setId(Integer id) {  
92 - this.id = id;  
93 - } 86 + public Integer getId() {
  87 + return id;
  88 + }
  89 +
  90 + public void setId(Integer id) {
  91 + this.id = id;
  92 + }
  93 +
  94 + public String getCompany() {
  95 + return company;
  96 + }
  97 +
  98 + public void setCompany(String company) {
  99 + this.company = company;
  100 + }
  101 +
  102 + public String getCompanyCode() {
  103 + return companyCode;
  104 + }
  105 +
  106 + public void setCompanyCode(String companyCode) {
  107 + this.companyCode = companyCode;
  108 + }
  109 +
  110 + public String getBrancheCompany() {
  111 + return brancheCompany;
  112 + }
  113 +
  114 + public void setBrancheCompany(String brancheCompany) {
  115 + this.brancheCompany = brancheCompany;
  116 + }
  117 +
  118 + public String getBrancheCompanyCode() {
  119 + return brancheCompanyCode;
  120 + }
  121 +
  122 + public void setBrancheCompanyCode(String brancheCompanyCode) {
  123 + this.brancheCompanyCode = brancheCompanyCode;
  124 + }
  125 +
  126 + public String getJobCode() {
  127 + return jobCode;
  128 + }
  129 +
  130 + public void setJobCode(String jobCode) {
  131 + this.jobCode = jobCode;
  132 + }
  133 +
  134 + public String getPersonnelName() {
  135 + return personnelName;
  136 + }
  137 +
  138 + public void setPersonnelName(String personnelName) {
  139 + this.personnelName = personnelName;
  140 + }
  141 +
  142 + public String getPapersCode() {
  143 + return papersCode;
  144 + }
  145 +
  146 + public void setPapersCode(String papersCode) {
  147 + this.papersCode = papersCode;
  148 + }
  149 +
  150 + public String getIcCardCode() {
  151 + return icCardCode;
  152 + }
  153 +
  154 + public void setIcCardCode(String icCardCode) {
  155 + this.icCardCode = icCardCode;
  156 + }
  157 +
  158 + public String getPersonnelType() {
  159 + return personnelType;
  160 + }
  161 +
  162 + public void setPersonnelType(String personnelType) {
  163 + this.personnelType = personnelType;
  164 + }
  165 +
  166 + public String getPosts() {
  167 + return posts;
  168 + }
94 169
95 - public String getPersonnelCode() {  
96 - return personnelCode;  
97 - } 170 + public void setPosts(String posts) {
  171 + this.posts = posts;
  172 + }
98 173
99 - public void setPersonnelCode(String personnelCode) {  
100 - this.personnelCode = personnelCode;  
101 - } 174 + public String getPersonnelCode() {
  175 + return personnelCode;
  176 + }
102 177
103 - public String getJobCode() {  
104 - return jobCode;  
105 - } 178 + public void setPersonnelCode(String personnelCode) {
  179 + this.personnelCode = personnelCode;
  180 + }
106 181
107 - public void setJobCode(String jobCode) {  
108 - this.jobCode = jobCode;  
109 - } 182 + public String getPersonnelImg() {
  183 + return personnelImg;
  184 + }
110 185
111 - public String getPersonnelName() {  
112 - return personnelName;  
113 - } 186 + public void setPersonnelImg(String personnelImg) {
  187 + this.personnelImg = personnelImg;
  188 + }
114 189
115 - public void setPersonnelName(String personnelName) {  
116 - this.personnelName = personnelName;  
117 - } 190 + public String getLineCode() {
  191 + return lineCode;
  192 + }
118 193
119 - public Integer getPersonnelType() {  
120 - return personnelType;  
121 - } 194 + public void setLineCode(String lineCode) {
  195 + this.lineCode = lineCode;
  196 + }
122 197
123 - public void setPersonnelType(Integer personnelType) {  
124 - this.personnelType = personnelType;  
125 - } 198 + public String getTelphone() {
  199 + return telphone;
  200 + }
126 201
127 - public String getPersonnelImg() {  
128 - return personnelImg;  
129 - }  
130 -  
131 - public void setPersonnelImg(String personnelImg) {  
132 - this.personnelImg = personnelImg;  
133 - }  
134 -  
135 - public String getLineCode() {  
136 - return lineCode;  
137 - }  
138 -  
139 - public void setLineCode(String lineCode) {  
140 - this.lineCode = lineCode;  
141 - }  
142 -  
143 - public String getIcCardCode() {  
144 - return icCardCode;  
145 - }  
146 -  
147 - public void setIcCardCode(String icCardCode) {  
148 - this.icCardCode = icCardCode;  
149 - }  
150 -  
151 - public String getPapersCode() {  
152 - return papersCode;  
153 - }  
154 -  
155 - public void setPapersCode(String papersCode) {  
156 - this.papersCode = papersCode;  
157 - }  
158 -  
159 - public String getPosts() {  
160 - return posts;  
161 - }  
162 -  
163 - public void setPosts(String posts) {  
164 - this.posts = posts;  
165 - }  
166 -  
167 - public String getCompany() {  
168 - return company;  
169 - }  
170 -  
171 - public void setCompany(String company) {  
172 - this.company = company;  
173 - }  
174 -  
175 - public String getBrancheCompany() {  
176 - return brancheCompany;  
177 - }  
178 -  
179 - public void setBrancheCompany(String brancheCompany) {  
180 - this.brancheCompany = brancheCompany;  
181 - }  
182 -  
183 - public Integer getCreateBy() {  
184 - return createBy;  
185 - }  
186 -  
187 - public void setCreateBy(Integer createBy) {  
188 - this.createBy = createBy;  
189 - } 202 + public void setTelphone(String telphone) {
  203 + this.telphone = telphone;
  204 + }
190 205
191 - public String getTelphone() {  
192 - return telphone;  
193 - } 206 + public String getDescriptions() {
  207 + return descriptions;
  208 + }
194 209
195 - public void setTelphone(String telphone) {  
196 - this.telphone = telphone;  
197 - } 210 + public void setDescriptions(String descriptions) {
  211 + this.descriptions = descriptions;
  212 + }
198 213
199 - public Integer getUpdateBy() {  
200 - return updateBy;  
201 - } 214 + public SysUser getCreateBy() {
  215 + return createBy;
  216 + }
202 217
203 - public void setUpdateBy(Integer updateBy) {  
204 - this.updateBy = updateBy;  
205 - } 218 + public void setCreateBy(SysUser createBy) {
  219 + this.createBy = createBy;
  220 + }
206 221
207 - public String getDescriptions() {  
208 - return descriptions;  
209 - } 222 + public SysUser getUpdateBy() {
  223 + return updateBy;
  224 + }
210 225
211 - public void setDescriptions(String descriptions) {  
212 - this.descriptions = descriptions;  
213 - } 226 + public void setUpdateBy(SysUser updateBy) {
  227 + this.updateBy = updateBy;
  228 + }
214 229
215 - public Date getCreateDate() {  
216 - return createDate;  
217 - } 230 + public Date getCreateDate() {
  231 + return createDate;
  232 + }
218 233
219 - public void setCreateDate(Date createDate) {  
220 - this.createDate = createDate;  
221 - } 234 + public void setCreateDate(Date createDate) {
  235 + this.createDate = createDate;
  236 + }
222 237
223 - public Date getUpdateDate() {  
224 - return updateDate;  
225 - } 238 + public Date getUpdateDate() {
  239 + return updateDate;
  240 + }
226 241
227 - public void setUpdateDate(Date updateDate) {  
228 - this.updateDate = updateDate;  
229 - } 242 + public void setUpdateDate(Date updateDate) {
  243 + this.updateDate = updateDate;
  244 + }
230 } 245 }
src/main/java/com/bsth/entity/schedule/BusinessInfo.java
1 -package com.bsth.entity.schedule;  
2 -  
3 -import javax.persistence.*;  
4 -import java.util.Date;  
5 -  
6 -/**  
7 - * 线路运营信息汇总。  
8 - * TODO:暂时这样写,演示后重新修正  
9 - */  
10 -@Entity  
11 -@Table(name = "bsth_c_s_bi")  
12 -public class BusinessInfo {  
13 -  
14 - /** 主键Id */  
15 - @Id  
16 - @GeneratedValue  
17 - private Long id;  
18 -  
19 - /** TODO:之后修正 */  
20 - /** 线路名称 */  
21 - private String xlName;  
22 - /** 线路编码 */  
23 - private String xlBm;  
24 - /** 公司名称 */  
25 - private String gsName;  
26 - /** 分公司名称 */  
27 - private String fgsName;  
28 -  
29 - /** 配车数 */  
30 - private int pcCount;  
31 - /** 人员数 */  
32 - private int ryCount;  
33 - /** 路牌数 */  
34 - private int lpCount;  
35 - /** 套跑数 */  
36 - private int tpCount;  
37 - /** 时刻表数 */  
38 - private int ttCount;  
39 - /** 调度规则数 */  
40 - private int srCount;  
41 - /** 调度计划数 */  
42 - private int spCount;  
43 -  
44 - // 创建日期  
45 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
46 - private Date createDate;  
47 - // 修改日期  
48 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
49 - private Date updateDate;  
50 -  
51 - public Long getId() {  
52 - return id;  
53 - }  
54 -  
55 - public void setId(Long id) {  
56 - this.id = id;  
57 - }  
58 -  
59 - public String getXlName() {  
60 - return xlName;  
61 - }  
62 -  
63 - public void setXlName(String xlName) {  
64 - this.xlName = xlName;  
65 - }  
66 -  
67 - public String getXlBm() {  
68 - return xlBm;  
69 - }  
70 -  
71 - public void setXlBm(String xlBm) {  
72 - this.xlBm = xlBm;  
73 - }  
74 -  
75 - public String getGsName() {  
76 - return gsName;  
77 - }  
78 -  
79 - public void setGsName(String gsName) {  
80 - this.gsName = gsName;  
81 - }  
82 -  
83 - public String getFgsName() {  
84 - return fgsName;  
85 - }  
86 -  
87 - public void setFgsName(String fgsName) {  
88 - this.fgsName = fgsName;  
89 - }  
90 -  
91 - public int getPcCount() {  
92 - return pcCount;  
93 - }  
94 -  
95 - public void setPcCount(int pcCount) {  
96 - this.pcCount = pcCount;  
97 - }  
98 -  
99 - public int getRyCount() {  
100 - return ryCount;  
101 - }  
102 -  
103 - public void setRyCount(int ryCount) {  
104 - this.ryCount = ryCount;  
105 - }  
106 -  
107 - public int getLpCount() {  
108 - return lpCount;  
109 - }  
110 -  
111 - public void setLpCount(int lpCount) {  
112 - this.lpCount = lpCount;  
113 - }  
114 -  
115 - public int getTpCount() {  
116 - return tpCount;  
117 - }  
118 -  
119 - public void setTpCount(int tpCount) {  
120 - this.tpCount = tpCount;  
121 - }  
122 -  
123 - public int getTtCount() {  
124 - return ttCount;  
125 - }  
126 -  
127 - public void setTtCount(int ttCount) {  
128 - this.ttCount = ttCount;  
129 - }  
130 -  
131 - public int getSrCount() {  
132 - return srCount;  
133 - }  
134 -  
135 - public void setSrCount(int srCount) {  
136 - this.srCount = srCount;  
137 - }  
138 -  
139 - public int getSpCount() {  
140 - return spCount;  
141 - }  
142 -  
143 - public void setSpCount(int spCount) {  
144 - this.spCount = spCount;  
145 - }  
146 -  
147 - public Date getCreateDate() {  
148 - return createDate;  
149 - }  
150 -  
151 - public void setCreateDate(Date createDate) {  
152 - this.createDate = createDate;  
153 - }  
154 -  
155 - public Date getUpdateDate() {  
156 - return updateDate;  
157 - }  
158 -  
159 - public void setUpdateDate(Date updateDate) {  
160 - this.updateDate = updateDate;  
161 - }  
162 -} 1 +package com.bsth.entity.schedule;
  2 +
  3 +import javax.persistence.*;
  4 +import java.util.Date;
  5 +
  6 +/**
  7 + * 线路运营信息汇总。
  8 + * TODO:暂时这样写,演示后重新修正
  9 + */
  10 +@Entity
  11 +@Table(name = "bsth_c_s_bi")
  12 +public class BusinessInfo {
  13 +
  14 + /** 主键Id */
  15 + @Id
  16 + @GeneratedValue
  17 + private Long id;
  18 +
  19 + /** TODO:之后修正 */
  20 + /** 线路名称 */
  21 + private String xlName;
  22 + /** 线路编码 */
  23 + private String xlBm;
  24 + /** 公司名称 */
  25 + private String gsName;
  26 + /** 分公司名称 */
  27 + private String fgsName;
  28 +
  29 + /** 配车数 */
  30 + private int pcCount;
  31 + /** 人员数 */
  32 + private int ryCount;
  33 + /** 路牌数 */
  34 + private int lpCount;
  35 + /** 套跑数 */
  36 + private int tpCount;
  37 + /** 时刻表数 */
  38 + private int ttCount;
  39 + /** 调度规则数 */
  40 + private int srCount;
  41 + /** 调度计划数 */
  42 + private int spCount;
  43 +
  44 + // 创建日期
  45 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  46 + private Date createDate;
  47 + // 修改日期
  48 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  49 + private Date updateDate;
  50 +
  51 + public Long getId() {
  52 + return id;
  53 + }
  54 +
  55 + public void setId(Long id) {
  56 + this.id = id;
  57 + }
  58 +
  59 + public String getXlName() {
  60 + return xlName;
  61 + }
  62 +
  63 + public void setXlName(String xlName) {
  64 + this.xlName = xlName;
  65 + }
  66 +
  67 + public String getXlBm() {
  68 + return xlBm;
  69 + }
  70 +
  71 + public void setXlBm(String xlBm) {
  72 + this.xlBm = xlBm;
  73 + }
  74 +
  75 + public String getGsName() {
  76 + return gsName;
  77 + }
  78 +
  79 + public void setGsName(String gsName) {
  80 + this.gsName = gsName;
  81 + }
  82 +
  83 + public String getFgsName() {
  84 + return fgsName;
  85 + }
  86 +
  87 + public void setFgsName(String fgsName) {
  88 + this.fgsName = fgsName;
  89 + }
  90 +
  91 + public int getPcCount() {
  92 + return pcCount;
  93 + }
  94 +
  95 + public void setPcCount(int pcCount) {
  96 + this.pcCount = pcCount;
  97 + }
  98 +
  99 + public int getRyCount() {
  100 + return ryCount;
  101 + }
  102 +
  103 + public void setRyCount(int ryCount) {
  104 + this.ryCount = ryCount;
  105 + }
  106 +
  107 + public int getLpCount() {
  108 + return lpCount;
  109 + }
  110 +
  111 + public void setLpCount(int lpCount) {
  112 + this.lpCount = lpCount;
  113 + }
  114 +
  115 + public int getTpCount() {
  116 + return tpCount;
  117 + }
  118 +
  119 + public void setTpCount(int tpCount) {
  120 + this.tpCount = tpCount;
  121 + }
  122 +
  123 + public int getTtCount() {
  124 + return ttCount;
  125 + }
  126 +
  127 + public void setTtCount(int ttCount) {
  128 + this.ttCount = ttCount;
  129 + }
  130 +
  131 + public int getSrCount() {
  132 + return srCount;
  133 + }
  134 +
  135 + public void setSrCount(int srCount) {
  136 + this.srCount = srCount;
  137 + }
  138 +
  139 + public int getSpCount() {
  140 + return spCount;
  141 + }
  142 +
  143 + public void setSpCount(int spCount) {
  144 + this.spCount = spCount;
  145 + }
  146 +
  147 + public Date getCreateDate() {
  148 + return createDate;
  149 + }
  150 +
  151 + public void setCreateDate(Date createDate) {
  152 + this.createDate = createDate;
  153 + }
  154 +
  155 + public Date getUpdateDate() {
  156 + return updateDate;
  157 + }
  158 +
  159 + public void setUpdateDate(Date updateDate) {
  160 + this.updateDate = updateDate;
  161 + }
  162 +}
src/main/java/com/bsth/entity/schedule/CarConfigInfo.java
1 -package com.bsth.entity.schedule;  
2 -  
3 -import com.bsth.entity.Cars;  
4 -import com.bsth.entity.Line;  
5 -  
6 -import javax.persistence.*;  
7 -import java.util.Date;  
8 -  
9 -/**  
10 - * 车辆配置信息。  
11 - */  
12 -@Entity  
13 -@Table(name = "bsth_c_s_ccinfo")  
14 -public class CarConfigInfo {  
15 -  
16 - /** 主健Id */  
17 - @Id  
18 - @GeneratedValue  
19 - private Long id;  
20 -  
21 - /** TODO:等其他实体类完整后,做关联引用 */  
22 -  
23 - /** 线路关联 */  
24 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
25 - private Line xl;  
26 - /** 车辆关联 */  
27 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
28 - private Cars cl;  
29 -  
30 -  
31 - /** 早班时间(格式:HH:mm) */  
32 - @Column(length = 5)  
33 - private String zbsj;  
34 - /** 末班时间(格式:HH:mm) */  
35 - @Column(length = 5)  
36 - private String mbsj;  
37 -  
38 - /** 启用日期 */  
39 - private Date qyrq;  
40 - /** 终止日期 */  
41 - private Date zzrq;  
42 - /** 停车点(TODO:这个不知道是否要关联)( */  
43 - private String tcd;  
44 - /** 受否切换(TODO:不懂) */  
45 - private int isSwitch;  
46 -  
47 - // 创建日期  
48 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
49 - private Date createDate;  
50 - // 修改日期  
51 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
52 - private Date updateDate;  
53 -  
54 - public Long getId() {  
55 - return id;  
56 - }  
57 -  
58 - public void setId(Long id) {  
59 - this.id = id;  
60 - }  
61 -  
62 - public Line getXl() {  
63 - return xl;  
64 - }  
65 -  
66 - public void setXl(Line xl) {  
67 - this.xl = xl;  
68 - }  
69 -  
70 - public Cars getCl() {  
71 - return cl;  
72 - }  
73 -  
74 - public void setCl(Cars cl) {  
75 - this.cl = cl;  
76 - }  
77 -  
78 - public Date getQyrq() {  
79 - return qyrq;  
80 - }  
81 -  
82 - public void setQyrq(Date qyrq) {  
83 - this.qyrq = qyrq;  
84 - }  
85 -  
86 - public Date getZzrq() {  
87 - return zzrq;  
88 - }  
89 -  
90 - public void setZzrq(Date zzrq) {  
91 - this.zzrq = zzrq;  
92 - }  
93 -  
94 - public String getTcd() {  
95 - return tcd;  
96 - }  
97 -  
98 - public void setTcd(String tcd) {  
99 - this.tcd = tcd;  
100 - }  
101 -  
102 - public int getIsSwitch() {  
103 - return isSwitch;  
104 - }  
105 -  
106 - public void setIsSwitch(int isSwitch) {  
107 - this.isSwitch = isSwitch;  
108 - }  
109 -  
110 - public Date getCreateDate() {  
111 - return createDate;  
112 - }  
113 -  
114 - public void setCreateDate(Date createDate) {  
115 - this.createDate = createDate;  
116 - }  
117 -  
118 - public Date getUpdateDate() {  
119 - return updateDate;  
120 - }  
121 -  
122 - public String getZbsj() {  
123 - return zbsj;  
124 - }  
125 -  
126 - public void setZbsj(String zbsj) {  
127 - this.zbsj = zbsj;  
128 - }  
129 -  
130 - public String getMbsj() {  
131 - return mbsj;  
132 - }  
133 -  
134 - public void setMbsj(String mbsj) {  
135 - this.mbsj = mbsj;  
136 - }  
137 -  
138 - public void setUpdateDate(Date updateDate) {  
139 - this.updateDate = updateDate;  
140 - }  
141 -} 1 +package com.bsth.entity.schedule;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +import com.bsth.entity.Line;
  5 +import com.bsth.entity.sys.SysUser;
  6 +
  7 +import javax.persistence.*;
  8 +import java.util.Date;
  9 +
  10 +/**
  11 + * 车辆配置信息。
  12 + */
  13 +@Entity
  14 +@Table(name = "bsth_c_s_ccinfo")
  15 +public class CarConfigInfo {
  16 +
  17 + /** 主健Id */
  18 + @Id
  19 + @GeneratedValue
  20 + private Long id;
  21 +
  22 + /** 线路关联 */
  23 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  24 + private Line xl;
  25 + /** 车辆关联 */
  26 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  27 + private Cars cl;
  28 +
  29 +
  30 + /** 早班时间(格式:HH:mm) */
  31 + @Column(length = 5)
  32 + private String zbsj;
  33 + /** 末班时间(格式:HH:mm) */
  34 + @Column(length = 5)
  35 + private String mbsj;
  36 +
  37 + /** 启用日期 */
  38 + @Column(nullable = false)
  39 + private Date qyrq;
  40 + /** 终止日期 */
  41 + private Date zzrq;
  42 + @Column(nullable = false)
  43 + /** 停车点(TODO:这个不知道是否要关联)*/
  44 + private String tcd;
  45 + /** 受否切换 0或者1(TODO:不懂,貌似喝历史配车有关) */
  46 + @Column(nullable = false)
  47 + private int isSwitch;
  48 +
  49 + /** 创建人 */
  50 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  51 + private SysUser createBy;
  52 + /** 修改人 */
  53 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  54 + private SysUser updateBy;
  55 +
  56 + /** 创建日期 */
  57 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  58 + private Date createDate;
  59 + /** 修改日期 */
  60 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  61 + private Date updateDate;
  62 +
  63 + public Long getId() {
  64 + return id;
  65 + }
  66 +
  67 + public void setId(Long id) {
  68 + this.id = id;
  69 + }
  70 +
  71 + public Line getXl() {
  72 + return xl;
  73 + }
  74 +
  75 + public void setXl(Line xl) {
  76 + this.xl = xl;
  77 + }
  78 +
  79 + public Cars getCl() {
  80 + return cl;
  81 + }
  82 +
  83 + public void setCl(Cars cl) {
  84 + this.cl = cl;
  85 + }
  86 +
  87 + public String getZbsj() {
  88 + return zbsj;
  89 + }
  90 +
  91 + public void setZbsj(String zbsj) {
  92 + this.zbsj = zbsj;
  93 + }
  94 +
  95 + public String getMbsj() {
  96 + return mbsj;
  97 + }
  98 +
  99 + public void setMbsj(String mbsj) {
  100 + this.mbsj = mbsj;
  101 + }
  102 +
  103 + public Date getQyrq() {
  104 + return qyrq;
  105 + }
  106 +
  107 + public void setQyrq(Date qyrq) {
  108 + this.qyrq = qyrq;
  109 + }
  110 +
  111 + public Date getZzrq() {
  112 + return zzrq;
  113 + }
  114 +
  115 + public void setZzrq(Date zzrq) {
  116 + this.zzrq = zzrq;
  117 + }
  118 +
  119 + public String getTcd() {
  120 + return tcd;
  121 + }
  122 +
  123 + public void setTcd(String tcd) {
  124 + this.tcd = tcd;
  125 + }
  126 +
  127 + public int getIsSwitch() {
  128 + return isSwitch;
  129 + }
  130 +
  131 + public void setIsSwitch(int isSwitch) {
  132 + this.isSwitch = isSwitch;
  133 + }
  134 +
  135 + public SysUser getCreateBy() {
  136 + return createBy;
  137 + }
  138 +
  139 + public void setCreateBy(SysUser createBy) {
  140 + this.createBy = createBy;
  141 + }
  142 +
  143 + public SysUser getUpdateBy() {
  144 + return updateBy;
  145 + }
  146 +
  147 + public void setUpdateBy(SysUser updateBy) {
  148 + this.updateBy = updateBy;
  149 + }
  150 +
  151 + public Date getCreateDate() {
  152 + return createDate;
  153 + }
  154 +
  155 + public void setCreateDate(Date createDate) {
  156 + this.createDate = createDate;
  157 + }
  158 +
  159 + public Date getUpdateDate() {
  160 + return updateDate;
  161 + }
  162 +
  163 + public void setUpdateDate(Date updateDate) {
  164 + this.updateDate = updateDate;
  165 + }
  166 +}
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
1 -package com.bsth.entity.schedule;  
2 -  
3 -import com.bsth.entity.Cars;  
4 -import com.bsth.entity.Line;  
5 -import com.bsth.entity.Personnel;  
6 -  
7 -import javax.persistence.*;  
8 -import java.util.Date;  
9 -  
10 -/**  
11 - * 人员配置信息。  
12 - */  
13 -@Entity  
14 -@Table(name = "bsth_c_s_ecinfo")  
15 -public class EmployeeConfigInfo {  
16 -  
17 - /** 主键Id */  
18 - @Id  
19 - @GeneratedValue  
20 - private Long id;  
21 -  
22 - /** 线路关联 */  
23 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
24 - private Line xl;  
25 - /** 车辆关联 */  
26 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
27 - private Cars cl;  
28 - /** 人员关联(驾驶员) */  
29 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
30 - private Personnel jsy;  
31 - /** 人员关联(售票员) */  
32 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
33 - private Personnel spy;  
34 -  
35 - /** 搭班编码(TODO:不懂) */  
36 - private String dbbm;  
37 -  
38 - // 创建日期  
39 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
40 - private Date createDate;  
41 - // 修改日期  
42 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
43 - private Date updateDate;  
44 -  
45 - public Long getId() {  
46 - return id;  
47 - }  
48 -  
49 - public void setId(Long id) {  
50 - this.id = id;  
51 - }  
52 -  
53 - public Line getXl() {  
54 - return xl;  
55 - }  
56 -  
57 - public void setXl(Line xl) {  
58 - this.xl = xl;  
59 - }  
60 -  
61 - public Cars getCl() {  
62 - return cl;  
63 - }  
64 -  
65 - public void setCl(Cars cl) {  
66 - this.cl = cl;  
67 - }  
68 -  
69 - public Personnel getJsy() {  
70 - return jsy;  
71 - }  
72 -  
73 - public void setJsy(Personnel jsy) {  
74 - this.jsy = jsy;  
75 - }  
76 -  
77 - public Personnel getSpy() {  
78 - return spy;  
79 - }  
80 -  
81 - public void setSpy(Personnel spy) {  
82 - this.spy = spy;  
83 - }  
84 -  
85 - public String getDbbm() {  
86 - return dbbm;  
87 - }  
88 -  
89 - public void setDbbm(String dbbm) {  
90 - this.dbbm = dbbm;  
91 - }  
92 -  
93 - public Date getCreateDate() {  
94 - return createDate;  
95 - }  
96 -  
97 - public void setCreateDate(Date createDate) {  
98 - this.createDate = createDate;  
99 - }  
100 -  
101 - public Date getUpdateDate() {  
102 - return updateDate;  
103 - }  
104 -  
105 - public void setUpdateDate(Date updateDate) {  
106 - this.updateDate = updateDate;  
107 - }  
108 -} 1 +package com.bsth.entity.schedule;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +import com.bsth.entity.Line;
  5 +import com.bsth.entity.Personnel;
  6 +import com.bsth.entity.sys.SysUser;
  7 +
  8 +import javax.persistence.*;
  9 +import java.util.Date;
  10 +
  11 +/**
  12 + * 人员配置信息。
  13 + */
  14 +@Entity
  15 +@Table(name = "bsth_c_s_ecinfo")
  16 +public class EmployeeConfigInfo {
  17 +
  18 + /** 主键Id */
  19 + @Id
  20 + @GeneratedValue
  21 + private Long id;
  22 +
  23 + /** 线路关联 */
  24 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  25 + private Line xl;
  26 + /** 车辆关联 */
  27 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  28 + private Cars cl;
  29 + /** 人员关联(驾驶员) */
  30 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  31 + private Personnel jsy;
  32 + /** 人员关联(售票员) */
  33 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  34 + private Personnel spy;
  35 +
  36 + /** 搭班编码(TODO:估计是售票员和驾驶员搭配时使用) */
  37 + private String dbbm;
  38 +
  39 + /** 创建人 */
  40 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  41 + private SysUser createBy;
  42 + /** 修改人 */
  43 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  44 + private SysUser updateBy;
  45 +
  46 + /** 创建日期 */
  47 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  48 + private Date createDate;
  49 + /** 修改日期 */
  50 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  51 + private Date updateDate;
  52 +
  53 + public Long getId() {
  54 + return id;
  55 + }
  56 +
  57 + public void setId(Long id) {
  58 + this.id = id;
  59 + }
  60 +
  61 + public Line getXl() {
  62 + return xl;
  63 + }
  64 +
  65 + public void setXl(Line xl) {
  66 + this.xl = xl;
  67 + }
  68 +
  69 + public Cars getCl() {
  70 + return cl;
  71 + }
  72 +
  73 + public void setCl(Cars cl) {
  74 + this.cl = cl;
  75 + }
  76 +
  77 + public Personnel getJsy() {
  78 + return jsy;
  79 + }
  80 +
  81 + public void setJsy(Personnel jsy) {
  82 + this.jsy = jsy;
  83 + }
  84 +
  85 + public Personnel getSpy() {
  86 + return spy;
  87 + }
  88 +
  89 + public void setSpy(Personnel spy) {
  90 + this.spy = spy;
  91 + }
  92 +
  93 + public String getDbbm() {
  94 + return dbbm;
  95 + }
  96 +
  97 + public void setDbbm(String dbbm) {
  98 + this.dbbm = dbbm;
  99 + }
  100 +
  101 + public Date getCreateDate() {
  102 + return createDate;
  103 + }
  104 +
  105 + public void setCreateDate(Date createDate) {
  106 + this.createDate = createDate;
  107 + }
  108 +
  109 + public Date getUpdateDate() {
  110 + return updateDate;
  111 + }
  112 +
  113 + public void setUpdateDate(Date updateDate) {
  114 + this.updateDate = updateDate;
  115 + }
  116 +}
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
1 -package com.bsth.entity.schedule;  
2 -  
3 -import com.bsth.entity.Line;  
4 -  
5 -import javax.persistence.*;  
6 -import javax.persistence.Table;  
7 -import java.util.Date;  
8 -  
9 -/**  
10 - * 路牌信息。  
11 - */  
12 -@Entity  
13 -@Table(name = "bsth_c_s_gbi")  
14 -public class GuideboardInfo {  
15 -  
16 - /** 主键Id */  
17 - @Id  
18 - @GeneratedValue  
19 - private Long id;  
20 -  
21 - /** 线路关联 */  
22 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
23 - private Line xl;  
24 -  
25 - /** 路牌顺序号 */  
26 - private int lpNo;  
27 - /** 路牌名称 */  
28 - private String lpName;  
29 - /** 路牌类型(普通路牌/临加路牌) */  
30 - private String lpType;  
31 -  
32 - // 创建日期  
33 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
34 - private Date createDate;  
35 - // 修改日期  
36 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
37 - private Date updateDate;  
38 -  
39 - public Long getId() {  
40 - return id;  
41 - }  
42 -  
43 - public void setId(Long id) {  
44 - this.id = id;  
45 - }  
46 -  
47 - public Line getXl() {  
48 - return xl;  
49 - }  
50 -  
51 - public void setXl(Line xl) {  
52 - this.xl = xl;  
53 - }  
54 -  
55 - public int getLpNo() {  
56 - return lpNo;  
57 - }  
58 -  
59 - public void setLpNo(int lpNo) {  
60 - this.lpNo = lpNo;  
61 - }  
62 -  
63 - public String getLpName() {  
64 - return lpName;  
65 - }  
66 -  
67 - public void setLpName(String lpName) {  
68 - this.lpName = lpName;  
69 - }  
70 -  
71 - public String getLpType() {  
72 - return lpType;  
73 - }  
74 -  
75 - public void setLpType(String lpType) {  
76 - this.lpType = lpType;  
77 - }  
78 -  
79 - public Date getCreateDate() {  
80 - return createDate;  
81 - }  
82 -  
83 - public void setCreateDate(Date createDate) {  
84 - this.createDate = createDate;  
85 - }  
86 -  
87 - public Date getUpdateDate() {  
88 - return updateDate;  
89 - }  
90 -  
91 - public void setUpdateDate(Date updateDate) {  
92 - this.updateDate = updateDate;  
93 - }  
94 -} 1 +package com.bsth.entity.schedule;
  2 +
  3 +import com.bsth.entity.Line;
  4 +
  5 +import javax.persistence.*;
  6 +import javax.persistence.Table;
  7 +import java.util.Date;
  8 +
  9 +/**
  10 + * 路牌信息。
  11 + */
  12 +@Entity
  13 +@Table(name = "bsth_c_s_gbi")
  14 +public class GuideboardInfo {
  15 +
  16 + /** 主键Id */
  17 + @Id
  18 + @GeneratedValue
  19 + private Long id;
  20 +
  21 + /** 线路关联 */
  22 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  23 + private Line xl;
  24 +
  25 + /** 路牌顺序号 */
  26 + private int lpNo;
  27 + /** 路牌名称 */
  28 + private String lpName;
  29 + /** 路牌类型(普通路牌/临加路牌) */
  30 + private String lpType;
  31 +
  32 + // 创建日期
  33 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  34 + private Date createDate;
  35 + // 修改日期
  36 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  37 + private Date updateDate;
  38 +
  39 + public Long getId() {
  40 + return id;
  41 + }
  42 +
  43 + public void setId(Long id) {
  44 + this.id = id;
  45 + }
  46 +
  47 + public Line getXl() {
  48 + return xl;
  49 + }
  50 +
  51 + public void setXl(Line xl) {
  52 + this.xl = xl;
  53 + }
  54 +
  55 + public int getLpNo() {
  56 + return lpNo;
  57 + }
  58 +
  59 + public void setLpNo(int lpNo) {
  60 + this.lpNo = lpNo;
  61 + }
  62 +
  63 + public String getLpName() {
  64 + return lpName;
  65 + }
  66 +
  67 + public void setLpName(String lpName) {
  68 + this.lpName = lpName;
  69 + }
  70 +
  71 + public String getLpType() {
  72 + return lpType;
  73 + }
  74 +
  75 + public void setLpType(String lpType) {
  76 + this.lpType = lpType;
  77 + }
  78 +
  79 + public Date getCreateDate() {
  80 + return createDate;
  81 + }
  82 +
  83 + public void setCreateDate(Date createDate) {
  84 + this.createDate = createDate;
  85 + }
  86 +
  87 + public Date getUpdateDate() {
  88 + return updateDate;
  89 + }
  90 +
  91 + public void setUpdateDate(Date updateDate) {
  92 + this.updateDate = updateDate;
  93 + }
  94 +}
src/main/java/com/bsth/entity/schedule/SchedulePlan.java
1 -package com.bsth.entity.schedule;  
2 -  
3 -import com.bsth.entity.Line;  
4 -import com.bsth.entity.schedule.rule.ScheduleRule1;  
5 -import com.bsth.entity.sys.SysUser;  
6 -  
7 -import javax.persistence.*;  
8 -import java.util.Date;  
9 -import java.util.List;  
10 -  
11 -/**  
12 - * 排班计划。  
13 - */  
14 -@Entity  
15 -@Table(name = "bsth_c_s_sp")  
16 -public class SchedulePlan {  
17 -  
18 - /** 主键Id */  
19 - @Id  
20 - @GeneratedValue  
21 - private Long id;  
22 -  
23 - /** 关联的线路 */  
24 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
25 - private Line xl;  
26 - /** 关联的时刻表/模版 */  
27 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
28 - private TTInfo ttInfo;  
29 - /** 关联的排班规则 */  
30 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
31 - private ScheduleRule1 scheduleRule1;  
32 -  
33 - /** 排班计划的开始时间 */  
34 - private Date scheduleFromTime;  
35 - /** 排班计划的结束时间 */  
36 - private Date scheduleToTime;  
37 -  
38 - /** 操作人 */  
39 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
40 - private SysUser user;  
41 -  
42 - /** 使用中间表的一对多关联 明细信息 */  
43 - @OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
44 - @JoinTable(  
45 - name = "bsth_c_s_sp_r_info",  
46 - joinColumns = @JoinColumn(name = "sp_id"),  
47 - inverseJoinColumns = @JoinColumn(name = "sp_info_id")  
48 - )  
49 - private List<SchedulePlanInfo> schedulePlanInfoList;  
50 -  
51 - // 创建日期  
52 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
53 - private Date createDate;  
54 - // 修改日期  
55 - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
56 - private Date updateDate;  
57 -  
58 - public Long getId() {  
59 - return id;  
60 - }  
61 -  
62 - public void setId(Long id) {  
63 - this.id = id;  
64 - }  
65 -  
66 - public Line getXl() {  
67 - return xl;  
68 - }  
69 -  
70 - public void setXl(Line xl) {  
71 - this.xl = xl;  
72 - }  
73 -  
74 - public TTInfo getTtInfo() {  
75 - return ttInfo;  
76 - }  
77 -  
78 - public void setTtInfo(TTInfo ttInfo) {  
79 - this.ttInfo = ttInfo;  
80 - }  
81 -  
82 - public Date getScheduleFromTime() {  
83 - return scheduleFromTime;  
84 - }  
85 -  
86 - public void setScheduleFromTime(Date scheduleFromTime) {  
87 - this.scheduleFromTime = scheduleFromTime;  
88 - }  
89 -  
90 - public Date getScheduleToTime() {  
91 - return scheduleToTime;  
92 - }  
93 -  
94 - public void setScheduleToTime(Date scheduleToTime) {  
95 - this.scheduleToTime = scheduleToTime;  
96 - }  
97 -  
98 - public SysUser getUser() {  
99 - return user;  
100 - }  
101 -  
102 - public void setUser(SysUser user) {  
103 - this.user = user;  
104 - }  
105 -  
106 - public Date getCreateDate() {  
107 - return createDate;  
108 - }  
109 -  
110 - public void setCreateDate(Date createDate) {  
111 - this.createDate = createDate;  
112 - }  
113 -  
114 - public Date getUpdateDate() {  
115 - return updateDate;  
116 - }  
117 -  
118 - public ScheduleRule1 getScheduleRule1() {  
119 - return scheduleRule1;  
120 - }  
121 -  
122 - public void setScheduleRule1(ScheduleRule1 scheduleRule1) {  
123 - this.scheduleRule1 = scheduleRule1;  
124 - }  
125 -  
126 - public void setUpdateDate(Date updateDate) {  
127 - this.updateDate = updateDate;  
128 - }  
129 -} 1 +package com.bsth.entity.schedule;
  2 +
  3 +import com.bsth.entity.Line;
  4 +import com.bsth.entity.schedule.rule.ScheduleRule1;
  5 +import com.bsth.entity.sys.SysUser;
  6 +
  7 +import javax.persistence.*;
  8 +import java.util.Date;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * 排班计划。
  13 + */
  14 +@Entity
  15 +@Table(name = "bsth_c_s_sp")
  16 +public class SchedulePlan {
  17 +
  18 + /** 主键Id */
  19 + @Id
  20 + @GeneratedValue
  21 + private Long id;
  22 +
  23 + /** 关联的线路 */
  24 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  25 + private Line xl;
  26 + /** 关联的时刻表/模版 */
  27 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  28 + private TTInfo ttInfo;
  29 + /** 关联的排班规则 */
  30 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  31 + private ScheduleRule1 scheduleRule1;
  32 +
  33 + /** 排班计划的开始时间 */
  34 + private Date scheduleFromTime;
  35 + /** 排班计划的结束时间 */
  36 + private Date scheduleToTime;
  37 +
  38 + /** 操作人 */
  39 + @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  40 + private SysUser user;
  41 +
  42 + /** 使用中间表的一对多关联 明细信息 */
  43 + @OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  44 + @JoinTable(
  45 + name = "bsth_c_s_sp_r_info",
  46 + joinColumns = @JoinColumn(name = "sp_id"),
  47 + inverseJoinColumns = @JoinColumn(name = "sp_info_id")
  48 + )
  49 + private List<SchedulePlanInfo> schedulePlanInfoList;
  50 +
  51 + // 创建日期
  52 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  53 + private Date createDate;
  54 + // 修改日期
  55 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  56 + private Date updateDate;
  57 +
  58 + public Long getId() {
  59 + return id;
  60 + }
  61 +
  62 + public void setId(Long id) {
  63 + this.id = id;
  64 + }
  65 +
  66 + public Line getXl() {
  67 + return xl;
  68 + }
  69 +
  70 + public void setXl(Line xl) {
  71 + this.xl = xl;
  72 + }
  73 +
  74 + public TTInfo getTtInfo() {
  75 + return ttInfo;
  76 + }
  77 +
  78 + public void setTtInfo(TTInfo ttInfo) {
  79 + this.ttInfo = ttInfo;
  80 + }
  81 +
  82 + public Date getScheduleFromTime() {
  83 + return scheduleFromTime;
  84 + }
  85 +
  86 + public void setScheduleFromTime(Date scheduleFromTime) {
  87 + this.scheduleFromTime = scheduleFromTime;
  88 + }
  89 +
  90 + public Date getScheduleToTime() {
  91 + return scheduleToTime;
  92 + }
  93 +
  94 + public void setScheduleToTime(Date scheduleToTime) {
  95 + this.scheduleToTime = scheduleToTime;
  96 + }
  97 +
  98 + public SysUser getUser() {
  99 + return user;
  100 + }
  101 +
  102 + public void setUser(SysUser user) {
  103 + this.user = user;
  104 + }
  105 +
  106 + public Date getCreateDate() {
  107 + return createDate;
  108 + }
  109 +
  110 + public void setCreateDate(Date createDate) {
  111 + this.createDate = createDate;
  112 + }
  113 +
  114 + public Date getUpdateDate() {
  115 + return updateDate;
  116 + }
  117 +
  118 + public ScheduleRule1 getScheduleRule1() {
  119 + return scheduleRule1;
  120 + }
  121 +
  122 + public void setScheduleRule1(ScheduleRule1 scheduleRule1) {
  123 + this.scheduleRule1 = scheduleRule1;
  124 + }
  125 +
  126 + public void setUpdateDate(Date updateDate) {
  127 + this.updateDate = updateDate;
  128 + }
  129 +}