Commit 8942f4e306b1bd80a97c142d84cdadae3bb70f70

Authored by 廖磊
Committed by zb
1 parent d9ea8cf2

update

src/main/java/com/bsth/controller/report/ReportController.java
@@ -297,6 +297,8 @@ public class ReportController { @@ -297,6 +297,8 @@ public class ReportController {
297 m_.put("qSj", jsonObject.getString("qSj")); 297 m_.put("qSj", jsonObject.getString("qSj"));
298 m_.put("hJh", jsonObject.getString("hJh")); 298 m_.put("hJh", jsonObject.getString("hJh"));
299 m_.put("hSj", jsonObject.getString("hSj")); 299 m_.put("hSj", jsonObject.getString("hSj"));
  300 + m_.put("djgsj", jsonObject.getString("djgsj"));
  301 + m_.put("bcjgsj", jsonObject.getString("bcjgsj"));
300 lMap.add(m_); 302 lMap.add(m_);
301 } 303 }
302 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 304 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
src/main/java/com/bsth/service/excep/impl/SpeedingServiceImpl.java
@@ -332,7 +332,8 @@ public class SpeedingServiceImpl implements SpeedingService { @@ -332,7 +332,8 @@ public class SpeedingServiceImpl implements SpeedingService {
332 Location location; 332 Location location;
333 while (rs.next()) { 333 while (rs.next()) {
334 speed = new Speeding(); 334 speed = new Speeding();
335 - speed.setVehicle(rs.getString("vehicle")); 335 + speed.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
  336 + // speed.setVehicle(rs.getString("vehicle"));
336 location = TransGPS.LocationMake(rs.getFloat("lon"), rs.getFloat("lat")); 337 location = TransGPS.LocationMake(rs.getFloat("lon"), rs.getFloat("lat"));
337 location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location)); 338 location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
338 speed.setLon((float)location.getLng()); 339 speed.setLon((float)location.getLng());
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -2402,6 +2402,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2402,6 +2402,8 @@ public class ReportServiceImpl implements ReportService{
2402 m.put("qSj", time); 2402 m.put("qSj", time);
2403 m.put("hJh", listInfo.get(i+1).getFcsj()); 2403 m.put("hJh", listInfo.get(i+1).getFcsj());
2404 m.put("hSj", listInfo.get(i+1).getFcsjActual()); 2404 m.put("hSj", listInfo.get(i+1).getFcsjActual());
  2405 + m.put("djgsj", peak);
  2406 + m.put("bcjgsj", (fscjNext-fcsjTime)/60000);
2405 mapList.add(m); 2407 mapList.add(m);
2406 } 2408 }
2407 }else{ 2409 }else{
@@ -2416,6 +2418,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2416,6 +2418,8 @@ public class ReportServiceImpl implements ReportService{
2416 m.put("qSj", time); 2418 m.put("qSj", time);
2417 m.put("hJh", listInfo.get(i+1).getFcsj()); 2419 m.put("hJh", listInfo.get(i+1).getFcsj());
2418 m.put("hSj", listInfo.get(i+1).getFcsjActual()); 2420 m.put("hSj", listInfo.get(i+1).getFcsjActual());
  2421 + m.put("djgsj", trough);
  2422 + m.put("bcjgsj", (fscjNext-fcsjTime)/60000);
2419 mapList.add(m); 2423 mapList.add(m);
2420 } 2424 }
2421 } 2425 }
@@ -2443,6 +2447,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2443,6 +2447,8 @@ public class ReportServiceImpl implements ReportService{
2443 m.put("qSj", time); 2447 m.put("qSj", time);
2444 m.put("hJh", listInfo.get(i+1).getFcsj()); 2448 m.put("hJh", listInfo.get(i+1).getFcsj());
2445 m.put("hSj", listInfo.get(i+1).getFcsjActual()); 2449 m.put("hSj", listInfo.get(i+1).getFcsjActual());
  2450 + m.put("djgsj", peak);
  2451 + m.put("bcjgsj", (fscjNext-fcsjTime)/60000);
2446 mapList.add(m); 2452 mapList.add(m);
2447 } 2453 }
2448 }else{ 2454 }else{
@@ -2457,6 +2463,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2457,6 +2463,8 @@ public class ReportServiceImpl implements ReportService{
2457 m.put("qSj", time); 2463 m.put("qSj", time);
2458 m.put("hJh", listInfo.get(i+1).getFcsj()); 2464 m.put("hJh", listInfo.get(i+1).getFcsj());
2459 m.put("hSj", listInfo.get(i+1).getFcsjActual()); 2465 m.put("hSj", listInfo.get(i+1).getFcsjActual());
  2466 + m.put("djgsj", trough);
  2467 + m.put("bcjgsj", (fscjNext-fcsjTime)/60000);
2460 mapList.add(m); 2468 mapList.add(m);
2461 } 2469 }
2462 } 2470 }
src/main/resources/static/pages/excep/js/line-list-function.js 0 → 100644
  1 +var PublicFunctions = function () {
  2 + var PubFun = {
  3 + /** 初始化线路标题与ID */
  4 + setTiteText : function(lineId) {
  5 + // 根据线路ID获取线路名称
  6 + GetAjaxData.getIdLineName(lineId,function(data) {
  7 + // 定义线路名称
  8 + var lineNameV = data.name;
  9 + $('.portlet-title .caption').text(lineNameV);
  10 + });
  11 + },
  12 + setSectionFormValue : function(Section) {
  13 + $('#isRoadeSpeedInput').val(Section.isRoadeSpeed);
  14 + // 路段ID
  15 + $('#sectionIdInput').val(Section.sectionId);
  16 + // 路段路由ID
  17 + $('#sectionRouteIdInput').val(Section.sectionrouteId);
  18 + // 线路ID
  19 + $('#sectionRouteLineInput').val(Section.sectionrouteLine);
  20 + // 线路编码
  21 + $('#lineCodeInput').val(Section.sectionrouteLineCode);
  22 + // 折线坐标集合
  23 + $('#bsectionVectorInput').val(Section.sectionBsectionVector);
  24 + // 路段名称
  25 + $('#sectionNameInput').val(Section.sectionName);
  26 + // 路段编码
  27 + $('#sectionCodeInput').val(Section.sectionCode);
  28 + // 路段序号
  29 + $('#sectionrouteCodeSelect').val(Section.sectionrouteCode);
  30 + // 路段方向
  31 + $('#directionsSection').val(Section.sectionrouteDirections);
  32 + // 道路编码
  33 + $('#roadCodingCodInput').val(Section.sectionRoadCoding);
  34 + // 道路限速
  35 + $('#speedLimitInput').val(Section.sectionSpeedLimet);
  36 + // 路段长度
  37 + $('#sectionDistanceInput').val(Section.sectionDistance);
  38 + // 时长
  39 + $('#sectionTimeInput').val(Section.sectionTime);
  40 + // 版本号
  41 + $('#versionsInput').val(Section.versions);
  42 + // 是否撤销
  43 + $('#destroySelect').val(Section.destroy);
  44 + // 描述/说明
  45 + $('#descriptionsTextarea').val(Section.descriptions);
  46 + },
  47 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  48 + linePanlThree : function(lineId,data,direction) {
  49 + /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
  50 + $get('/stationroute/getStationRouteCenterPoints',{lineId:lineId,direction:direction},function(resultdata) {
  51 + SpeedingMap.clearMarkAndOverlays();
  52 + var polyline_center;
  53 + // 如果站点路由数据不为空
  54 + if(resultdata.length>0) {
  55 + var ceter_index = Math.floor(resultdata.length / 2);
  56 + var ceterPointsStr = resultdata[ceter_index].bJwpoints;
  57 + var ceterPointsArray = ceterPointsStr.split(' ');
  58 + polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  59 + // 遍历站点路由数据
  60 + for(var s = 0 ; s<resultdata.length;s++) {
  61 + // 中心点坐标字符串
  62 + var bJwpointsStr = resultdata[s].bJwpoints;
  63 + var stationName = resultdata[s].stationName;
  64 + // 起个中心点坐标字符串
  65 + var bJwpointsArray = bJwpointsStr.split(' ');
  66 + // 设置中心点
  67 + var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
  68 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  69 + SpeedingMap.drawingUpStationPoint(point_center,stationName,s+1);
  70 + }
  71 +
  72 + }
  73 + // 路段数据长度
  74 + var dataLen = data.length;
  75 + //debugger;
  76 + // 如果大于零
  77 + if(dataLen>0) {
  78 + // 编辑路段数据
  79 + for(var d= 0; d<dataLen;d++){
  80 + // 地图折线坐标点集合
  81 + var polylineArray = [];
  82 + // 获取路段折线坐标字符串
  83 + var sectionBsectionVectorStr = data[d].sectionBsectionVector;
  84 + if(sectionBsectionVectorStr==null)
  85 + continue;
  86 + // 切割段折线坐标字符串
  87 + var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1);
  88 + // 分割折线坐标字符串
  89 + var lineArray = tempStr.split(',');
  90 + for(var i = 0;i<lineArray.length;i++) {
  91 + polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
  92 + }
  93 + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
  94 + SpeedingMap.drawingUpline01(polylineArray,polyline_center,data[d]);
  95 + }
  96 + }
  97 + });
  98 + },
  99 + // 方向代码转名称.
  100 + dirdmToName : function(value){
  101 + var srStr = '';
  102 + if(value=='0')
  103 + srStr = '上行';
  104 + else if(value=='1')
  105 + srStr = '下行';
  106 + return srStr;
  107 + },
  108 +// editAChangeCssRemoveDisabled : function() {
  109 +// $('#downLine').removeClass('btn disabled');
  110 +// $('.btn-circle').removeClass('disabled');
  111 +// $('#upLine').removeClass('btn disabled');
  112 +// },
  113 + }
  114 + return PubFun ;
  115 +}();
