Commit af1ec9df87aef9f27fce4928be415baf8d339144

Authored by 王通
2 parents 78022dce 26d356d2

Merge branch 'pudong' of http://192.168.168.201:8888/panzhaov5/bsth_control into pudong

Showing 26 changed files with 2917 additions and 1714 deletions

Too many changes to show.

To preserve performance only 26 of 33 files are displayed.

README.md
1 -公交调度系统BS版 0.1  
2 -======  
3 -----------  
4 -## 目录  
5 ----------  
6 - * [字典表](#字典表)  
7 - * [动态jpa查询实现](#动态jpa查询实现)  
8 - * [车载 gps 相关数据](#gps)  
9 - * [实时gps数据接口 http](#实时gps接口)  
10 - * [进出站数据表结构](#进站数据)  
11 - * [异常警报表结构](#异常警报)  
12 - * [大间隔](#大间隔)  
13 - * [超速](#超速)  
14 - * [越界](#越界)  
15 - * [越站](#越站)  
16 - * [聚集](#聚集)  
17 - * [掉线](#掉线)  
18 - * [调度消息下发接口HTTP](#调度消息下发接口)  
19 - * [调度消息上传接口HTTP](#调度消息上传接口)  
20 - * [车辆历史GPS数据](#车辆历史GPS)  
21 -  
22 -----------  
23 -  
24 -## 字典表  
25 -----------  
26 -字典操作全部由前端负责,主要有2种。  
27 -  
28 -1、转换字典代码。  
29 - 当pjax的`pjax:success`事件被触发(片段加载完成)  
30 - 扫描容器内所有有 `$(".nt-dictionary")` 元素进行字典转换  
31 -``` html  
32 ---dom标签为span div p h1 h2 h3 h4 h5 h6 等等文本元素时,如下写法,text为要转换的代码  
33 -<span class="nt-dictionary" data-group="ScheduleType">out</span>  
34 ---to  
35 -<span>出场</span>  
36 -  
37 -<!- dom标签为input时,如下 data-code为要转换的代码 -->  
38 -<input class="nt-dictionary" data-group="ScheduleType" data-code="out">  
39 ---to  
40 -<input value="出场">  
41 -  
42 -<!- dom标签为select时 如下 data-code为要选中的项 -->  
43 -<select class="nt-dictionary" data-group="ScheduleType" data-code="out"></select>  
44 ---to  
45 -<select>  
46 - <option value="normal">正常班次</option>  
47 - <option value="out" selected>出场</option>  
48 - <option value="in">进场</option>  
49 - <option value="oil">加油</option>  
50 - <option value="temp">临加</option>  
51 - <option value="region">区间</option>  
52 - <option value="venting">放空</option>  
53 - <option value="major">放大站</option>  
54 -</select>  
55 -```  
56 -*原标签的class 除nt-dictionary 外,其余均会被保留*  
57 -  
58 -2、dictionary.js提供如下方法自行使用  
59 -| 方法名 | 参数|返回|  
60 -| ---- | ---- | ---- | ---- |  
61 -| groups (获取所有字典组) | 无| | {LineTrend: 线路走向, ScheduleType: 班次类型} |  
62 -| getByGroup (获取字典组下的字典)| (group) |{0: 上行, 1: 下行}|  
63 -| transformCode (转换字典代码)| (group, code) | 上行 |  
64 -  
65 -## 动态jpa查询实现  
66 -----------  
67 -*参考调度系统枚举com.bsth.entity.search.SearchOperator*  
68 -  
69 -  
70 -## gps  
71 -----------  
72 -### 实时gps接口  
73 -  
74 -所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/)  
75 -根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901)  
76 -  
77 -<span style="color: red">Response</span>:  
78 -```json  
79 -{  
80 - "data":[  
81 - {  
82 - "companyCode":5,  
83 - "lineId":10329,  
84 - "deviceId":"05B01901",  
85 - "carparkNo":"00000000",  
86 - "stopNo":"7C890002",  
87 - "lon":121.549866,  
88 - "lat":31.238798,  
89 - "timestamp":1397104499000,  
90 - "speed":42.0,  
91 - "direction":245.9,  
92 - "state":0,  
93 - "upDown":0  
94 - }]  
95 -}  
96 -```  
97 -  
98 -| -- | --|--|  
99 -| ---- | ---- | ---- |  
100 -| companyCode | int | 公司代码 |  
101 -| lineId | int | 线路编码 |  
102 -| deviceId | String | 设备编号 |  
103 -| carparkNo | String | 停车场编码 |  
104 -| stopNo | String | 站点编码 |  
105 -| lon | float | 经度 |  
106 -| lat | float | 纬度 |  
107 -| timestamp | long | 时间戳 |  
108 -| speed | float | 速度|  
109 -| direction | float | 方向(角度) |  
110 -| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) |  
111 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)|  
112 -  
113 -  
114 -### 进站数据  
115 -----------  
116 -表名:  
117 -  
118 -| .. | .. | .. |  
119 -| ---- | ---- | ---- |  
120 -| id | int | 主键 |  
121 -| deviceId | String | 设备号 |  
122 -| lineId | int | 线路编码 |  
123 -| stopNo | long | 站点编码 |  
124 -| timestamp | long | 时间戳 |  
125 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
126 -| createDate | Date | 创建时间 |  
127 -  
128 -  
129 -### 异常警报  
130 -----------  
131 -  
132 -### 大间隔  
133 -----------  
134 -表名:  
135 -  
136 -| .. | .. | .. |  
137 -| ---- | ---- | ---- |  
138 -| id | int | 主键 |  
139 -| line | int | 线路编码 |  
140 -| station | String | 站点编码 |  
141 -| cVehicle | String | 当前车辆编码 |  
142 -| lastVehicle | String | 上一个车辆编码 |  
143 -| interval | long | 间隔时间(秒) |  
144 -| timestamp | long | 时间戳 |  
145 -| createDate | Date | 创建时间 |  
146 -  
147 -### 超速  
148 -----------  
149 -表名:  
150 -  
151 -| .. | .. | .. |  
152 -| ---- | ---- | ---- |  
153 -| id | int | 主键 |  
154 -| vehicle | String | 车辆编码 |  
155 -| line | int | 线路编码 |  
156 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
157 -| lon | float | 经度 |  
158 -| lat | float | 纬度|  
159 -| speed | float | 速度 |  
160 -| timestamp | long | 时间戳 |  
161 -| createDate | Date | 时间 |  
162 -  
163 -### 越界  
164 -----------  
165 -表名:  
166 -  
167 -| .. | .. | .. |  
168 -| ---- | ---- | ---- |  
169 -| id | int | 主键 |  
170 -| vehicle | String | 车辆编码 |  
171 -| line | int | 线路编码 |  
172 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
173 -| lon | float | 经度 |  
174 -| lat | float | 纬度|  
175 -| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值|  
176 -| timestamp | long | 时间戳 |  
177 -| createDate | Date | 时间 |  
178 -  
179 -  
180 -### 越站  
181 -----------  
182 -表名:  
183 -  
184 -| .. | .. | .. |  
185 -| ---- | ---- | ---- |  
186 -| id | int | 主键 |  
187 -| line | int | 线路编码 |  
188 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
189 -| station | String | 站点编码 |  
190 -| vehicle | String | 车辆编码 |  
191 -| inData | Date | 进站时间 |  
192 -| outDate | Date | 出站时间 |  
193 -  
194 -  
195 -### 聚集  
196 -----------  
197 -表名:  
198 -  
199 -| .. | .. | .. |  
200 -| ---- | ---- | ---- |  
201 -| id | int | 主键 |  
202 -| line | int | 线路编码 |  
203 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
204 -| stations | String | 站点(多个用 , 号分隔。应该是连续站点) |  
205 -| vehicles | String | 车辆编码(多个用 , 号分隔) |  
206 -| timestamp | long | 时间戳 |  
207 -| createDate | Date | 时间 |  
208 -  
209 -  
210 -### 掉线  
211 -----------  
212 -表名:  
213 -  
214 -| .. | .. | .. |  
215 -| ---- | ---- | ---- |  
216 -| id | int | 主键 |  
217 -| line | int | 线路编码 |  
218 -| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |  
219 -| vehicle | String | 车辆编码 |  
220 -| lon | float | 经度 |  
221 -| lat | float | 纬度|  
222 -| timestamp | long | 时间戳 |  
223 -| createDate | Date | 时间 |  
224 -  
225 -  
226 -### 调度消息下发接口  
227 -----------  
228 -[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/)  
229 -  
230 -<span style="color: red">Request</span>:  
231 -```json  
232 -{  
233 - "deviceId":12345,  
234 - "timestamp":44324,  
235 - "operCode":0x60,  
236 - "data":{  
237 - "companyCode":22,  
238 - "deviceId":"029L2222",  
239 - "timestamp":134326,  
240 - "instructType":00,  
241 - "dispatchInstruct":0x00,  
242 - "msgId":12345,  
243 - "alarmTime":201606012000,  
244 - "serviceState":00000000,  
245 - "txtContent":"你好"  
246 - }  
247 -}  
248 -```  
249 -| .. | .. | .. |  
250 -| ---- | ---- | ---- |  
251 -| deviceId | string | 设备编号 |  
252 -| timestamp | long | 时间戳(ms) |  
253 -| operCode | short | 一级协议 |  
254 -| data.companyCode | short | 公司代码 |  
255 -| data.deviceId | string | 设备编号 |  
256 -| data.timestamp | long | 时间戳 |  
257 -| data.instructType | short | 保留 默认0 |  
258 -| data.dispatchInstruct | short | 调度指令 调度指令。0X00表示信息短语,0X01表示取消上次指令+调度指令(闹钟有效),0x02表示为调度指令(闹钟有效); 0x03表示运营状态指令(闹钟无效);0x04表示其他指令。|  
259 -| data.msgId | long | 同上 |  
260 -| data.alarmTime | long | 闹钟 MMddhhmm|  
261 -| data.serviceState | long | 多状态字节   先由车载发起车辆故障、事故报告、扣证、纠纷、加油等审请,经调度确认后,下发调度指令与运营状态。当调度指令为0X00终端需要提示信息。当调度指令为0x01和0x02,终端需要收到后提示信息。并且必须在闹钟结束后进行终端相关状态更新。在闹钟时间前120秒开始提示。当调度指令为0x03,收到后进行终端相关状态更新,终端不需要提示信息。当调度指令为0x04,暂不需要提示信息。|  
262 -| data.txtContent | string | 下发的消息文本 |  
263 -```json  
264 -{  
265 - "deviceId":12345,  
266 - "timestamp":44324,  
267 - "operCode":0x64,  
268 - "data":{  
269 - "cityCode":22,  
270 - "deviceId":"029L2222",  
271 - "lineId":"134326"  
272 - }  
273 -}  
274 -```  
275 -| .. | .. | .. |  
276 -| ---- | ---- | ---- |  
277 -| deviceId | string | 设备编号 |  
278 -| timestamp | long | 时间戳(ms) |  
279 -| operCode | short | 一级协议 |  
280 -| data.cityCode | short | 城市区号 |  
281 -| data.deviceId | string | 设备编号 |  
282 -| data.lineId | string | 线路编号 6位 不足6位前面补0 如编号890 用000890表示 |  
283 -  
284 -```json  
285 -{  
286 - "deviceId":12345,  
287 - "timestamp":44324,  
288 - "operCode":0xC0,  
289 - "data":{  
290 - "operCode":0x86,  
291 - "requestAck":0x06  
292 - }  
293 -}  
294 -```  
295 -| .. | .. | .. |  
296 -| ---- | ---- | ---- |  
297 -| deviceId | string | 设备编号 |  
298 -| timestamp | long | 时间戳(ms) |  
299 -| operCode | short | 一级协议 |  
300 -| data.operCode | short | 二级协议 |  
301 -| data.requestAck | short | 请求应答字 0x06同意 0x15不同意|  
302 -  
303 -```json  
304 -{  
305 - "deviceId":12345,  
306 - "timestamp":44324,  
307 - "operCode":0xC0,  
308 - "data":{  
309 - "operCode":0xa3,  
310 - "deviceId":12345,  
311 - "ipAddress":222.66.0.204,  
312 - "port":8899,  
313 - "reportMode":0,  
314 - "interval":0,  
315 - "distance":0,  
316 - "speedingThreshold":0,  
317 - "alarmThreshold":0,  
318 - "posIpAddress":0,  
319 - "posPort":0,  
320 - "delay":0,  
321 - "speedThreshold1":0,  
322 - "speedThreshold2":0,  
323 - "contrast":0,  
324 - "brightness":0,  
325 - "saturation":0  
326 - }  
327 -}  
328 -```  
329 -| .. | .. | .. |  
330 -| ---- | ---- | ---- |  
331 -| deviceId | string | 设备编号 |  
332 -| timestamp | long | 时间戳(ms) |  
333 -| operCode | short | 一级协议 |  
334 -| data.operCode | short | 二级协议 |  
335 -| data.deviceId | string | 设备编号|  
336 -| data.ipAddress | string | 网关IP地址|  
337 -| data.port | string | 网关端口|  
338 -| data.reportMode | short | 定时定距上报模式|  
339 -| data.interval | int | 定时上报时间间隔|  
340 -| data.distance | string | 定距上报距离间隔|  
341 -| data.speedingThreshold | short | 非线路状态超速阀门|  
342 -| data.alarmThreshold | short | 预警阀门|  
343 -| data.posIpAddress | string | pos机IP地址|  
344 -| data.posPort | string | pos机端口|  
345 -| data.delay | int | 延迟机关时间|  
346 -| data.deviceId | short | 中门视频切换到码表界面速度阀门 默认45|  
347 -| data.deviceId | short | 码表界面切换到中门视频速度阀门 默认35|  
348 -| data.deviceId | short | 对比度|  
349 -| data.deviceId | short | 亮度|  
350 -| data.deviceId | short | 饱和度|  
351 -  
352 -```json  
353 -{  
354 - "deviceId":12345,  
355 - "timestamp":44324,  
356 - "operCode":0xC0,  
357 - "data":{  
358 - "operCode":0xa4  
359 - }  
360 -}  
361 -```  
362 -| .. | .. | .. |  
363 -| ---- | ---- | ---- |  
364 -| deviceId | string | 设备编号 |  
365 -| timestamp | long | 时间戳(ms) |  
366 -| operCode | short | 一级协议 |  
367 -| data.operCode | short | 二级协议 |  
368 -  
369 -```json  
370 -{  
371 - "deviceId":12345,  
372 - "timestamp":44324,  
373 - "operCode":0xC0,  
374 - "data":{  
375 - "operCode":0xa5  
376 - "programVersion":2  
377 - }  
378 -}  
379 -```  
380 -| .. | .. | .. |  
381 -| ---- | ---- | ---- |  
382 -| deviceId | string | 设备编号 |  
383 -| timestamp | long | 时间戳(ms) |  
384 -| operCode | short | 一级协议 |  
385 -| data.operCode | short | 二级协议 |  
386 -| data.programVersion | short | 程序版本 |  
387 -  
388 -<span style="color: red">Response</span>:  
389 -```json  
390 -{  
391 - "errCode":0  
392 -}  
393 -```  
394 -  
395 -### 调度消息上传接口  
396 -----------  
397 -上行POST地址:[http://192.168.168.120:9088/control/upstream](http://192.168.168.120:9088/control/upstream)  
398 -<span style="color: red">Request</span>:  
399 -```json  
400 -{  
401 - "deviceId":12345,  
402 - "timestamp":44324,  
403 - "status":0,  
404 - "operCode":0x80,  
405 - "data":{  
406 - "operCode":0x26,  
407 - "requestCode":22  
408 - }  
409 -}  
410 -```  
411 -| .. | .. | .. |  
412 -| ---- | ---- | ---- |  
413 -| deviceId | string | 设备编号 |  
414 -| timestamp | long | 时间戳(ms) |  
415 -| status | int | 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读 |  
416 -| operCode | short | 一级协议 消息确认将无数据 |  
417 -| data.operCode | short | 二级协议 |  
418 -| data.requestCode | short | 请求代码0xa1 恢复运营 0xa2 申请调档 0xa3 出场请求 0xa5 进场请求 0xa7 加油请求 0x50 车辆故障 0x70 路阻报告 0x60 事故报告 0x11 扣证纠纷 0x12 报警 |  
419 -<span style="color: red">Response</span>:  
420 -```json  
421 -{  
422 - "errCode":0  
423 -}  
424 -```  
425 -  
426 -### 车辆历史GPS  
427 -----------  
428 -表名:BSTH_C_GPS_INFO  
429 -  
430 -| .. | .. | .. |  
431 -| ---- | ---- | ---- |  
432 -| cityCode | int | 城市代码 |  
433 -| industryCode | int | 行业代码 |  
434 -| companyCode | int | 企业代码 |  
435 -| lineId | int | 线路编号 |  
436 -| deviceId | string | 设备编号 |  
437 -| driverNo | int | 驾驶员工号 |  
438 -| carparkSerialNo | int | 停车场序列号 |  
439 -| carparkNo | string | 停车场编号 |  
440 -| stopSerialNo | int | 站点序列号 |  
441 -| stopNo | string | 停车场编号 |  
442 -| lon | float | 经度 |  
443 -| lat | float | 维度 |  
444 -| ts | long | 时间戳 |  
445 -| speedSensor | float | 发动机速度 |  
446 -| speedGps | float | gps速度 |  
447 -| direction | float | 角度0-359 |  
448 -| inTemp | int | 车内温度 |  
449 -| serviceState | long | 设备状态字 |  
450 -<<<<<<< HEAD  
451 -| daysYear | int | 对应年中的天数 为分区字段 查询一定要用此字段过滤 |  
452 -=======  
453 -| daysYear | int | 对应年中的天数 为分区字段 查询一定要用此字段过滤 |  
454 -  
455 ->>>>>>> af8ec3bedc8644f5813e9adab12a163e93cc7f50 1 +公交调度系统BS版 0.1
  2 +======
  3 +----------
  4 +## 目录
  5 +---------
  6 + * [字典表](#字典表)
  7 + * [动态jpa查询实现](#动态jpa查询实现)
  8 + * [车载 gps 相关数据](#gps)
  9 + * [实时gps数据接口 http](#实时gps接口)
  10 + * [进出站数据表结构](#进站数据)
  11 + * [异常警报表结构](#异常警报)
  12 + * [大间隔](#大间隔)
  13 + * [超速](#超速)
  14 + * [越界](#越界)
  15 + * [越站](#越站)
  16 + * [聚集](#聚集)
  17 + * [掉线](#掉线)
  18 + * [调度消息下发接口HTTP](#调度消息下发接口)
  19 + * [调度消息上传接口HTTP](#调度消息上传接口)
  20 + * [车辆历史GPS数据](#车辆历史GPS)
  21 +
  22 +----------
  23 +
  24 +## 字典表
  25 +----------
  26 +字典操作全部由前端负责,主要有2种。
  27 +
  28 +1、转换字典代码。
  29 + 当pjax的`pjax:success`事件被触发(片段加载完成)
  30 + 扫描容器内所有有 `$(".nt-dictionary")` 元素进行字典转换
  31 +``` html
  32 +--dom标签为span div p h1 h2 h3 h4 h5 h6 等等文本元素时,如下写法,text为要转换的代码
  33 +<span class="nt-dictionary" data-group="ScheduleType">out</span>
  34 +--to
  35 +<span>出场</span>
  36 +
  37 +<!- dom标签为input时,如下 data-code为要转换的代码 -->
  38 +<input class="nt-dictionary" data-group="ScheduleType" data-code="out">
  39 +--to
  40 +<input value="出场">
  41 +
  42 +<!- dom标签为select时 如下 data-code为要选中的项 -->
  43 +<select class="nt-dictionary" data-group="ScheduleType" data-code="out"></select>
  44 +--to
  45 +<select>
  46 + <option value="normal">正常班次</option>
  47 + <option value="out" selected>出场</option>
  48 + <option value="in">进场</option>
  49 + <option value="oil">加油</option>
  50 + <option value="temp">临加</option>
  51 + <option value="region">区间</option>
  52 + <option value="venting">放空</option>
  53 + <option value="major">放大站</option>
  54 +</select>
  55 +```
  56 +*原标签的class 除nt-dictionary 外,其余均会被保留*
  57 +
  58 +2、dictionary.js提供如下方法自行使用
  59 +| 方法名 | 参数|返回|
  60 +| ---- | ---- | ---- | ---- |
  61 +| groups (获取所有字典组) | 无| | {LineTrend: 线路走向, ScheduleType: 班次类型} |
  62 +| getByGroup (获取字典组下的字典)| (group) |{0: 上行, 1: 下行}|
  63 +| transformCode (转换字典代码)| (group, code) | 上行 |
  64 +
  65 +## 动态jpa查询实现
  66 +----------
  67 +*参考调度系统枚举com.bsth.entity.search.SearchOperator*
  68 +
  69 +
  70 +## gps
  71 +----------
  72 +### 实时gps接口
  73 +
  74 +所有在线GPS: [http://192.168.168.192:8080/transport_server/rtgps](http://192.168.168.192:8080/transport_server/rtgps/)
  75 +根据设备号查询:[http://192.168.168.192:8080/transport_server/rtgps/05B01901](http://192.168.168.192:8080/transport_server/rtgps/05B01901)
  76 +
  77 +<span style="color: red">Response</span>:
  78 +```json
  79 +{
  80 + "data":[
  81 + {
  82 + "companyCode":5,
  83 + "lineId":10329,
  84 + "deviceId":"05B01901",
  85 + "carparkNo":"00000000",
  86 + "stopNo":"7C890002",
  87 + "lon":121.549866,
  88 + "lat":31.238798,
  89 + "timestamp":1397104499000,
  90 + "speed":42.0,
  91 + "direction":245.9,
  92 + "state":0,
  93 + "upDown":0
  94 + }]
  95 +}
  96 +```
  97 +
  98 +| -- | --|--|
  99 +| ---- | ---- | ---- |
  100 +| companyCode | int | 公司代码 |
  101 +| lineId | int | 线路编码 |
  102 +| deviceId | String | 设备编号 |
  103 +| carparkNo | String | 停车场编码 |
  104 +| stopNo | String | 站点编码 |
  105 +| lon | float | 经度 |
  106 +| lat | float | 纬度 |
  107 +| timestamp | long | 时间戳 |
  108 +| speed | float | 速度|
  109 +| direction | float | 方向(角度) |
  110 +| state | int | 营运状态( 0 营运 ,1 非营运, -1 无效) |
  111 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效)|
  112 +
  113 +
  114 +### 进站数据
  115 +----------
  116 +表名:
  117 +
  118 +| .. | .. | .. |
  119 +| ---- | ---- | ---- |
  120 +| id | int | 主键 |
  121 +| deviceId | String | 设备号 |
  122 +| lineId | int | 线路编码 |
  123 +| stopNo | long | 站点编码 |
  124 +| timestamp | long | 时间戳 |
  125 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  126 +| createDate | Date | 创建时间 |
  127 +
  128 +
  129 +### 异常警报
  130 +----------
  131 +
  132 +### 大间隔
  133 +----------
  134 +表名:
  135 +
  136 +| .. | .. | .. |
  137 +| ---- | ---- | ---- |
  138 +| id | int | 主键 |
  139 +| line | int | 线路编码 |
  140 +| station | String | 站点编码 |
  141 +| cVehicle | String | 当前车辆编码 |
  142 +| lastVehicle | String | 上一个车辆编码 |
  143 +| interval | long | 间隔时间(秒) |
  144 +| timestamp | long | 时间戳 |
  145 +| createDate | Date | 创建时间 |
  146 +
  147 +### 超速
  148 +----------
  149 +表名:
  150 +
  151 +| .. | .. | .. |
  152 +| ---- | ---- | ---- |
  153 +| id | int | 主键 |
  154 +| vehicle | String | 车辆编码 |
  155 +| line | int | 线路编码 |
  156 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  157 +| lon | float | 经度 |
  158 +| lat | float | 纬度|
  159 +| speed | float | 速度 |
  160 +| timestamp | long | 时间戳 |
  161 +| createDate | Date | 时间 |
  162 +
  163 +### 越界
  164 +----------
  165 +表名:
  166 +
  167 +| .. | .. | .. |
  168 +| ---- | ---- | ---- |
  169 +| id | int | 主键 |
  170 +| vehicle | String | 车辆编码 |
  171 +| line | int | 线路编码 |
  172 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  173 +| lon | float | 经度 |
  174 +| lat | float | 纬度|
  175 +| location | String | 越界位置(由线调页面进行初始转换)意思是该字段默认为空,页面第一次查看时会写入值|
  176 +| timestamp | long | 时间戳 |
  177 +| createDate | Date | 时间 |
  178 +
  179 +
  180 +### 越站
  181 +----------
  182 +表名:
  183 +
  184 +| .. | .. | .. |
  185 +| ---- | ---- | ---- |
  186 +| id | int | 主键 |
  187 +| line | int | 线路编码 |
  188 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  189 +| station | String | 站点编码 |
  190 +| vehicle | String | 车辆编码 |
  191 +| inData | Date | 进站时间 |
  192 +| outDate | Date | 出站时间 |
  193 +
  194 +
  195 +### 聚集
  196 +----------
  197 +表名:
  198 +
  199 +| .. | .. | .. |
  200 +| ---- | ---- | ---- |
  201 +| id | int | 主键 |
  202 +| line | int | 线路编码 |
  203 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  204 +| stations | String | 站点(多个用 , 号分隔。应该是连续站点) |
  205 +| vehicles | String | 车辆编码(多个用 , 号分隔) |
  206 +| timestamp | long | 时间戳 |
  207 +| createDate | Date | 时间 |
  208 +
  209 +
  210 +### 掉线
  211 +----------
  212 +表名:
  213 +
  214 +| .. | .. | .. |
  215 +| ---- | ---- | ---- |
  216 +| id | int | 主键 |
  217 +| line | int | 线路编码 |
  218 +| upDown | int | 上下行(0 上行 , 1 下行 , -1 无效) |
  219 +| vehicle | String | 车辆编码 |
  220 +| lon | float | 经度 |
  221 +| lat | float | 纬度|
  222 +| timestamp | long | 时间戳 |
  223 +| createDate | Date | 时间 |
  224 +
  225 +
  226 +### 调度消息下发接口
  227 +----------
  228 +[http://192.168.168.192:8080/transport_server/message](http://192.168.168.192:8080/transport_server/message/)
  229 +
  230 +<span style="color: red">Request</span>:
  231 +```json
  232 +{
  233 + "deviceId":12345,
  234 + "timestamp":44324,
  235 + "operCode":0x60,
  236 + "data":{
  237 + "companyCode":22,
  238 + "deviceId":"029L2222",
  239 + "timestamp":134326,
  240 + "instructType":00,
  241 + "dispatchInstruct":0x00,
  242 + "msgId":12345,
  243 + "alarmTime":201606012000,
  244 + "serviceState":00000000,
  245 + "txtContent":"你好"
  246 + }
  247 +}
  248 +```
  249 +| .. | .. | .. |
  250 +| ---- | ---- | ---- |
  251 +| deviceId | string | 设备编号 |
  252 +| timestamp | long | 时间戳(ms) |
  253 +| operCode | short | 一级协议 |
  254 +| data.companyCode | short | 公司代码 |
  255 +| data.deviceId | string | 设备编号 |
  256 +| data.timestamp | long | 时间戳 |
  257 +| data.instructType | short | 保留 默认0 |
  258 +| data.dispatchInstruct | short | 调度指令 调度指令。0X00表示信息短语,0X01表示取消上次指令+调度指令(闹钟有效),0x02表示为调度指令(闹钟有效); 0x03表示运营状态指令(闹钟无效);0x04表示其他指令。|
  259 +| data.msgId | long | 同上 |
  260 +| data.alarmTime | long | 闹钟 MMddhhmm|
  261 +| data.serviceState | long | 多状态字节   先由车载发起车辆故障、事故报告、扣证、纠纷、加油等审请,经调度确认后,下发调度指令与运营状态。当调度指令为0X00终端需要提示信息。当调度指令为0x01和0x02,终端需要收到后提示信息。并且必须在闹钟结束后进行终端相关状态更新。在闹钟时间前120秒开始提示。当调度指令为0x03,收到后进行终端相关状态更新,终端不需要提示信息。当调度指令为0x04,暂不需要提示信息。|
  262 +| data.txtContent | string | 下发的消息文本 |
  263 +```json
  264 +{
  265 + "deviceId":12345,
  266 + "timestamp":44324,
  267 + "operCode":0x64,
  268 + "data":{
  269 + "cityCode":22,
  270 + "deviceId":"029L2222",
  271 + "lineId":"134326"
  272 + }
  273 +}
  274 +```
  275 +| .. | .. | .. |
  276 +| ---- | ---- | ---- |
  277 +| deviceId | string | 设备编号 |
  278 +| timestamp | long | 时间戳(ms) |
  279 +| operCode | short | 一级协议 |
  280 +| data.cityCode | short | 城市区号 |
  281 +| data.deviceId | string | 设备编号 |
  282 +| data.lineId | string | 线路编号 6位 不足6位前面补0 如编号890 用000890表示 |
  283 +
  284 +```json
  285 +{
  286 + "deviceId":12345,
  287 + "timestamp":44324,
  288 + "operCode":0xC0,
  289 + "data":{
  290 + "operCode":0x86,
  291 + "requestAck":0x06
  292 + }
  293 +}
  294 +```
  295 +| .. | .. | .. |
  296 +| ---- | ---- | ---- |
  297 +| deviceId | string | 设备编号 |
  298 +| timestamp | long | 时间戳(ms) |
  299 +| operCode | short | 一级协议 |
  300 +| data.operCode | short | 二级协议 |
  301 +| data.requestAck | short | 请求应答字 0x06同意 0x15不同意|
  302 +
  303 +```json
  304 +{
  305 + "deviceId":12345,
  306 + "timestamp":44324,
  307 + "operCode":0xC0,
  308 + "data":{
  309 + "operCode":0xa3,
  310 + "deviceId":12345,
  311 + "ipAddress":222.66.0.204,
  312 + "port":8899,
  313 + "reportMode":0,
  314 + "interval":0,
  315 + "distance":0,
  316 + "speedingThreshold":0,
  317 + "alarmThreshold":0,
  318 + "posIpAddress":0,
  319 + "posPort":0,
  320 + "delay":0,
  321 + "speedThreshold1":0,
  322 + "speedThreshold2":0,
  323 + "contrast":0,
  324 + "brightness":0,
  325 + "saturation":0
  326 + }
  327 +}
  328 +```
  329 +| .. | .. | .. |
  330 +| ---- | ---- | ---- |
  331 +| deviceId | string | 设备编号 |
  332 +| timestamp | long | 时间戳(ms) |
  333 +| operCode | short | 一级协议 |
  334 +| data.operCode | short | 二级协议 |
  335 +| data.deviceId | string | 设备编号|
  336 +| data.ipAddress | string | 网关IP地址|
  337 +| data.port | string | 网关端口|
  338 +| data.reportMode | short | 定时定距上报模式|
  339 +| data.interval | int | 定时上报时间间隔|
  340 +| data.distance | string | 定距上报距离间隔|
  341 +| data.speedingThreshold | short | 非线路状态超速阀门|
  342 +| data.alarmThreshold | short | 预警阀门|
  343 +| data.posIpAddress | string | pos机IP地址|
  344 +| data.posPort | string | pos机端口|
  345 +| data.delay | int | 延迟机关时间|
  346 +| data.deviceId | short | 中门视频切换到码表界面速度阀门 默认45|
  347 +| data.deviceId | short | 码表界面切换到中门视频速度阀门 默认35|
  348 +| data.deviceId | short | 对比度|
  349 +| data.deviceId | short | 亮度|
  350 +| data.deviceId | short | 饱和度|
  351 +
  352 +```json
  353 +{
  354 + "deviceId":12345,
  355 + "timestamp":44324,
  356 + "operCode":0xC0,
  357 + "data":{
  358 + "operCode":0xa4
  359 + }
  360 +}
  361 +```
  362 +| .. | .. | .. |
  363 +| ---- | ---- | ---- |
  364 +| deviceId | string | 设备编号 |
  365 +| timestamp | long | 时间戳(ms) |
  366 +| operCode | short | 一级协议 |
  367 +| data.operCode | short | 二级协议 |
  368 +
  369 +```json
  370 +{
  371 + "deviceId":12345,
  372 + "timestamp":44324,
  373 + "operCode":0xC0,
  374 + "data":{
  375 + "operCode":0xa5
  376 + "programVersion":2
  377 + }
  378 +}
  379 +```
  380 +| .. | .. | .. |
  381 +| ---- | ---- | ---- |
  382 +| deviceId | string | 设备编号 |
  383 +| timestamp | long | 时间戳(ms) |
  384 +| operCode | short | 一级协议 |
  385 +| data.operCode | short | 二级协议 |
  386 +| data.programVersion | short | 程序版本 |
  387 +
  388 +<span style="color: red">Response</span>:
  389 +```json
  390 +{
  391 + "errCode":0
  392 +}
  393 +```
  394 +
  395 +### 调度消息上传接口
  396 +----------
  397 +上行POST地址:[http://192.168.168.120:9088/control/upstream](http://192.168.168.120:9088/control/upstream)
  398 +<span style="color: red">Request</span>:
  399 +```json
  400 +{
  401 + "deviceId":12345,
  402 + "timestamp":44324,
  403 + "status":0,
  404 + "operCode":0x80,
  405 + "data":{
  406 + "operCode":0x26,
  407 + "requestCode":22
  408 + }
  409 +}
  410 +```
  411 +| .. | .. | .. |
  412 +| ---- | ---- | ---- |
  413 +| deviceId | string | 设备编号 |
  414 +| timestamp | long | 时间戳(ms) |
  415 +| status | int | 0x80时无数据 0表示失败 1表示成功或设备确认 2表示驾驶员阅读 |
  416 +| operCode | short | 一级协议 消息确认将无数据 |
  417 +| data.operCode | short | 二级协议 |
  418 +| data.requestCode | short | 请求代码0xa1 恢复运营 0xa2 申请调档 0xa3 出场请求 0xa5 进场请求 0xa7 加油请求 0x50 车辆故障 0x70 路阻报告 0x60 事故报告 0x11 扣证纠纷 0x12 报警 |
  419 +<span style="color: red">Response</span>:
  420 +```json
  421 +{
  422 + "errCode":0
  423 +}
  424 +```
  425 +
  426 +### 车辆历史GPS
  427 +----------
  428 +表名:BSTH_C_GPS_INFO
  429 +
  430 +| .. | .. | .. |
  431 +| ---- | ---- | ---- |
  432 +| cityCode | int | 城市代码 |
  433 +| industryCode | int | 行业代码 |
  434 +| companyCode | int | 企业代码 |
  435 +| lineId | int | 线路编号 |
  436 +| deviceId | string | 设备编号 |
  437 +| driverNo | int | 驾驶员工号 |
  438 +| carparkSerialNo | int | 停车场序列号 |
  439 +| carparkNo | string | 停车场编号 |
  440 +| stopSerialNo | int | 站点序列号 |
  441 +| stopNo | string | 停车场编号 |
  442 +| lon | float | 经度 |
  443 +| lat | float | 维度 |
  444 +| ts | long | 时间戳 |
  445 +| speedSensor | float | 发动机速度 |
  446 +| speedGps | float | gps速度 |
  447 +| direction | float | 角度0-359 |
  448 +| inTemp | int | 车内温度 |
  449 +| serviceState | long | 设备状态字 |
  450 +| daysYear | int | 对应年中的天数 为分区字段 查询一定要用此字段过滤 |
  451 +
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
1 -package com.bsth.controller.realcontrol;  
2 -  
3 -import java.io.ByteArrayOutputStream;  
4 -import java.io.IOException;  
5 -import java.io.InputStream;  
6 -import java.io.OutputStream;  
7 -import java.net.HttpURLConnection;  
8 -import java.net.URL;  
9 -import java.util.ArrayList;  
10 -import java.util.Collection;  
11 -import java.util.HashMap;  
12 -import java.util.List;  
13 -import java.util.Map;  
14 -  
15 -import org.apache.commons.io.IOUtils;  
16 -import org.apache.commons.lang3.StringEscapeUtils;  
17 -import org.joda.time.format.DateTimeFormat;  
18 -import org.joda.time.format.DateTimeFormatter;  
19 -import org.springframework.beans.factory.annotation.Autowired;  
20 -import org.springframework.web.bind.annotation.PathVariable;  
21 -import org.springframework.web.bind.annotation.RequestMapping;  
22 -import org.springframework.web.bind.annotation.RequestMethod;  
23 -import org.springframework.web.bind.annotation.RequestParam;  
24 -import org.springframework.web.bind.annotation.RestController;  
25 -  
26 -import com.alibaba.fastjson.JSONArray;  
27 -import com.bsth.common.ResponseCode;  
28 -import com.bsth.controller.BaseController;  
29 -import com.bsth.controller.realcontrol.dto.ChangePersonCar;  
30 -import com.bsth.controller.realcontrol.dto.DfsjChange;  
31 -import com.bsth.data.BasicData;  
32 -import com.bsth.data.schedule.DayOfSchedule;  
33 -import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;  
34 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
35 -import com.bsth.entity.schedule.SchedulePlanInfo;  
36 -import com.bsth.entity.sys.SysUser;  
37 -import com.bsth.security.util.SecurityUtils;  
38 -import com.bsth.service.realcontrol.ScheduleRealInfoService;  
39 -import com.bsth.util.ConfigUtil;  
40 -import com.fasterxml.jackson.databind.ObjectMapper;  
41 -  
42 -@RestController  
43 -@RequestMapping("/realSchedule")  
44 -public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> {  
45 -  
46 - @Autowired  
47 - ScheduleRealInfoService scheduleRealInfoService;  
48 -  
49 - @Autowired  
50 - DayOfSchedule dayOfSchedule;  
51 -  
52 - @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST)  
53 - public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){  
54 - return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm);  
55 - }  
56 -  
57 - @RequestMapping(value = "/lines")  
58 - public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) {  
59 - return scheduleRealInfoService.findByLines(lines);  
60 - }  
61 -  
62 - @RequestMapping(value = "/car")  
63 - public List<ScheduleRealInfo> findByCar(String nbbm){  
64 - return dayOfSchedule.findByNbbm(nbbm);  
65 - }  
66 -  
67 - /**  
68 - *  
69 - * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id  
70 - * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws  
71 - */  
72 - @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)  
73 - public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,  
74 - @RequestParam String dfsj,String bcType,  
75 - @RequestParam(defaultValue = "") String opType) {  
76 - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null);  
77 - }  
78 -  
79 - /**  
80 - *  
81 - * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔  
82 - */  
83 - @RequestMapping(value = "/destroy", method = RequestMethod.POST)  
84 - public Map<String, Object> destroy(@RequestParam String idsStr  
85 - /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,  
86 - @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) {  
87 - return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null);  
88 - }  
89 -  
90 - /**  
91 - *  
92 - * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws  
93 - */  
94 - @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET)  
95 - public Map<String, String> carDeviceMapp() {  
96 - return BasicData.deviceId2NbbmMap.inverse();  
97 - }  
98 -  
99 - /**  
100 - *  
101 - * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param  
102 - * lineId @throws  
103 - */  
104 - @RequestMapping(value = "/driver", method = RequestMethod.GET)  
105 - public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) {  
106 - return scheduleRealInfoService.findDriverByLine(lineCode);  
107 - }  
108 -  
109 - /**  
110 - *  
111 - * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param  
112 - * lineId @throws  
113 - */  
114 - @RequestMapping(value = "/conductor", method = RequestMethod.GET)  
115 - public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) {  
116 - return scheduleRealInfoService.findConductorByLine(lineCode);  
117 - }  
118 -  
119 - /**  
120 - *  
121 - * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param  
122 - * lineId @throws  
123 - */  
124 - @RequestMapping(value = "/cars", method = RequestMethod.GET)  
125 - public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) {  
126 - return scheduleRealInfoService.findCarByLine(lineCode);  
127 - }  
128 -  
129 - /**  
130 - *  
131 - * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws  
132 - */  
133 - @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET)  
134 - public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) {  
135 - return scheduleRealInfoService.sreachVehic(nbbm);  
136 - }  
137 - /**  
138 - *  
139 - * @Title: realOutAdjust  
140 - * @Description: TODO(实发调整)  
141 - * @param @param id 班次ID  
142 - * @param @param fcsjActual 实际发车时间 HH:mm  
143 - * @param @param remarks 备注  
144 - * @throws  
145 - */  
146 - @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST)  
147 - public Map<String, Object> realOutAdjust(@RequestParam Long id, @RequestParam String fcsjActual,  
148 - @RequestParam String remarks) {  
149 - return scheduleRealInfoService.realOutAdjust(id, fcsjActual, remarks);  
150 - }  
151 -  
152 - /**  
153 - *  
154 - * @Title: revokeDestroy  
155 - * @Description: TODO(撤销烂班)  
156 - * @param @param id  
157 - * @throws  
158 - */  
159 - @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST)  
160 - public Map<String, Object> revokeDestroy(@RequestParam Long id){  
161 - return scheduleRealInfoService.revokeDestroy(id);  
162 - }  
163 -  
164 - /**  
165 - *  
166 - * @Title: revokeRealOutgo  
167 - * @Description: TODO(撤销实发)  
168 - * @param @param id  
169 - * @throws  
170 - */  
171 - @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST)  
172 - public Map<String, Object> revokeRealOutgo(@RequestParam Long id){  
173 - return scheduleRealInfoService.revokeRealOutgo(id);  
174 - }  
175 -  
176 - /**  
177 - * 撤销执行  
178 - * @param id  
179 - * @return  
180 - */  
181 - @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST)  
182 - public Map<String, Object> revokeRealArrive(@RequestParam Long id){  
183 - return scheduleRealInfoService.revokeRealArrive(id);  
184 - }  
185 -  
186 - /**  
187 - *  
188 - * @Title: spaceAdjust  
189 - * @Description: TODO(间隔调整)  
190 - * @param @param ids 要调整的班次数组ID  
191 - * @param @param space 间隔  
192 - * @throws  
193 - */  
194 - @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST)  
195 - public Map<String, Object> spaceAdjust(Long[] ids, Integer space){  
196 - return scheduleRealInfoService.spaceAdjust(ids, space);  
197 - }  
198 -  
199 - /**  
200 - *  
201 - * @Title: schInfoFineTune  
202 - * @Description: TODO(发车信息微调)  
203 - * @param @param map  
204 - * @throws  
205 - */  
206 - @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)  
207 - public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){  
208 - return scheduleRealInfoService.schInfoFineTune(map);  
209 - }  
210 -  
211 - /**  
212 - *  
213 - * @Title: outgoAdjustAll  
214 - * @Description: TODO(批量待发调整)  
215 - * @param @param list  
216 - * @throws  
217 - */  
218 - @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST)  
219 - public Map<String, Object> outgoAdjustAll(@RequestParam String params){  
220 - //反转义  
221 - params = StringEscapeUtils.unescapeHtml4(params);  
222 - return scheduleRealInfoService.outgoAdjustAll(params);  
223 - }  
224 -  
225 - /**  
226 - *  
227 - * @Title: findByLineAndUpDown  
228 - * @Description: TODO(根据线路和走向获取班次)  
229 - * @param @param line  
230 - * @param @param upDown  
231 - */  
232 - @RequestMapping(value = "/findByLineAndUpDown")  
233 - public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){  
234 - return dayOfSchedule.findByLineAndUpDown(line, upDown);  
235 - }  
236 -  
237 - /**  
238 - *  
239 - * @Title: findRouteByLine  
240 - * @Description: TODO(获取线路的站点,路段路由)  
241 - * @param @param lineCode  
242 - * @throws  
243 - */  
244 - @RequestMapping(value = "/findRouteByLine")  
245 - public Map<String, Object> findRouteByLine(@RequestParam String lineCode){  
246 - return scheduleRealInfoService.findRouteByLine(lineCode);  
247 - }  
248 -  
249 - /**  
250 - *  
251 - * @Title: removeChildTask  
252 - * @Description: TODO(删除子任务)  
253 - * @param @param taskId 子任务ID  
254 - * @throws  
255 - */  
256 - @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE)  
257 - public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){  
258 - return scheduleRealInfoService.removeChildTask(taskId);  
259 - }  
260 -  
261 - /**  
262 - *  
263 - * @Title: findByLineCode  
264 - * @Description: TODO(根据线路获取班次信息)  
265 - * @param @param lineCode  
266 - */  
267 - @RequestMapping(value = "/lineCode/{lineCode}")  
268 - public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){  
269 - return dayOfSchedule.findByLineCode(lineCode);  
270 - }  
271 -  
272 - @RequestMapping(value = "/queryUserInfo")  
273 - public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line,  
274 - @RequestParam String date,@RequestParam String state) {  
275 - return scheduleRealInfoService.queryUserInfo(line, date,state);  
276 - }  
277 -  
278 - @RequestMapping(value = "/queryUserInfoPx")  
279 - public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line,  
280 - @RequestParam String date,@RequestParam String state,@RequestParam String type) {  
281 - return scheduleRealInfoService.queryUserInfoPx(line, date,state,type);  
282 - }  
283 -  
284 - @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET)  
285 - public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName, @RequestParam String clZbh,  
286 - @RequestParam String lpName,@RequestParam String date,@RequestParam String line) {  
287 - return scheduleRealInfoService.exportWaybill(jName, clZbh, lpName,date,line);  
288 - }  
289 -  
290 - @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET)  
291 - public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh  
292 - ,@RequestParam String date,@RequestParam String line) {  
293 - return scheduleRealInfoService.exportWaybillQp( clZbh, date,line);  
294 - }  
295 -  
296 -  
297 - @RequestMapping(value = "/dailyInfo")  
298 - public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) {  
299 - return scheduleRealInfoService.dailyInfo(line, date, type);  
300 - }  
301 -  
302 - @RequestMapping(value = "/historyMessage")  
303 - public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date,  
304 - @RequestParam String code, @RequestParam String type) {  
305 - return scheduleRealInfoService.historyMessage(line, date, code, type);  
306 - }  
307 -  
308 - @RequestMapping(value="/findLine")  
309 - public List<Map<String,String>> findLine(@RequestParam String line){  
310 - return scheduleRealInfoService.findLine(line);  
311 - }  
312 -  
313 - @RequestMapping(value="/findKMBC",method = RequestMethod.GET)  
314 - public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName  
315 - ,@RequestParam String date,@RequestParam String line){  
316 - return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line);  
317 - }  
318 -  
319 - /**  
320 - * 路单公里统计 (闵行审计专用)  
321 - * @param jGh  
322 - * @param clZbh  
323 - * @param lpName  
324 - * @param date  
325 - * @param line  
326 - * @return  
327 - */  
328 - @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET)  
329 - public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName  
330 - ,@RequestParam String date,@RequestParam String line){  
331 - return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line);  
332 - }  
333 -  
334 - @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET)  
335 - public Map<String,Object> findKMBCQp(@RequestParam String clZbh  
336 - ,@RequestParam String date,@RequestParam String line){  
337 - return scheduleRealInfoService.findKMBCQp(clZbh,date,line);  
338 - }  
339 -  
340 - @RequestMapping(value="/findLpName")  
341 - public List<Map<String,String>> findLpName(@RequestParam String lpName){  
342 - return scheduleRealInfoService.findLpName(lpName);  
343 - }  
344 -  
345 - @RequestMapping(value = "/account")  
346 - public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date,  
347 - @RequestParam String code,@RequestParam String xlName, @RequestParam String type) {  
348 - return scheduleRealInfoService.account(line, date, code, xlName, type);  
349 - }  
350 -  
351 - @RequestMapping(value = "/accountPx")  
352 - public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date,  
353 - @RequestParam String code,@RequestParam String xlName, @RequestParam String px) {  
354 - return scheduleRealInfoService.accountPx(line, date, code, xlName, px);  
355 - }  
356 -  
357 - @RequestMapping(value = "/correctForm")  
358 - public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,  
359 - @RequestParam String endDate,  
360 - @RequestParam String lpName, @RequestParam String code,  
361 - @RequestParam String type,@RequestParam String changType) {  
362 - return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType);  
363 - }  
364 - /**  
365 - * @Title queryListWaybill  
366 - * @Description 查询行车路单列表  
367 - * @param jName 驾驶员名字  
368 - * @param clZbh 车辆自编号(内部编号)  
369 - * @param lpName 路牌  
370 - * @return  
371 - */  
372 - @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET)  
373 - public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName  
374 - ,@RequestParam String date,@RequestParam String line){  
375 - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,line);  
376 - }  
377 -  
378 - /**  
379 - * @Title queryListWaybill  
380 - * @Description 查询行车路单列表(闵行审计专用路单)  
381 - * @param jName 驾驶员名字  
382 - * @param clZbh 车辆自编号(内部编号)  
383 - * @param lpName 路牌  
384 - * @return  
385 - */  
386 - @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET)  
387 - public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName  
388 - ,@RequestParam String date,@RequestParam String line){  
389 - return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line);  
390 - }  
391 -  
392 - @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET)  
393 - public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh,  
394 - @RequestParam String date,@RequestParam String line){  
395 - return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line);  
396 - }  
397 -  
398 - @RequestMapping(value="/statisticsDaily")  
399 - public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date,  
400 - @RequestParam String xlName, @RequestParam String type){  
401 - return scheduleRealInfoService.statisticsDaily(line, date, xlName, type);  
402 - }  
403 -  
404 - @RequestMapping(value="/statisticsDaily_mh_2")  
405 - public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date,  
406 - @RequestParam String xlName, @RequestParam String type){  
407 - return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type);  
408 - }  
409 -  
410 - @RequestMapping(value="/statisticsDailyTj")  
411 - public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){  
412 - String gsdm="";  
413 - if(map.get("gsdm")!=null){  
414 - gsdm=map.get("gsdm").toString();  
415 - }  
416 - String fgsdm="";  
417 - if(map.get("fgsdm")!=null){  
418 - fgsdm=map.get("fgsdm").toString();  
419 - }  
420 - String line="";  
421 - if(map.get("line")!=null){  
422 - line=map.get("line").toString();  
423 - }  
424 - String date="";  
425 - if(map.get("date")!=null){  
426 - date=map.get("date").toString();  
427 - }  
428 - String date2="";  
429 - if(map.get("date2")!=null){  
430 - date2=map.get("date2").toString();  
431 - }  
432 - String xlName="";  
433 - if(map.get("xlName")!=null){  
434 - xlName=map.get("xlName").toString();  
435 - }  
436 - String type="";  
437 - if(map.get("type")!=null){  
438 - type=map.get("type").toString();  
439 - }  
440 - String nature="0";  
441 - if(map.get("nature")!=null){  
442 - nature=map.get("nature").toString();  
443 - }  
444 - return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature);  
445 - }  
446 -  
447 - /*  
448 - * 公里修正报表  
449 - */  
450 - @RequestMapping(value="/mileageReportTj")  
451 - public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){  
452 - String gsdm="";  
453 - if(map.get("gsdm")!=null){  
454 - gsdm=map.get("gsdm").toString();  
455 - }  
456 - String fgsdm="";  
457 - if(map.get("fgsdm")!=null){  
458 - fgsdm=map.get("fgsdm").toString();  
459 - }  
460 - String line="";  
461 - if(map.get("line")!=null){  
462 - line=map.get("line").toString();  
463 - }  
464 - String date="";  
465 - if(map.get("date")!=null){  
466 - date=map.get("date").toString();  
467 - }  
468 - String date2="";  
469 - if(map.get("date2")!=null){  
470 - date2=map.get("date2").toString();  
471 - }  
472 - String xlName="";  
473 - if(map.get("xlName")!=null){  
474 - xlName=map.get("xlName").toString();  
475 - }  
476 - return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2);  
477 - }  
478 -  
479 - /*  
480 - * 班次修正报表  
481 - */  
482 - @RequestMapping(value="/scheduleCorrectionReport")  
483 - public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){  
484 - String gsdm="";  
485 - if(map.get("gsdm")!=null){  
486 - gsdm=map.get("gsdm").toString();  
487 - }  
488 - String fgsdm="";  
489 - if(map.get("fgsdm")!=null){  
490 - fgsdm=map.get("fgsdm").toString();  
491 - }  
492 - String line="";  
493 - if(map.get("line")!=null){  
494 - line=map.get("line").toString();  
495 - }  
496 - String date="";  
497 - if(map.get("date")!=null){  
498 - date=map.get("date").toString();  
499 - }  
500 - String date2="";  
501 - if(map.get("date2")!=null){  
502 - date2=map.get("date2").toString();  
503 - }  
504 - String xlName="";  
505 - if(map.get("xlName")!=null){  
506 - xlName=map.get("xlName").toString();  
507 - }  
508 - return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2);  
509 - }  
510 -  
511 - @RequestMapping(value="/MapById",method = RequestMethod.GET)  
512 - public Map<String, Object> MapById(@RequestParam("id") Long id){  
513 - return scheduleRealInfoService.MapById(id);  
514 - }  
515 -  
516 - @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET)  
517 - public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){  
518 - return scheduleRealInfoService.MapByIdQp(id);  
519 - }  
520 -  
521 - /**  
522 - * @Title: scheduleDaily  
523 - * @Description: TODO(调度日报表)  
524 - * @param line 线路  
525 - * @param date 时间  
526 - * @return  
527 - */  
528 - @RequestMapping(value="/scheduleDaily")  
529 - public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){  
530 - return scheduleRealInfoService.scheduleDaily(line,date);  
531 - }  
532 -  
533 - @RequestMapping(value="/realScheduleList")  
534 - public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){  
535 - return scheduleRealInfoService.realScheduleList(line,date);  
536 - }  
537 -  
538 - @RequestMapping(value="/realScheduleList_zrw")  
539 - public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){  
540 - return scheduleRealInfoService.realScheduleList_zrw(line,date);  
541 - }  
542 -  
543 - @RequestMapping(value="/realScheduleList_mh_2")  
544 - public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){  
545 - return scheduleRealInfoService.realScheduleList_mh_2(line,date);  
546 - }  
547 -  
548 - @RequestMapping(value="/realScheduleListQp")  
549 - public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){  
550 - return scheduleRealInfoService.realScheduleListQp(line,date);  
551 - }  
552 -  
553 - @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)  
554 - public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){  
555 - cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);  
556 - List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class);  
557 - return scheduleRealInfoService.multi_tzrc(cpcs, null);  
558 - }  
559 -  
560 - @RequestMapping(value="/multi_dftz", method=RequestMethod.POST)  
561 - public Map<String, Object> multi_dftz(@RequestParam String dcsJson){  
562 - dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson);  
563 - List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class);  
564 - return scheduleRealInfoService.multi_dftz(dfsjcs);  
565 - }  
566 -  
567 - @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST)  
568 - public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){  
569 - return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName);  
570 - }  
571 -  
572 - @RequestMapping(value="/history", method=RequestMethod.POST)  
573 - public Map<String,Object> historySave(ScheduleRealInfo sch){  
574 - return scheduleRealInfoService.historySave(sch);  
575 - }  
576 -  
577 -  
578 - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");  
579 - private final static long ONE_DAY = 1000 * 60 * 60 * 24;  
580 - /**  
581 - * 获取可编辑的历史班次日期  
582 - * @return  
583 - */  
584 - @RequestMapping("dateArray")  
585 - public List<String> dateArray(@RequestParam(defaultValue = "0") int c){  
586 - List<String> rs = new ArrayList<>();  
587 -  
588 - long t = System.currentTimeMillis();  
589 - if(c != 1)  
590 - t -= (ONE_DAY + (1000 * 60 * 60 * 6));  
591 - for(int i = 0; i < 3; i ++){  
592 - rs.add(fmtyyyyMMdd.print(t));  
593 - t -= ONE_DAY;  
594 - }  
595 - return rs;  
596 - }  
597 -  
598 - @RequestMapping(value = "svgAttr", method = RequestMethod.POST)  
599 - public Map<String, Object> svgAttr(@RequestParam String jsonStr){  
600 - return scheduleRealInfoService.svgAttr(jsonStr);  
601 - }  
602 -  
603 - @RequestMapping(value = "svgAttr", method = RequestMethod.GET)  
604 - public Map<String, Object> findSvgAttr(@RequestParam String idx){  
605 - return scheduleRealInfoService.findSvgAttr(idx);  
606 - }  
607 -  
608 - @RequestMapping(value = "addRemarks", method = RequestMethod.POST)  
609 - public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){  
610 - return scheduleRealInfoService.addRemarks(id, remarks);  
611 - }  
612 -  
613 - @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET)  
614 - public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){  
615 - return scheduleRealInfoService.scheduleDailyQp(line,date);  
616 - }  
617 -  
618 - @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET)  
619 - public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){  
620 - return scheduleRealInfoService.scheduleDailyExport(map);  
621 - }  
622 -  
623 - @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET)  
624 - public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){  
625 - return scheduleRealInfoService.exportWaybillMore(map);  
626 - }  
627 -  
628 - /**  
629 - * 获取当日计划排班 , 从计划表抓取数据  
630 - * @return  
631 - */  
632 - @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET)  
633 - public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){  
634 - return scheduleRealInfoService.currentSchedulePlan(lineCode);  
635 - }  
636 -  
637 - @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST)  
638 - public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){  
639 - return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type);  
640 - }  
641 -  
642 - /**  
643 - * 删除当日实际排班  
644 - * @return  
645 - */  
646 - @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST)  
647 - public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){  
648 - return dayOfSchedule.deleteRealSchedule(lineCode);  
649 - }  
650 -  
651 - /**  
652 - * 从计划表重新加载当日排班  
653 - * @param lineCode  
654 - * @return  
655 - */  
656 - @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST)  
657 - public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){  
658 - Map<String, Object> rs = new HashMap<>();  
659 - List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode);  
660 - if(list != null && list.size() > 0){  
661 - rs.put("status", ResponseCode.ERROR);  
662 - rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。");  
663 - return rs;  
664 - }  
665 -  
666 - int code = dayOfSchedule.reloadSch(lineCode);  
667 -  
668 - //重新按公司编码索引数据  
669 - dayOfSchedule.groupByGsbm();  
670 - rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR);  
671 - return rs;  
672 - }  
673 -  
674 - /**  
675 - * 误点调整  
676 - * @param idx  
677 - * @param minute  
678 - * @return  
679 - */  
680 - @RequestMapping(value = "lateAdjust", method = RequestMethod.POST)  
681 - public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){  
682 - return scheduleRealInfoService.lateAdjust(idx, minute);  
683 - }  
684 -  
685 - /**  
686 - * 获取所有应发未到的班次  
687 - * @param idx  
688 - * @return  
689 - */  
690 - @RequestMapping(value = "allLate2")  
691 - public List<ScheduleRealInfo> allLate2(@RequestParam String idx){  
692 - return scheduleRealInfoService.allLate2(idx);  
693 - }  
694 -  
695 - /**  
696 - * 添加一个临加到历史库  
697 - * @param sch  
698 - * @return  
699 - */  
700 - @RequestMapping(value = "history/add", method = RequestMethod.POST)  
701 - public Map<String, Object> addToHistory(ScheduleRealInfo sch){  
702 - return scheduleRealInfoService.addToHistory(sch);  
703 - }  
704 -  
705 - /**  
706 - * 从历史库里删除临加班次  
707 - * @param sch  
708 - * @return  
709 - */  
710 - @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)  
711 - public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){  
712 - return scheduleRealInfoService.deleteToHistory(id);  
713 - }  
714 -  
715 - /**  
716 - * 从历史库里删除临加班次  
717 - * @param sch  
718 - * @return  
719 - */  
720 - @RequestMapping(value = "wxsb", method = RequestMethod.POST)  
721 - public Map<String, Object> deleteToHistory(@RequestParam Map<String, Object> param){  
722 - SysUser user = SecurityUtils.getCurrentUser();  
723 - String uname = user.getUserName();  
724 - StringBuilder url = new StringBuilder(ConfigUtil.get("http.report.url"));  
725 - url.append("?nbbm=").append(param.get("nbbm")).append("&bxy=").append(uname).append("&bxbm=").append(param.get("bxType"));  
726 - // 分公司保存格式 分公司编码_公司编码  
727 - String val = BasicData.nbbm2FgsCompanyCodeMap.get(param.get("nbbm"));  
728 - String[] arr = val.split("_");  
729 - if (!"22".equals(arr[1])) {  
730 - Map<String, Object> res = new HashMap<String, Object>();  
731 - res.put("status", ResponseCode.ERROR);  
732 - res.put("msg", "除金高公司外暂未开通此功能");  
733 -  
734 - return res;  
735 - }  
736 - url.append("&fgs=").append(arr[0]);  
737 -  
738 - return request(url.toString());  
739 - }  
740 -  
741 - @SuppressWarnings("unchecked")  
742 - private static Map<String, Object> request(String url) {  
743 - Map<String, Object> res = new HashMap<String, Object>();  
744 - res.put("status", ResponseCode.SUCCESS);  
745 - InputStream in = null;  
746 - HttpURLConnection con = null;  
747 - try {  
748 - con = (HttpURLConnection)new URL(url).openConnection();  
749 - con.setRequestMethod("POST");  
750 - con.setRequestProperty("keep-alive", "true");  
751 - con.setRequestProperty("accept", "application/json");  
752 - con.setRequestProperty("content-type", "application/json");  
753 - con.setDoInput(true);  
754 - con.setReadTimeout(2500);  
755 - con.setConnectTimeout(2500);  
756 -  
757 - con.connect();  
758 - if (con.getResponseCode() == 200) {  
759 - in = con.getInputStream();  
760 - ByteArrayOutputStream bout = new ByteArrayOutputStream();  
761 - IOUtils.copy(in, bout); bout.close();  
762 - Map<String, Object> response = new ObjectMapper().readValue(bout.toByteArray(), Map.class);  
763 - if (!"报修成功".equals(response.get("msg"))) {  
764 - res.put("status", ResponseCode.ERROR);  
765 - res.putAll(response);  
766 - }  
767 - }  
768 - } catch (IOException e) {  
769 - // TODO Auto-generated catch block  
770 - res.put("status", ResponseCode.ERROR);  
771 - res.put("msg", "调用上报接口异常");  
772 - } finally {  
773 - try {  
774 - if (in != null) in.close();  
775 - if (con != null) con.disconnect();  
776 - } catch (IOException e) {  
777 - // TODO Auto-generated catch block  
778 - e.printStackTrace();  
779 - }  
780 - }  
781 -  
782 - return res;  
783 - }  
784 -} 1 +package com.bsth.controller.realcontrol;
  2 +
  3 +import java.io.ByteArrayOutputStream;
  4 +import java.io.IOException;
  5 +import java.io.InputStream;
  6 +import java.io.OutputStream;
  7 +import java.net.HttpURLConnection;
  8 +import java.net.URL;
  9 +import java.util.ArrayList;
  10 +import java.util.Collection;
  11 +import java.util.HashMap;
  12 +import java.util.List;
  13 +import java.util.Map;
  14 +
  15 +import org.apache.commons.io.IOUtils;
  16 +import org.apache.commons.lang3.StringEscapeUtils;
  17 +import org.joda.time.format.DateTimeFormat;
  18 +import org.joda.time.format.DateTimeFormatter;
  19 +import org.springframework.beans.factory.annotation.Autowired;
  20 +import org.springframework.web.bind.annotation.PathVariable;
  21 +import org.springframework.web.bind.annotation.RequestMapping;
  22 +import org.springframework.web.bind.annotation.RequestMethod;
  23 +import org.springframework.web.bind.annotation.RequestParam;
  24 +import org.springframework.web.bind.annotation.RestController;
  25 +
  26 +import com.alibaba.fastjson.JSONArray;
  27 +import com.bsth.common.ResponseCode;
  28 +import com.bsth.controller.BaseController;
  29 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  30 +import com.bsth.controller.realcontrol.dto.DfsjChange;
  31 +import com.bsth.data.BasicData;
  32 +import com.bsth.data.schedule.DayOfSchedule;
  33 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
  34 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  35 +import com.bsth.entity.schedule.SchedulePlanInfo;
  36 +import com.bsth.entity.sys.SysUser;
  37 +import com.bsth.security.util.SecurityUtils;
  38 +import com.bsth.service.realcontrol.ScheduleRealInfoService;
  39 +import com.bsth.util.ConfigUtil;
  40 +import com.fasterxml.jackson.databind.ObjectMapper;
  41 +
  42 +@RestController
  43 +@RequestMapping("/realSchedule")
  44 +public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> {
  45 +
  46 + @Autowired
  47 + ScheduleRealInfoService scheduleRealInfoService;
  48 +
  49 + @Autowired
  50 + DayOfSchedule dayOfSchedule;
  51 +
  52 + @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST)
  53 + public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){
  54 + return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm);
  55 + }
  56 +
  57 + @RequestMapping(value = "/lines")
  58 + public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) {
  59 + return scheduleRealInfoService.findByLines(lines);
  60 + }
  61 +
  62 + @RequestMapping(value = "/car")
  63 + public List<ScheduleRealInfo> findByCar(String nbbm){
  64 + return dayOfSchedule.findByNbbm(nbbm);
  65 + }
  66 +
  67 + /**
  68 + *
  69 + * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id
  70 + * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws
  71 + */
  72 + @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)
  73 + public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,
  74 + @RequestParam String dfsj,String bcType,
  75 + @RequestParam(defaultValue = "") String opType) {
  76 + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null);
  77 + }
  78 +
  79 + /**
  80 + *
  81 + * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔
  82 + */
  83 + @RequestMapping(value = "/destroy", method = RequestMethod.POST)
  84 + public Map<String, Object> destroy(@RequestParam String idsStr
  85 + /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,
  86 + @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) {
  87 + return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null);
  88 + }
  89 +
  90 + /**
  91 + *
  92 + * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws
  93 + */
  94 + @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET)
  95 + public Map<String, String> carDeviceMapp() {
  96 + return BasicData.deviceId2NbbmMap.inverse();
  97 + }
  98 +
  99 + /**
  100 + *
  101 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param
  102 + * lineId @throws
  103 + */
  104 + @RequestMapping(value = "/driver", method = RequestMethod.GET)
  105 + public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) {
  106 + return scheduleRealInfoService.findDriverByLine(lineCode);
  107 + }
  108 +
  109 + /**
  110 + *
  111 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param
  112 + * lineId @throws
  113 + */
  114 + @RequestMapping(value = "/conductor", method = RequestMethod.GET)
  115 + public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) {
  116 + return scheduleRealInfoService.findConductorByLine(lineCode);
  117 + }
  118 +
  119 + /**
  120 + *
  121 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param
  122 + * lineId @throws
  123 + */
  124 + @RequestMapping(value = "/cars", method = RequestMethod.GET)
  125 + public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) {
  126 + return scheduleRealInfoService.findCarByLine(lineCode);
  127 + }
  128 +
  129 + /**
  130 + *
  131 + * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws
  132 + */
  133 + @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET)
  134 + public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) {
  135 + return scheduleRealInfoService.sreachVehic(nbbm);
  136 + }
  137 + /**
  138 + *
  139 + * @Title: realOutAdjust
  140 + * @Description: TODO(实发调整)
  141 + * @param @param id 班次ID
  142 + * @param @param fcsjActual 实际发车时间 HH:mm
  143 + * @param @param remarks 备注
  144 + * @throws
  145 + */
  146 + @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST)
  147 + public Map<String, Object> realOutAdjust(@RequestParam Long id, @RequestParam String fcsjActual,
  148 + @RequestParam String remarks) {
  149 + return scheduleRealInfoService.realOutAdjust(id, fcsjActual, remarks);
  150 + }
  151 +
  152 + /**
  153 + *
  154 + * @Title: revokeDestroy
  155 + * @Description: TODO(撤销烂班)
  156 + * @param @param id
  157 + * @throws
  158 + */
  159 + @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST)
  160 + public Map<String, Object> revokeDestroy(@RequestParam Long id){
  161 + return scheduleRealInfoService.revokeDestroy(id);
  162 + }
  163 +
  164 + /**
  165 + *
  166 + * @Title: revokeRealOutgo
  167 + * @Description: TODO(撤销实发)
  168 + * @param @param id
  169 + * @throws
  170 + */
  171 + @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST)
  172 + public Map<String, Object> revokeRealOutgo(@RequestParam Long id){
  173 + return scheduleRealInfoService.revokeRealOutgo(id);
  174 + }
  175 +
  176 + /**
  177 + * 撤销执行
  178 + * @param id
  179 + * @return
  180 + */
  181 + @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST)
  182 + public Map<String, Object> revokeRealArrive(@RequestParam Long id){
  183 + return scheduleRealInfoService.revokeRealArrive(id);
  184 + }
  185 +
  186 + /**
  187 + *
  188 + * @Title: spaceAdjust
  189 + * @Description: TODO(间隔调整)
  190 + * @param @param ids 要调整的班次数组ID
  191 + * @param @param space 间隔
  192 + * @throws
  193 + */
  194 + @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST)
  195 + public Map<String, Object> spaceAdjust(Long[] ids, Integer space){
  196 + return scheduleRealInfoService.spaceAdjust(ids, space);
  197 + }
  198 +
  199 + /**
  200 + *
  201 + * @Title: schInfoFineTune
  202 + * @Description: TODO(发车信息微调)
  203 + * @param @param map
  204 + * @throws
  205 + */
  206 + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)
  207 + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){
  208 + return scheduleRealInfoService.schInfoFineTune(map);
  209 + }
  210 +
  211 + /**
  212 + *
  213 + * @Title: outgoAdjustAll
  214 + * @Description: TODO(批量待发调整)
  215 + * @param @param list
  216 + * @throws
  217 + */
  218 + @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST)
  219 + public Map<String, Object> outgoAdjustAll(@RequestParam String params){
  220 + //反转义
  221 + params = StringEscapeUtils.unescapeHtml4(params);
  222 + return scheduleRealInfoService.outgoAdjustAll(params);
  223 + }
  224 +
  225 + /**
  226 + *
  227 + * @Title: findByLineAndUpDown
  228 + * @Description: TODO(根据线路和走向获取班次)
  229 + * @param @param line
  230 + * @param @param upDown
  231 + */
  232 + @RequestMapping(value = "/findByLineAndUpDown")
  233 + public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){
  234 + return dayOfSchedule.findByLineAndUpDown(line, upDown);
  235 + }
  236 +
  237 + /**
  238 + *
  239 + * @Title: findRouteByLine
  240 + * @Description: TODO(获取线路的站点,路段路由)
  241 + * @param @param lineCode
  242 + * @throws
  243 + */
  244 + @RequestMapping(value = "/findRouteByLine")
  245 + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){
  246 + return scheduleRealInfoService.findRouteByLine(lineCode);
  247 + }
  248 +
  249 + /**
  250 + *
  251 + * @Title: removeChildTask
  252 + * @Description: TODO(删除子任务)
  253 + * @param @param taskId 子任务ID
  254 + * @throws
  255 + */
  256 + @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE)
  257 + public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){
  258 + return scheduleRealInfoService.removeChildTask(taskId);
  259 + }
  260 +
  261 + /**
  262 + *
  263 + * @Title: findByLineCode
  264 + * @Description: TODO(根据线路获取班次信息)
  265 + * @param @param lineCode
  266 + */
  267 + @RequestMapping(value = "/lineCode/{lineCode}")
  268 + public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){
  269 + return dayOfSchedule.findByLineCode(lineCode);
  270 + }
  271 +
  272 + @RequestMapping(value = "/queryUserInfo")
  273 + public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line,
  274 + @RequestParam String date,@RequestParam String state) {
  275 + return scheduleRealInfoService.queryUserInfo(line, date,state);
  276 + }
  277 +
  278 + @RequestMapping(value = "/queryUserInfoPx")
  279 + public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line,
  280 + @RequestParam String date,@RequestParam String state,@RequestParam String type) {
  281 + return scheduleRealInfoService.queryUserInfoPx(line, date,state,type);
  282 + }
  283 +
  284 + @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET)
  285 + public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName, @RequestParam String clZbh,
  286 + @RequestParam String lpName,@RequestParam String date,@RequestParam String line) {
  287 + return scheduleRealInfoService.exportWaybill(jName, clZbh, lpName,date,line);
  288 + }
  289 +
  290 + @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET)
  291 + public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh
  292 + ,@RequestParam String date,@RequestParam String line) {
  293 + return scheduleRealInfoService.exportWaybillQp( clZbh, date,line);
  294 + }
  295 +
  296 +
  297 + @RequestMapping(value = "/dailyInfo")
  298 + public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) {
  299 + return scheduleRealInfoService.dailyInfo(line, date, type);
  300 + }
  301 +
  302 + @RequestMapping(value = "/historyMessage")
  303 + public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date,
  304 + @RequestParam String code, @RequestParam String type) {
  305 + return scheduleRealInfoService.historyMessage(line, date, code, type);
  306 + }
  307 +
  308 + @RequestMapping(value="/findLine")
  309 + public List<Map<String,String>> findLine(@RequestParam String line){
  310 + return scheduleRealInfoService.findLine(line);
  311 + }
  312 +
  313 + @RequestMapping(value="/findKMBC",method = RequestMethod.GET)
  314 + public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
  315 + ,@RequestParam String date,@RequestParam String line){
  316 + return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line);
  317 + }
  318 +
  319 + /**
  320 + * 路单公里统计 (闵行审计专用)
  321 + * @param jGh
  322 + * @param clZbh
  323 + * @param lpName
  324 + * @param date
  325 + * @param line
  326 + * @return
  327 + */
  328 + @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET)
  329 + public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
  330 + ,@RequestParam String date,@RequestParam String line){
  331 + return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line);
  332 + }
  333 +
  334 + @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET)
  335 + public Map<String,Object> findKMBCQp(@RequestParam String clZbh
  336 + ,@RequestParam String date,@RequestParam String line){
  337 + return scheduleRealInfoService.findKMBCQp(clZbh,date,line);
  338 + }
  339 +
  340 + @RequestMapping(value="/findLpName")
  341 + public List<Map<String,String>> findLpName(@RequestParam String lpName){
  342 + return scheduleRealInfoService.findLpName(lpName);
  343 + }
  344 +
  345 + @RequestMapping(value = "/account")
  346 + public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date,
  347 + @RequestParam String code,@RequestParam String xlName, @RequestParam String type) {
  348 + return scheduleRealInfoService.account(line, date, code, xlName, type);
  349 + }
  350 +
  351 + @RequestMapping(value = "/accountPx")
  352 + public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date,
  353 + @RequestParam String code,@RequestParam String xlName, @RequestParam String px) {
  354 + return scheduleRealInfoService.accountPx(line, date, code, xlName, px);
  355 + }
  356 +
  357 + @RequestMapping(value = "/correctForm")
  358 + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,
  359 + @RequestParam String endDate,
  360 + @RequestParam String lpName, @RequestParam String code,
  361 + @RequestParam String type,@RequestParam String changType) {
  362 + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType);
  363 + }
  364 + /**
  365 + * @Title queryListWaybill
  366 + * @Description 查询行车路单列表
  367 + * @param jName 驾驶员名字
  368 + * @param clZbh 车辆自编号(内部编号)
  369 + * @param lpName 路牌
  370 + * @return
  371 + */
  372 + @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET)
  373 + public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  374 + ,@RequestParam String date,@RequestParam String line){
  375 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,line);
  376 + }
  377 +
  378 + /**
  379 + * @Title queryListWaybill
  380 + * @Description 查询行车路单列表(闵行审计专用路单)
  381 + * @param jName 驾驶员名字
  382 + * @param clZbh 车辆自编号(内部编号)
  383 + * @param lpName 路牌
  384 + * @return
  385 + */
  386 + @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET)
  387 + public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  388 + ,@RequestParam String date,@RequestParam String line){
  389 + return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line);
  390 + }
  391 +
  392 + @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET)
  393 + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh,
  394 + @RequestParam String date,@RequestParam String line){
  395 + return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line);
  396 + }
  397 +
  398 + @RequestMapping(value="/statisticsDaily")
  399 + public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date,
  400 + @RequestParam String xlName, @RequestParam String type){
  401 + return scheduleRealInfoService.statisticsDaily(line, date, xlName, type);
  402 + }
  403 +
  404 + @RequestMapping(value="/statisticsDaily_mh_2")
  405 + public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date,
  406 + @RequestParam String xlName, @RequestParam String type){
  407 + return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type);
  408 + }
  409 +
  410 + @RequestMapping(value="/statisticsDailyTj")
  411 + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){
  412 + String gsdm="";
  413 + if(map.get("gsdm")!=null){
  414 + gsdm=map.get("gsdm").toString();
  415 + }
  416 + String fgsdm="";
  417 + if(map.get("fgsdm")!=null){
  418 + fgsdm=map.get("fgsdm").toString();
  419 + }
  420 + String line="";
  421 + if(map.get("line")!=null){
  422 + line=map.get("line").toString();
  423 + }
  424 + String date="";
  425 + if(map.get("date")!=null){
  426 + date=map.get("date").toString();
  427 + }
  428 + String date2="";
  429 + if(map.get("date2")!=null){
  430 + date2=map.get("date2").toString();
  431 + }
  432 + String xlName="";
  433 + if(map.get("xlName")!=null){
  434 + xlName=map.get("xlName").toString();
  435 + }
  436 + String type="";
  437 + if(map.get("type")!=null){
  438 + type=map.get("type").toString();
  439 + }
  440 + String nature="0";
  441 + if(map.get("nature")!=null){
  442 + nature=map.get("nature").toString();
  443 + }
  444 + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature);
  445 + }
  446 +
  447 + /*
  448 + * 公里修正报表
  449 + */
  450 + @RequestMapping(value="/mileageReportTj")
  451 + public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){
  452 + String gsdm="";
  453 + if(map.get("gsdm")!=null){
  454 + gsdm=map.get("gsdm").toString();
  455 + }
  456 + String fgsdm="";
  457 + if(map.get("fgsdm")!=null){
  458 + fgsdm=map.get("fgsdm").toString();
  459 + }
  460 + String line="";
  461 + if(map.get("line")!=null){
  462 + line=map.get("line").toString();
  463 + }
  464 + String date="";
  465 + if(map.get("date")!=null){
  466 + date=map.get("date").toString();
  467 + }
  468 + String date2="";
  469 + if(map.get("date2")!=null){
  470 + date2=map.get("date2").toString();
  471 + }
  472 + String xlName="";
  473 + if(map.get("xlName")!=null){
  474 + xlName=map.get("xlName").toString();
  475 + }
  476 + return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2);
  477 + }
  478 +
  479 + /*
  480 + * 班次修正报表
  481 + */
  482 + @RequestMapping(value="/scheduleCorrectionReport")
  483 + public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){
  484 + String gsdm="";
  485 + if(map.get("gsdm")!=null){
  486 + gsdm=map.get("gsdm").toString();
  487 + }
  488 + String fgsdm="";
  489 + if(map.get("fgsdm")!=null){
  490 + fgsdm=map.get("fgsdm").toString();
  491 + }
  492 + String line="";
  493 + if(map.get("line")!=null){
  494 + line=map.get("line").toString();
  495 + }
  496 + String date="";
  497 + if(map.get("date")!=null){
  498 + date=map.get("date").toString();
  499 + }
  500 + String date2="";
  501 + if(map.get("date2")!=null){
  502 + date2=map.get("date2").toString();
  503 + }
  504 + String xlName="";
  505 + if(map.get("xlName")!=null){
  506 + xlName=map.get("xlName").toString();
  507 + }
  508 + return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2);
  509 + }
  510 +
  511 + @RequestMapping(value="/MapById",method = RequestMethod.GET)
  512 + public Map<String, Object> MapById(@RequestParam("id") Long id){
  513 + return scheduleRealInfoService.MapById(id);
  514 + }
  515 +
  516 + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET)
  517 + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){
  518 + return scheduleRealInfoService.MapByIdQp(id);
  519 + }
  520 +
  521 + /**
  522 + * @Title: scheduleDaily
  523 + * @Description: TODO(调度日报表)
  524 + * @param line 线路
  525 + * @param date 时间
  526 + * @return
  527 + */
  528 + @RequestMapping(value="/scheduleDaily")
  529 + public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){
  530 + return scheduleRealInfoService.scheduleDaily(line,date);
  531 + }
  532 +
  533 + @RequestMapping(value="/realScheduleList")
  534 + public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){
  535 + return scheduleRealInfoService.realScheduleList(line,date);
  536 + }
  537 +
  538 + @RequestMapping(value="/realScheduleList_zrw")
  539 + public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){
  540 + return scheduleRealInfoService.realScheduleList_zrw(line,date);
  541 + }
  542 +
  543 + @RequestMapping(value="/realScheduleList_mh_2")
  544 + public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){
  545 + return scheduleRealInfoService.realScheduleList_mh_2(line,date);
  546 + }
  547 +
  548 + @RequestMapping(value="/realScheduleListQp")
  549 + public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){
  550 + return scheduleRealInfoService.realScheduleListQp(line,date);
  551 + }
  552 +
  553 + @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)
  554 + public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){
  555 + cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);
  556 + List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class);
  557 + return scheduleRealInfoService.multi_tzrc(cpcs, null);
  558 + }
  559 +
  560 + @RequestMapping(value="/multi_dftz", method=RequestMethod.POST)
  561 + public Map<String, Object> multi_dftz(@RequestParam String dcsJson){
  562 + dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson);
  563 + List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class);
  564 + return scheduleRealInfoService.multi_dftz(dfsjcs);
  565 + }
  566 +
  567 + @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST)
  568 + public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){
  569 + return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName);
  570 + }
  571 +
  572 + @RequestMapping(value="/history", method=RequestMethod.POST)
  573 + public Map<String,Object> historySave(ScheduleRealInfo sch){
  574 + return scheduleRealInfoService.historySave(sch);
  575 + }
  576 +
  577 +
  578 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");
  579 + private final static long ONE_DAY = 1000 * 60 * 60 * 24;
  580 + /**
  581 + * 获取可编辑的历史班次日期
  582 + * @return
  583 + */
  584 + @RequestMapping("dateArray")
  585 + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){
  586 + List<String> rs = new ArrayList<>();
  587 +
  588 + long t = System.currentTimeMillis();
  589 + if(c != 1)
  590 + t -= (ONE_DAY + (1000 * 60 * 60 * 6));
  591 + for(int i = 0; i < 3; i ++){
  592 + rs.add(fmtyyyyMMdd.print(t));
  593 + t -= ONE_DAY;
  594 + }
  595 + return rs;
  596 + }
  597 +
  598 + @RequestMapping(value = "svgAttr", method = RequestMethod.POST)
  599 + public Map<String, Object> svgAttr(@RequestParam String jsonStr){
  600 + return scheduleRealInfoService.svgAttr(jsonStr);
  601 + }
  602 +
  603 + @RequestMapping(value = "svgAttr", method = RequestMethod.GET)
  604 + public Map<String, Object> findSvgAttr(@RequestParam String idx){
  605 + return scheduleRealInfoService.findSvgAttr(idx);
  606 + }
  607 +
  608 + @RequestMapping(value = "addRemarks", method = RequestMethod.POST)
  609 + public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){
  610 + return scheduleRealInfoService.addRemarks(id, remarks);
  611 + }
  612 +
  613 + @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET)
  614 + public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){
  615 + return scheduleRealInfoService.scheduleDailyQp(line,date);
  616 + }
  617 +
  618 + @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET)
  619 + public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){
  620 + return scheduleRealInfoService.scheduleDailyExport(map);
  621 + }
  622 +
  623 + @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET)
  624 + public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){
  625 + return scheduleRealInfoService.exportWaybillMore(map);
  626 + }
  627 +
  628 + /**
  629 + * 获取当日计划排班 , 从计划表抓取数据
  630 + * @return
  631 + */
  632 + @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET)
  633 + public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){
  634 + return scheduleRealInfoService.currentSchedulePlan(lineCode);
  635 + }
  636 +
  637 + @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST)
  638 + public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){
  639 + return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type);
  640 + }
  641 +
  642 + /**
  643 + * 删除当日实际排班
  644 + * @return
  645 + */
  646 + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST)
  647 + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){
  648 + return dayOfSchedule.deleteRealSchedule(lineCode);
  649 + }
  650 +
  651 + /**
  652 + * 从计划表重新加载当日排班
  653 + * @param lineCode
  654 + * @return
  655 + */
  656 + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST)
  657 + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){
  658 + Map<String, Object> rs = new HashMap<>();
  659 + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode);
  660 + if(list != null && list.size() > 0){
  661 + rs.put("status", ResponseCode.ERROR);
  662 + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。");
  663 + return rs;
  664 + }
  665 +
  666 + int code = dayOfSchedule.reloadSch(lineCode);
  667 +
  668 + //重新按公司编码索引数据
  669 + dayOfSchedule.groupByGsbm();
  670 + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR);
  671 + return rs;
  672 + }
  673 +
  674 + /**
  675 + * 误点调整
  676 + * @param idx
  677 + * @param minute
  678 + * @return
  679 + */
  680 + @RequestMapping(value = "lateAdjust", method = RequestMethod.POST)
  681 + public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){
  682 + return scheduleRealInfoService.lateAdjust(idx, minute);
  683 + }
  684 +
  685 + /**
  686 + * 获取所有应发未到的班次
  687 + * @param idx
  688 + * @return
  689 + */
  690 + @RequestMapping(value = "allLate2")
  691 + public List<ScheduleRealInfo> allLate2(@RequestParam String idx){
  692 + return scheduleRealInfoService.allLate2(idx);
  693 + }
  694 +
  695 + /**
  696 + * 添加一个临加到历史库
  697 + * @param sch
  698 + * @return
  699 + */
  700 + @RequestMapping(value = "history/add", method = RequestMethod.POST)
  701 + public Map<String, Object> addToHistory(ScheduleRealInfo sch){
  702 + return scheduleRealInfoService.addToHistory(sch);
  703 + }
  704 +
  705 + /**
  706 + * 从历史库里删除临加班次
  707 + * @param sch
  708 + * @return
  709 + */
  710 + @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)
  711 + public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){
  712 + return scheduleRealInfoService.deleteToHistory(id);
  713 + }
  714 +
  715 + @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST)
  716 + public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){
  717 + Map<String, Object> map =new HashMap<>();
  718 + map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode));
  719 + return map;
  720 + }
  721 +
  722 + /**
  723 + * 从历史库里删除临加班次
  724 + * @param sch
  725 + * @return
  726 + */
  727 + @RequestMapping(value = "wxsb", method = RequestMethod.POST)
  728 + public Map<String, Object> deleteToHistory(@RequestParam Map<String, Object> param){
  729 + SysUser user = SecurityUtils.getCurrentUser();
  730 + String uname = user.getUserName();
  731 + StringBuilder url = new StringBuilder(ConfigUtil.get("http.report.url"));
  732 + url.append("?nbbm=").append(param.get("nbbm")).append("&bxy=").append(uname).append("&bxbm=").append(param.get("bxType"));
  733 + // 分公司保存格式 分公司编码_公司编码
  734 + String val = BasicData.nbbm2FgsCompanyCodeMap.get(param.get("nbbm"));
  735 + String[] arr = val.split("_");
  736 + if (!"22".equals(arr[1])) {
  737 + Map<String, Object> res = new HashMap<String, Object>();
  738 + res.put("status", ResponseCode.ERROR);
  739 + res.put("msg", "除金高公司外暂未开通此功能");
  740 +
  741 + return res;
  742 + }
  743 + url.append("&fgs=").append(arr[0]);
  744 +
  745 + return request(url.toString());
  746 + }
  747 +
  748 + @SuppressWarnings("unchecked")
  749 + private static Map<String, Object> request(String url) {
  750 + Map<String, Object> res = new HashMap<String, Object>();
  751 + res.put("status", ResponseCode.SUCCESS);
  752 + InputStream in = null;
  753 + HttpURLConnection con = null;
  754 + try {
  755 + con = (HttpURLConnection)new URL(url).openConnection();
  756 + con.setRequestMethod("POST");
  757 + con.setRequestProperty("keep-alive", "true");
  758 + con.setRequestProperty("accept", "application/json");
  759 + con.setRequestProperty("content-type", "application/json");
  760 + con.setDoInput(true);
  761 + con.setReadTimeout(2500);
  762 + con.setConnectTimeout(2500);
  763 +
  764 + con.connect();
  765 + if (con.getResponseCode() == 200) {
  766 + in = con.getInputStream();
  767 + ByteArrayOutputStream bout = new ByteArrayOutputStream();
  768 + IOUtils.copy(in, bout); bout.close();
  769 + Map<String, Object> response = new ObjectMapper().readValue(bout.toByteArray(), Map.class);
  770 + if (!"报修成功".equals(response.get("msg"))) {
  771 + res.put("status", ResponseCode.ERROR);
  772 + res.putAll(response);
  773 + }
  774 + }
  775 + } catch (IOException e) {
  776 + // TODO Auto-generated catch block
  777 + res.put("status", ResponseCode.ERROR);
  778 + res.put("msg", "调用上报接口异常");
  779 + } finally {
  780 + try {
  781 + if (in != null) in.close();
  782 + if (con != null) con.disconnect();
  783 + } catch (IOException e) {
  784 + // TODO Auto-generated catch block
  785 + e.printStackTrace();
  786 + }
  787 + }
  788 +
  789 + return res;
  790 + }
  791 +}
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -231,6 +231,15 @@ public class ScheduleRealInfo { @@ -231,6 +231,15 @@ public class ScheduleRealInfo {
231 * 换车营运标记 true 表示该主任务由 【中途换车子任务】 级联生成 231 * 换车营运标记 true 表示该主任务由 【中途换车子任务】 级联生成
232 */ 232 */
233 private boolean ccService; 233 private boolean ccService;
  234 + private Integer lpChange;
  235 +
  236 + public Integer getLpChange() {
  237 + return lpChange;
  238 + }
  239 +
  240 + public void setLpChange(Integer lpChange) {
  241 + this.lpChange = lpChange;
  242 + }
234 243
235 public boolean isDfAuto() { 244 public boolean isDfAuto() {
236 return dfAuto; 245 return dfAuto;
src/main/java/com/bsth/repository/StationRouteRepository.java
@@ -392,6 +392,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int @@ -392,6 +392,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
392 392
393 @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH) 393 @EntityGraph(value = "stationRoute_station", type = EntityGraph.EntityGraphType.FETCH)
394 @Override 394 @Override
  395 + @Query(value = "select r from StationRoute r where r.destroy=0")
395 List<StationRoute> findAll(); 396 List<StationRoute> findAll();
396 397
397 @Query("select new map(sr.station.id as stationid, sr.stationName as stationname) from StationRoute sr where sr.line.id=?1 and sr.directions=?2") 398 @Query("select new map(sr.station.id as stationid, sr.stationName as stationname) from StationRoute sr where sr.line.id=?1 and sr.directions=?2")
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -223,4 +223,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -223,4 +223,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
223 @Override 223 @Override
224 List<ScheduleRealInfo> findAll(); 224 List<ScheduleRealInfo> findAll();
225 225
  226 + @Modifying
  227 + @Transactional
  228 + @Query(value = "update ScheduleRealInfo s set s.lpChange=1 where s.id=?1 ")
  229 + Integer updateLpChange(Long id);
  230 +
  231 + @Query(value = "select count (s.id) from ScheduleRealInfo s where s.clZbh=?1 and s.scheduleDateStr=?2 and s.xlBm=?3 and s.qdzCode=?4")
  232 + Object isCircleQdz(String clzbh,String sdr,String xlbm,String qdzCode);
  233 +
226 } 234 }
src/main/java/com/bsth/repository/sys/RoleRepository.java
@@ -3,6 +3,7 @@ package com.bsth.repository.sys; @@ -3,6 +3,7 @@ package com.bsth.repository.sys;
3 3
4 import javax.transaction.Transactional; 4 import javax.transaction.Transactional;
5 5
  6 +import org.springframework.data.jpa.domain.Specification;
6 import org.springframework.data.jpa.repository.Modifying; 7 import org.springframework.data.jpa.repository.Modifying;
7 import org.springframework.data.jpa.repository.Query; 8 import org.springframework.data.jpa.repository.Query;
8 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
@@ -10,6 +11,8 @@ import org.springframework.stereotype.Repository; @@ -10,6 +11,8 @@ import org.springframework.stereotype.Repository;
10 import com.bsth.entity.sys.Role; 11 import com.bsth.entity.sys.Role;
11 import com.bsth.repository.BaseRepository; 12 import com.bsth.repository.BaseRepository;
12 13
  14 +import java.util.List;
  15 +
13 @Repository 16 @Repository
14 public interface RoleRepository extends BaseRepository<Role, Integer>{ 17 public interface RoleRepository extends BaseRepository<Role, Integer>{
15 18
@@ -21,4 +24,7 @@ public interface RoleRepository extends BaseRepository&lt;Role, Integer&gt;{ @@ -21,4 +24,7 @@ public interface RoleRepository extends BaseRepository&lt;Role, Integer&gt;{
21 @Transactional 24 @Transactional
22 @Query("update Role r set r.codeName=?1, r.roleName=?2, r.enable=?3, r.descriptions=?4 where r.id=?5") 25 @Query("update Role r set r.codeName=?1, r.roleName=?2, r.enable=?3, r.descriptions=?4 where r.id=?5")
23 void update(String codeName, String roleName, boolean enable, String descriptions, Integer id); 26 void update(String codeName, String roleName, boolean enable, String descriptions, Integer id);
  27 +
  28 + @Query(value = "select * from role where id in(?1)",nativeQuery = true)
  29 + List<Role> findAllById(String ids);
24 } 30 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -193,4 +193,5 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -193,4 +193,5 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
193 193
194 List<Map<String, Object>> scheduleCorrectionReport(String gsdm, String fgsdm, 194 List<Map<String, Object>> scheduleCorrectionReport(String gsdm, String fgsdm,
195 String line, String date, String date2); 195 String line, String date, String date2);
  196 + Integer isCircleQdz(String clzbh,String sdr,String xlbm,String qdzCode);
196 } 197 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -5606,8 +5606,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -5606,8 +5606,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
5606 ScheduleRealInfo leftSch, rightSch = null; 5606 ScheduleRealInfo leftSch, rightSch = null;
5607 for (int i = 0; i < largeList.size(); i++) { 5607 for (int i = 0; i < largeList.size(); i++) {
5608 leftSch = largeList.get(i); 5608 leftSch = largeList.get(i);
  5609 + leftSch.setLpChange(1);
5609 if (i < smallList.size()) { 5610 if (i < smallList.size()) {
5610 rightSch = smallList.get(i); 5611 rightSch = smallList.get(i);
  5612 + rightSch.setLpChange(1);
5611 ts.add(rightSch); 5613 ts.add(rightSch);
5612 } else { 5614 } else {
5613 //不对称时多出来的 5615 //不对称时多出来的
@@ -5626,6 +5628,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -5626,6 +5628,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
5626 5628
5627 carSet.add(leftSch.getClZbh()); 5629 carSet.add(leftSch.getClZbh());
5628 carSet.add(rightSch.getClZbh()); 5630 carSet.add(rightSch.getClZbh());
  5631 + scheduleRealInfoRepository.updateLpChange(leftSch.getId());
  5632 + scheduleRealInfoRepository.updateLpChange(rightSch.getId());
5629 } 5633 }
5630 5634
5631 //重新计算路牌的起点应到时间 5635 //重新计算路牌的起点应到时间
@@ -5981,6 +5985,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -5981,6 +5985,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
5981 lMap.add(resMap); 5985 lMap.add(resMap);
5982 return lMap; 5986 return lMap;
5983 } 5987 }
  5988 +
  5989 + @Override
  5990 + public Integer isCircleQdz(String clzbh, String sdr, String xlbm, String qdzCode) {
  5991 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  5992 + String time =sdf.format(Long.parseLong(sdr));
  5993 +
  5994 + Object num=scheduleRealInfoRepository.isCircleQdz(clzbh, time, xlbm, qdzCode);
  5995 + Integer num2=num==0||num==0L?0:1;
  5996 + return num2;
  5997 + }
5984 } 5998 }
5985 5999
5986 class AccountMap implements Comparator<Map<String, Object>> { 6000 class AccountMap implements Comparator<Map<String, Object>> {
src/main/java/com/bsth/service/sys/impl/RoleServiceImpl.java
@@ -103,4 +103,9 @@ public class RoleServiceImpl extends BaseServiceImpl&lt;Role, Integer&gt; implements @@ -103,4 +103,9 @@ public class RoleServiceImpl extends BaseServiceImpl&lt;Role, Integer&gt; implements
103 map.put("userNames", userNames); 103 map.put("userNames", userNames);
104 return map; 104 return map;
105 } 105 }
  106 +
  107 + @Override
  108 + public List<Role> findAllByIds(String ids) {
  109 + return roleRepository.findAllById(ids);
  110 + }
106 } 111 }
src/main/resources/application-dev.properties
@@ -31,4 +31,4 @@ http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all @@ -31,4 +31,4 @@ http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all
31 ## gateway real data 31 ## gateway real data
32 http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/ 32 http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/
33 ## gateway send directive 33 ## gateway send directive
34 -http.send.directive = http://192.168.168.201:9090/transport_server/message/  
35 \ No newline at end of file 34 \ No newline at end of file
  35 +http.send.directive = http://192.168.168.201:9090/transport_server/message/
