Commit bfe499ac3945a34d45e58d883700f5de87a052e0
1 parent
e77f2925
update
Showing
2 changed files
with
129 additions
and
22 deletions
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| @@ -869,50 +869,50 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -869,50 +869,50 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 869 | Map<String, Object> m0 = new HashMap<String, Object>(); | 869 | Map<String, Object> m0 = new HashMap<String, Object>(); |
| 870 | m0.put("time", "首~6:30"); | 870 | m0.put("time", "首~6:30"); |
| 871 | m0.put("upbc", "0"); m0.put("dnbc", "0"); | 871 | m0.put("upbc", "0"); m0.put("dnbc", "0"); |
| 872 | - m0.put("upys", "--"); m0.put("dnys", "--"); | ||
| 873 | - m0.put("pjys", "--"); | 872 | + m0.put("upys", "/"); m0.put("dnys", "/"); |
| 873 | + m0.put("pjys", "/"); | ||
| 874 | tempList.add(m0); | 874 | tempList.add(m0); |
| 875 | Map<String, Object> m1 = new HashMap<String, Object>(); | 875 | Map<String, Object> m1 = new HashMap<String, Object>(); |
| 876 | m1.put("time", "6:31~8:30"); | 876 | m1.put("time", "6:31~8:30"); |
| 877 | m1.put("upbc", "0"); m1.put("dnbc", "0"); | 877 | m1.put("upbc", "0"); m1.put("dnbc", "0"); |
| 878 | - m1.put("upys", "--"); m1.put("dnys", "--"); | ||
| 879 | - m1.put("pjys", "--"); | 878 | + m1.put("upys", "/"); m1.put("dnys", "/"); |
| 879 | + m1.put("pjys", "/"); | ||
| 880 | tempList.add(m1); | 880 | tempList.add(m1); |
| 881 | Map<String, Object> m2 = new HashMap<String, Object>(); | 881 | Map<String, Object> m2 = new HashMap<String, Object>(); |
| 882 | m2.put("time", "8:31~11:00"); | 882 | m2.put("time", "8:31~11:00"); |
| 883 | m2.put("upbc", "0"); m2.put("dnbc", "0"); | 883 | m2.put("upbc", "0"); m2.put("dnbc", "0"); |
| 884 | - m2.put("upys", "--"); m2.put("dnys", "--"); | ||
| 885 | - m2.put("pjys", "--"); | 884 | + m2.put("upys", "/"); m2.put("dnys", "/"); |
| 885 | + m2.put("pjys", "/"); | ||
| 886 | tempList.add(m2); | 886 | tempList.add(m2); |
| 887 | Map<String, Object> m3 = new HashMap<String, Object>(); | 887 | Map<String, Object> m3 = new HashMap<String, Object>(); |
| 888 | m3.put("time", "11:01~13:30"); | 888 | m3.put("time", "11:01~13:30"); |
| 889 | m3.put("upbc", "0"); m3.put("dnbc", "0"); | 889 | m3.put("upbc", "0"); m3.put("dnbc", "0"); |
| 890 | - m3.put("upys", "--"); m3.put("dnys", "--"); | ||
| 891 | - m3.put("pjys", "--"); | 890 | + m3.put("upys", "/"); m3.put("dnys", "/"); |
| 891 | + m3.put("pjys", "/"); | ||
| 892 | tempList.add(m3); | 892 | tempList.add(m3); |
| 893 | Map<String, Object> m4 = new HashMap<String, Object>(); | 893 | Map<String, Object> m4 = new HashMap<String, Object>(); |
| 894 | m4.put("time", "13:31~16:00"); | 894 | m4.put("time", "13:31~16:00"); |
| 895 | m4.put("upbc", "0"); m4.put("dnbc", "0"); | 895 | m4.put("upbc", "0"); m4.put("dnbc", "0"); |
| 896 | - m4.put("upys", "--"); m4.put("dnys", "--"); | ||
| 897 | - m4.put("pjys", "--"); | 896 | + m4.put("upys", "/"); m4.put("dnys", "/"); |
| 897 | + m4.put("pjys", "/"); | ||
| 898 | tempList.add(m4); | 898 | tempList.add(m4); |
| 899 | Map<String, Object> m5 = new HashMap<String, Object>(); | 899 | Map<String, Object> m5 = new HashMap<String, Object>(); |
| 900 | m5.put("time", "16:01~18:00"); | 900 | m5.put("time", "16:01~18:00"); |
| 901 | m5.put("upbc", "0"); m5.put("dnbc", "0"); | 901 | m5.put("upbc", "0"); m5.put("dnbc", "0"); |
| 902 | - m5.put("upys", "--"); m5.put("dnys", "--"); | ||
| 903 | - m5.put("pjys", "--"); | 902 | + m5.put("upys", "/"); m5.put("dnys", "/"); |
| 903 | + m5.put("pjys", "/"); | ||
| 904 | tempList.add(m5); | 904 | tempList.add(m5); |
| 905 | Map<String, Object> m6 = new HashMap<String, Object>(); | 905 | Map<String, Object> m6 = new HashMap<String, Object>(); |
| 906 | m6.put("time", "18:01~20:30"); | 906 | m6.put("time", "18:01~20:30"); |
| 907 | m6.put("upbc", "0"); m6.put("dnbc", "0"); | 907 | m6.put("upbc", "0"); m6.put("dnbc", "0"); |
| 908 | - m6.put("upys", "--"); m6.put("dnys", "--"); | ||
| 909 | - m6.put("pjys", "--"); | 908 | + m6.put("upys", "/"); m6.put("dnys", "/"); |
| 909 | + m6.put("pjys", "/"); | ||
| 910 | tempList.add(m6); | 910 | tempList.add(m6); |
| 911 | Map<String, Object> m7 = new HashMap<String, Object>(); | 911 | Map<String, Object> m7 = new HashMap<String, Object>(); |
| 912 | m7.put("time", "20:31~末"); | 912 | m7.put("time", "20:31~末"); |
| 913 | m7.put("upbc", "0"); m7.put("dnbc", "0"); | 913 | m7.put("upbc", "0"); m7.put("dnbc", "0"); |
| 914 | - m7.put("upys", "--"); m7.put("dnys", "--"); | ||
| 915 | - m7.put("pjys", "--"); | 914 | + m7.put("upys", "/"); m7.put("dnys", "/"); |
| 915 | + m7.put("pjys", "/"); | ||
| 916 | tempList.add(m7); | 916 | tempList.add(m7); |
| 917 | } | 917 | } |
| 918 | 918 | ||
| @@ -1367,6 +1367,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1367,6 +1367,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1367 | } | 1367 | } |
| 1368 | for(String key : keyMap.keySet()){ | 1368 | for(String key : keyMap.keySet()){ |
| 1369 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 1369 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1370 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 1370 | Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>(); | 1371 | Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>(); |
| 1371 | List<Long> longList0 = new ArrayList<Long>(); | 1372 | List<Long> longList0 = new ArrayList<Long>(); |
| 1372 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | 1373 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); |
| @@ -1410,6 +1411,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1410,6 +1411,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1410 | if(delay >= -3 && delay <= 1){ | 1411 | if(delay >= -3 && delay <= 1){ |
| 1411 | sjbc++; | 1412 | sjbc++; |
| 1412 | } | 1413 | } |
| 1414 | + m.put("qdzFirst0", shouban0.getQdzName()); | ||
| 1415 | + m.put("jhfcFirst0", shouban0.getFcsj()); | ||
| 1416 | + m.put("sjfcFirst0", shouban0.getFcsjActual()); | ||
| 1417 | + m.put("delayFirst0", delay>0?"+"+delay:delay); | ||
| 1413 | } | 1418 | } |
| 1414 | 1419 | ||
| 1415 | if(moban0.getFcsjActual() != null){ | 1420 | if(moban0.getFcsjActual() != null){ |
| @@ -1420,7 +1425,20 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1420,7 +1425,20 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1420 | if(delay >= -3 && delay <= 1){ | 1425 | if(delay >= -3 && delay <= 1){ |
| 1421 | sjbc++; | 1426 | sjbc++; |
| 1422 | } | 1427 | } |
| 1428 | + m.put("qdzLast0", moban0.getQdzName()); | ||
| 1429 | + m.put("jhfcLast0", moban0.getFcsj()); | ||
| 1430 | + m.put("sjfcLast0", moban0.getFcsjActual()); | ||
| 1431 | + m.put("delayLast0", delay>0?"+"+delay:delay); | ||
| 1423 | } | 1432 | } |
| 1433 | + } else { | ||
| 1434 | + m.put("qdzFirst0", "--"); | ||
| 1435 | + m.put("jhfcFirst0", "/"); | ||
| 1436 | + m.put("sjfcFirst0", "/"); | ||
| 1437 | + m.put("delayFirst0", "/"); | ||
| 1438 | + m.put("qdzLast0", "--"); | ||
| 1439 | + m.put("jhfcLast0", "/"); | ||
| 1440 | + m.put("sjfcLast0", "/"); | ||
| 1441 | + m.put("delayLast0", "/"); | ||
| 1424 | } | 1442 | } |
| 1425 | 1443 | ||
| 1426 | if(longList1.size() != 0){ | 1444 | if(longList1.size() != 0){ |
| @@ -1435,7 +1453,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1435,7 +1453,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1435 | if(delay >= -3 && delay <= 1){ | 1453 | if(delay >= -3 && delay <= 1){ |
| 1436 | sjbc++; | 1454 | sjbc++; |
| 1437 | } | 1455 | } |
| 1456 | + m.put("qdzFirst1", shouban1.getQdzName()); | ||
| 1457 | + m.put("jhfcFirst1", shouban1.getFcsj()); | ||
| 1458 | + m.put("sjfcFirst1", shouban1.getFcsjActual()); | ||
| 1459 | + m.put("delayFirst1", delay>0?"+"+delay:delay); | ||
| 1438 | } | 1460 | } |
| 1461 | + | ||
| 1439 | if(moban1.getFcsjActual() != null){ | 1462 | if(moban1.getFcsjActual() != null){ |
| 1440 | jhbc++; | 1463 | jhbc++; |
| 1441 | String[] split = moban1.getFcsjActual().split(":"); | 1464 | String[] split = moban1.getFcsjActual().split(":"); |
| @@ -1444,9 +1467,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -1444,9 +1467,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 1444 | if(delay >= -3 && delay <= 1){ | 1467 | if(delay >= -3 && delay <= 1){ |
| 1445 | sjbc++; | 1468 | sjbc++; |
| 1446 | } | 1469 | } |
| 1470 | + m.put("qdzLast1", moban1.getQdzName()); | ||
| 1471 | + m.put("jhfcLast1", moban1.getFcsj()); | ||
| 1472 | + m.put("sjfcLast1", moban1.getFcsjActual()); | ||
| 1473 | + m.put("delayLast1", delay>0?"+"+delay:delay); | ||
| 1447 | } | 1474 | } |
| 1475 | + } else { | ||
| 1476 | + m.put("qdzFirst1", "--"); | ||
| 1477 | + m.put("jhfcFirst1", "/"); | ||
| 1478 | + m.put("sjfcFirst1", "/"); | ||
| 1479 | + m.put("delayFirst1", "/"); | ||
| 1480 | + m.put("qdzLast1", "--"); | ||
| 1481 | + m.put("jhfcLast1", "/"); | ||
| 1482 | + m.put("sjfcLast1", "/"); | ||
| 1483 | + m.put("delayLast1", "/"); | ||
| 1448 | } | 1484 | } |
| 1449 | - | 1485 | + |
| 1486 | + m.put("line", key); | ||
| 1487 | + tempMap.put("map", m); | ||
| 1450 | tempMap.put("jhbc", jhbc); | 1488 | tempMap.put("jhbc", jhbc); |
| 1451 | tempMap.put("sjbc", sjbc); | 1489 | tempMap.put("sjbc", sjbc); |
| 1452 | tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%"); | 1490 | tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%"); |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| @@ -67,9 +67,42 @@ | @@ -67,9 +67,42 @@ | ||
| 67 | 67 | ||
| 68 | </tbody> | 68 | </tbody> |
| 69 | </table> | 69 | </table> |
| 70 | - <div style="text-align: right;"> | ||
| 71 | - <ul id="pagination" class="pagination"></ul> | ||
| 72 | - </div> | 70 | + </div> |
| 71 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 72 | + <table class="table table-bordered table-hover table-checkable" id="map"> | ||
| 73 | + <thead> | ||
| 74 | + <tr class="hidden"> | ||
| 75 | + <th style="display: none;"></th> | ||
| 76 | + <th rowspan="2">线路</th> | ||
| 77 | + <th colspan="4">上行首发</th> | ||
| 78 | + <th colspan="4">上行末发</th> | ||
| 79 | + <th colspan="4">下行首发</th> | ||
| 80 | + <th colspan="4">下行末发</th> | ||
| 81 | + </tr> | ||
| 82 | + <tr class="hidden"> | ||
| 83 | + <th style="display: none;"></th> | ||
| 84 | + <th>站点</th> | ||
| 85 | + <th>计发</th> | ||
| 86 | + <th>实发</th> | ||
| 87 | + <th>快慢</th> | ||
| 88 | + <th>站点</th> | ||
| 89 | + <th>计发</th> | ||
| 90 | + <th>实发</th> | ||
| 91 | + <th>快慢</th> | ||
| 92 | + <th>站点</th> | ||
| 93 | + <th>计发</th> | ||
| 94 | + <th>实发</th> | ||
| 95 | + <th>快慢</th> | ||
| 96 | + <th>站点</th> | ||
| 97 | + <th>计发</th> | ||
| 98 | + <th>实发</th> | ||
| 99 | + <th>快慢</th> | ||
| 100 | + </tr> | ||
| 101 | + </thead> | ||
| 102 | + <tbody> | ||
| 103 | + | ||
| 104 | + </tbody> | ||
| 105 | + </table> | ||
| 73 | </div> | 106 | </div> |
| 74 | </div> | 107 | </div> |
| 75 | </div> | 108 | </div> |
| @@ -165,6 +198,18 @@ | @@ -165,6 +198,18 @@ | ||
| 165 | fage=true; | 198 | fage=true; |
| 166 | } | 199 | } |
| 167 | 200 | ||
| 201 | + var list; | ||
| 202 | + $("#forms tbody").on("click","a",function(){ | ||
| 203 | + var index = $(this).parent().parent().index(); | ||
| 204 | + $.each(list, function(i, g){ | ||
| 205 | + if(index == i){ | ||
| 206 | + var tbodyHtml = template('list_maps',{list:g.map}); | ||
| 207 | + $('#map tbody').html(tbodyHtml); | ||
| 208 | + $("#map .hidden").removeClass("hidden"); | ||
| 209 | + $("html,body").animate({scrollTop:$("#map").offset().top},1000); | ||
| 210 | + } | ||
| 211 | + }); | ||
| 212 | + }); | ||
| 168 | 213 | ||
| 169 | $("#query").on("click",jsDoQuery); | 214 | $("#query").on("click",jsDoQuery); |
| 170 | 215 | ||
| @@ -190,12 +235,15 @@ | @@ -190,12 +235,15 @@ | ||
| 190 | params['line'] = line; | 235 | params['line'] = line; |
| 191 | params['date'] = date; | 236 | params['date'] = date; |
| 192 | params['type'] = "query"; | 237 | params['type'] = "query"; |
| 193 | - $(".hidden").removeClass("hidden"); | 238 | + $("#forms .hidden").removeClass("hidden"); |
| 239 | + $("#map tr").addClass("hidden"); | ||
| 194 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ | 240 | $get('/pcpc/firstAndLastBus_sum', params, function(result){ |
| 195 | // 把数据填充到模版中 | 241 | // 把数据填充到模版中 |
| 196 | var tbodyHtml = template('list_firstAndLastBus',{list:result}); | 242 | var tbodyHtml = template('list_firstAndLastBus',{list:result}); |
| 197 | // 把渲染好的模版html文本追加到表格中 | 243 | // 把渲染好的模版html文本追加到表格中 |
| 198 | $('#forms tbody').html(tbodyHtml); | 244 | $('#forms tbody').html(tbodyHtml); |
| 245 | + | ||
| 246 | + list = result; | ||
| 199 | 247 | ||
| 200 | if(result.length == 0) | 248 | if(result.length == 0) |
| 201 | $("#export").attr('disabled',"true"); | 249 | $("#export").attr('disabled',"true"); |
| @@ -234,7 +282,7 @@ | @@ -234,7 +282,7 @@ | ||
| 234 | <td>{{obj.line}}</td> | 282 | <td>{{obj.line}}</td> |
| 235 | <td>{{obj.jhbc}}</td> | 283 | <td>{{obj.jhbc}}</td> |
| 236 | <td>{{obj.sjbc}}</td> | 284 | <td>{{obj.sjbc}}</td> |
| 237 | - <td>{{obj.zdl}}</td> | 285 | + <td><a id='delay'>{{obj.zdl}}</a></td> |
| 238 | </tr> | 286 | </tr> |
| 239 | {{/each}} | 287 | {{/each}} |
| 240 | {{if list.length == 0}} | 288 | {{if list.length == 0}} |
| @@ -242,4 +290,25 @@ | @@ -242,4 +290,25 @@ | ||
| 242 | <td colspan="20"><h6 class="muted">没有找到相关数据</h6></td> | 290 | <td colspan="20"><h6 class="muted">没有找到相关数据</h6></td> |
| 243 | </tr> | 291 | </tr> |
| 244 | {{/if}} | 292 | {{/if}} |
| 293 | +</script> | ||
| 294 | +<script type="text/html" id="list_maps"> | ||
| 295 | + <tr> | ||
| 296 | + <td>{{list.line}}</td> | ||
| 297 | + <td>{{list.qdzFirst0}}</td> | ||
| 298 | + <td>{{list.jhfcFirst0}}</td> | ||
| 299 | + <td>{{list.sjfcFirst0}}</td> | ||
| 300 | + <td>{{list.delayFirst0}}</td> | ||
| 301 | + <td>{{list.qdzLast0}}</td> | ||
| 302 | + <td>{{list.jhfcLast0}}</td> | ||
| 303 | + <td>{{list.sjfcLast0}}</td> | ||
| 304 | + <td>{{list.delayLast0}}</td> | ||
| 305 | + <td>{{list.qdzFirst1}}</td> | ||
| 306 | + <td>{{list.jhfcFirst1}}</td> | ||
| 307 | + <td>{{list.sjfcFirst1}}</td> | ||
| 308 | + <td>{{list.delayFirst1}}</td> | ||
| 309 | + <td>{{list.qdzLast1}}</td> | ||
| 310 | + <td>{{list.jhfcLast1}}</td> | ||
| 311 | + <td>{{list.sjfcLast1}}</td> | ||
| 312 | + <td>{{list.delayLast1}}</td> | ||
| 313 | + </tr> | ||
| 245 | </script> | 314 | </script> |
| 246 | \ No newline at end of file | 315 | \ No newline at end of file |