0 \ No newline at end of file 116 \ No newline at end of file
src/main/resources/static/pages/excep/speedingCount.html
@@ -17,120 +17,362 @@ @@ -17,120 +17,362 @@
17 <div class="portlet-title"> 17 <div class="portlet-title">
18 <div class="caption"> 18 <div class="caption">
19 <i class="fa fa-times-circle"></i> <span 19 <i class="fa fa-times-circle"></i> <span
20 - class="caption-subject font-dark sbold uppercase">超速异常数据统计</span> 20 + class="caption-subject font-dark sbold uppercase">超速异常数据表</span>
  21 + </div>
  22 + <div class="actions">
21 </div> 23 </div>
22 -  
23 </div> 24 </div>
24 <div class="portlet-body"> 25 <div class="portlet-body">
25 <div class="table-container" style="margin-top: 10px"> 26 <div class="table-container" style="margin-top: 10px">
26 <table 27 <table
27 class="table table-striped table-bordered table-hover table-checkable" 28 class="table table-striped table-bordered table-hover table-checkable"
28 id="datatable_speeding"> 29 id="datatable_speeding">
29 - <tr role="row" class="filter">  
30 - <td><label style="padding: 6px 12px;">线路 </label></td>  
31 - <td>  
32 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
33 - </td>  
34 - <td><label style="padding: 6px 12px;">日期</label></td>  
35 - <td>  
36 - <input class="form-control" type="text" id="date" style="width: 180px;"/>  
37 - </td>  
38 - <td>  
39 - <button id="bottomId" class="btn btn-sm green btn-outline filter-submit margin-bottom" > 30 + <thead>
  31 + <tr role="row" class="heading">
  32 + <th width="3%">#</th>
  33 + <th width="4%">线路</th>
  34 + <th width="6%">车辆自编号</th>
  35 + <th width="8%">上下行</th>
  36 + <th width="10%">开始时间</th>
  37 + <th width="10%">结束时间</th>
  38 + <th width="8%">持续时间</th>
  39 + <th width="8%">查看轨迹</th>
  40 + <th width="6%">操作</th>
  41 + </tr>
  42 + <tr role="row" class="filter">
  43 + <td></td>
  44 + <td>
  45 + <select class="form-control" name="line" id="line" style="width: 100px;"></select>
  46 + </td>
  47 + <td>
  48 + <select class="form-control" name="nbbm" id="nbbm" style="width: 100px;"></select>
  49 + </td>
  50 + <!-- <td>
  51 +
  52 + </td>
  53 + <td>
  54 + </td> -->
  55 + <td>
  56 + <select class="form-control form-filter " name="updown" style="width: 90px;">
  57 + <option value="">请选择...</option>
  58 + <option value="0">上行</option>
  59 + <option value="1">下行</option>
  60 + <option value="-1">无效</option>
  61 + </select>
  62 + </td>
  63 + <td>
  64 + <input class="form-control" type="date" name="startDate" />
  65 + </td>
  66 + <td>
  67 + <input class="form-control" type="date" name="endDate" />
  68 + </td>
  69 + <td>
  70 + >=<input class="form-control" type="text" name="times" style="width:50px;display:inline!important"
  71 + onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"/>
  72 + </td>
  73 + <td>
  74 + </td>
  75 + <td>
  76 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