src/main/resources/application-prod.properties
@@ -17,22 +17,15 @@ spring.datasource.max-idle=8 @@ -17,22 +17,15 @@ spring.datasource.max-idle=8
17 spring.datasource.min-idle=8 17 spring.datasource.min-idle=8
18 spring.datasource.initial-size=5 18 spring.datasource.initial-size=5
19 19
20 -spring.datasource.max-wait=10000  
21 -spring.datasource.remove-abandoned=true  
22 -spring.datasource.remove-abandoned-timeout=120  
23 -  
24 spring.datasource.test-on-borrow=true 20 spring.datasource.test-on-borrow=true
25 spring.datasource.test-on-connect=true 21 spring.datasource.test-on-connect=true
26 spring.datasource.test-on-return=true 22 spring.datasource.test-on-return=true
27 spring.datasource.test-while-idle=true 23 spring.datasource.test-while-idle=true
28 spring.datasource.validation-query=select 1 24 spring.datasource.validation-query=select 1
29 -spring.datasource.time-between-eviction-runs-millis=1800000  
30 25
31 ## gps client data 26 ## gps client data
32 http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all 27 http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all
33 ## gateway real data 28 ## gateway real data
34 http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ 29 http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/
35 ## gateway send directive 30 ## gateway send directive
36 -http.send.directive = http://10.10.200.79:8080/transport_server/message/  
37 -## maintenance report  
38 -http.report.url = http://116.247.73.122:9098/jgjwsystem_j2ee/  
39 \ No newline at end of file 31 \ No newline at end of file
  32 +http.send.directive = http://10.10.200.79:8080/transport_server/message/