40 <i class="fa fa-search"></i> 搜索</button> 77 <i class="fa fa-search"></i> 搜索</button>
41 -  
42 - <button class="btn btn-sm red btn-outline filter-cancel"> 78 +
  79 + <button class="btn btn-sm red btn-outline filter-cancel">
43 <i class="fa fa-times"></i> 重置</button> 80 <i class="fa fa-times"></i> 重置</button>
44 - </td>  
45 - </tr>  
46 - </table> 81 + </td>
  82 + </tr>
  83 + </thead>
  84 + <tbody></tbody>
  85 + </table>
  86 + <div style="text-align: right;">
  87 + <ul id="pagination" class="pagination"></ul>
  88 + </div>
47 </div> 89 </div>
48 - <div class="row">  
49 - <div class="col-md-12">  
50 - <div class="portlet light portlet-fit bordered">  
51 -  
52 - <div class="portlet-body">  
53 - <div id="echarts_bar" style="height:500px;"></div>  
54 - </div>  
55 - </div>  
56 - </div>  
57 - </div>  
58 </div> 90 </div>
59 </div> 91 </div>
60 </div> 92 </div>
61 </div> 93 </div>
62 -<script type="text/javascript">  
63 -Echart();  
64 -function Echart() {  
65 - var line=$("#line").val();  
66 - var dataTime=$("#date").val();  
67 - getEchart_server("speeding", "线路", "统计图", "line", "xl","/speeding/getReport.do", "1", "echarts_bar", line, dataTime);  
68 -}  
69 94
70 -$("#bottomId").click(function(){  
71 - Echart();  
72 -}) 95 +<script id="speeding_list_temp" type="text/html">
  96 +{{each list as obj i}}
  97 +<tr>
  98 + <td style="vertical-align: middle;">
  99 + <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}">
  100 + </td>
  101 + <td>
  102 + {{obj.lineName}}
  103 + </td>
  104 + <td>
  105 + {{obj.vehicle}}
  106 + </td>
  107 + <td>
  108 + {{if obj.upDown==0}}
  109 + 上行
  110 + {{else if obj.upDown==1}}
  111 + 下行
  112 + {{else}}
  113 + 无效
  114 + {{/if}}
  115 + </td>
  116 + <td>
  117 + {{obj.timestampDate}}
  118 + </td>
  119 + <td>
  120 + {{obj.endtimestampDate}}
  121 + </td>
  122 + <td>
  123 + {{(obj.endtimestamp-obj.timestamp)/1000}}秒
  124 + </td>
  125 + <td>
  126 + <a class="btn default blue-stripe btn-sm lookTrajectory" data-vehicle ="{{obj.vehicle}}"
  127 + data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}"
  128 + data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}"
  129 + data-endlat="{{obj.endlat}}" data-lineid="{{obj.lineId}}" data-updown="{{obj.upDown}}">
  130 + 查看轨迹
  131 + </a>
  132 + </td>
  133 + <td>
  134 +
  135 + </td>
  136 +</tr>
  137 +{{/each}}
  138 +{{if list.length == 0}}
  139 +<tr>
  140 + <td colspan=8><h6 class="muted">没有找到相关数据</h6></td>
  141 +</tr>
  142 +{{/if}}
  143 +</script>
  144 +
  145 +<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
  146 +
  147 +<script>