40 \ No newline at end of file 33 \ No newline at end of file
src/main/resources/application.properties
1 spring.profiles: dev,prod 1 spring.profiles: dev,prod
2 -spring.profiles.active: prod 2 +spring.profiles.active: dev
3 3
4 spring.view.suffix=.html 4 spring.view.suffix=.html
5 server.session-timeout=-1 5 server.session-timeout=-1
src/main/resources/static/pages/permission/authorize_all/user_auth.html
1 -<!-- 用户线调授权页面 -->  
2 -<div id="user_authorize_wrap" style="height: 100%;">  
3 - <div class="top_title"></div>  
4 -  
5 - <div class="xd_line_list">  
6 - </div>  
7 - <div class="top_tools">  
8 - <form class="ct_pattern_form">  
9 - <div class="uk-margin">  
10 - <div uk-form-custom="target: > * > span:first" style="display: none">  
11 - <select id="pattern_select" >  
12 - <option value="0">监控模式</option>  
13 - <option value="1">主调模式</option>  
14 - </select>  
15 - <button class="uk-button uk-button-default" type="button" tabindex="-1">  
16 - <span></span>  
17 - <span uk-icon="icon: chevron-down"></span>  
18 - </button>  
19 - </div>  
20 - </div>  
21 - </form>  
22 - <div class="add_line_icon" uk-toggle="target: #select_line_modal">  
23 - <i uk-icon="icon: plus"></i> 添加线路  
24 - </div>  
25 - &nbsp;&nbsp;  
26 - <button class="uk-button uk-button-primary uk-button-small" id="global_save_btn">保存哇!</button>  
27 - </div>  
28 -  
29 - <div class="uk-child-width-expand uk-grid-small xd_menu_grid" uk-grid style="display: none;">  
30 -  
31 - <div>  
32 - <h4>数据&统计</h4>  
33 - <ul class="uk-list uk-list-large uk-list-divider">  
34 - <li><label><input class="uk-checkbox" type="checkbox" data-event="curr_date_schedule"> 当日计划排班</label></li>  
35 - <li><label><input class="uk-checkbox" type="checkbox" data-event="cache_data_manage"> 缓存数据管理</label></li>  
36 - <li><label><input class="uk-checkbox" type="checkbox" data-event="history_sch_maintain"> 历史路单维护</label></li>  
37 - <li><label><input class="uk-checkbox" type="checkbox" data-event="sch_edit_info"> 班次修正日志</label></li>  
38 - </ul>  
39 - </div>  
40 -  
41 - <div>  
42 - <h4>报表管理</h4>  
43 - <ul class="uk-list uk-list-large uk-list-divider">  
44 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_waybill"> 行车路单</label></li>  
45 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_history_message"> 调度历史消息</label></li>  
46 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_account"> 驾驶员请求台账</label></li>  
47 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_correctForm"> 修正报表</label></li>  
48 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_statisticsDaily"> 统计日报</label></li>  
49 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_scheduleDaily"> 调度日报</label></li>  
50 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_jobSummary"> 工作汇总</label></li>  
51 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_daily"> 班次日报表</label></li>  
52 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_inoutstation"> 班次到离站</label></li>  
53 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_oilListMonth"> 月存油报表</label></li>  
54 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_scheduleAnaly"> 时刻表分析</label></li>  
55 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_message"> 调度消息分析</label></li>  
56 - <li><label><input class="uk-checkbox" type="checkbox" data-event="form_changetochange"> 换人换车情况统计表</label></li>  
57 - </ul>  
58 - </div>  
59 -  
60 - <div>  
61 - <h4>车载设备</h4>  
62 - <ul class="uk-list uk-list-large uk-list-divider">  
63 - <li><label><input class="uk-checkbox" type="checkbox" data-event="all_devices"> 设备管理</label></li>  
64 - <li><label><input class="uk-checkbox" type="checkbox" data-event="directive_history"> 指令下发记录</label></li>  
65 - <li><label><input class="uk-checkbox" type="checkbox" data-event="device_report"> 设备上报记录</label></li>  
66 - <li><label><input class="uk-checkbox" type="checkbox" data-event="gps_play_back"> 轨迹回放</label></li>  
67 - <li><label><input class="uk-checkbox" type="checkbox" data-event="safe_driving"> 安全驾驶(图像)</label></li>  
68 - </ul>  
69 - </div>  
70 -  
71 - <div>  
72 - <h4>系统设置</h4>  
73 - <ul class="uk-list uk-list-large uk-list-divider">  
74 - <li><label><input class="uk-checkbox" type="checkbox" data-event="line_config"> 线路配置</label></li>  
75 - <li><label><input class="uk-checkbox" type="checkbox" data-event="tts_config"> TTS</label></li>  
76 - <li><label><input class="uk-checkbox" type="checkbox" data-event="signal_state"> 信号标记</label></li>  
77 - </ul>  
78 - </div>  
79 -  
80 - </div>  
81 -  
82 - <!-- This is the modal -->  
83 - <div id="select_line_modal" class="uk-modal-container" uk-modal="bg-close:false;">  
84 - <div class="uk-modal-dialog uk-modal-body">  
85 - <button class="uk-modal-close-outside" type="button" uk-close></button>  
86 - <h2 class="uk-modal-title">添加线路权限</h2>  
87 - <div>  
88 - <form>  
89 - <div class="ct_field" style="width: 140px;">  
90 - <label>状态</label>  
91 - <select class="uk-select" id="modal_type_select" style="width: 94px;">  
92 - <option value="-1">全部</option>  
93 - <option value="0">营运</option>  
94 - <option value="1">撤销</option>  
95 - </select>  
96 - </div>  
97 - <div class="ct_field">  
98 - <label>公司</label>  
99 - <select class="uk-select" id="modal_company_select"></select>  
100 - </div>  
101 - <div class="ct_field">  
102 - <label>分公司</label>  
103 - <select class="uk-select" id="modal_sub_company_select" disabled></select>  
104 - </div>  
105 - <div class="ct_field">  
106 - <label>线路</label>  
107 - <input class="uk-input" id="modal_line_input" placeholder="没做拼音映射!!"/>  
108 - </div>  
109 - <label><input class="uk-checkbox" type="checkbox" id="globalCheckbox"> 全选</label>  
110 - </form>  
111 - <div class="uk-modal-body line_checkbox_list" style="padding: 0 !important;" uk-overflow-auto>  
112 - </div>  
113 - </div>  
114 - <p class="uk-text-right">  
115 - <button class="uk-button uk-button-default uk-modal-close" type="button">取消</button>  
116 - <button class="uk-button uk-button-primary" id="confirmBtn" type="button">确定</button>  
117 - </p>  
118 - </div>  
119 - </div>  
120 -  
121 - <script id="authorize-user-auth-lines-temp" type="text/html">  
122 - {{each list as t i}}  
123 - <h5>{{t.fgsName}}</h5>  
124 - <div class="sub_lines">  
125 - {{each t.list as obj j}}  
126 - <span title="{{obj.lineCode}}" class="line_btn {{obj.destroy==1?'destroy':''}}">{{obj.name}}</span>  
127 - {{/each}}  
128 - </div>  
129 - {{/each}}  
130 - </script>  
131 - <script id="authorize-user-auth-title-temp" type="text/html">  
132 - <div style="font-weight: 600;">{{name}}({{userName}})  
133 - </div>  
134 - <!--<div class="desc">最近登录 {{lastLoginDateStr}}</div>-->  
135 - <div class="desc">...</div>  
136 - </script>  
137 -  
138 - <script id="authorize-modal-lines-temp" type="text/html">  
139 - {{each list as obj i}}  
140 - <label class="btn {{obj.destroy==1?'destroy':''}}" data-gs="{{obj.company}}" data-fgs="{{obj.brancheCompany}}" title="{{obj.name}}" data-code="{{obj.lineCode}}">  
141 - <input class="uk-checkbox" type="checkbox" >{{obj.name}}  
142 - </label>  
143 - {{/each}}  
144 - </script>  
145 - <script>  
146 - (function () {  
147 - var wrap = '#user_authorize_wrap', user, xd_auth, all_lines,companyData;  
148 - //分公司名称映射(只用于分组展示,就写死)  
149 - var fgs_name_mapp={  
150 - '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)',  
151 - '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)',  
152 - '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_5': '南汇公司(南汇公司)', '26_6': '南汇公司(南汇六分)',  
153 - '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)',  
154 - '77_78': '闵行公司','300_301': '金球公交','302_303': '露虹公交', '99_100': '青浦公交','24_1': '一车队', '24_2': '二车队', '24_3': '三车队'  
155 - };  
156 -  
157 - var defauleConfig;  
158 -  
159 - $(wrap).on('init', function (e, data) {  
160 - e.stopPropagation();  
161 - user = data.user;  
162 - all_lines = data.lineArray;  
163 - companyData = data.companyData;  
164 -  
165 - all_lines.sort(function (a, b) {  
166 - return a.name.localeCompare(b.name);  
167 - });  
168 - //top title  
169 - var htmlStr = template('authorize-user-auth-title-temp', user);  
170 - $('.top_title', wrap).html(htmlStr);  
171 -  
172 - //用户线调权限  
173 - defauleConfig = {userId: user.id, pattern: 0, excludeMenus: 'history_sch_maintain'};  
174 - $.get('/realControAuthority/findByUserId', {userId: user.id}, function (rs) {  
175 - //console.log('rsrs',rs);  
176 - xd_auth = rs;  
177 - if(!xd_auth)  
178 - xd_auth=defauleConfig;  
179 - //渲染线路权限  
180 - render_auth_lines();  
181 - //渲染菜单权限  
182 - render_auth_menus();  
183 - //渲染线路选择modal  
184 - //render_line_select_modal();  
185 - $('#pattern_select',wrap).val(xd_auth.pattern).trigger('change').parent().show();  
186 - });  
187 - });  
188 -  
189 - function render_auth_lines() {  
190 - var data = [], codeArray=[];  
191 - if(xd_auth && xd_auth.lineCodeStr)  
192 - codeArray = xd_auth.lineCodeStr.split(',');  
193 -  
194 - $.each(all_lines, function () {  
195 - if(codeArray.indexOf(this.lineCode)!=-1)  
196 - data.push(this);  
197 - });  
198 -  
199 - data.sort(function (a, b) {  
200 - return a.name.localeCompare(b.name);  
201 - });  
202 - //按分公司分组  
203 - var gd = groupBy(data, 'cgsbm');  
204 - data = [];  
205 - for(var code in gd){  
206 - data.push({  
207 - code: code,  
208 - fgsName: fgs_name_mapp[code],  
209 - list: gd[code]  
210 - });  
211 - if(!fgs_name_mapp[code]){  
212 - alert('出现异常的公司归属 :' + code);  
213 - }  
214 - }  
215 -  
216 - data.sort(function (a, b) {  
217 - return a.fgsName.localeCompare(b.fgsName);  
218 - });  
219 -  
220 - var htmlStr = template('authorize-user-auth-lines-temp', {list: data});  
221 - $('.xd_line_list', wrap).html(htmlStr);  
222 -  
223 - //滚动条  
224 - $('.xd_line_list', wrap).perfectScrollbar({suppressScrollX: true});  
225 - }  
226 -  
227 - function render_auth_menus() {  
228 - var excludeArray = [],event;  
229 - if(xd_auth && xd_auth.excludeMenus)  
230 - excludeArray = xd_auth.excludeMenus.split(',');  
231 -  
232 - $('.xd_menu_grid li>label>input').each(function () {  
233 - event=$(this).data('event');  
234 - if(excludeArray.indexOf(event)==-1)  
235 - this.checked=true;  
236 - });  
237 - $('.xd_menu_grid').show();  
238 - $('.xd_menu_grid .uk-list', wrap).perfectScrollbar('update');  
239 - }  
240 -  
241 - $('.xd_menu_grid .uk-list', wrap).perfectScrollbar({suppressScrollX: true});  
242 -  
243 - /**  
244 - * 线路选择modal  
245 - */  
246 - var compSelectData, modal='#select_line_modal',modalRender;  
247 - $(modal).on('show', function () {  
248 - if(!modalRender){  
249 - render_line_select_modal();  
250 - modalRender = true;  
251 - }  
252 - $('#modal_line_input', modal).focus();  
253 - });  
254 - function render_line_select_modal() {  
255 - var htmlStr = template('authorize-modal-lines-temp', {list: all_lines, destroy: $('.modal_type_select',modal).val()});  
256 - $('.line_checkbox_list').html(htmlStr);  
257 - //选中线路  
258 - var codeArray=[];  
259 - if(xd_auth && xd_auth.lineCodeStr)  
260 - codeArray = xd_auth.lineCodeStr.split(',');  
261 -  
262 - $('.line_checkbox_list>label.btn').each(function () {  
263 - if(codeArray.indexOf($(this).data('code')+'')!=-1){  
264 - $(this).addClass('active').find('>input')[0].checked=true;  
265 - }  
266 - });  
267 -  
268 - //构建公司级联下拉框  
269 - compSelectData=convert_buss_data(companyData);  
270 - var companyStr = '<option value="">请选择...</option>';  
271 - for(var code in compSelectData){  
272 - companyStr+='<option value="'+code+'">'+compSelectData[code].name+'</option>';  
273 - }  
274 - $('#modal_company_select', modal).html(companyStr).on('change', function () {  
275 - var code = $(this).val(), subSelect=$('#modal_sub_company_select', modal);  
276 - if(!code)  
277 - subSelect.empty().attr('disabled', 'disabled');  
278 - else{  
279 - var subCompStr = '<option value="">请选择...</option>';  
280 - $.each(compSelectData[code].childs, function () {  
281 - subCompStr+='<option value="'+this.businessCode+'">'+this.businessName+'</option>';  
282 - });  
283 - subSelect.html(subCompStr).removeAttr('disabled');  
284 - }  
285 - //过滤线路  
286 - filter_modal_lines();  
287 - });  
288 - $('#modal_sub_company_select', modal).on('change', filter_modal_lines);  
289 - $('#modal_type_select', modal).on('change', filter_modal_lines);  
290 - }  
291 -  
292 - $('#modal_line_input', modal).on('input', function () {  
293 - var t = $(this).val()+'';  
294 - if(!t){  
295 - filter_modal_lines();  
296 - return;  
297 - }  
298 - var codes=[];  
299 - $.each(all_lines, function () {  
300 - if(this.name.indexOf(t)!=-1)  
301 - codes.push(this.lineCode);  
302 - });  
303 -  
304 - var array = $('.line_checkbox_list>label.btn').css('display', 'none');  
305 - array.each(function () {  
306 - if(codes.indexOf($(this).data('code')+'')!=-1)  
307 - $(this).css('display', 'inline-block');  
308 - });  
309 - });  
310 -  
311 - function filter_modal_lines() {  
312 - console.log('filter_modal_lines');  
313 - var company=$('#modal_company_select', modal).val(),//公司代码  
314 - sub_company=$('#modal_sub_company_select', modal).val(),//分公司代码  
315 - type = $('#modal_type_select', modal).val();//线路状态  
316 -  
317 - var array = $('.line_checkbox_list>label.btn').css('display', 'none'),s_dom=[];  
318 -  
319 - if(!company && !sub_company && type==-1){  
320 - array.css('display', 'inline-block');  
321 - return;  
322 - }  
323 -  
324 - var status;  
325 - array.each(function () {  
326 - if(company && $(this).data('gs')!=company)  
327 - return true;  
328 - if(sub_company && $(this).data('fgs')!=sub_company)  
329 - return true;  
330 -  
331 - status = $(this).hasClass('destroy')?1:0;  
332 - if(type!=-1 && type!=status)  
333 - return true;  
334 -  
335 - s_dom.push(this);  
336 - });  
337 - for(var i=0,dom;dom=s_dom[i++];)  
338 - $(dom).css('display', 'inline-block');  
339 - }  
340 -  
341 - $('.line_checkbox_list').on('click', 'label.btn', function () {  
342 - if($('input',this)[0].checked)  
343 - $(this).addClass('active');  
344 - else  
345 - $(this).removeClass('active');  
346 - });  
347 -  
348 - //全选  
349 - $('#globalCheckbox', modal).on('click', function () {  
350 - var state=this.checked;  
351 - $('.line_checkbox_list>label.btn:visible>input').each(function () {  
352 - this.checked=state;  
353 - });  
354 -  
355 - $('.line_checkbox_list>label.btn:visible').each(function () {  
356 - if(state)  
357 - $(this).addClass('active');  
358 - else  
359 - $(this).removeClass('active');  
360 - });  
361 - });  
362 -  
363 - //确定  
364 - $('#confirmBtn', modal).on('click', function () {  
365 - var lines='';  
366 - $('.line_checkbox_list>label.btn.active').each(function () {  
367 - lines+=($(this).data('code') + ',');  
368 - });  
369 - xd_auth.lineCodeStr = lines;  
370 - render_auth_lines();  
371 - UIkit.modal(modal).hide();  
372 - });  
373 -  
374 -  
375 - //保存  
376 - $('#global_save_btn', wrap).on('click', function () {  
377 - $(this).attr('disabled', 'disabled');  
378 - //调度模式  
379 - xd_auth.pattern=$('#pattern_select',wrap).val();  
380 - //要排除的线调菜单  
381 - var excludeMenus='';  
382 - $('.xd_menu_grid ul input[type=checkbox]').each(function () {  
383 - if(!this.checked)  
384 - excludeMenus+=$(this).data('event')+',';  
385 - });  
386 - xd_auth.excludeMenus=excludeMenus;  
387 - $.post('/realControAuthority', xd_auth, function (rs) {  
388 - UIkit.notification('保存成功!', 'primary');  
389 - $('.authorize_right_cont').trigger('refresh-user');  
390 - });  
391 - });  
392 - })();  
393 - </script> 1 +<!-- 用户线调授权页面 -->
  2 +<div id="user_authorize_wrap" style="height: 100%;">
  3 + <div class="top_title"></div>
  4 +
  5 + <div class="xd_line_list">
  6 + </div>
  7 + <div class="top_tools">
  8 + <form class="ct_pattern_form">
  9 + <div class="uk-margin">
  10 + <div uk-form-custom="target: > * > span:first" style="display: none">
  11 + <select id="pattern_select">
  12 + <option value="0">监控模式</option>
  13 + <option value="1">主调模式</option>
  14 + <option value="2">作废模式</option>
  15 + </select>
  16 + <button class="uk-button uk-button-default" type="button" tabindex="-1">
  17 + <span></span>
  18 + <span uk-icon="icon: chevron-down"></span>
  19 + </button>
  20 + </div>
  21 + </div>
  22 + </form>
  23 + <div class="add_line_icon" uk-toggle="target: #select_line_modal">
  24 + <i uk-icon="icon: plus"></i> 添加线路
  25 + </div>
  26 + &nbsp;&nbsp;
  27 + <button class="uk-button uk-button-primary uk-button-small" id="global_save_btn">保存哇!</button>
  28 + </div>
  29 +
  30 + <div class="uk-child-width-expand uk-grid-small xd_menu_grid" uk-grid style="display: none;">
  31 +
  32 + <div>
  33 + <h4>数据&统计</h4>
  34 + <ul class="uk-list uk-list-large uk-list-divider">
  35 + <li><label><input class="uk-checkbox" type="checkbox" data-event="curr_date_schedule"> 当日计划排班</label></li>
  36 + <li><label><input class="uk-checkbox" type="checkbox" data-event="cache_data_manage"> 缓存数据管理</label></li>
  37 + <li><label><input class="uk-checkbox" type="checkbox" data-event="history_sch_maintain"> 历史路单维护</label></li>
  38 + <li><label><input class="uk-checkbox" type="checkbox" data-event="sch_edit_info"> 班次修正日志</label></li>
  39 + </ul>
  40 + </div>
  41 +
  42 + <div>
  43 + <h4>报表管理</h4>
  44 + <ul class="uk-list uk-list-large uk-list-divider">
  45 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_waybill"> 行车路单</label></li>
  46 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_history_message"> 调度历史消息</label></li>
  47 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_account"> 驾驶员请求台账</label></li>
  48 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_correctForm"> 修正报表</label></li>
  49 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_statisticsDaily"> 统计日报</label></li>
  50 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_scheduleDaily"> 调度日报</label></li>
  51 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_jobSummary"> 工作汇总</label></li>
  52 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_daily"> 班次日报表</label></li>
  53 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_inoutstation"> 班次到离站</label></li>
  54 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_oilListMonth"> 月存油报表</label></li>
  55 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_scheduleAnaly"> 时刻表分析</label></li>
  56 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_message"> 调度消息分析</label></li>
  57 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_changetochange"> 换人换车情况统计表</label></li>
  58 + </ul>
  59 + </div>
  60 +
  61 + <div>
  62 + <h4>车载设备</h4>
  63 + <ul class="uk-list uk-list-large uk-list-divider">
  64 + <li><label><input class="uk-checkbox" type="checkbox" data-event="all_devices"> 设备管理</label></li>
  65 + <li><label><input class="uk-checkbox" type="checkbox" data-event="directive_history"> 指令下发记录</label></li>
  66 + <li><label><input class="uk-checkbox" type="checkbox" data-event="device_report"> 设备上报记录</label></li>
  67 + <li><label><input class="uk-checkbox" type="checkbox" data-event="gps_play_back"> 轨迹回放</label></li>
  68 + <li><label><input class="uk-checkbox" type="checkbox" data-event="safe_driving"> 安全驾驶(图像)</label></li>
  69 + </ul>
  70 + </div>
  71 +
  72 + <div>
  73 + <h4>系统设置</h4>
  74 + <ul class="uk-list uk-list-large uk-list-divider">
  75 + <li><label><input class="uk-checkbox" type="checkbox" data-event="line_config"> 线路配置</label></li>
  76 + <li><label><input class="uk-checkbox" type="checkbox" data-event="fbzdzx_config"> 翻班与自动执行</label></li>
  77 + <li><label><input class="uk-checkbox" type="checkbox" data-event="tts_config"> TTS</label></li>
  78 + <li><label><input class="uk-checkbox" type="checkbox" data-event="signal_state"> 信号标记</label></li>
  79 + </ul>
  80 + </div>
  81 +
  82 + </div>
  83 +
  84 + <!-- This is the modal -->
  85 + <div id="select_line_modal" class="uk-modal-container" uk-modal="bg-close:false;">
  86 + <div class="uk-modal-dialog uk-modal-body">
  87 + <button class="uk-modal-close-outside" type="button" uk-close></button>
  88 + <h2 class="uk-modal-title">添加线路权限</h2>
  89 + <div>
  90 + <form>
  91 + <div class="ct_field" style="width: 140px;">
  92 + <label>状态</label>
  93 + <select class="uk-select" id="modal_type_select" style="width: 94px;">
  94 + <option value="-1">全部</option>
  95 + <option value="0">营运</option>
  96 + <option value="1">撤销</option>
  97 + </select>
  98 + </div>
  99 + <div class="ct_field">
  100 + <label>公司</label>
  101 + <select class="uk-select" id="modal_company_select"></select>
  102 + </div>
  103 + <div class="ct_field">
  104 + <label>分公司</label>
  105 + <select class="uk-select" id="modal_sub_company_select" disabled></select>
  106 + </div>
  107 + <div class="ct_field">
  108 + <label>线路</label>
  109 + <input class="uk-input" id="modal_line_input" placeholder="没做拼音映射!!"/>
  110 + </div>
  111 + <label><input class="uk-checkbox" type="checkbox" id="globalCheckbox"> 全选</label>
  112 + </form>
  113 + <div class="uk-modal-body line_checkbox_list" style="padding: 0 !important;" uk-overflow-auto>
  114 + </div>
  115 + </div>
  116 + <p class="uk-text-right">
  117 + <button class="uk-button uk-button-default uk-modal-close" type="button">取消</button>
  118 + <button class="uk-button uk-button-primary" id="confirmBtn" type="button">确定</button>
  119 + </p>
  120 + </div>
  121 + </div>
  122 +
  123 + <script id="authorize-user-auth-lines-temp" type="text/html">
  124 + {{each list as t i}}
  125 + <h5>{{t.fgsName}}</h5>
  126 + <div class="sub_lines">
  127 + {{each t.list as obj j}}
  128 + <span title="{{obj.lineCode}}" class="line_btn {{obj.destroy==1?'destroy':''}}">{{obj.name}}</span>
  129 + {{/each}}
  130 + </div>
  131 + {{/each}}
  132 + </script>
  133 + <script id="authorize-user-auth-title-temp" type="text/html">
  134 + <div style="font-weight: 600;">{{name}}({{userName}})
  135 + </div>
  136 + <!--<div class="desc">最近登录 {{lastLoginDateStr}}</div>-->
  137 + <div class="desc">...</div>
  138 + </script>
  139 +
  140 + <script id="authorize-modal-lines-temp" type="text/html">
  141 + {{each list as obj i}}
  142 + <label class="btn {{obj.destroy==1?'destroy':''}}" data-gs="{{obj.company}}" data-fgs="{{obj.brancheCompany}}"
  143 + title="{{obj.name}}" data-code="{{obj.lineCode}}">
  144 + <input class="uk-checkbox" type="checkbox">{{obj.name}}
  145 + </label>
  146 + {{/each}}
  147 + </script>
  148 + <script>
  149 + (function () {
  150 + var wrap = '#user_authorize_wrap', user, xd_auth, all_lines, companyData;
  151 + //分公司名称映射(只用于分组展示,就写死)
  152 +<<<<<<< HEAD
  153 + var fgs_name_mapp = {
  154 + '55_3': '上南公司(六分公司)',
  155 + '55_1': '上南公司(二分公司)',
  156 + '55_2': '上南公司(三分公司)',
  157 + '55_4': '上南公司(一分公司)',
  158 + '55_5': '上南公司(培训部)',
  159 + '22_2': '金高公司(二分公司)',
  160 + '22_1': '金高公司(四分公司)',
  161 + '22_3': '金高公司(三分公司)',
  162 + '22_5': '金高公司(一分公司)',
  163 + '26_3': '南汇公司(三分公司)',
  164 + '26_2': '南汇公司(南汇二分)',
  165 + '26_1': '南汇公司(南汇一分)',
  166 + '26_4': '南汇公司(南汇维修公司)',
  167 + '26_5': '南汇公司(南汇公司)',
  168 + '26_6': '南汇公司(南汇六分)',
  169 + '05_5': '杨高公司(杨高分公司)',
  170 + '05_6': '杨高公司(周浦分公司)',
  171 + '05_3': '杨高公司(芦潮港分公司)',
  172 + '05_1': '杨高公司(川沙分公司)',
  173 + '05_2': '杨高公司(金桥分公司)',
  174 + '77_78': '闵行公司',
  175 + '300_301': '金球公交',
  176 + '99_100': '青浦公交',
  177 + '24_1': '一车队',
  178 + '24_2': '二车队',
  179 + '24_3': '三车队'
  180 +=======
  181 + var fgs_name_mapp={
  182 + '55_3': '上南公司(六分公司)', '55_1': '上南公司(二分公司)', '55_2': '上南公司(三分公司)', '55_4': '上南公司(一分公司)', '55_5': '上南公司(培训部)',
  183 + '22_2': '金高公司(二分公司)', '22_1': '金高公司(四分公司)', '22_3': '金高公司(三分公司)', '22_5': '金高公司(一分公司)',
  184 + '26_3': '南汇公司(三分公司)', '26_2': '南汇公司(南汇二分)', '26_1': '南汇公司(南汇一分)', '26_4': '南汇公司(南汇维修公司)', '26_5': '南汇公司(南汇公司)', '26_6': '南汇公司(南汇六分)',
  185 + '05_5': '杨高公司(杨高分公司)', '05_6': '杨高公司(周浦分公司)', '05_3': '杨高公司(芦潮港分公司)', '05_1': '杨高公司(川沙分公司)', '05_2': '杨高公司(金桥分公司)',
  186 + '77_78': '闵行公司','300_301': '金球公交','302_303': '露虹公交', '99_100': '青浦公交','24_1': '一车队', '24_2': '二车队', '24_3': '三车队'
  187 +>>>>>>> 46649faa9a8c89602fbb3f73b0242c178de95777
  188 + };
  189 +
  190 + var defauleConfig;
  191 + var patSelect;
  192 + $(wrap).on('init', function (e, data) {
  193 + e.stopPropagation();
  194 + user = data.user;
  195 + all_lines = data.lineArray;
  196 + companyData = data.companyData;
  197 +
  198 + all_lines.sort(function (a, b) {
  199 + return a.name.localeCompare(b.name);
  200 + });
  201 + //top title
  202 + var htmlStr = template('authorize-user-auth-title-temp', user);
  203 + $('.top_title', wrap).html(htmlStr);
  204 +
  205 + //用户线调权限
  206 + defauleConfig = {userId: user.id, pattern: 0, excludeMenus: 'history_sch_maintain'};
  207 + $.get('/realControAuthority/findByUserId', {userId: user.id}, function (rs) {
  208 + //console.log('rsrs',rs);
  209 + xd_auth = rs;
  210 + if (!xd_auth)
  211 + xd_auth = defauleConfig;
  212 + //渲染线路权限
  213 + render_auth_lines();
  214 + //渲染菜单权限
  215 + render_auth_menus();
  216 + //渲染线路选择modal
  217 + //render_line_select_modal();
  218 + patSelect = rs.pattern;
  219 + $('#pattern_select', wrap).val(xd_auth.pattern).trigger('change').parent().show();
  220 + });
  221 + });
  222 + $('#pattern_select').change(function () {
  223 + if ($('#pattern_select', wrap).val() == 2 && $('#pattern_select', wrap).val() != patSelect) {
  224 + // UIkit.modal.confirm("选择作废模式后该用户将失去所有线路和权限", function(){
  225 + //
  226 + // });
  227 + UIkit.modal.alert("选择作废模式后该用户将失去所有线路和权限!");
  228 + }
  229 +
  230 + })
  231 +
  232 + function render_auth_lines() {
  233 + var data = [], codeArray = [];
  234 + if (xd_auth && xd_auth.lineCodeStr)
  235 + codeArray = xd_auth.lineCodeStr.split(',');
  236 +
  237 + $.each(all_lines, function () {
  238 + if (codeArray.indexOf(this.lineCode) != -1)
  239 + data.push(this);
  240 + });
  241 +
  242 + data.sort(function (a, b) {
  243 + return a.name.localeCompare(b.name);
  244 + });
  245 + //按分公司分组
  246 + var gd = groupBy(data, 'cgsbm');
  247 + data = [];
  248 + for (var code in gd) {
  249 + data.push({
  250 + code: code,
  251 + fgsName: fgs_name_mapp[code],
  252 + list: gd[code]
  253 + });
  254 + if (!fgs_name_mapp[code]) {
  255 + alert('出现异常的公司归属 :' + code);
  256 + }
  257 + }
  258 +
  259 + data.sort(function (a, b) {
  260 + return a.fgsName.localeCompare(b.fgsName);
  261 + });
  262 +
  263 + var htmlStr = template('authorize-user-auth-lines-temp', {list: data});
  264 + $('.xd_line_list', wrap).html(htmlStr);
  265 +
  266 + //滚动条
  267 + $('.xd_line_list', wrap).perfectScrollbar({suppressScrollX: true});
  268 + }
  269 +
  270 + function render_auth_menus() {
  271 + debugger
  272 + var excludeArray = [], event;
  273 + if (xd_auth && xd_auth.excludeMenus)
  274 + excludeArray = xd_auth.excludeMenus.split(',');
  275 +
  276 + $('.xd_menu_grid li>label>input').each(function () {
  277 + event = $(this).data('event');
  278 + if (excludeArray.indexOf(event) == -1)
  279 + this.checked = true;
  280 + });
  281 + $('.xd_menu_grid').show();
  282 + $('.xd_menu_grid .uk-list', wrap).perfectScrollbar('update');
  283 + }
  284 +
  285 + $('.xd_menu_grid .uk-list', wrap).perfectScrollbar({suppressScrollX: true});
  286 +
  287 + /**
  288 + * 线路选择modal
  289 + */
  290 + var compSelectData, modal = '#select_line_modal', modalRender;
  291 + $(modal).on('show', function () {
  292 + if (!modalRender) {
  293 + render_line_select_modal();
  294 + modalRender = true;
  295 + }
  296 + $('#modal_line_input', modal).focus();
  297 + });
  298 +
  299 + function render_line_select_modal() {
  300 + var htmlStr = template('authorize-modal-lines-temp', {
  301 + list: all_lines,
  302 + destroy: $('.modal_type_select', modal).val()
  303 + });
  304 + $('.line_checkbox_list').html(htmlStr);
  305 + //选中线路
  306 + var codeArray = [];
  307 + if (xd_auth && xd_auth.lineCodeStr)
  308 + codeArray = xd_auth.lineCodeStr.split(',');
  309 +
  310 + $('.line_checkbox_list>label.btn').each(function () {
  311 + if (codeArray.indexOf($(this).data('code') + '') != -1) {
  312 + $(this).addClass('active').find('>input')[0].checked = true;
  313 + }
  314 + });
  315 +
  316 + //构建公司级联下拉框
  317 + compSelectData = convert_buss_data(companyData);
  318 + var companyStr = '<option value="">请选择...</option>';
  319 + for (var code in compSelectData) {
  320 + companyStr += '<option value="' + code + '">' + compSelectData[code].name + '</option>';
  321 + }
  322 + $('#modal_company_select', modal).html(companyStr).on('change', function () {
  323 + var code = $(this).val(), subSelect = $('#modal_sub_company_select', modal);
  324 + if (!code)
  325 + subSelect.empty().attr('disabled', 'disabled');
  326 + else {
  327 + var subCompStr = '<option value="">请选择...</option>';
  328 + $.each(compSelectData[code].childs, function () {
  329 + subCompStr += '<option value="' + this.businessCode + '">' + this.businessName + '</option>';
  330 + });
  331 + subSelect.html(subCompStr).removeAttr('disabled');
  332 + }
  333 + //过滤线路
  334 + filter_modal_lines();
  335 + });
  336 + $('#modal_sub_company_select', modal).on('change', filter_modal_lines);
  337 + $('#modal_type_select', modal).on('change', filter_modal_lines);
  338 + }
  339 +
  340 + $('#modal_line_input', modal).on('input', function () {
  341 + var t = $(this).val() + '';
  342 + if (!t) {
  343 + filter_modal_lines();
  344 + return;
  345 + }
  346 + var codes = [];
  347 + $.each(all_lines, function () {
  348 + if (this.name.indexOf(t) != -1)
  349 + codes.push(this.lineCode);
  350 + });
  351 +
  352 + var array = $('.line_checkbox_list>label.btn').css('display', 'none');
  353 + array.each(function () {
  354 + if (codes.indexOf($(this).data('code') + '') != -1)
  355 + $(this).css('display', 'inline-block');
  356 + });
  357 + });
  358 +
  359 + function filter_modal_lines() {
  360 + console.log('filter_modal_lines');
  361 + var company = $('#modal_company_select', modal).val(),//公司代码
  362 + sub_company = $('#modal_sub_company_select', modal).val(),//分公司代码
  363 + type = $('#modal_type_select', modal).val();//线路状态
  364 +
  365 + var array = $('.line_checkbox_list>label.btn').css('display', 'none'), s_dom = [];
  366 +
  367 + if (!company && !sub_company && type == -1) {
  368 + array.css('display', 'inline-block');
  369 + return;
  370 + }
  371 +
  372 + var status;
  373 + array.each(function () {
  374 + if (company && $(this).data('gs') != company)
  375 + return true;
  376 + if (sub_company && $(this).data('fgs') != sub_company)
  377 + return true;
  378 +
  379 + status = $(this).hasClass('destroy') ? 1 : 0;
  380 + if (type != -1 && type != status)
  381 + return true;
  382 +
  383 + s_dom.push(this);
  384 + });
  385 + for (var i = 0, dom; dom = s_dom[i++];)
  386 + $(dom).css('display', 'inline-block');
  387 + }
  388 +
  389 + $('.line_checkbox_list').on('click', 'label.btn', function () {
  390 + if ($('input', this)[0].checked)
  391 + $(this).addClass('active');
  392 + else
  393 + $(this).removeClass('active');
  394 + });
  395 +
  396 + //全选
  397 + $('#globalCheckbox', modal).on('click', function () {
  398 + var state = this.checked;
  399 + $('.line_checkbox_list>label.btn:visible>input').each(function () {
  400 + this.checked = state;
  401 + });
  402 +
  403 + $('.line_checkbox_list>label.btn:visible').each(function () {
  404 + if (state)
  405 + $(this).addClass('active');
  406 + else
  407 + $(this).removeClass('active');
  408 + });
  409 + });
  410 +
  411 + //确定
  412 + $('#confirmBtn', modal).on('click', function () {
  413 + var lines = '';
  414 + $('.line_checkbox_list>label.btn.active').each(function () {
  415 + lines += ($(this).data('code') + ',');
  416 + });
  417 + xd_auth.lineCodeStr = lines;
  418 + render_auth_lines();
  419 + UIkit.modal(modal).hide();
  420 + });
  421 +
  422 +
  423 + //保存
  424 + $('#global_save_btn', wrap).on('click', function () {
  425 + $(this).attr('disabled', 'disabled');
  426 + //调度模式
  427 + xd_auth.pattern = $('#pattern_select', wrap).val();
  428 + //要排除的线调菜单
  429 + var excludeMenus = '';
  430 + $('.xd_menu_grid ul input[type=checkbox]').each(function () {
  431 + if (!this.checked)
  432 + excludeMenus += $(this).data('event') + ',';
  433 + });
  434 + xd_auth.excludeMenus = excludeMenus;
  435 + if (xd_auth.pattern == 2) {
  436 + //UIkit.modal.confirm("选择作废模式后该用户将失去所有线路和权限", function () {
  437 + xd_auth.lineCodeStr = '';
  438 + var excludeMenusAll = '';
  439 + $('.xd_menu_grid ul input[type=checkbox]').each(function () {
  440 + excludeMenusAll += $(this).data('event') + ',';
  441 + });
  442 + xd_auth.excludeMenus = excludeMenusAll;
  443 + //});
  444 +
  445 + }
  446 + $.post('/realControAuthority', xd_auth, function (rs) {
  447 + UIkit.notification('保存成功!', 'primary');
  448 + $('.authorize_right_cont').trigger('refresh-user');
  449 + });
  450 + });
  451 + })();
  452 + </script>
394 </div> 453 </div>
395 \ No newline at end of file 454 \ No newline at end of file
src/main/resources/static/pages/permission/user/authorize.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh-cn">
  3 +
  4 +<head>
  5 + <meta charset="UTF-8">
  6 + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/>
  7 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" />
  8 + <link rel="stylesheet" href="/assets/plugins/ztree_v3/css/zTreeStyle/zTreeStyle.css" />
  9 + <style>
  10 + html,body{
  11 + height: 100%;
  12 + }
  13 + .ct_page{
  14 + padding: 25px 15px;
  15 + height: 100%;
  16 + height: calc(100% - 50px);
  17 + }
  18 +
  19 + .ct_cont{
  20 + height: calc(100% - 41px);
  21 + }
  22 +
  23 + .ct_cont>div>div.uk-card{
  24 + height: 99%;
  25 + }
  26 +
  27 + form .uk-inline{
  28 + width: calc(100% - 4px);
  29 + margin-left: 2px;
  30 + }
  31 +
  32 + .ct-card-body{
  33 + overflow: auto;
  34 + padding: 1px 1px 0 2px;
  35 + height: calc(100% - 54px);
  36 + position: relative;
  37 + margin-top: -12px;
  38 + }
  39 +
  40 + .ct_li_desc{
  41 + color: #a8a8a8;
  42 + font-size: 13px;
  43 + }
  44 +
  45 + .ct-card-body .uk-list-large{
  46 + font-size: 14px;
  47 + }
  48 +
  49 + .ct-card-body .uk-list-large>li{
  50 + cursor: default;
  51 + padding-left: 20px;
  52 + margin-top: 2px !important;
  53 + padding-top: 17px !important;
  54 + position: relative;
  55 + }
  56 +
  57 + .ct-card-body .uk-list-large>li:hover{
  58 + background: #edecec;
  59 + }
  60 +
  61 + .ct-card-body .uk-list-large>li.active{
  62 + background: #1e87f0 !important;
  63 + color: white;
  64 + }
  65 +
  66 + .ct-card-body .uk-list-large>li.active>span.role-code{
  67 + color: #ffffff;
  68 + }
  69 +
  70 + .ct-card-body .uk-list-large.role-list>li:hover{
  71 + background: #fff494;
  72 + }
  73 +
  74 + .ct-card-body .uk-list-large>li.active .ct_li_desc{
  75 + color: #e6e6e6;
  76 + }
  77 +
  78 + .ct-card-body .uk-list-large>li>span.uk-badge{
  79 + position: absolute;
  80 + top: 17px;
  81 + right: 25px;
  82 + }
  83 +
  84 + .ct-card-body .uk-list-large>li>span.role-code{
  85 + padding: 4px 6px;
  86 + color: #a8a8a8;
  87 + margin-left: 5px;
  88 + }
  89 +
  90 + .top_title{
  91 + padding: 9px 0 5px 15px;
  92 + border-bottom: 1px solid #ededed;
  93 + border-left: 5px solid #FFC107;
  94 + }
  95 +
  96 + .top_title>.desc{
  97 + font-size: 13px;
  98 + color: grey;
  99 + margin-top: 3px;
  100 + }
  101 +
  102 + .left_menu_list{
  103 + overflow: auto;
  104 + position: relative;
  105 + }
  106 +
  107 + .left_menu_list .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
  108 + opacity: 0.6 !important;
  109 + padding: 0 !important;
  110 + }
  111 +
  112 + ._company{
  113 + margin: 15px 0px;
  114 + }
  115 + ._company>h5{
  116 + margin-bottom: 10px;
  117 + font-size: 15px;
  118 + color: #6b6b6b;
  119 + text-indent: 12px;
  120 + }
  121 + ._company>._fgs>label{
  122 + padding: 3px 12px 3px 10px;
  123 + display: inline-block;
  124 + border: 1px solid gainsboro;
  125 + border-radius: 2px;
  126 + margin: 5px;
  127 + font-size: 14px;
  128 + }
  129 + ._company>._fgs>label.active{
  130 + background: #1e87f0;
  131 + color: #fff;
  132 + }
  133 + ._company .uk-checkbox:checked:focus,
  134 + .line_checkbox_list .uk-checkbox:checked:focus{
  135 + background-color: #1e87f0 !important;
  136 + }
  137 + .save_icon{
  138 + position: absolute;
  139 + right: 2px;
  140 + background: #bec4c9;
  141 + font-size: 12px;
  142 + padding: 2px 15px;
  143 + color: #fff;
  144 + box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  145 + cursor: pointer;
  146 + }
  147 + .save_icon:hover{
  148 + background: #FFC107;
  149 + }
  150 + .data_auth_list{
  151 + position: relative;
  152 + }
  153 + #user_authorize_wrap .top_title{
  154 + border-left: 5px solid #cacac8;
  155 + }
  156 + .xd_line_list{
  157 + height: 37%;
  158 + padding: 7px;
  159 + border-bottom: 1px solid #f2f2f2;
  160 + overflow: auto;
  161 + position: relative;
  162 + }
  163 + .xd_line_list>h5{
  164 + color: #858585;
  165 + margin: 5px 5px 5px 0;
  166 + font-size: 14px;
  167 + }
  168 + .sub_lines{
  169 + padding-left: 15px;
  170 + }
  171 + .sub_lines>span.line_btn {
  172 + background: #00BCD4;
  173 + color: #fff;
  174 + padding: 4px 9px;
  175 + display: inline-block;
  176 + min-width: 68px;
  177 + text-align: center;
  178 + margin: 5px 2px;
  179 + box-shadow: 0 5px 9px rgba(0,0,0,0.08);
  180 + cursor: pointer;
  181 + font-size: 14px;
  182 + font-family: 微软雅黑;
  183 + }
  184 +
  185 + .sub_lines>span.line_btn.destroy{
  186 + background: #ff5c5c;
  187 + }
  188 +
  189 + .sub_lines>span.line_btn.destroy:hover{
  190 + background: #ff7373;
  191 + }
  192 +
  193 + .sub_lines>span.line_btn:hover{
  194 + background: #2dd7ed;
  195 + }
  196 + .add_line_icon{
  197 + cursor: pointer;
  198 + padding: 2px 5px;
  199 + border-radius: 5px;
  200 + display: inline-block;
  201 + }
  202 + .add_line_icon>i{
  203 + vertical-align: top;
  204 + margin-top: 3px;
  205 + }
  206 + .add_line_icon:hover{
  207 + background: #ededed;
  208 + }
  209 + .ct_pattern_form{
  210 + display: inline-block;
  211 + }
  212 + .xd_menu_grid{
  213 + padding: 25px 25px 0 25px;
  214 + height: calc(63% - 91px);
  215 + }
  216 + .xd_menu_grid .uk-list{
  217 + border: 1px solid #ededed;
  218 + height: calc(100% - 70px);
  219 + overflow: auto;
  220 + position: relative;
  221 + }
  222 +
  223 + .xd_menu_grid .uk-list>li{
  224 + margin: 5px 0 !important;
  225 + padding: 10px 0 0 10px !important;
  226 + font-size: 14px;
  227 + }
  228 + .top_tools{
  229 + position: absolute;
  230 + top: 15px;
  231 + right: 25px;
  232 + }
  233 + .ct_field {
  234 + display: inline-block;
  235 + width: 240px;
  236 + }
  237 + .ct_field>select,.ct_field>input{
  238 + width: calc(100% - 60px);
  239 + }
  240 + .line_checkbox_list{
  241 + margin-top: 15px;
  242 + }
  243 + .line_checkbox_list>.btn{
  244 + padding: 5px 7px;
  245 + border-radius: 2px;
  246 + display: inline-block;
  247 + margin: 4px 9px;
  248 + font-size: 14px;
  249 + font-family: 微软雅黑;
  250 + border: 1px solid #d9d9d9;
  251 + width: 100px;
  252 + overflow: hidden;
  253 + text-overflow: ellipsis;
  254 + white-space: nowrap;
  255 + }
  256 + .line_checkbox_list>.btn>input{
  257 + margin-right: 5px;
  258 + }
  259 + .line_checkbox_list>.btn.active{
  260 + background: #1e87f0;
  261 + color: #fff;
  262 + }
  263 +
  264 + .line_checkbox_list>.btn.destroy,
  265 + .line_checkbox_list>.btn.destroy>input{
  266 + border-color: #ff9595;
  267 + color: #ff5c5c;
  268 + }
  269 +
  270 + .line_checkbox_list>.btn.destroy.active{
  271 + background: #ff5c5c;
  272 + color: #fff;
  273 + }
  274 +
  275 + .line_checkbox_list>.btn.destroy.active>input{
  276 + background-color: #ff5c5c !important;
  277 + border-color: #ff5c5c !important;
  278 + }
  279 +
  280 + #role_authorize_wrap .ztree *{
  281 + font-size: 14px;
  282 + }
  283 + #role_authorize_wrap .ztree li{
  284 + line-height: 21px;
  285 + }
  286 + .loading{
  287 + height: 100%;
  288 + text-align: center;
  289 + }
  290 + .loading .uk-spinner{
  291 + margin-top: 200px;
  292 + }
  293 + .loading circle{
  294 + stroke: red;
  295 + }
  296 +
  297 + #select_line_modal .uk-checkbox:checked {
  298 + background-color: #1e87f0;
  299 + }
  300 + </style>
  301 +</head>
  302 +
  303 +<body>
  304 +<div class="loading">
  305 + <div uk-spinner></div>
  306 +</div>
  307 +<div class="ct_page" style="display: none;">
  308 + <h2 class="uk-heading-line uk-heading-bullet"><span>用户授权管理</span></h2>
  309 + <div class="ct_cont uk-grid-small uk-child-width-expand" uk-grid>
  310 + <div class="role_list uk-width-1-4 ">
  311 + <div class="uk-card uk-card-default">
  312 + <form>
  313 + <div class="uk-margin">
  314 + <div class="uk-inline" >
  315 + <!--<span class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></span>-->
  316 + <!--<input class="uk-input role_search_input" type="text" placeholder="搜索角色">-->
  317 + </div>
  318 + </div>
  319 + </form>
  320 +
  321 + <div class="ct-card-body" >
  322 + <ul class="uk-list uk-list-large uk-list-divider role-list">
  323 + </ul>
  324 + </div>
  325 + </div>
  326 + </div>
  327 + <div class="user_list uk-width-1-5 ">
  328 + <div class="uk-card uk-card-default">
  329 + <form>
  330 + <div class="uk-margin">
  331 + <div class="uk-inline" >
  332 + <!--<span class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></span>-->
  333 + <!--<input class="uk-input user_search_input" type="text" placeholder="搜索用户">-->
  334 + </div>
  335 + </div>
  336 + </form>
  337 +
  338 + <div class="ct-card-body">
  339 + <ul class="uk-list uk-list-large user-list">
  340 + </ul>
  341 + </div>
  342 + </div>
  343 + </div>
  344 + <div class="auth_cont ">
  345 + <div class="uk-card uk-card-default authorize_right_cont">
  346 +
  347 + </div>
  348 + </div>
  349 + </div>
  350 +</div>
  351 +
  352 +<script id="authorize-role-list-temp" type="text/html">
  353 + {{each list as r i}}
  354 + <li data-id="{{r.id}}" data-name="{{r.roleName}}" data-code="{{r.codeUp}}">{{r.roleName}}
  355 + <span class="role-code">{{r.codeName}}</span>
  356 + <div class="ct_li_desc">{{r.createDateStr}}</div>
  357 + <span class="uk-badge">{{r.count}}</span>
  358 + </li>
  359 + {{/each}}
  360 +</script>
  361 +<script id="authorize-user-list-temp" type="text/html">
  362 + {{each list as u i}}
  363 + <li class="uk-animation-fade uk-animation-fast" data-name="{{u.name}}" data-code="{{u.userNameUp}}" data-id="{{u.id}}">{{u.name}}<span class="role-code">{{u.userName}}</span></li>
  364 + {{/each}}
  365 +</script>
  366 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  367 +<script src="/assets/js/common.js"></script>
  368 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  369 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  370 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  371 +<!-- EventProxy -->
  372 +<script src="/assets/js/eventproxy.js"></script>
  373 +<!-- art-template 模版引擎 -->
  374 +<script src="/assets/plugins/template.js"></script>
  375 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  376 +<script src="/assets/plugins/ztree_v3/js/jquery.ztree.core.min.js"></script>
  377 +<script src="/assets/plugins/ztree_v3/js/jquery.ztree.excheck.min.js"></script>
  378 +<script>
  379 + var storage = window.localStorage;
  380 +
  381 + if (typeof String.prototype.startsWith != 'function') {
  382 + String.prototype.startsWith = function (prefix){
  383 + return this.slice(0, prefix.length) === prefix;
  384 + };
  385 + }
  386 + var roles,users,role_users,modules,companyData,lineArray;
  387 +
  388 + var ep = EventProxy.create('query_roles', 'query_users', 'query_modules', 'query_company', 'query_line', function (rs, us, ms, cs, lines) {
  389 + roles = rs;
  390 + users = us;
  391 + modules = ms;
  392 + companyData = cs;
  393 + lineArray=lines;
  394 + role_users = {};
  395 + debugger
  396 + for(var i=0,r;r=roles[i++];){
  397 + r.count=0;
  398 + role_users[r.id]=[];
  399 + r.createDateStr=moment(r.createDate).format('YYYY-MM-DD HH:ss');
  400 + r.codeUp=r.codeName.toUpperCase();
  401 + for(var j=0,u;u=users[j++];){
  402 + if(u.roles.indexOf(r.id)!=-1){
  403 + r.count++;
  404 + role_users[r.id].push(u);
  405 + }
  406 + }
  407 + }
  408 + //渲染角色list
  409 + render_role_list(roles);
  410 + //渲染用户list
  411 + render_user_list(users);
  412 +
  413 + $('.loading').remove();
  414 + $('.ct_page').show();
  415 + });
  416 +
  417 + //角色点击
  418 + $('ul.role-list').on('click', 'li', roleClickHanlder);
  419 + //用户点击
  420 + $('ul.user-list').on('click', 'li', userClickHanlder);
  421 +
  422 +
  423 + function roleClickHanlder() {
  424 + if($(this).hasClass('active') && $('ul.user-list>li.active').length==0)
  425 + return;
  426 +
  427 + reset_dom();
  428 + $('ul.role-list>li.active').removeClass('active');
  429 + $(this).addClass('active');
  430 + //重新渲染用户list
  431 + var id = $(this).data('id');
  432 + render_user_list(role_users[id]);
  433 + //加载角色授权页面
  434 + $('.authorize_right_cont').load('/pages/permission/authorize_all/role_auth.html', function () {
  435 + $('#role_authorize_wrap', this).trigger('init', {role: get_role(id), modules: modules, companyData: companyData});
  436 + });
  437 + }
  438 +
  439 + function userClickHanlder() {
  440 + if($(this).hasClass('active'))
  441 + return;
  442 +
  443 + reset_dom();
  444 + $('ul.user-list>li.active').removeClass('active');
  445 + $(this).addClass('active');
  446 +
  447 + //加载用户授权页面
  448 + var id = $(this).data('id');
  449 + $('.authorize_right_cont').load('/pages/permission/authorize_all/user_auth.html', function () {
  450 + $('#user_authorize_wrap', this).trigger('init', {user: get_user(id),lineArray:lineArray, companyData:companyData});
  451 + });
  452 + }
  453 +
  454 + //refresh-user
  455 + $('.authorize_right_cont').on('refresh-user', function () {
  456 + $('ul.user-list>li.active').removeClass('active').trigger('click');
  457 + });
  458 +
  459 + function reset_dom() {
  460 + $('#select_line_modal').remove();
  461 + }
  462 +
  463 + //滚动条
  464 + $('.ct_page .uk-card .ct-card-body').perfectScrollbar({suppressScrollX: true});
  465 +
  466 + //query all role
  467 + var paramsRole = {};
  468 + paramsRole['codeName'] = 'ROLE_ADMIN';
  469 + var storage = window.localStorage;
  470 + var userId=storage.getItem("editUser");
  471 + $get('/user',{id_eq:userId}, function (rs) {
  472 + debugger
  473 + //if (rs)
  474 + ep.emit('query_roles', rs.content[0].roles);
  475 + });
  476 +
  477 +
  478 + //query all user
  479 + var paramsUser = {};
  480 + paramsRole['name'] = 'name';
  481 + $.get('/user/all_distinct',paramsUser, function (rs) {
  482 + var userA={};
  483 + for(var i=0,u;u=rs[i++];){
  484 + if (u.id==userId){
  485 + discard_field(u);
  486 + u.userNameUp=u.userName.toUpperCase();
  487 + u.lastLoginDateStr=moment(u.lastLoginDate).format('YYYY-MM-DD HH:ss');
  488 + userA[0]=u;
  489 + }
  490 + }
  491 + ep.emit('query_users', userA);
  492 + });
  493 +
  494 + //query all modules
  495 + $.get('/module/all_distinct', function (rs) {
  496 + ep.emit('query_modules', rs);
  497 + });
  498 +
  499 + //query all company data
  500 + $.get('/business/all', function (rs) {
  501 + ep.emit('query_company', rs);
  502 + });
  503 +
  504 + //query all line
  505 + $.get('/line/all', {'remove_ne': 1}, function (rs) {
  506 + ep.emit('query_line', rs);
  507 + });
  508 +
  509 + function discard_field(u) {
  510 + var array = [];
  511 + $.each(u.roles, function () {
  512 + array.push(this.id);
  513 + });
  514 + u.roles = array;
  515 + }
  516 +
  517 + function render_role_list(list) {
  518 + var htmlStr = template('authorize-role-list-temp', {list: list});
  519 + $('ul.role-list').html(htmlStr);
  520 + up_scroll();
  521 + }
  522 +
  523 +
  524 + function render_user_list(list) {
  525 + var htmlStr = template('authorize-user-list-temp', {list: list});
  526 + $('ul.user-list').html(htmlStr);
  527 + up_scroll();
  528 + }
  529 +
  530 + function reset_role_list(){
  531 + var actives = $('ul.role-list>li.active');
  532 + if(actives.length > 0){
  533 + $('ul.role-list>li.active').removeClass('active');
  534 + render_user_list(users);
  535 + $('.authorize_right_cont').empty();
  536 + }
  537 + }
  538 +
  539 + function up_scroll() {
  540 + $('.ct_page .uk-card .ct-card-body').perfectScrollbar('update');
  541 + }
  542 +
  543 +
  544 +
  545 + function get_role(id) {
  546 + for(var i=0,r;r=roles[i++];){
  547 + if(r.id==id)
  548 + return r;
  549 + }
  550 + return null;
  551 + }
  552 +
  553 + function get_user(id) {
  554 + for(var i=0,u;u=users[i++];){
  555 + if(u.id==id)
  556 + return u;
  557 + }
  558 + return null;
  559 + }
  560 +
  561 + $(document).on('submit', 'form', function () {
  562 + return false;
  563 + });
  564 +
  565 + function convert_buss_data(rs) {
  566 + var baseCode;
  567 + //找到跟节点
  568 + $.each(rs, function () {
  569 + if(this.upCode == 0){
  570 + baseCode=this.businessCode;
  571 + return false;
  572 + }
  573 + });
  574 + if(!baseCode){
  575 + alert('大爷找不到根节点,数据有问题吧!!!');
  576 + return;
  577 + }
  578 + //提取二级节点
  579 + var secondMap={};
  580 + $.each(rs, function () {
  581 + if(this.upCode==baseCode){
  582 + secondMap[this.businessCode] = {
  583 + name: this.businessName,
  584 + childs: []
  585 + };
  586 + }
  587 + });
  588 + //分公司节点
  589 + $.each(rs, function () {
  590 + if(secondMap[this.upCode])
  591 + secondMap[this.upCode].childs.push(this);
  592 + });
  593 +
  594 + //排序
  595 + for(var sid in secondMap){
  596 + secondMap[sid].childs.sort(naturalSort);
  597 + }
  598 +
  599 + return secondMap;
  600 + }
  601 +
  602 + var naturalSort=function (a, b) {
  603 + return a.businessName.localeCompare(b.businessName);
  604 + };
  605 +
  606 + var groupBy = function (list, field) {
  607 + var rs = {},
  608 + key;
  609 + $.each(list, function () {
  610 + key = this[field];
  611 + if (!rs[key])
  612 + rs[key] = [];
  613 +
  614 + rs[key].push(this);
  615 + });
  616 +
  617 + return rs;
  618 + };
  619 +</script>
  620 +</body>
  621 +</html>
0 \ No newline at end of file 622 \ No newline at end of file
src/main/resources/static/pages/permission/user/edit.html
@@ -67,9 +67,13 @@ @@ -67,9 +67,13 @@
67 </div> 67 </div>
68 </div> 68 </div>
69 </div> 69 </div>
  70 + <div>
  71 + <!--<iframe src="authorize.html?origin=real_control_iframe" frameborder="0" style="height: 600px;width: 100%;"></iframe>-->
  72 + </div>
70 <div class="form-actions"> 73 <div class="form-actions">
71 <div class="row"> 74 <div class="row">
72 <div class="col-md-offset-3 col-md-4"> 75 <div class="col-md-offset-3 col-md-4">
  76 + <!--<a href="main.html" class="btn green" id="nextStep" ><i class="fa fa-check"></i> 下一步</a>-->
73 <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button> 77 <button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button>
74 <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a> 78 <a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a>
75 </div> 79 </div>
@@ -79,6 +83,21 @@ @@ -79,6 +83,21 @@
79 <!-- END FORM--> 83 <!-- END FORM-->
80 </div> 84 </div>
81 </div> 85 </div>
  86 +
  87 +<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;left: 50%;
  88 + top: 50%;transform: translate(-50%,-50%);min-width:50%;overflow: visible;bottom: inherit; right: inherit;">
  89 + <div class="modal-dialog">
  90 + <div class="modal-content">
  91 + <div class="modal-body" style="text-align: center;"></div>
  92 + <div class="modal-footer" style="margin: 0 auto;">
  93 + <center>
  94 + <button type="button" class="btn btn-primary" data-dismiss="modal" id="noNext" style="margin-right: 20%;padding:5px 35px;background-color: #337AB7;color: white;">&nbsp;完&nbsp;成&nbsp;</button>
  95 + <button type="button" class="btn btn-primary" id="yesNext">继续配置授权</button>
  96 + </center>
  97 + </div>
  98 + </div><!-- /.modal-content -->
  99 + </div><!-- /.modal -->
  100 +</div>