73 $(function(){ 148 $(function(){
74 -//搜索线路  
75 -$('#line').select2({  
76 - ajax: {  
77 - url: '/realSchedule/findLine',  
78 - type: 'post',  
79 - dataType: 'json',  
80 - delay: 150,  
81 - data: function(params){  
82 - return{line: params.term};  
83 - },  
84 - processResults: function (data) {  
85 - return {  
86 - results: data  
87 - };  
88 - },  
89 - cache: true  
90 - },  
91 - templateResult: function(repo){  
92 - if (repo.loading) return repo.text;  
93 - var h = '<span>'+repo.text+'</span>';  
94 - return h;  
95 - },  
96 - escapeMarkup: function (markup) { return markup; },  
97 - minimumInputLength: 1,  
98 - templateSelection: function(repo){  
99 - return repo.text;  
100 - },  
101 - language: {  
102 - noResults: function(){  
103 - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';  
104 - },  
105 - inputTooShort : function(e) {  
106 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';  
107 - },  
108 - searching : function() {  
109 - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';  
110 - } 149 + var page = 0, initPagination;
  150 + var icheckOptions = {
  151 + checkboxClass: 'icheckbox_flat-blue',
  152 + increaseArea: '20%'
111 } 153 }
112 -}); 154 +
  155 + var date = new Date();
  156 + var week = date.getDay();//表明今天是周几。0-6表示周日到周六
  157 + var dateTime = date.getTime();//当前时间的时间戳,单位秒。
  158 +
  159 + var endTime = dateTime-week*24*3600*1000;//上周末、格式为时间戳。
  160 + var startTime = endTime-6*24*3600*1000;//上周一、格式为时间戳。
  161 + var endDate = timeToData(endTime);
  162 + var startDate = timeToData(startTime);
  163 + //表单默认选择上周一到上周日的超速信息。
  164 + $("input[name='endDate']")[0].value = endDate;
  165 + $("input[name='startDate']")[0].value = startDate;
  166 + var parameter = new Object();
  167 + parameter.endDate = $("input[name='endDate']")[0].value;
  168 + parameter.startDate = $("input[name='startDate']")[0].value;
  169 + jsDoQuery(parameter, true);
  170 + //搜索线路
  171 + $.get('/basic/lineCode2Name',function(result){
  172 + var data=[];
  173 + data.push({id: " ", text: "全部线路"});
  174 + for(var code in result){
  175 + data.push({id: code, text: result[code]});
  176 + }
  177 + initPinYinSelect2('#line',data,'');
  178 + });
  179 +
  180 + //时间戳转换为年月日
  181 + function timeToData(time){
  182 + var date = new Date(time);
  183 + var year = date.getFullYear();
  184 + var Month = date.getMonth()+1>10?date.getMonth()+1:"0"+(date.getMonth()+1);
  185 + var Day = date.getDate()>9?date.getDate():"0"+date.getDate();
  186 + return year+"-"+Month+"-"+Day;
  187 + }
  188 +
  189 + //重置
  190 + $('tr.filter .filter-cancel').on('click', function(){
  191 + $('tr.filter input, select').val('').change();
  192 + jsDoQuery(null, true);
  193 + });
  194 +
  195 + //提交
  196 + $('tr.filter .filter-submit').on('click', function(){
  197 + var cells = $('tr.filter')[0].cells
  198 + ,params = {}
  199 + ,name;
  200 + $.each(cells, function(i, cell){
  201 + var items = $('input,select', cell);
  202 + for(var j = 0, item; item = items[j++];){
  203 + name = $(item).attr('name');
  204 + if(name){
  205 + params[name] = $(item).val();
  206 + }
  207 + }
  208 + });
  209 + page = 0;
  210 + jsDoQuery(params, true);
  211 + });
  212 +
  213 + /*
  214 + * 获取数据 p: 要提交的参数, pagination: 是否重新分页
  215 + */
  216 + function jsDoQuery(p, pagination){
  217 + var params = {};
  218 + if(p)
  219 + params = p;
  220 + //更新时间排序
  221 + params['order'] = 'lastLoginDate';
  222 + params['page'] = page;
  223 + var i = layer.load(2);
  224 + $get('/speeding/pagequery' ,params, function(data){
  225 + var bodyHtm = template('speeding_list_temp', {list: data.dataList});
  226 + $('#datatable_speeding tbody').html(bodyHtm)
  227 + .find('.icheck').iCheck(icheckOptions)
  228 + .on('ifChanged', iCheckChange);
  229 + if(pagination && data.dataList.length > 0){
  230 + //重新分页
  231 + initPagination = true;
  232 + showPagination(data);
  233 + }
  234 + layer.close(i);
  235 + $(".lookTrajectory").click(function(){
  236 + var vehicle = $(this).data('vehicle');
  237 + var startDate = $(this).data('startdate');
  238 + var endDate = $(this).data('enddate');
  239 + var lon = $(this).data('lon');
  240 + var lat = $(this).data('lat');
  241 + var endLon = $(this).data('endlon');
  242 + var endLat = $(this).data('endlat');
  243 + var lineid = $(this).data('lineid');
  244 + var upDown = $(this).data('updown');
  245 + var storage = window.localStorage;
  246 + storage.setItem("zbhAndDate",vehicle+","+startDate+","+endDate+","+lon+","+lat+","+endLon+","+endLat+","+lineid+","+upDown);
  247 + $.get('/pages/excep/speedingMap.html?',function (result) {
  248 + layer.open({
  249 + type: 1,
  250 + title:'<i class="uk-icon-play-circle"></i>轨迹回放',
  251 + shadeClose: true,
  252 + shade: true,
  253 + scrollbar: false,
  254 + maxmin: false, //开启最大化最小化按钮
  255 + area: ['100%', '100%'],
  256 + content:result,//内容
  257 + });
  258 + });
  259 + })
  260 + });
  261 + }
  262 +
  263 + function iCheckChange(){
  264 + var tr = $(this).parents('tr');
  265 + if(this.checked)
  266 + tr.addClass('row-active');
  267 + else
  268 + tr.removeClass('row-active');
  269 +
  270 + if($('#datatable_resource input.icheck:checked').length == 1)
  271 + $('#removeButton').removeAttr('disabled');
  272 + else
  273 + $('#removeButton').attr('disabled', 'disabled');
  274 + }
  275 +
  276 + function showPagination(data){
  277 + //分页
  278 + $('#pagination').jqPaginator({
  279 + totalPages: data.totalPage,//总页数
  280 + visiblePages: 6,// 中间显示页数
  281 + currentPage: page + 1,
  282 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  283 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  284 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  285 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  286 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  287 + onPageChange: function (num, type) {
  288 + if(initPagination){
  289 + initPagination = false;
  290 + return;
  291 + }
  292 + var cells = $('tr.filter')[0].cells
  293 + ,params = {}
  294 + ,name;
  295 + $.each(cells, function(i, cell){
  296 + var items = $('input,select', cell);
  297 + for(var j = 0, item; item = items[j++];){
  298 + name = $(item).attr('name');
  299 + if(name){
  300 + params[name] = $(item).val();
  301 + }
  302 + }
  303 + });
  304 + page = num - 1;
  305 + jsDoQuery(params, false);
  306 + }
  307 + });
  308 + }
  309 +
  310 + //删除
  311 + $('#removeButton').on('click', function(){
  312 + if($(this).attr('disabled'))
  313 + return;
  314 +
  315 + var id = $('#datatable_resource input.icheck:checked').data('id');
  316 +
  317 + removeConfirm('确定要删除选中的数据?', '/resource/' + id ,function(){
  318 + $('tr.filter .filter-submit').click();
  319 + });
  320 + });
113 321
114 -//重置  
115 -$('tr.filter .filter-cancel').on('click', function(){  
116 - $('tr.filter input, select').val('').change();  
117 - Echart(); 322 +$("#line").on("change",initXl);
  323 +function initXl(){
  324 +$('#nbbm').select2({
  325 + placeholder: '搜索车辆...',
  326 + ajax: {
  327 + url: '/report/carList',
  328 + dataType: 'json',
  329 + delay: 150,
  330 + data: function (params) {
  331 + return {nbbm: params.term,
  332 + gsbm:"",
  333 + fgsbm:"",
  334 + xlbm:$('#line').val()};
  335 + },
  336 + processResults: function (data) {
  337 + return {
  338 + results: data
  339 + };
  340 + },
  341 + cache: true
  342 + },
  343 + templateResult: function (repo) {
  344 + if (repo.loading) return repo.text;
  345 + var h = '<span>' + repo.text + '</span>';
  346 + h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');
  347 + return h;
  348 + },
  349 + escapeMarkup: function (markup) {
  350 + return markup;
  351 + },
  352 + minimumInputLength: 1,
  353 + templateSelection: function (repo) {
  354 + return repo.text;
  355 + },
  356 + language: {
  357 + noResults: function () {
  358 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  359 + },
  360 + inputTooShort: function (e) {
  361 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  362 + },
  363 + searching: function () {
  364 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  365 + }
  366 + }
118 }); 367 });
119 -$("#date").datetimepicker({  
120 - format : 'YYYY-MM-DD',  
121 - locale : 'zh-cn'  
122 -});  
123 -var myDate = new Date();  
124 -var year=myDate.getFullYear();  
125 -var month=myDate.getMonth()+1;  
126 -var day=myDate.getDate();  
127 -if((month+"").length<2){  
128 - $("#date").val(year+"-0"+month+"-"+day);  
129 -}else{  
130 - $("#date").val(year+"-"+month+"-"+day);  
131 -  
132 } 368 }
133 -})  
134 -</script>  
135 369
136 370
  371 +//改变状态
  372 +function changeEnabled(id,enabled){
  373 + $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){
  374 + jsDoQuery(null, true);
  375 + })
  376 +}
  377 +});
  378 +</script>