82 <script> 101 <script>
83 $(function(){ 102 $(function(){
84 var id = $.url().param('no'); 103 var id = $.url().param('no');
@@ -169,10 +188,24 @@ @@ -169,10 +188,24 @@
169 data: params, 188 data: params,
170 success: function(res){ 189 success: function(res){
171 layer.msg('修改用户信息成功.'); 190 layer.msg('修改用户信息成功.');
172 - loadPage('list.html'); 191 + $('#myModal').modal();
  192 + //loadPage('list.html');
173 } 193 }
174 }); 194 });
175 } 195 }
176 }); 196 });
  197 +
  198 + $('#noNext').click(function () {
  199 + $('#myModal').modal('hide');
  200 + $('.modal-backdrop').remove();
  201 +
  202 + loadPage('list.html');
  203 + })
  204 + $('#yesNext').click(function () {
  205 + var storage = window.localStorage;
  206 + storage.setItem("editUser",$('#id').val());
  207 + $('#myModal').modal('hide');
  208 + window.location.href='main.html'
  209 + })
177 }); 210 });
178 </script> 211 </script>
179 \ No newline at end of file 212 \ No newline at end of file
src/main/resources/static/pages/permission/user/list.html
@@ -60,6 +60,7 @@ @@ -60,6 +60,7 @@
60 </select> 60 </select>
61 </td> 61 </td>
62 <td></td> 62 <td></td>
  63 +