137 \ No newline at end of file 379 \ No newline at end of file
src/main/resources/static/pages/excep/speedingList.html
@@ -141,6 +141,8 @@ @@ -141,6 +141,8 @@
141 {{/if}} 141 {{/if}}
142 </script> 142 </script>
143 143
  144 +<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
  145 +
144 <script> 146 <script>
145 $(function(){ 147 $(function(){
146 var page = 0, initPagination; 148 var page = 0, initPagination;
src/main/resources/static/pages/excep/speedingListmh.html deleted 100644 → 0
1 -<div class="page-head">  
2 - <div class="page-title">  
3 - <h1>超速异常</h1>  
4 - </div>  
5 -</div>  
6 -  
7 -<ul class="page-breadcrumb breadcrumb">  
8 - <li><a href="/pages/home.html" data-pjax>主页</a> <i class="fa fa-circle"></i></li>  
9 - <li><span class="active">异常查看</span> <i class="fa fa-circle"></i></li>  
10 - <li><span class="active">超速异常</span></li>  
11 -</ul>  
12 -  
13 -<div class="row">  
14 - <div class="col-md-12">  
15 - <!-- Begin: life time stats -->  
16 - <div class="portlet light portlet-fit portlet-datatable bordered">  
17 - <div class="portlet-title">  
18 - <div class="caption">  
19 - <i class="fa fa-times-circle"></i> <span  
20 - class="caption-subject font-dark sbold uppercase">超速异常数据表</span>  
21 - </div>  
22 - <div class="actions">  
23 - </div>  
24 - </div>  
25 - <div class="portlet-body">  
26 - <div class="table-container" style="margin-top: 10px">  
27 - <table  
28 - class="table table-striped table-bordered table-hover table-checkable"  
29 - id="datatable_speeding">  
30 - <thead>  
31 - <tr role="row" class="heading">  
32 - <th width="3%">#</th>  
33 - <th width="4%">线路</th>  
34 - <th width="6%">车辆自编号</th>  
35 - <th width="8%">上下行</th>  
36 - <th width="10%">开始时间</th>  
37 - <th width="10%">结束时间</th>  
38 - <th width="8%">持续时间</th>  
39 - <th width="8%">查看轨迹</th>  
40 - <th width="6%">操作</th>  
41 - </tr>  
42 - <tr role="row" class="filter">  
43 - <td></td>  
44 - <td>  
45 - <select class="form-control" name="line" id="line" style="width: 100px;"></select>  
46 - </td>  
47 - <td>  
48 - <select class="form-control" name="nbbm" id="nbbm" style="width: 100px;"></select>  
49 - </td>  
50 - <!-- <td>  
51 -  
52 - </td>  
53 - <td>  
54 - </td> -->  
55 - <td>  
56 - <select class="form-control form-filter " name="updown" style="width: 90px;">  
57 - <option value="">请选择...</option>  
58 - <option value="0">上行</option>  
59 - <option value="1">下行</option>  
60 - <option value="-1">无效</option>  
61 - </select>  
62 - </td>  
63 - <td>  
64 - <input class="form-control" type="date" name="startDate" />  
65 - </td>  
66 - <td>  
67 - <input class="form-control" type="date" name="endDate" />  
68 - </td>  
69 - <td>  
70 - >=<input class="form-control" type="text" name="times" style="width:50px;display:inline!important"  
71 - onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"/>  
72 - </td>  
73 - <td>  
74 - </td>  
75 - <td>  
76 - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >  
77 - <i class="fa fa-search"></i> 搜索</button>  
78 -  
79 - <button class="btn btn-sm red btn-outline filter-cancel">  
80 - <i class="fa fa-times"></i> 重置</button>  
81 - </td>  
82 - </tr>  
83 - </thead>  
84 - <tbody></tbody>  
85 - </table>  
86 - <div style="text-align: right;">  
87 - <ul id="pagination" class="pagination"></ul>  
88 - </div>  
89 - </div>  
90 - </div>  
91 - </div>  
92 - </div>  
93 -</div>  
94 -  
95 -<script id="speeding_list_temp" type="text/html">  
96 -{{each list as obj i}}  
97 -<tr>  
98 - <td style="vertical-align: middle;">  
99 - <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}">  
100 - </td>  
101 - <td>  
102 - {{obj.lineName}}  
103 - </td>  
104 - <td>  
105 - {{obj.vehicle}}  
106 - </td>  
107 - <td>  
108 - {{if obj.upDown==0}}  
109 - 上行  
110 - {{else if obj.upDown==1}}  
111 - 下行  
112 - {{else}}  
113 - 无效  
114 - {{/if}}  
115 - </td>  
116 - <td>  
117 - {{obj.timestampDate}}  
118 - </td>  
119 - <td>  
120 - {{obj.endtimestampDate}}  
121 - </td>  
122 - <td>  
123 - {{(obj.endtimestamp-obj.timestamp)/1000}}秒  
124 - </td>  
125 - <td>  
126 - <a class="btn default blue-stripe btn-sm lookTrajectory" data-vehicle ="{{obj.vehicle}}"  
127 - data-startdate="{{obj.timestampDate}}" data-enddate="{{obj.endtimestampDate}}"  
128 - data-lon="{{obj.lon}}" data-lat="{{obj.lat}}" data-endlon="{{obj.endlon}}"  
129 - data-endlat="{{obj.endlat}}" data-lineid="{{obj.lineId}}" data-updown="{{obj.upDown}}">  
130 - 查看轨迹  
131 - </a>  
132 - </td>  
133 - <td>  
134 -  
135 - </td>  
136 -</tr>  
137 -{{/each}}  
138 -{{if list.length == 0}}  
139 -<tr>  
140 - <td colspan=8><h6 class="muted">没有找到相关数据</h6></td>  
141 -</tr>  
142 -{{/if}}  
143 -</script>  
144 -  
145 -<script>  
146 -$(function(){  
147 - var page = 0, initPagination;  
148 - var icheckOptions = {  
149 - checkboxClass: 'icheckbox_flat-blue',  
150 - increaseArea: '20%'  
151 - }  
152 -  
153 - var date = new Date();  
154 - var week = date.getDay();//表明今天是周几。0-6表示周日到周六  
155 - var dateTime = date.getTime();//当前时间的时间戳,单位秒。  
156 -  
157 - var endTime = dateTime-week*24*3600*1000;//上周末、格式为时间戳。  
158 - var startTime = endTime-6*24*3600*1000;//上周一、格式为时间戳。  
159 - var endDate = timeToData(endTime);  
160 - var startDate = timeToData(startTime);  
161 - //表单默认选择上周一到上周日的超速信息。  
162 - $("input[name='endDate']")[0].value = endDate;  
163 - $("input[name='startDate']")[0].value = startDate;  
164 - var parameter = new Object();  
165 - parameter.endDate = $("input[name='endDate']")[0].value;  
166 - parameter.startDate = $("input[name='startDate']")[0].value;  
167 - jsDoQuery(parameter, true);  
168 - //搜索线路  
169 - $.get('/basic/lineCode2Name',function(result){  
170 - var data=[];  
171 - data.push({id: " ", text: "全部线路"});  
172 - for(var code in result){  
173 - data.push({id: code, text: result[code]});  
174 - }  
175 - initPinYinSelect2('#line',data,'');  
176 - });  
177 -  
178 - //时间戳转换为年月日  
179 - function timeToData(time){  
180 - var date = new Date(time);  
181 - var year = date.getFullYear();  
182 - var Month = date.getMonth()+1>10?date.getMonth()+1:"0"+(date.getMonth()+1);  
183 - var Day = date.getDate()>9?date.getDate():"0"+date.getDate();  
184 - return year+"-"+Month+"-"+Day;  
185 - }  
186 -  
187 - //重置  
188 - $('tr.filter .filter-cancel').on('click', function(){  
189 - $('tr.filter input, select').val('').change();  
190 - jsDoQuery(null, true);  
191 - });  
192 -  
193 - //提交  
194 - $('tr.filter .filter-submit').on('click', function(){  
195 - var cells = $('tr.filter')[0].cells  
196 - ,params = {}  
197 - ,name;  
198 - $.each(cells, function(i, cell){  
199 - var items = $('input,select', cell);  
200 - for(var j = 0, item; item = items[j++];){  
201 - name = $(item).attr('name');  
202 - if(name){  
203 - params[name] = $(item).val();  
204 - }  
205 - }  
206 - });  
207 - page = 0;  
208 - jsDoQuery(params, true);  
209 - });  
210 -  
211 - /*  
212 - * 获取数据 p: 要提交的参数, pagination: 是否重新分页  
213 - */  
214 - function jsDoQuery(p, pagination){  
215 - var params = {};  
216 - if(p)  
217 - params = p;  
218 - //更新时间排序  
219 - params['order'] = 'lastLoginDate';  
220 - params['page'] = page;  
221 - var i = layer.load(2);  
222 - $get('/speeding/pagequery' ,params, function(data){  
223 - var bodyHtm = template('speeding_list_temp', {list: data.dataList});  
224 - $('#datatable_speeding tbody').html(bodyHtm)  
225 - .find('.icheck').iCheck(icheckOptions)  
226 - .on('ifChanged', iCheckChange);  
227 - if(pagination && data.dataList.length > 0){  
228 - //重新分页  
229 - initPagination = true;  
230 - showPagination(data);  
231 - }  
232 - layer.close(i);  
233 - $(".lookTrajectory").click(function(){  
234 - var vehicle = $(this).data('vehicle');  
235 - var startDate = $(this).data('startdate');  
236 - var endDate = $(this).data('enddate');  
237 - var lon = $(this).data('lon');  
238 - var lat = $(this).data('lat');  
239 - var endLon = $(this).data('endlon');  
240 - var endLat = $(this).data('endlat');  
241 - var lineid = $(this).data('lineid');  
242 - var upDown = $(this).data('updown');  
243 - var storage = window.localStorage;  
244 - storage.setItem("zbhAndDate",vehicle+","+startDate+","+endDate+","+lon+","+lat+","+endLon+","+endLat+","+lineid+","+upDown);  
245 - $.get('/pages/excep/speedingMap.html?',function (result) {  
246 - layer.open({  
247 - type: 1,  
248 - title:'<i class="uk-icon-play-circle"></i>轨迹回放',  
249 - shadeClose: true,  
250 - shade: true,  
251 - scrollbar: false,  
252 - maxmin: false, //开启最大化最小化按钮  
253 - area: ['100%', '100%'],  
254 - content:result,//内容  
255 - });  
256 - });  
257 - })  
258 - });  
259 - }  
260 -  
261 - function iCheckChange(){  
262 - var tr = $(this).parents('tr');  
263 - if(this.checked)  
264 - tr.addClass('row-active');  
265 - else  
266 - tr.removeClass('row-active');  
267 -  
268 - if($('#datatable_resource input.icheck:checked').length == 1)  
269 - $('#removeButton').removeAttr('disabled');  
270 - else  
271 - $('#removeButton').attr('disabled', 'disabled');  
272 - }  
273 -  
274 - function showPagination(data){  
275 - //分页  
276 - $('#pagination').jqPaginator({  
277 - totalPages: data.totalPage,//总页数  
278 - visiblePages: 6,// 中间显示页数  
279 - currentPage: page + 1,  
280 - first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',  
281 - prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',  
282 - next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',  
283 - last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',  
284 - page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',  
285 - onPageChange: function (num, type) {  
286 - if(initPagination){  
287 - initPagination = false;  
288 - return;  
289 - }  
290 - var cells = $('tr.filter')[0].cells  
291 - ,params = {}  
292 - ,name;  
293 - $.each(cells, function(i, cell){  
294 - var items = $('input,select', cell);  
295 - for(var j = 0, item; item = items[j++];){  
296 - name = $(item).attr('name');  
297 - if(name){  
298 - params[name] = $(item).val();  
299 - }  
300 - }  
301 - });  
302 - page = num - 1;  
303 - jsDoQuery(params, false);  
304 - }  
305 - });  
306 - }  
307 -  
308 - //删除  
309 - $('#removeButton').on('click', function(){  
310 - if($(this).attr('disabled'))  
311 - return;  
312 -  
313 - var id = $('#datatable_resource input.icheck:checked').data('id');  
314 -  
315 - removeConfirm('确定要删除选中的数据?', '/resource/' + id ,function(){  
316 - $('tr.filter .filter-submit').click();  
317 - });  
318 - });  
319 -  
320 -$("#line").on("change",initXl);  
321 -function initXl(){  
322 -$('#nbbm').select2({  
323 - placeholder: '搜索车辆...',  
324 - ajax: {  
325 - url: '/report/carList',  
326 - dataType: 'json',  
327 - delay: 150,  
328 - data: function (params) {  
329 - return {nbbm: params.term,  
330 - gsbm:"",  
331 - fgsbm:"",  
332 - xlbm:$('#line').val()};  
333 - },  
334 - processResults: function (data) {  
335 - return {  
336 - results: data  
337 - };  
338 - },  
339 - cache: true  
340 - },  
341 - templateResult: function (repo) {  
342 - if (repo.loading) return repo.text;  
343 - var h = '<span>' + repo.text + '</span>';  
344 - h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');  
345 - return h;  
346 - },  
347 - escapeMarkup: function (markup) {  
348 - return markup;  
349 - },  
350 - minimumInputLength: 1,  
351 - templateSelection: function (repo) {  
352 - return repo.text;  
353 - },  
354 - language: {  
355 - noResults: function () {  
356 - return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';  
357 - },  
358 - inputTooShort: function (e) {  
359 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';  
360 - },  
361 - searching: function () {  
362 - return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';  
363 - }  
364 - }  
365 -});  
366 -}  
367 -  
368 -  
369 -//改变状态  
370 -function changeEnabled(id,enabled){  
371 - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){  
372 - jsDoQuery(null, true);  
373 - })  
374 -}  
375 -});  
376 -</script>  
377 \ No newline at end of file 0 \ No newline at end of file
src/main/resources/static/pages/forms/mould/countIntervalXx.xls
No preview for this file type
src/main/resources/static/pages/report/countInterval/countInterval.html
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 <div class="portlet-body"> 52 <div class="portlet-body">
53 <div class="row" class="col-md-12"> 53 <div class="row" class="col-md-12">
54 <div class="col-md-5"> 54 <div class="col-md-5">
55 - <div id="left_table" style="margin-top: 10px;overflow:auto;height: 860px"> 55 + <div id="left_table" style="margin-top: 10px;overflow:auto;">
56 <input class="btn btn-default hidden" type="button" id="export" value="导出"/> 56 <input class="btn btn-default hidden" type="button" id="export" value="导出"/>
57 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info_inter"> 57 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info_inter">
58 <thead> 58 <thead>
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <th>线路</th> 61 <th>线路</th>
62 <th>等级</th> 62 <th>等级</th>
63 <th>班次数</th> 63 <th>班次数</th>
64 - <th>发生次数</th> 64 + <th>次数</th>
65 <th>发生率</th> 65 <th>发生率</th>
66 </tr> 66 </tr>
67 </thead> 67 </thead>
@@ -77,16 +77,21 @@ @@ -77,16 +77,21 @@
77 <table class="table table-bordered table-hover table-checkable" id="forms"> 77 <table class="table table-bordered table-hover table-checkable" id="forms">
78 <thead class="hidden"> 78 <thead class="hidden">
79 <tr > 79 <tr >
80 - <th rowspan="2">分公司</th>  
81 - <th rowspan="2">线路</th>  
82 - <th rowspan="2">大间隔等级</th>  
83 - <th colspan="4">发生大间隔班次</th> 80 + <th rowspan="3">分公司</th>
  81 + <th rowspan="3">线路</th>
  82 + <th rowspan="3">等级</th>
  83 + <th colspan="6">发生大间隔班次</th>
84 </tr> 84 </tr>
85 <tr> 85 <tr>
86 - <th>计发</th>  
87 - <th>实发</th>  
88 - <th>计发</th>  
89 - <th>实发</th> 86 + <th rowspan="2">计发</th>
  87 + <th rowspan="2">实发</th>
  88 + <th rowspan="2">计发</th>
  89 + <th rowspan="2">实发</th>
  90 + <th colspan="2">间隔时间(分)</th>
  91 + </tr>
  92 + <tr>
  93 + <th>班次</th>
  94 + <th>大间隔</th>
90 </tr> 95 </tr>
91 </thead> 96 </thead>
92 <tbody> 97 <tbody>
@@ -208,7 +213,7 @@ @@ -208,7 +213,7 @@
208 layer.msg("请选择时间!"); 213 layer.msg("请选择时间!");
209 return; 214 return;
210 } 215 }
211 -// $("#left_table").height($(window).height()-100); 216 + $("#left_table").height($(window).height()-200);
212 line = $("#line").val(); 217 line = $("#line").val();
213 date = $("#date").val(); 218 date = $("#date").val();
214 gsbm =$("#gsdm").val(); 219 gsbm =$("#gsdm").val();
@@ -296,13 +301,15 @@ @@ -296,13 +301,15 @@
296 <script type="text/html" id="list_inter_info_xx"> 301 <script type="text/html" id="list_inter_info_xx">
297 {{each list as obj i}} 302 {{each list as obj i}}
298 <tr> 303 <tr>
299 - <td width="20%">{{obj.fgsname}}</td>  
300 - <td width="20%">{{obj.xlName}}</td>  
301 - <td width="10%">{{obj.djgde}}</td>  
302 - <td width="10%">{{obj.qJh}}</td>  
303 - <td width="10%">{{obj.qSj}}</td>  
304 - <td width="10%">{{obj.hJh}}</td>  
305 - <td width="10%">{{obj.hSj}}</td> 304 + <td width="14%">{{obj.fgsname}}</td>
  305 + <td width="16%">{{obj.xlName}}</td>
  306 + <td width="8%">{{obj.djgde}}</td>
  307 + <td width="8%">{{obj.qJh}}</td>
  308 + <td width="8%">{{obj.qSj}}</td>
  309 + <td width="8%">{{obj.hJh}}</td>
  310 + <td width="8%">{{obj.hSj}}</td>
  311 + <td width="10%">{{obj.bcjgsj}}</td>
  312 + <td width="10%">{{obj.djgsj}}</td>
306 </tr> 313 </tr>
307 {{/each}} 314 {{/each}}
308 {{if list.length == 0}} 315 {{if list.length == 0}}