63 <td> 64 <td>
64 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" > 65 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
65 <i class="fa fa-search"></i> 搜索</button> 66 <i class="fa fa-search"></i> 搜索</button>
@@ -110,6 +111,8 @@ @@ -110,6 +111,8 @@
110 <td> 111 <td>
111 {{obj.lastLoginDate}} 112 {{obj.lastLoginDate}}
112 </td> 113 </td>
  114 +
  115 +
113 <td> 116 <td>
114 <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a> 117 <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
115 <!--<button type="button" class="btn btn-sm line_allot_btn" data-id="{{obj.id}}">线调线路分配</button>--> 118 <!--<button type="button" class="btn btn-sm line_allot_btn" data-id="{{obj.id}}">线调线路分配</button>-->
src/main/resources/static/pages/permission/user/main.html 0 → 100644
  1 +<iframe src="authorize.html?origin=real_control_iframe" frameborder="0" style="height: 90%;width: 100%;"></iframe>
  2 +<div class="form-actions">
  3 + <div class="row">
  4 + <div class="col-md-offset-3 col-md-4">
  5 + <!--<a href="main.html" class="btn green" ><i class="fa fa-check"></i> 上一步</a>-->
  6 + <!--<button type="submit" class="btn green" ><i class="fa fa-check"></i> 提交</button>-->
  7 + <!--<a type="button" class="btn default" href="list.html" data-pjax><i class="fa fa-times"></i> 取消</a>-->
  8 + </div>
  9 + </div>
  10 +</div>
0 \ No newline at end of file 11 \ No newline at end of file
src/main/resources/static/real_control_v2/css/line_schedule.css
@@ -265,6 +265,12 @@ span.fcsj-diff { @@ -265,6 +265,12 @@ span.fcsj-diff {
265 color: #444; 265 color: #444;
266 } 266 }
267 267
  268 +.tl-wfyd {
  269 + background: rgb( 246,193,10);
  270 + border-top: 1px solid #d9d9d9 !important;
  271 + color: #444;
  272 +}
  273 +
268 .tl-xxfc{ 274 .tl-xxfc{
269 background: rgb(0,255,255); 275 background: rgb(0,255,255);
270 color: #484747; 276 color: #484747;
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lp_change.html
@@ -391,6 +391,7 @@ @@ -391,6 +391,7 @@
391 var type = $(this).data('type'); 391 var type = $(this).data('type');
392 gb_common.$post('/realSchedule/lpChangeMulti', {leftIdx: leftIdx, rightIdx: rightIdx, type: type}, function (rs) { 392 gb_common.$post('/realSchedule/lpChangeMulti', {leftIdx: leftIdx, rightIdx: rightIdx, type: type}, function (rs) {
393 console.log('rs', rs); 393 console.log('rs', rs);
  394 + debugger
394 notify_succ("操作成功!!"); 395 notify_succ("操作成功!!");
395 if(rs.ts) 396 if(rs.ts)
396 gb_schedule_table.updateSchedule(rs.ts); 397 gb_schedule_table.updateSchedule(rs.ts);
@@ -402,6 +403,7 @@ @@ -402,6 +403,7 @@
402 403
403 404
404 function reLoadCurrPageData(){ 405 function reLoadCurrPageData(){
  406 + debugger
405 $('[name=lineSelect]', modal).each(function () { 407 $('[name=lineSelect]', modal).each(function () {
406 var array = gb_common.get_vals(gb_schedule_table.findScheduleByLine($(this).val())).sort(gb_schedule_table.schedule_sort); 408 var array = gb_common.get_vals(gb_schedule_table.findScheduleByLine($(this).val())).sort(gb_schedule_table.schedule_sort);
407 //按路牌分组 409 //按路牌分组
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_custom.html
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 </div> 21 </div>
22 22
23 <script> 23 <script>
  24 + var schselect='';
24 (function () { 25 (function () {
25 var wrap = '#add-sub-task-main-modal .add_custom_wrap', 26 var wrap = '#add-sub-task-main-modal .add_custom_wrap',
26 sch, fs=[]; 27 sch, fs=[];
@@ -28,23 +29,23 @@ @@ -28,23 +29,23 @@
28 $(wrap).on('init', function (e, data) { 29 $(wrap).on('init', function (e, data) {
29 e.stopPropagation(); 30 e.stopPropagation();
30 sch = data.sch; 31 sch = data.sch;
  32 + schselect=sch;
31 $('.plus_icon_span', wrap).trigger('click'); 33 $('.plus_icon_span', wrap).trigger('click');
32 }); 34 });
33 -  
34 //plsu icon 35 //plsu icon
35 $('.plus_icon_span', wrap).on('click', addTaskForm); 36 $('.plus_icon_span', wrap).on('click', addTaskForm);
36 37
37 var bcTypeMap = {'in': 2, 'out': 3, 'normal': 1}; 38 var bcTypeMap = {'in': 2, 'out': 3, 'normal': 1};
38 function addTaskForm() { 39 function addTaskForm() {
39 - var htmlStr = template('sub-task-v2-form-temp', {sch: sch}) 40 + var htmlStr = template('sub-task-v2-form-temp', {sch: schselect})
40 var f = $(htmlStr); 41 var f = $(htmlStr);
41 $('.forms', wrap).append(f); 42 $('.forms', wrap).append(f);
42 //字典转换 43 //字典转换
43 dictionaryUtils.transformDom($('.nt-dictionary', f)); 44 dictionaryUtils.transformDom($('.nt-dictionary', f));
44 45
45 //班次类型切换 46 //班次类型切换
46 - if(bcTypeMap[sch.bcType])  
47 - $('[name=type2]', f).val(bcTypeMap[sch.bcType]); 47 + if(bcTypeMap[schselect.bcType])
  48 + $('[name=type2]', f).val(bcTypeMap[schselect.bcType]);
48 $('[name=type2]', f).trigger('change'); 49 $('[name=type2]', f).trigger('change');
49 50
50 //滚动条到底 51 //滚动条到底
@@ -76,7 +77,7 @@ @@ -76,7 +77,7 @@
76 e.preventDefault(); 77 e.preventDefault();
77 78
78 dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this) 79 dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this)
79 - , {/*remarks: $('#form-s-t',wrap).val(), */'schedule.id': sch.id})); 80 + , {/*remarks: $('#form-s-t',wrap).val(), */'schedule.id': schselect.id}));
80 $(this).data('valid', true); 81 $(this).data('valid', true);
81 82
82 if(allValidSuccess()){ 83 if(allValidSuccess()){
@@ -87,11 +88,11 @@ @@ -87,11 +88,11 @@
87 //完成后更新前端数据 88 //完成后更新前端数据
88 gb_schedule_table.updateSchedule(rst); 89 gb_schedule_table.updateSchedule(rst);
89 UIkit.modal('#add-sub-task-main-modal').hide(); 90 UIkit.modal('#add-sub-task-main-modal').hide();
90 - $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch}); 91 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: schselect});
91 gb_data_basic.reload_stat_park_data(); 92 gb_data_basic.reload_stat_park_data();
92 93
93 //更新路牌公里统计面板 94 //更新路牌公里统计面板
94 - gb_schedule_table.showLpMileageTipBySch(sch); 95 + gb_schedule_table.showLpMileageTipBySch(schselect);
95 return; 96 return;
96 } 97 }
97 var data = dataArray[i]; 98 var data = dataArray[i];
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/main.html
1 <div class="uk-modal ct_move_modal" id="add-sub-task-main-modal"> 1 <div class="uk-modal ct_move_modal" id="add-sub-task-main-modal">
2 <div class="uk-modal-dialog" style="width: 1100px;"> 2 <div class="uk-modal-dialog" style="width: 1100px;">
3 - <a href="" class="uk-modal-close uk-close"></a> 3 + <a href="" class="uk-modal-close uk-close" style="position: relative;"></a>
  4 + <a style="position: absolute; right: 40px;top: 8px;text-decoration-line: none;" id="min_a" >—</a>
4 <div class="uk-modal-header"> 5 <div class="uk-modal-header">
5 <h2>添加子任务</h2></div> 6 <h2>添加子任务</h2></div>
6 7
@@ -106,7 +107,7 @@ @@ -106,7 +107,7 @@
106 </div> 107 </div>
107 </div> 108 </div>
108 109
109 - <div class="uk-grid"> 110 + <div class="uk-grid zirenwu">
110 <div class="uk-width-2-3 domains"></div> 111 <div class="uk-width-2-3 domains"></div>
111 <div class="uk-width-1-3"> 112 <div class="uk-width-1-3">
112 <div class="uk-form-row"> 113 <div class="uk-form-row">
@@ -215,6 +216,7 @@ @@ -215,6 +216,7 @@
215 $(modal).on('init', function (e, data) { 216 $(modal).on('init', function (e, data) {
216 e.stopPropagation(); 217 e.stopPropagation();
217 sch = data.sch; 218 sch = data.sch;
  219 + schData=[].concat(sch)
218 220
219 //站到场数据 221 //站到场数据
220 st_park_data = gb_data_basic.get_stat_park_data()[sch.xlBm]; 222 st_park_data = gb_data_basic.get_stat_park_data()[sch.xlBm];
@@ -231,6 +233,7 @@ @@ -231,6 +233,7 @@
231 233
232 var st_doms = gb_schedule_context_menu.get_st_doms(); 234 var st_doms = gb_schedule_context_menu.get_st_doms();
233 //普通 235 //普通
  236 + debugger
234 $('.normalCont', modal).html(st_doms.custom_dom); 237 $('.normalCont', modal).html(st_doms.custom_dom);
235 $('.add_custom_wrap', modal).trigger('init', data); 238 $('.add_custom_wrap', modal).trigger('init', data);
236 239
@@ -504,17 +507,18 @@ @@ -504,17 +507,18 @@
504 var nf = gb_common.next_elem('sub_task_form_v2', f), 507 var nf = gb_common.next_elem('sub_task_form_v2', f),
505 nInput = $f('reason', nf); 508 nInput = $f('reason', nf);
506 509
507 - if (nf.length > 0 && nInput.length > 0) {  
508 - nInput.val(reason).trigger('change');  
509 - }  
510 - else {  
511 - var cont = f.parents('li.tab_cont'), 510 + // if (nf.length > 0 && nInput.length > 0) {
  511 + // nInput.val(reason).trigger('change');
  512 + // }
  513 + // else {
  514 + //var cont = f.parents('li.tab_cont'),
  515 + var cont = $(this).parents('.zirenwu'),
512 remInput = $('[name=remarks]', cont); 516 remInput = $('[name=remarks]', cont);
513 517
514 if(remInput.val()==reason + ',') 518 if(remInput.val()==reason + ',')
515 return; 519 return;
516 remInput.val(remInput.val() + reason + ','); 520 remInput.val(remInput.val() + reason + ',');
517 - } 521 + //}
518 } 522 }
519 523
520 function calcMileageByRoutes(routes, s, e) { 524 function calcMileageByRoutes(routes, s, e) {
@@ -672,6 +676,33 @@ @@ -672,6 +676,33 @@
672 676
673 return array; 677 return array;
674 } 678 }
  679 + var schData={};
  680 + var addChildModel='';
  681 + $('#min_a').click(function () {
  682 + $('#add-sub-task-main-modal').hide();
  683 +
  684 + if (!$("#minChildDiv").length>0){
  685 + var minChildDiv='<div id="minChildDiv" style="width: 300px;height: 25px;z-index: 9999;position: fixed;background-color: #009dd8;bottom: 0;color: #fffbfd;border-radius: 5px;"><span style="margin-left:20px;">添加子任务</span> <a style="margin-left:160px; text-decoration:none;color: white;font-size: 24px;" id="maxChild">□</a><a style="margin-left:10px;text-decoration: none;color: white;" onclick="closeAddChild()">X</a></div>';
  686 + $('body').append(minChildDiv);
  687 + }
  688 + });
  689 +
  690 + $('body').on('click','#maxChild',function () {
  691 + $('#add-sub-task-main-modal').show();
  692 + $('#minChildDiv').remove();
  693 + })
  694 +
  695 +
675 })(); 696 })();
  697 +
  698 + function closeAddChild(){
  699 + $('#add-sub-task-main-modal').remove();
  700 + $('#minChildDiv').remove();
  701 + }
  702 +
676 </script> 703 </script>
677 -</div>  
678 \ No newline at end of file 704 \ No newline at end of file
  705 +</div>
  706 +<script>
  707 +
  708 +
  709 +</script>
679 \ No newline at end of file 710 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
24 </div> 24 </div>
25 </div> 25 </div>
26 <i class="uk-icon-eye uk-icon-hover ct_eye_icon"></i> 26 <i class="uk-icon-eye uk-icon-hover ct_eye_icon"></i>
  27 + <i class="uk-icon-qrcode uk-icon-hover ct_calu_icon" data-toggle="tooltip" data-placement="bottom" title="计算应到实到时间对比"></i>
  28 +
27 <!--<i class="uk-icon-share-alt uk-icon-hover tp_info_icon" ></i>--> 29 <!--<i class="uk-icon-share-alt uk-icon-hover tp_info_icon" ></i>-->
28 30
29 <span class="warn_multi_station" data-updown="{{dir}}" data-code="{{line.lineCode}}"></span> 31 <span class="warn_multi_station" data-updown="{{dir}}" data-code="{{line.lineCode}}"></span>
@@ -65,7 +67,7 @@ @@ -65,7 +67,7 @@
65 {{sch.clZbh}} 67 {{sch.clZbh}}
66 </dd> 68 </dd>
67 <dd>{{sch.qdzArrDatejh}}</dd> 69 <dd>{{sch.qdzArrDatejh}}</dd>
68 - <dd>{{sch.qdzArrDatesj}}</dd> 70 + <dd class="qdzArrDatesjDD"><span class="qdzArrDatesjSPAN">{{sch.qdzArrDatesj}}</span><span class="arrsj-diff">{{sch.arrsj_diff}}</span></dd>
69 <dd data-sort-val={{sch.fcsjT}}> 71 <dd data-sort-val={{sch.fcsjT}}>
70 {{sch.fcsj}} 72 {{sch.fcsj}}
71 {{if sch.bcType == "out"}} 73 {{if sch.bcType == "out"}}
@@ -87,6 +89,9 @@ @@ -87,6 +89,9 @@
87 {{if sch.cTasks.length > 0}} 89 {{if sch.cTasks.length > 0}}
88 <span class="uk-badge uk-badge-notification c_task {{if sch.c_t_mileage_status==-1}}c_task_mileage_error{{/if}}">{{sch.cTasks.length}}</span> 90 <span class="uk-badge uk-badge-notification c_task {{if sch.c_t_mileage_status==-1}}c_task_mileage_error{{/if}}">{{sch.cTasks.length}}</span>
89 {{/if}} 91 {{/if}}
  92 + {{if sch.lpChange==1}}
  93 + <span class="uk-badge uk-badge-success out">换</span>
  94 + {{/if}}
90 </dd> 95 </dd>
91 <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}"> 96 <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">
92 {{sch.dfsj}} 97 {{sch.dfsj}}
@@ -101,12 +106,15 @@ @@ -101,12 +106,15 @@
101 tl-yzx 106 tl-yzx
102 {{else if sch.status==1}} 107 {{else if sch.status==1}}
103 tl-zzzx 108 tl-zzzx
  109 + {{else if sch.status ==4}}
  110 + tl-wfyd
104 {{else if sch.status == 0 && sch.late}} 111 {{else if sch.status == 0 && sch.late}}
105 tl-wd 112 tl-wd
106 {{/if}} fcsjActualCell"> 113 {{/if}} fcsjActualCell">
107 {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span> 114 {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span>
108 </dd> 115 </dd>
109 <dd data-uk-observe> 116 <dd data-uk-observe>
  117 +
110 <span title="{{sch.remarks}}" 118 <span title="{{sch.remarks}}"
111 data-uk-tooltip="{pos:'top-left'}">{{sch.remarks}}</span> 119 data-uk-tooltip="{pos:'top-left'}">{{sch.remarks}}</span>
112 </dd> 120 </dd>
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/fbzdzx_config.html 0 → 100644
  1 +<div id="nav-fbzdzx_config-modal" class="uk-modal">
  2 + <div class="uk-modal-dialog uk-modal-dialog-blank" style="overflow: hidden;">
  3 + <button class="uk-modal-close uk-close" type="button"></button>
  4 + <div class="uk-grid uk-flex-middle" data-uk-grid-margin>
  5 + <div class="uk-width-medium-1-6 uk-height-viewport line-config-tree" data-uk-observe>
  6 + <h3 class="title">翻班与自动完成</h3>
  7 + <div class="uk-accordion" data-uk-accordion="{showfirst:false}" ></div>
  8 + </div>
  9 + <div class="uk-width-medium-5-6 uk-height-viewport right-container" data-uk-observe>
  10 + <div id="fbzdzx_config_entity_panel"></div>
  11 + <div id="buffer_config_panel"></div>
  12 + </div>
  13 + </div>
  14 + </div>
  15 +
  16 +
  17 + <script id="nav-fbzdzx_config-modal-tree-temp" type="text/html">
  18 + {{each array as line i}}
  19 + <h3 class="uk-accordion-title" data-id="{{line.lineCode}}">{{line.name}}</h3>
  20 + <div class="uk-accordion-content">
  21 + <ul class="uk-list uk-list-line" id="smooth_scroll_list">
  22 + <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li>
  23 + <li><a data-href="#schedule_auto_exec_panel" >班次自动执行</a></li>
  24 + </ul>
  25 + </div>
  26 + {{/each}}
  27 + </script>
  28 +
  29 + <script>
  30 + (function () {
  31 + var modal = '#nav-fbzdzx_config-modal',
  32 + lineConfig, activeCode;
  33 +
  34 + //初始化滚动条
  35 + $('.right-container', modal).perfectScrollbar({suppressScrollX: true});
  36 + /**
  37 + * 手风琴拨动
  38 + */
  39 + $('.uk-accordion').on('toggle.uk.accordion', function (e, active, toggle, content) {
  40 + if(active){
  41 + activeCode = $(toggle).data('id');
  42 + load();
  43 + }
  44 + });
  45 +
  46 + $(modal).on('init', function (e, data) {
  47 + e.stopPropagation();
  48 + var htmlStr = template('nav-fbzdzx_config-modal-tree-temp', {array: gb_data_basic.activeLines});
  49 + $('.line-config-tree .uk-accordion', modal).html(htmlStr);
  50 +
  51 + if(data.activeCode)
  52 + activeCode = data.activeCode;
  53 + else{
  54 + //展开tab激活的线路
  55 + var $activeTab = $('#main-tab-content>li.line_schedule.uk-active');
  56 + if($activeTab.length > 0)
  57 + activeCode = $activeTab.data('id');
  58 + else{
  59 + //展开第一个
  60 + var $first = $('.uk-accordion-title:eq(0)', modal);
  61 + activeCode = $first.data('id');
  62 + }
  63 + }
  64 +
  65 + setTimeout(function () {
  66 + $('.uk-accordion-title[data-id='+activeCode+']', modal).trigger('click');
  67 + }, 500);
  68 + });
  69 +
  70 +
  71 + var load = function () {
  72 + //获取线路配置信息
  73 + $.get('/lineConfig/getByLineCode', {lineCode: activeCode}, function (conf) {
  74 + lineConfig = conf;
  75 +
  76 + loadConfigEntity();
  77 + loadBufferConfig();
  78 +
  79 + setTimeout(function () {
  80 + //更新滚动条高度
  81 + $('.right-container', modal).perfectScrollbar('update');
  82 + }, 500);
  83 + });
  84 + };
  85 +
  86 + //线路配置表属性设置
  87 + var loadConfigEntity = function () {
  88 + $.get('/real_control_v2/fragments/north/nav/line_config/fbzdzx_config_entity.html', function (attrDom) {
  89 + $('.right-container #fbzdzx_config_entity_panel', modal)
  90 + .html(attrDom)
  91 + .find('#fbzdzx_config_entity_wrap')
  92 + .trigger('init', {lineConfig: lineConfig});
  93 + });
  94 + };
  95 +
  96 +
  97 + //瞄点
  98 + $(modal).on('click', '#smooth_scroll_list>li>a', function () {
  99 + var id = $(this).data('href');
  100 + scrollToElement($(id, modal));
  101 + });
  102 +
  103 + function scrollToElement(ele) {
  104 + var cont = $('.right-container', modal), diff = 10;
  105 + cont.animate({
  106 + scrollTop: ele.offset().top - cont.offset().top + cont.scrollTop() - diff
  107 + }, 300);
  108 + }
  109 + })();
  110 + </script>
  111 +</div>
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/fbzdzx_config_entity.html 0 → 100644
  1 +<!-- 线路配置表相关属性 -->
  2 +<div id="fbzdzx_config_entity_wrap">
  3 + <form class="uk-form"></form>
  4 +
  5 + <script id="fbzdzx_config_entity_form-temp" type="text/html">
  6 + <div id="schedule_reload_time_panel">
  7 + <h2 class="btn_title_line">
  8 + <a class="uk-link-reset">班次更新时间</a>
  9 + </h2>
  10 + <div>
  11 + <div>
  12 + <span class="line_name"></span>每天
  13 + <div class="uk-form-icon" style="margin: 0 5px;">
  14 + <i class="uk-icon-clock-o"></i>
  15 + <input name="startOptInput" readonly type="text" class="z-depth-input" value="{{startOpt}}"
  16 + style="width: 151px;"
  17 + data-uk-timepicker>
  18 + </div>
  19 + 更新到当日排班
  20 + </div>
  21 + <ul class="uk-list">
  22 + <li>
  23 + <small><i class="uk-icon-question-circle"></i> 所有发车时间小于该时间的班次都默认跨过24点,手动调整的实发实达均应用此规则。</small>
  24 + </li>
  25 + </ul>
  26 + <button class="uk-button uk-button-mini" id="clearRealScheduleBtn">删除实际排班</button>
  27 + <button class="uk-button uk-button-mini" id="reLoadRealScheduleBtn">重新加载实际排班</button>
  28 + <button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button>
  29 + </div>
  30 + </div>
  31 +
  32 + <div id="schedule_auto_exec_panel">
  33 + <h2 class="btn_title_line">
  34 + <a class="uk-link-reset">班次自动执行</a>
  35 + </h2>
  36 + <div>
  37 + <div>
  38 + <label>
  39 + <input type="checkbox" id="enableAutoExec" {{autoExec?"checked":""}}> 启用自动班次执行
  40 + </label>
  41 + </div>
  42 + <ul class="uk-list">
  43 + <li>
  44 + <small style="color: red;font-size: 14px;">1、 你必须只应该对【无固定走向且无人监管的线路】启用此项。</small>
  45 + </li>
  46 + <li>
  47 + <small>2、启用该选项后,系统将不再依赖相关定位信号来执行班次。</small>
  48 + </li>
  49 + <li>
  50 + <small>3、系统将在合适的时候自动填入实发实达时间,以完善报表。</small>
  51 + </li>
  52 + <li>
  53 + <small>4、系统不会下发班次调度指令。</small>
  54 + </li>
  55 + </ul>
  56 + </div>
  57 + </div>
  58 +
  59 + </script>
  60 +
  61 + <script>
  62 + (function () {
  63 +
  64 + var wrap = '#fbzdzx_config_entity_wrap', conf, parks, upStationRoutes;
  65 +
  66 + /**
  67 + * 删除实际排班
  68 + */
  69 + var clearRealSchedule = function (e) {
  70 + e.stopPropagation();
  71 + var lineCode = conf.line.lineCode;
  72 + var htmlStr = '<h4 style="color: red;">你确定要删除【' + conf.line.name + '】今日的实际排班?</h4><h5 style="margin-top: 15px;">今日的实际排班会被删除</h5><h5 style="margin-top: 15px;">人车、路牌、待发等相关班次调整信息会被删除。</h5><h5 style="margin-top: 15px;">调度指令和期间与设备的通讯记录被保留</h5><h5 style="margin-top: 15px;">后台日志中的人工操作痕迹被保留</h5>';
  73 + alt_confirm(htmlStr, function () {
  74 + show_wait_modal('正在清除数据...');
  75 + gb_common.$post('/realSchedule/deleteRealSchedule', {lineCode: lineCode}, function () {
  76 + //刷新班次表格
  77 + gb_schedule_table.reLoadAndRefresh(lineCode);
  78 + hide_wait_modal();
  79 + notify_succ('删除班次成功!!!');
  80 + });
  81 + }, '确认删除' + conf.line.name + '的实际排班', true);
  82 +
  83 + return false;
  84 + };
  85 +
  86 + /**
  87 + * 重新载入实际排班
  88 + */
  89 + var reLoadRealSchedule = function (e) {
  90 + e.stopPropagation();
  91 + var lineCode = conf.line.lineCode;
  92 + show_wait_modal('正在重载数据...');
  93 + gb_common.$post('/realSchedule/reLoadRealSchedule', {lineCode: lineCode}, function () {
  94 + //刷新班次表格
  95 + gb_schedule_table.reLoadAndRefresh(lineCode);
  96 + hide_wait_modal();
  97 + notify_succ('重新载入班次成功');
  98 + });
  99 + return false;
  100 + };
  101 +
  102 + $(wrap).on('init', function (e, data) {
  103 + e.stopPropagation();
  104 + conf = data.lineConfig;
  105 + //停车场
  106 + $.get('/basic/parks', function (rs) {
  107 + parks = [];
  108 + for (var code in rs) {
  109 + parks.push({code: code, name: rs[code]});
  110 + }
  111 +
  112 + parks.sort(function (a, b) {
  113 + return $.trim(a.name).localeCompare($.trim(b.name), 'zh-CN');
  114 + });
  115 + renderPSDom();
  116 + });
  117 + //上行站点路由
  118 + upStationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(conf.line.lineCode).sort(function (a, b) {
  119 + return a.stationRouteCode - b.stationRouteCode;
  120 + }), 'directions')[0];
  121 +
  122 + var htmlStr = template('fbzdzx_config_entity_form-temp', conf);
  123 + $('form', wrap).html(htmlStr);
  124 +
  125 + $('.line_name', '#fbzdzx_config_entity_wrap').text(conf.line.name);
  126 + //更新排班时间
  127 + $('input[name=startOptInput]', wrap).on('change', updateStartTime);
  128 + //出场时间类型
  129 + $('select[name=outParkTypeSelect]', wrap).on('change', updateOutParkType);
  130 + //原线路回场
  131 + $('select[name=inParkForSourceSelect]', wrap).on('change', enableInParkForSource);
  132 + //删除班次
  133 + $('#clearRealScheduleBtn', wrap).on('click', clearRealSchedule);
  134 + //重新载入实际排班
  135 + $('#reLoadRealScheduleBtn', wrap).on('click', reLoadRealSchedule);
  136 + $('#enableAutoExec', wrap).on('click', autoExecFun);
  137 + });
  138 +
  139 + function changeTwinsParkAndStation() {
  140 + var parks='',stations=''
  141 + ,$panel = $('.park-and-station-wrap', wrap);
  142 +
  143 + $('select[name=twinsPark]', $panel).each(function () {
  144 + parks += ($(this).val() + ',');
  145 + });
  146 +
  147 + $('select[name=twinsStation]', $panel).each(function () {
  148 + stations += ($(this).val() + ',');
  149 + });
  150 +
  151 + if(parks.length > 0)
  152 + parks = parks.substr(0, parks.length - 1);
  153 + if(stations.length > 0)
  154 + stations = stations.substr(0, stations.length - 1);
  155 +
  156 + gb_common.$post('/lineConfig/parkAndStationSet', {
  157 + lineCode: conf.line.lineCode,
  158 + twinsPark: parks,
  159 + twinsStation: stations
  160 + }, function (rs) {
  161 + notify_succ('已保存!!');
  162 + conf = rs.conf;
  163 + });
  164 + }
  165 +
  166 + //更新排班时间
  167 + var startOptFlag;
  168 +
  169 + function updateStartTime() {
  170 + if (startOptFlag || $(this).val() == conf.startOpt)
  171 + return;
  172 + startOptFlag = true;
  173 + var that = this;
  174 + setTimeout(function () {
  175 + var timeStr = $(that).val();
  176 + gb_common.$post('/lineConfig/editTime', {
  177 + lineCode: conf.line.lineCode,
  178 + time: timeStr
  179 + }, function (rs) {
  180 + notify_succ('班次更新时间调整为 ' + timeStr);
  181 + conf.startOpt = rs.time;
  182 + });
  183 + startOptFlag = false;
  184 + }, 300);
  185 + }
  186 +
  187 + function updateOutParkType() {
  188 + var type = $(this).val();
  189 + var lineCode = conf.line.lineCode;
  190 +
  191 + var data = {lineCode: lineCode, type: type, parkCode: '', stationCode: ''};
  192 + //出站既是出场
  193 + if (type == 2) {
  194 + //如果配置上有信息
  195 + if(conf.twinsParks){
  196 + data.parkCode = conf.twinsParks;
  197 + data.stationCode = conf.twinsStations;
  198 + }
  199 + else{
  200 + data.parkCode = gb_data_basic.getLineInformation(lineCode).carPark;//默认关联 线路标准停车场
  201 + data.stationCode = upStationRoutes[0].stationCode;//和上行起点站
  202 + }
  203 + }
  204 + gb_common.$post('/lineConfig/editOutTimeType', data, function (rs) {
  205 + notify_succ('调整出场时间类型成功!');
  206 + conf = rs.conf;
  207 +
  208 + //渲染场站关联dom
  209 + renderPSDom();
  210 + });
  211 + }
  212 +
  213 +
  214 +
  215 + function enableInParkForSource() {
  216 + var enable = $(this).val();
  217 + gb_common.$post('/lineConfig/enableInParkForSource', {
  218 + lineCode: conf.line.lineCode,
  219 + enable: enable
  220 + }, function () {
  221 + notify_succ((enable == 1 ? '启用' : '禁用') + '原线路回场');
  222 + conf.inParkForSource = enable;
  223 + });
  224 + }
  225 +
  226 +
  227 + /**
  228 + * 自动执行
  229 + */
  230 + function autoExecFun(){
  231 + var that = this;
  232 + if(that.checked){
  233 + that.checked = false;
  234 + alt_confirm('<span style="color: red;font-size: 16px;">启用【' + conf.line.name + '】的自动执行功能?</span>', function () {
  235 + var data = {
  236 + lineCode: conf.line.lineCode,
  237 + autoExec: true
  238 + };
  239 + gb_common.$post('/lineConfig/setAutoExec', data, function (rs) {
  240 + notify_succ('启用成功!');
  241 + conf = rs.conf;
  242 +
  243 + that.checked = true;
  244 + });
  245 + }, '我确定要将【' + conf.line.name + '】设置为自动执行', true);
  246 + }
  247 + else{
  248 + that.checked = true;
  249 + alt_confirm('<span style="color: red;font-size: 16px;">禁用【' + conf.line.name + '】的自动执行功能?</span>', function () {
  250 + var data = {
  251 + lineCode: conf.line.lineCode,
  252 + autoExec: false
  253 + };
  254 + gb_common.$post('/lineConfig/setAutoExec', data, function (rs) {
  255 + notify_succ('禁用成功!');
  256 + conf = rs.conf;
  257 +
  258 + that.checked = false;
  259 + });
  260 + }, '我确定要禁用【' + conf.line.name + '】的自动执行', true);
  261 + }
  262 + }
  263 +
  264 +
  265 + /**
  266 + * 删除 场既是站 项目
  267 + */
  268 + $(wrap).on('click', '.c_2_s_list .item .uk-close', function () {
  269 + $(this).parents('.item').remove();
  270 + changeTwinsParkAndStation();
  271 + });
  272 +
  273 +
  274 + $(wrap).on('change', 'select[name=twinsPark]', changeTwinsParkAndStation);
  275 + $(wrap).on('change', 'select[name=twinsStation]', changeTwinsParkAndStation);
  276 + })();
  277 + </script>
  278 +</div>
0 \ No newline at end of file 279 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config.html
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
19 <h3 class="uk-accordion-title" data-id="{{line.lineCode}}">{{line.name}}</h3> 19 <h3 class="uk-accordion-title" data-id="{{line.lineCode}}">{{line.name}}</h3>
20 <div class="uk-accordion-content"> 20 <div class="uk-accordion-content">
21 <ul class="uk-list uk-list-line" id="smooth_scroll_list"> 21 <ul class="uk-list uk-list-line" id="smooth_scroll_list">
22 - <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li>  
23 - <li><a data-href="#schedule_auto_exec_panel" >班次自动执行</a></li> 22 + <!--<li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li>-->
  23 + <!--<li><a data-href="#schedule_auto_exec_panel" >班次自动执行</a></li>-->
24 <li><a data-href="#out_time_type_panel" >出场时间类型</a></li> 24 <li><a data-href="#out_time_type_panel" >出场时间类型</a></li>
25 <li><a data-href="#in_park_source_panel" >原线路回场</a></li> 25 <li><a data-href="#in_park_source_panel" >原线路回场</a></li>
26 <li><a data-href="#buffer_inOut_diff_panel">到站缓冲区设置</a></li> 26 <li><a data-href="#buffer_inOut_diff_panel">到站缓冲区设置</a></li>
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config_entity.html
@@ -3,58 +3,58 @@ @@ -3,58 +3,58 @@
3 <form class="uk-form"></form> 3 <form class="uk-form"></form>
4 4
5 <script id="line_config_entity_form-temp" type="text/html"> 5 <script id="line_config_entity_form-temp" type="text/html">
6 - <div id="schedule_reload_time_panel">  
7 - <h2 class="btn_title_line">  
8 - <a class="uk-link-reset">班次更新时间</a>  
9 - </h2>  
10 - <div>  
11 - <div>  
12 - <span class="line_name"></span>每天  
13 - <div class="uk-form-icon" style="margin: 0 5px;">  
14 - <i class="uk-icon-clock-o"></i>  
15 - <input name="startOptInput" readonly type="text" class="z-depth-input" value="{{startOpt}}"  
16 - style="width: 151px;"  
17 - data-uk-timepicker>  
18 - </div>  
19 - 更新到当日排班  
20 - </div>  
21 - <ul class="uk-list">  
22 - <li>  
23 - <small><i class="uk-icon-question-circle"></i> 所有发车时间小于该时间的班次都默认跨过24点,手动调整的实发实达均应用此规则。</small>  
24 - </li>  
25 - </ul>  
26 - <button class="uk-button uk-button-mini" id="clearRealScheduleBtn">删除实际排班</button>  
27 - <button class="uk-button uk-button-mini" id="reLoadRealScheduleBtn">重新加载实际排班</button>  
28 - <button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button>  
29 - </div>  
30 - </div>  
31 -  
32 - <div id="schedule_auto_exec_panel">  
33 - <h2 class="btn_title_line">  
34 - <a class="uk-link-reset">班次自动执行</a>  
35 - </h2>  
36 - <div>  
37 - <div>  
38 - <label>  
39 - <input type="checkbox" id="enableAutoExec" {{autoExec?"checked":""}}> 启用自动班次执行  
40 - </label>  
41 - </div>  
42 - <ul class="uk-list">  
43 - <li>  
44 - <small style="color: red;font-size: 14px;">1、 你必须只应该对【无固定走向且无人监管的线路】启用此项。</small>  
45 - </li>  
46 - <li>  
47 - <small>2、启用该选项后,系统将不再依赖相关定位信号来执行班次。</small>  
48 - </li>  
49 - <li>  
50 - <small>3、系统将在合适的时候自动填入实发实达时间,以完善报表。</small>  
51 - </li>  
52 - <li>  
53 - <small>4、系统不会下发班次调度指令。</small>  
54 - </li>  
55 - </ul>  
56 - </div>  
57 - </div> 6 + <!--<div id="schedule_reload_time_panel">-->
  7 + <!--<h2 class="btn_title_line">-->
  8 + <!--<a class="uk-link-reset">班次更新时间</a>-->
  9 + <!--</h2>-->
  10 + <!--<div>-->
  11 + <!--<div>-->
  12 + <!--<span class="line_name"></span>每天-->
  13 + <!--<div class="uk-form-icon" style="margin: 0 5px;">-->
  14 + <!--<i class="uk-icon-clock-o"></i>-->
  15 + <!--<input name="startOptInput" readonly type="text" class="z-depth-input" value="{{startOpt}}"-->
  16 + <!--style="width: 151px;"-->
  17 + <!--data-uk-timepicker>-->
  18 + <!--</div>-->
  19 + <!--更新到当日排班-->
  20 + <!--</div>-->
  21 + <!--<ul class="uk-list">-->
  22 + <!--<li>-->
  23 + <!--<small><i class="uk-icon-question-circle"></i> 所有发车时间小于该时间的班次都默认跨过24点,手动调整的实发实达均应用此规则。</small>-->
  24 + <!--</li>-->
  25 + <!--</ul>-->
  26 + <!--<button class="uk-button uk-button-mini" id="clearRealScheduleBtn">删除实际排班</button>-->
  27 + <!--<button class="uk-button uk-button-mini" id="reLoadRealScheduleBtn">重新加载实际排班</button>-->
  28 + <!--<button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button>-->
  29 + <!--</div>-->
  30 + <!--</div>-->
  31 +
  32 + <!--<div id="schedule_auto_exec_panel">-->
  33 + <!--<h2 class="btn_title_line">-->
  34 + <!--<a class="uk-link-reset">班次自动执行</a>-->
  35 + <!--</h2>-->
  36 + <!--<div>-->
  37 + <!--<div>-->
  38 + <!--<label>-->
  39 + <!--<input type="checkbox" id="enableAutoExec" {{autoExec?"checked":""}}> 启用自动班次执行-->
  40 + <!--</label>-->
  41 + <!--</div>-->
  42 + <!--<ul class="uk-list">-->
  43 + <!--<li>-->
  44 + <!--<small style="color: red;font-size: 14px;">1、 你必须只应该对【无固定走向且无人监管的线路】启用此项。</small>-->
  45 + <!--</li>-->
  46 + <!--<li>-->
  47 + <!--<small>2、启用该选项后,系统将不再依赖相关定位信号来执行班次。</small>-->
  48 + <!--</li>-->
  49 + <!--<li>-->
  50 + <!--<small>3、系统将在合适的时候自动填入实发实达时间,以完善报表。</small>-->
  51 + <!--</li>-->
  52 + <!--<li>-->
  53 + <!--<small>4、系统不会下发班次调度指令。</small>-->
  54 + <!--</li>-->
  55 + <!--</ul>-->
  56 + <!--</div>-->
  57 + <!--</div>-->
58 58
59 <div id="out_time_type_panel"> 59 <div id="out_time_type_panel">
60 <h2 class="btn_title_line"> 60 <h2 class="btn_title_line">