Commit 34dbf2939fa35e0514884ce56c8b454482cbb40c

Authored by 娄高锋
2 parents ee1f42dc ebe128ec

Merge branch 'pudong_jdk8' of 192.168.168.201:panzhaov5/bsth_control into pudong_jdk8

src/main/java/com/bsth/data/gpsdata_v2/handlers/InStationProcess.java
1 1 package com.bsth.data.gpsdata_v2.handlers;
2 2  
  3 +import com.bsth.data.BasicData;
3 4 import com.bsth.data.LineConfigData;
4 5 import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
5 6 import com.bsth.data.gpsdata_v2.cache.GpsCacheData;
... ... @@ -98,11 +99,6 @@ public class InStationProcess {
98 99 flow = false;
99 100 }
100 101  
101   - //进起点 rfid状态复位
102   - if (null != sch && ((sch.getQdzCode().equals(gps.getStopNo()) && gps.getInstation() > 0) || sch.getQdzCode().equals(gps.getCarparkNo()))) {
103   - resetRfid(sch);
104   - }
105   -
106 102 boolean isEnd = false;
107 103  
108 104 //进终点
... ... @@ -112,6 +108,12 @@ public class InStationProcess {
112 108 isEnd = true;
113 109 }
114 110  
  111 + //进起点 rfid状态复位
  112 + if (!isEnd && null != sch &&
  113 + ((sch.getQdzCode().equals(gps.getStopNo()) && gps.getInstation() > 0) || sch.getQdzCode().equals(gps.getCarparkNo()))) {
  114 + resetRfid(sch);
  115 + }
  116 +
115 117 GpsCacheData.in(gps, isEnd);
116 118 }
117 119  
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -229,12 +229,13 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int
229 229 "a.station_route_code," +
230 230 "b.station_cod," +
231 231 "a.distances,"+
232   - "s.station_name," +
  232 + "a.station_name," +
233 233 "a.directions FROM (SELECT " +
234 234 "s.station_mark," +
235 235 "s.station_route_code," +
236 236 "s.directions," +
237 237 "s.distances,"+
  238 + "s.station_name,"+
238 239 "s.station FROM bsth_c_stationroute s where s.line = ?1 and s.destroy=0) a " +
239 240 "LEFT JOIN bsth_c_station b " +
240 241 " on a.station = b.id ORDER BY a.directions ASC ) k ORDER BY k.directions,k.station_route_code ASC", nativeQuery=true)
... ...
src/main/resources/static/pages/summary/destory_sch_detail/list.html
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   - <!-- flatpickr -->
9   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
10   - <style>
11   - html,body{
12   - height: 100%;
13   - }
14   - .ct_page{
15   - padding: 25px 15px;
16   - height: 100%;
17   - height: calc(100% - 50px);
18   - }
19   -
20   - .ct_cont{
21   - height: calc(100% - 35px);
22   - }
23   -
24   - .ct_cont>div>div.uk-card{
25   - height: 99%;
26   - }
27   -
28   - .loading{
29   - height: 100%;
30   - text-align: center;
31   - }
32   - .loading .uk-spinner{
33   - margin-top: 200px;
34   - }
35   - .loading circle{
36   - stroke: red;
37   - }
38   -
39   - .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
40   - opacity: 0.6 !important;
41   - padding: 0 !important;
42   - }
43   -
44   - .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){
45   - width: 9%;
46   - }
47   - .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){
48   - width: 9%;
49   - }
50   - .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){
51   - width: 9%;
52   - }
53   - .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){
54   - width: 9%;
55   - }
56   - .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){
57   - width: 9%;
58   - }
59   - .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){
60   - width: 9%;
61   - }
62   - .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){
63   - width: 8%;
64   - }
65   - .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){
66   - width: 8%;
67   - }
68   - .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){
69   - width: 8%;
70   - }
71   - .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){
72   - }
73   -
74   - .ct_search_form_wrap{
75   - border-bottom: 1px solid #e5e5e5;
76   - padding: 10px 0 25px 10px;
77   - }
78   - .ct_search_form_wrap .ct_field{
79   - display: inline-block;
80   - margin: 0 5px;
81   - }
82   -
83   - .ct_search_form_wrap .ct_field label{
84   - font-size: 14px;
85   - }
86   -
87   - .ct_search_form_wrap .ct_field input{
88   - width: 110px;
89   - }
90   -
91   - .ct_search_form_wrap .ct_field select{
92   - width: auto;
93   - min-width: 100px;
94   - }
95   -
96   - .ct_search_form_wrap .uk-button{
97   - padding: 0 14px;
98   - }
99   -
100   - .ct_search_form_wrap .uk-button i{
101   - vertical-align: middle;
102   - margin-top: -2px;
103   - margin-right: 7px;
104   - }
105   -
106   - .ct_table_wrap{
107   - font-size: 14px;
108   - height: calc(100% - 77px);
109   - }
110   -
111   - .t_body_wrap{
112   - height: calc(100% - 41px);
113   - overflow: auto;
114   - position: relative;
115   - }
116   -
117   - .ct_field.ct_field_bottom{
118   - vertical-align: bottom;
119   - font-size: 12px;
120   - margin-left: 0;
121   - }
122   - </style>
123   -</head>
124   -
125   -<body>
126   -<div class="loading">
127   - <div uk-spinner></div>
128   -</div>
129   -<div class="ct_page" style="display: none;">
130   - <h3 class="uk-heading-line uk-heading-bullet"><span style="color: #ff5353;">烂班明细统计</span></h3>
131   - <div class="ct_cont" >
132   - <div class="ct_search_form_wrap">
133   - <form>
134   - <div class="ct_field">
135   - <label>公司:
136   - <select class="uk-select" name="gsBm_eq">
137   - </select>
138   - </label>
139   - </div>
140   - <div class="ct_field">
141   - <label>分公司:
142   - <select class="uk-select" name="fgsBm_eq">
143   - </select>
144   - </label>
145   - </div>
146   - <div class="ct_field">
147   - <label>线路:
148   - <select class="uk-select" name="lineCode_eq">
149   - </select>
150   - </label>
151   - </div>
152   - <div class="ct_field">
153   - <label>日期:
154   - <input class="uk-input" name="rq" style="width: 220px;">
155   - </label>
156   - </div>
157   - <div class="ct_field">
158   - <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
159   - </div>
160   - <div class="ct_field ct_field_bottom">
161   - <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
162   - </div>
163   - <div class="ct_field ct_field_bottom">
164   - <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>
165   - </div>
166   - </form>
167   - </div>
168   - <div class="ct_table_wrap day">
169   - <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">
170   - <thead>
171   - <tr>
172   - <th>日期</th>
173   - <th>线路</th>
174   - <th>车号</th>
175   - <th>司机</th>
176   - <th>售票员</th>
177   - <th>原因</th>
178   - <th>班次</th>
179   - <th>烂班公里</th>
180   - <th>烂班时间</th>
181   - <th>备注</th>
182   - </tr>
183   - </thead>
184   - </table>
185   - <div class="t_body_wrap">
186   - <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">
187   - <tbody>
188   - </tbody>
189   - </table>
190   - </div>
191   - </div>
192   - </div>
193   -</div>
194   -
195   -<script id="destroy_sch_list_temp" type="text/html">
196   - {{each list as obj i}}
197   - <tr>
198   - <td>{{obj.rq}}</td>
199   - <td>{{obj.lineName}}</td>
200   - <td>{{obj.nbbm}}</td>
201   - <td>{{obj.jGh}}</td>
202   - <td>{{obj.sGh}}</td>
203   - <td>{{obj.reason}}</td>
204   - <td><a style="text-decoration: underline;">{{obj.size}}</a></td>
205   - <td>{{obj.mileage}}</td>
206   - <td>{{obj.timeStr}}</td>
207   - <td>{{obj.remark}}</td>
208   - </tr>
209   - {{/each}}
210   -</script>
211   -
212   -<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
213   -<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
214   -<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
215   -<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
216   -<!-- EventProxy -->
217   -<script src="/assets/js/eventproxy.js"></script>
218   -<!-- art-template 模版引擎 -->
219   -<script src="/assets/plugins/template.js"></script>
220   -<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
221   -<!-- jquery.serializejson JSON序列化插件 -->
222   -<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
223   -<!-- flatpickr -->
224   -<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
225   -<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
226   -<script>
227   -
228   - var f = $('form', '');
229   - //var page=0, pageSize=120;
230   -
231   - var ep = EventProxy.create('query_comps', 'query_lines', function () {
232   - $('[name=gsBm_eq]', f).trigger('change');//公司change
233   - query();
234   -
235   - $('.loading').remove();
236   - $('.ct_page').show();
237   - });
238   -
239   - //点击搜索
240   - $('button.search', f).on('click', query);
241   -
242   - function query() {
243   - $('button.search', f).attr('disabled', 'disabled');
244   - var data = f.serializeJSON();
245   - $('.ct_destroy_sch_table tbody').html('');
246   - //开始结束时间
247   - data.rq_ge = data.rq.substr(0, 10);
248   - data.rq_le = data.rq.substr(13);
249   - //data.order='t';
250   - delete data.rq;
251   -
252   - $.get('/summary/destroy_detail/all', data, function (rs) {
253   - $('button.search', f).removeAttr('disabled');
254   - if(!rs || rs.length==0)
255   - return UIkit.notification('没有搜索到相关数据!!', 'danger');
256   - $.each(rs, function () {
257   - this.timeStr=moment(this.t).format('HH:mm')
258   - });
259   -
260   - var htmlStr = template('destroy_sch_list_temp', {list: rs});
261   - $('.ct_destroy_sch_table tbody').html(htmlStr);
262   - $('.t_body_wrap').perfectScrollbar('update');
263   - });
264   - }
265   -
266   -
267   - //日期选择框
268   - var fs='YYYY-MM-DD'
269   - , ets=moment().subtract(1, 'days').format(fs)
270   - , sts=moment().subtract(3, 'days').format(fs);
271   - flatpickr('.ct_search_form_wrap [name=rq]', {
272   - mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
273   - });
274   - var comps;
275   - //构建公司级联下拉框
276   - $.get('/user/companyData', function (rs) {
277   - comps = rs;
278   - var opts = '';
279   - for(var i=0,obj;obj=comps[i++];){
280   - opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
281   - }
282   - $('[name=gsBm_eq]', f).html(opts);
283   - ep.emit('query_comps');
284   - });
285   -
286   - var lineMapps;
287   - //加载线路信息
288   - $.get('/line/all', {'destroy_eq': 0}, function (rs) {
289   - rs.sort(function (a, b) {
290   - return a.name.localeCompare(b.name);
291   - });
292   - lineMapps={};
293   - var k;
294   - $.each(rs, function () {
295   - k = this.company+'_'+this.brancheCompany;
296   - if(!lineMapps[k])
297   - lineMapps[k]=[];
298   - lineMapps[k].push(this);
299   - });
300   -
301   - ep.emit('query_lines');
302   - });
303   -
304   - $('[name=gsBm_eq]', f).on('change', function () {
305   - var code = $(this).val(), subs=[];
306   - $.each(comps, function () {
307   - if(this.companyCode==code)
308   - subs=this.children;
309   - });
310   -
311   - var opts='';
312   - $.each(subs, function () {
313   - opts += '<option value="'+this.code+'">'+this.name+'</option>';
314   - });
315   - $('[name=fgsBm_eq]', f).html(opts).trigger('change');
316   - });
317   -
318   - $('[name=fgsBm_eq]', f).on('change', function () {
319   - var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();
320   - var array = lineMapps[k];
321   - var opts = '<option value="">全部</option>';
322   - if(array){
323   - $.each(array, function () {
324   - opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
325   - });
326   - }
327   - $('[name=lineCode_eq]', f).html(opts);
328   - });
329   -
330   - //
331   - //滚动条
332   - $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});
333   -
334   - $(document).on('submit', 'form', function () {
335   - return false;
336   - });
337   -
338   - /**
339   - * 导出
340   - */
341   - $('.export_excel').on('click', function () {
342   - var data = f.serializeJSON();
343   - data.rq_ge = data.rq.substr(0, 10);
344   - data.rq_le = data.rq.substr(13);
345   - data.order='t';
346   - delete data.rq;
347   -
348   - window.open('/summary/destroy_detail/excel?' + $.param(data));
349   - });
350   -
351   -</script>
352   -</body>
  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 + <!-- flatpickr -->
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css">
  10 + <style>
  11 + html,body{
  12 + height: 100%;
  13 + }
  14 + .ct_page{
  15 + padding: 25px 15px;
  16 + height: 100%;
  17 + height: calc(100% - 50px);
  18 + }
  19 +
  20 + .ct_cont{
  21 + height: calc(100% - 35px);
  22 + }
  23 +
  24 + .ct_cont>div>div.uk-card{
  25 + height: 99%;
  26 + }
  27 +
  28 + .loading{
  29 + height: 100%;
  30 + text-align: center;
  31 + }
  32 + .loading .uk-spinner{
  33 + margin-top: 200px;
  34 + }
  35 + .loading circle{
  36 + stroke: red;
  37 + }
  38 +
  39 + .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{
  40 + opacity: 0.6 !important;
  41 + padding: 0 !important;
  42 + }
  43 +
  44 + .ct_destroy_sch_table_width th:nth-of-type(1),.ct_destroy_sch_table_width td:nth-of-type(1){
  45 + width: 9%;
  46 + }
  47 + .ct_destroy_sch_table_width th:nth-of-type(2),.ct_destroy_sch_table_width td:nth-of-type(2){
  48 + width: 9%;
  49 + }
  50 + .ct_destroy_sch_table_width th:nth-of-type(3),.ct_destroy_sch_table_width td:nth-of-type(3){
  51 + width: 9%;
  52 + }
  53 + .ct_destroy_sch_table_width th:nth-of-type(4),.ct_destroy_sch_table_width td:nth-of-type(4){
  54 + width: 9%;
  55 + }
  56 + .ct_destroy_sch_table_width th:nth-of-type(5),.ct_destroy_sch_table_width td:nth-of-type(5){
  57 + width: 9%;
  58 + }
  59 + .ct_destroy_sch_table_width th:nth-of-type(6),.ct_destroy_sch_table_width td:nth-of-type(6){
  60 + width: 9%;
  61 + }
  62 + .ct_destroy_sch_table_width th:nth-of-type(7),.ct_destroy_sch_table_width td:nth-of-type(7){
  63 + width: 8%;
  64 + }
  65 + .ct_destroy_sch_table_width th:nth-of-type(8),.ct_destroy_sch_table_width td:nth-of-type(8){
  66 + width: 8%;
  67 + }
  68 + .ct_destroy_sch_table_width th:nth-of-type(9),.ct_destroy_sch_table_width td:nth-of-type(9){
  69 + width: 8%;
  70 + }
  71 + .ct_destroy_sch_table_width th:nth-of-type(10),.ct_destroy_sch_table_width td:nth-of-type(10){
  72 + }
  73 +
  74 + .ct_search_form_wrap{
  75 + border-bottom: 1px solid #e5e5e5;
  76 + padding: 10px 0 25px 10px;
  77 + }
  78 + .ct_search_form_wrap .ct_field{
  79 + display: inline-block;
  80 + margin: 0 5px;
  81 + }
  82 +
  83 + .ct_search_form_wrap .ct_field label{
  84 + font-size: 14px;
  85 + }
  86 +
  87 + .ct_search_form_wrap .ct_field input{
  88 + width: 110px;
  89 + }
  90 +
  91 + .ct_search_form_wrap .ct_field select{
  92 + width: auto;
  93 + min-width: 100px;
  94 + }
  95 +
  96 + .ct_search_form_wrap .uk-button{
  97 + padding: 0 14px;
  98 + }
  99 +
  100 + .ct_search_form_wrap .uk-button i{
  101 + vertical-align: middle;
  102 + margin-top: -2px;
  103 + margin-right: 7px;
  104 + }
  105 +
  106 + .ct_table_wrap{
  107 + font-size: 14px;
  108 + height: calc(100% - 77px);
  109 + }
  110 +
  111 + .t_body_wrap{
  112 + height: calc(100% - 41px);
  113 + overflow: auto;
  114 + position: relative;
  115 + }
  116 +
  117 + .ct_field.ct_field_bottom{
  118 + vertical-align: bottom;
  119 + font-size: 12px;
  120 + margin-left: 0;
  121 + }
  122 + </style>
  123 +</head>
  124 +
  125 +<body>
  126 +<div class="loading">
  127 + <div uk-spinner></div>
  128 +</div>
  129 +<div class="ct_page" style="display: none;">
  130 + <h3 class="uk-heading-line uk-heading-bullet"><span style="color: #ff5353;">烂班明细统计</span></h3>
  131 + <div class="ct_cont" >
  132 + <div class="ct_search_form_wrap">
  133 + <form>
  134 + <div class="ct_field">
  135 + <label>公司:
  136 + <select class="uk-select" name="gsBm_eq">
  137 + </select>
  138 + </label>
  139 + </div>
  140 + <div class="ct_field">
  141 + <label>分公司:
  142 + <select class="uk-select" name="fgsBm_eq">
  143 + </select>
  144 + </label>
  145 + </div>
  146 + <div class="ct_field">
  147 + <label>线路:
  148 + <select class="uk-select" name="lineCode_eq">
  149 + </select>
  150 + </label>
  151 + </div>
  152 + <div class="ct_field">
  153 + <label>原因:
  154 + <select class="uk-select" name="reason_eq">
  155 + <option value="">全部</option>
  156 + <option value="配车">配车</option>
  157 + <option value="保养">保养</option>
  158 + <option value="故障">故障</option>
  159 + <option value="肇事">肇事</option>
  160 + <option value="路阻">路阻</option>
  161 + <option value="纠纷">纠纷</option>
  162 + <option value="缺人">缺人</option>
  163 + <option value="客稀">客稀</option>
  164 + <option value="缺车">缺车</option>
  165 + <option value="气候">气候</option>
  166 + <option value="援外">援外</option>
  167 + <option value="吊慢">吊慢</option>
  168 + <option value="抽减">抽减</option>
  169 + <option value="路救">路救</option>
  170 + <option value="其他">其他</option>
  171 + </select>
  172 + </label>
  173 + </div>
  174 + <div class="ct_field">
  175 + <label>日期:
  176 + <input class="uk-input" name="rq" style="width: 220px;">
  177 + </label>
  178 + </div>
  179 + <div class="ct_field">
  180 + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
  181 + </div>
  182 + <div class="ct_field ct_field_bottom">
  183 + <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
  184 + </div>
  185 + <div class="ct_field ct_field_bottom">
  186 + <span uk-icon="icon: question" title="不统计进出场和2点间空驶" uk-tooltip="pos: bottom"></span>
  187 + </div>
  188 + </form>
  189 + </div>
  190 + <div class="ct_table_wrap day">
  191 + <table class="uk-table uk-table-small ct_destroy_sch_table_width" style="margin-bottom: 0;">
  192 + <thead>
  193 + <tr>
  194 + <th>日期</th>
  195 + <th>线路</th>
  196 + <th>车号</th>
  197 + <th>司机</th>
  198 + <th>售票员</th>
  199 + <th>原因</th>
  200 + <th>班次</th>
  201 + <th>烂班公里</th>
  202 + <th>烂班时间</th>
  203 + <th>备注</th>
  204 + </tr>
  205 + </thead>
  206 + </table>
  207 + <div class="t_body_wrap">
  208 + <table class="uk-table uk-table-divider uk-table-hover uk-table-small ct_destroy_sch_table ct_destroy_sch_table_width">
  209 + <tbody>
  210 + </tbody>
  211 + </table>
  212 + </div>
  213 + </div>
  214 + </div>
  215 +</div>
  216 +
  217 +<script id="destroy_sch_list_temp" type="text/html">
  218 + {{each list as obj i}}
  219 + <tr>
  220 + <td>{{obj.rq}}</td>
  221 + <td>{{obj.lineName}}</td>
  222 + <td>{{obj.nbbm}}</td>
  223 + <td>{{obj.jGh}}</td>
  224 + <td>{{obj.sGh}}</td>
  225 + <td>{{obj.reason}}</td>
  226 + <td><a style="text-decoration: underline;">{{obj.size}}</a></td>
  227 + <td>{{obj.mileage}}</td>
  228 + <td>{{obj.timeStr}}</td>
  229 + <td>{{obj.remark}}</td>
  230 + </tr>
  231 + {{/each}}
  232 +</script>
  233 +
  234 +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
  235 +<script src="/assets/plugins/uk3.0/uikit.min.js"></script>
  236 +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script>
  237 +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script>
  238 +<!-- EventProxy -->
  239 +<script src="/assets/js/eventproxy.js"></script>
  240 +<!-- art-template 模版引擎 -->
  241 +<script src="/assets/plugins/template.js"></script>
  242 +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script>
  243 +<!-- jquery.serializejson JSON序列化插件 -->
  244 +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script>
  245 +<!-- flatpickr -->
  246 +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script>
  247 +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script>
  248 +<script>
  249 +
  250 + var f = $('form', '');
  251 + //var page=0, pageSize=120;
  252 +
  253 + var ep = EventProxy.create('query_comps', 'query_lines', function () {
  254 + $('[name=gsBm_eq]', f).trigger('change');//公司change
  255 + query();
  256 +
  257 + $('.loading').remove();
  258 + $('.ct_page').show();
  259 + });
  260 +
  261 + //点击搜索
  262 + $('button.search', f).on('click', query);
  263 +
  264 + function query() {
  265 + $('button.search', f).attr('disabled', 'disabled');
  266 + var data = f.serializeJSON();
  267 + $('.ct_destroy_sch_table tbody').html('');
  268 + //开始结束时间
  269 + data.rq_ge = data.rq.substr(0, 10);
  270 + data.rq_le = data.rq.substr(13);
  271 + //data.order='t';
  272 + delete data.rq;
  273 +
  274 + $.get('/summary/destroy_detail/all', data, function (rs) {
  275 + $('button.search', f).removeAttr('disabled');
  276 + if(!rs || rs.length==0)
  277 + return UIkit.notification('没有搜索到相关数据!!', 'danger');
  278 + $.each(rs, function () {
  279 + this.timeStr=moment(this.t).format('HH:mm')
  280 + });
  281 +
  282 + var htmlStr = template('destroy_sch_list_temp', {list: rs});
  283 + $('.ct_destroy_sch_table tbody').html(htmlStr);
  284 + $('.t_body_wrap').perfectScrollbar('update');
  285 + });
  286 + }
  287 +
  288 +
  289 + //日期选择框
  290 + var fs='YYYY-MM-DD'
  291 + , ets=moment().subtract(1, 'days').format(fs)
  292 + , sts=moment().subtract(3, 'days').format(fs);
  293 + flatpickr('.ct_search_form_wrap [name=rq]', {
  294 + mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
  295 + });
  296 + var comps;
  297 + //构建公司级联下拉框
  298 + $.get('/user/companyData', function (rs) {
  299 + comps = rs;
  300 + var opts = '';
  301 + for(var i=0,obj;obj=comps[i++];){
  302 + opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>';
  303 + }
  304 + $('[name=gsBm_eq]', f).html(opts);
  305 + ep.emit('query_comps');
  306 + });
  307 +
  308 + var lineMapps;
  309 + //加载线路信息
  310 + $.get('/line/all', {'destroy_eq': 0}, function (rs) {
  311 + rs.sort(function (a, b) {
  312 + return a.name.localeCompare(b.name);
  313 + });
  314 + lineMapps={};
  315 + var k;
  316 + $.each(rs, function () {
  317 + k = this.company+'_'+this.brancheCompany;
  318 + if(!lineMapps[k])
  319 + lineMapps[k]=[];
  320 + lineMapps[k].push(this);
  321 + });
  322 +
  323 + ep.emit('query_lines');
  324 + });
  325 +
  326 + $('[name=gsBm_eq]', f).on('change', function () {
  327 + var code = $(this).val(), subs=[];
  328 + $.each(comps, function () {
  329 + if(this.companyCode==code)
  330 + subs=this.children;
  331 + });
  332 +
  333 + var opts='<option value="">全部</option>';
  334 + $.each(subs, function () {
  335 + opts += '<option value="'+this.code+'">'+this.name+'</option>';
  336 + });
  337 + $('[name=fgsBm_eq]', f).html(opts).trigger('change');
  338 + });
  339 +
  340 + $('[name=fgsBm_eq]', f).on('change', function () {
  341 + var k = $('[name=gsBm_eq]', f).val() + '_' + $(this).val();
  342 + var array = lineMapps[k];
  343 + var opts = '<option value="">全部</option>';
  344 + if(array){
  345 + $.each(array, function () {
  346 + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>';
  347 + });
  348 + }
  349 + $('[name=lineCode_eq]', f).html(opts);
  350 + });
  351 +
  352 + //
  353 + //滚动条
  354 + $('.t_body_wrap').perfectScrollbar({suppressScrollX: true});
  355 +
  356 + $(document).on('submit', 'form', function () {
  357 + return false;
  358 + });
  359 +
  360 + /**
  361 + * 导出
  362 + */
  363 + $('.export_excel').on('click', function () {
  364 + var data = f.serializeJSON();
  365 + data.rq_ge = data.rq.substr(0, 10);
  366 + data.rq_le = data.rq.substr(13);
  367 + data.order='t';
  368 + delete data.rq;
  369 +
  370 + window.open('/summary/destroy_detail/excel?' + $.param(data));
  371 + });
  372 +
  373 +</script>
  374 +</body>
353 375 </html>
354 376 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html
1   -<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-jhlb-modal">
2   - <div class="uk-modal-dialog" style="width: 370px;">
3   - <a href="" class="uk-modal-close uk-close"></a>
4   - <div class="uk-modal-header">
5   - <h2>计划烂班</h2></div>
6   - <form class="uk-form uk-form-horizontal">
7   - </form>
8   - </div>
9   -
10   - <script id="schedule-jhlb-form-temp" type="text/html">
11   - <div class="uk-grid">
12   - <div class="uk-width-1-1">
13   - <div class="uk-form-row">
14   - <label class="uk-form-label" >内部编码</label>
15   - <div class="uk-form-controls">
16   - <input value="{{sch.clZbh}}" disabled/>
17   - </div>
18   - </div>
19   - </div>
20   - </div>
21   -
22   - <div class="uk-grid">
23   - <div class="uk-width-1-1">
24   - <div class="uk-form-row">
25   - <label class="uk-form-label" >路牌</label>
26   - <div class="uk-form-controls">
27   - <select name="lpName">
28   - {{if lps.length > 1}}
29   - <option value="-100">全部</option>
30   - {{/if}}
31   - {{each lps as lpName i}}
32   - <option value="{{lpName}}">{{lpName}}</option>
33   - {{/each}}
34   - </select>
35   - </div>
36   - </div>
37   - </div>
38   - </div>
39   -
40   - <div class="uk-grid">
41   - <div class="uk-width-1-1">
42   - <div class="uk-form-row">
43   - <label class="uk-form-label" >班次
44   - <hr>
45   - <label>全选
46   - <input class="i-cbox" name="allCheck" type="checkbox" >
47   - </label>
48   - </label>
49   - <div class="uk-form-controls sch-time-checkbox-list">
50   - {{each list as sch i}}
51   - <label data-lp="{{sch.lpName}}" {{if sch.destroy}}class="destroy-sch"{{/if}}>
52   - <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}>
53   - {{sch.dfsj}}
54   -
55   - {{if sch.bcType == "out"}}
56   - <span class="uk-badge uk-badge-success">出场</span>
57   - {{else if sch.bcType == "in"}}
58   - <span class="uk-badge uk-badge-warning">进场</span>
59   - {{else if sch.bcType == "venting"}}
60   - <span class="uk-badge uk-badge-danger">直放</span>
61   - {{else if sch.bcType == "major"}}
62   - <span class="uk-badge uk-badge-danger">放站</span>
63   - {{/if}}
64   - {{if sch.sflj}}
65   - <span class="uk-badge uk-badge-danger">临加</span>
66   - {{/if}}
67   - {{if sch.destroy}}
68   - <small>已烂班</small>
69   - {{/if}}
70   - </label>
71   - {{/each}}
72   - </div>
73   - </div>
74   - </div>
75   - </div>
76   - <div class="uk-grid">
77   - <div class="uk-width-1-1">
78   - <div class="uk-form-row">
79   - <label class="uk-form-label" >调整说明</label>
80   - <div class="uk-form-controls">
81   - <select name="adjustExps" required>
82   - <option value="">请选择..</option>
83   - {{each adjustExps as exp i}}
84   - <option value="{{exp}}">{{exp}}</option>
85   - {{/each}}
86   - </select>
87   - </div>
88   - </div>
89   - </div>
90   - </div>
91   - <div class="uk-grid">
92   - <div class="uk-width-1-1">
93   - <div class="uk-form-row ct-stacked">
94   - <div class="uk-form-controls" style="margin-top: 5px;">
95   - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="烂班说明,不超过20个字符"></textarea>
96   - </div>
97   - </div>
98   - </div>
99   - </div>
100   -
101   - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
102   - <button type="button" class="uk-button uk-modal-close">取消</button>
103   - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
104   - </div>
105   - </script>
106   -
107   - <script>
108   - (function() {
109   - var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
110   - var modal = '#schedule-jhlb-modal',
111   - sch;
112   - $(modal).on('init', function(e, data) {
113   - e.stopPropagation();
114   - sch = data.sch;
115   - //获取车辆所有班次
116   - var schArr = gb_common.get_vals(gb_schedule_table.findScheduleByLine(sch.xlBm)).filter(function(item) {
117   - return item.clZbh == sch.clZbh;
118   - }).sort(gb_schedule_table.schedule_sort);
119   -
120   - //获取路牌
121   - var lps = {};
122   - $.each(schArr, function () {
123   - lps[this.lpName]=1;
124   - });
125   -
126   - var formHtml = template('schedule-jhlb-form-temp', {
127   - sch: sch,
128   - list: schArr,
129   - adjustExps:adjustExps,
130   - lps: gb_common.get_keys(lps)
131   - });
132   - $('form', modal).html(formHtml);
133   -
134   - if(!sch.destroy){
135   - //选中班次
136   - var ckbox=$('input[type=checkbox][value='+sch.id+']', f).attr('checked', 'checked');
137   - //滚动到可视区域
138   - var cont=$('.sch-time-checkbox-list', f);
139   - cont.animate({
140   - scrollTop: ckbox.offset().top - cont.offset().top + cont.scrollTop() - 10
141   - }, 500);
142   - }
143   -
144   - //submit
145   - var f = $('form', modal).formValidation(gb_form_validation_opts);
146   - f.on('success.form.fv', function(e) {
147   - e.preventDefault();
148   - var data = $(this).serializeJSON();
149   - if(!data.ids || data.ids.length==0){
150   - UIkit.modal(modal).hide();
151   - return;
152   - }
153   - var idsStr='';
154   - $.each(data.ids, function(){idsStr+=(','+this)});
155   - data.idsStr=idsStr.substr(1);
156   - //提交
157   - gb_common.$post('/realSchedule/destroy', data, function(rs){
158   - gb_schedule_table.updateSchedule(rs.ts);
159   - UIkit.modal(modal).hide();
160   - notify_succ('烂班操作成功!');
161   - //calc 应发未发
162   - gb_schedule_table.calc_yfwf_num(sch.xlBm);
163   - });
164   - });
165   -
166   - $('[name=adjustExps]', f).on('change', function(){
167   - var rem=$('[name=remarks]', f);
168   - rem.val(rem.val() + $(this).val() + ',').trigger('input');
169   - });
170   -
171   - //路牌切换事件
172   - $('[name=lpName]', f).on('change', function () {
173   - var v = $(this).val();
174   - var lbs = $('.sch-time-checkbox-list label', modal);
175   - if(v=='-100'){
176   - //显示全部
177   - lbs.show();
178   - }
179   - else {
180   - lbs.hide().each(function () {
181   - if($(this).data('lp')==v)
182   - $(this).show();
183   - else{
184   - //将隐藏的checkbox取消选中
185   - $(this).find('input[type=checkbox]')[0].checked=false;
186   - }
187   - });
188   - }
189   - });
190   -
191   - //全选
192   - $('[name=allCheck]', f).on('click', function () {
193   - var cbs = $('.sch-time-checkbox-list label input[type=checkbox]:visible:enabled', modal);
194   - var status = this.checked;
195   - cbs.each(function () {
196   - this.checked = status;
197   - });
198   - });
199   - });
200   - })();
201   - </script>
202   -</div>
  1 +<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-jhlb-modal">
  2 + <div class="uk-modal-dialog" style="width: 370px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>计划烂班</h2></div>
  6 + <form class="uk-form uk-form-horizontal">
  7 + </form>
  8 + </div>
  9 +
  10 + <script id="schedule-jhlb-form-temp" type="text/html">
  11 + <div class="uk-grid">
  12 + <div class="uk-width-1-1">
  13 + <div class="uk-form-row">
  14 + <label class="uk-form-label" >内部编码</label>
  15 + <div class="uk-form-controls">
  16 + <input value="{{sch.clZbh}}" disabled/>
  17 + </div>
  18 + </div>
  19 + </div>
  20 + </div>
  21 +
  22 + <div class="uk-grid">
  23 + <div class="uk-width-1-1">
  24 + <div class="uk-form-row">
  25 + <label class="uk-form-label" >路牌</label>
  26 + <div class="uk-form-controls">
  27 + <select name="lpName">
  28 + {{if lps.length > 1}}
  29 + <option value="-100">全部</option>
  30 + {{/if}}
  31 + {{each lps as lpName i}}
  32 + <option value="{{lpName}}">{{lpName}}</option>
  33 + {{/each}}
  34 + </select>
  35 + </div>
  36 + </div>
  37 + </div>
  38 + </div>
  39 +
  40 + <div class="uk-grid">
  41 + <div class="uk-width-1-1">
  42 + <div class="uk-form-row">
  43 + <label class="uk-form-label" >班次
  44 + <hr>
  45 + <label>全选
  46 + <input class="i-cbox" name="allCheck" type="checkbox" >
  47 + </label>
  48 + </label>
  49 + <div class="uk-form-controls sch-time-checkbox-list">
  50 + {{each list as sch i}}
  51 + <label data-lp="{{sch.lpName}}" {{if sch.destroy}}class="destroy-sch"{{/if}}>
  52 + <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}>
  53 + {{sch.dfsj}}
  54 +
  55 + {{if sch.bcType == "out"}}
  56 + <span class="uk-badge uk-badge-success">出场</span>
  57 + {{else if sch.bcType == "in"}}
  58 + <span class="uk-badge uk-badge-warning">进场</span>
  59 + {{else if sch.bcType == "venting"}}
  60 + <span class="uk-badge uk-badge-danger">直放</span>
  61 + {{else if sch.bcType == "major"}}
  62 + <span class="uk-badge uk-badge-danger">放站</span>
  63 + {{/if}}
  64 + {{if sch.sflj}}
  65 + <span class="uk-badge uk-badge-danger">临加</span>
  66 + {{/if}}
  67 + {{if sch.destroy}}
  68 + <small>已烂班</small>
  69 + {{/if}}
  70 + </label>
  71 + {{/each}}
  72 + </div>
  73 + </div>
  74 + </div>
  75 + </div>
  76 + <div class="uk-grid">
  77 + <div class="uk-width-1-1">
  78 + <div class="uk-form-row">
  79 + <label class="uk-form-label" >调整说明</label>
  80 + <div class="uk-form-controls">
  81 + <select name="adjustExps" required>
  82 + <option value="">请选择..</option>
  83 + {{each adjustExps as exp i}}
  84 + <option value="{{exp}}">{{exp}}</option>
  85 + {{/each}}
  86 + </select>
  87 + </div>
  88 + </div>
  89 + </div>
  90 + </div>
  91 + <div class="uk-grid">
  92 + <div class="uk-width-1-1">
  93 + <div class="uk-form-row ct-stacked">
  94 + <div class="uk-form-controls" style="margin-top: 5px;">
  95 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="烂班说明,不超过20个字符"></textarea>
  96 + </div>
  97 + </div>
  98 + </div>
  99 + </div>
  100 +
  101 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  102 + <button type="button" class="uk-button uk-modal-close">取消</button>
  103 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  104 + </div>
  105 + </script>
  106 +
  107 + <script>
  108 + (function() {
  109 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '路救', '其他'];
  110 + var modal = '#schedule-jhlb-modal',
  111 + sch;
  112 + $(modal).on('init', function(e, data) {
  113 + e.stopPropagation();
  114 + sch = data.sch;
  115 + //获取车辆所有班次
  116 + var schArr = gb_common.get_vals(gb_schedule_table.findScheduleByLine(sch.xlBm)).filter(function(item) {
  117 + return item.clZbh == sch.clZbh;
  118 + }).sort(gb_schedule_table.schedule_sort);
  119 +
  120 + //获取路牌
  121 + var lps = {};
  122 + $.each(schArr, function () {
  123 + lps[this.lpName]=1;
  124 + });
  125 +
  126 + var formHtml = template('schedule-jhlb-form-temp', {
  127 + sch: sch,
  128 + list: schArr,
  129 + adjustExps:adjustExps,
  130 + lps: gb_common.get_keys(lps)
  131 + });
  132 + $('form', modal).html(formHtml);
  133 +
  134 + if(!sch.destroy){
  135 + //选中班次
  136 + var ckbox=$('input[type=checkbox][value='+sch.id+']', f).attr('checked', 'checked');
  137 + //滚动到可视区域
  138 + var cont=$('.sch-time-checkbox-list', f);
  139 + cont.animate({
  140 + scrollTop: ckbox.offset().top - cont.offset().top + cont.scrollTop() - 10
  141 + }, 500);
  142 + }
  143 +
  144 + //submit
  145 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  146 + f.on('success.form.fv', function(e) {
  147 + e.preventDefault();
  148 + var data = $(this).serializeJSON();
  149 + if(!data.ids || data.ids.length==0){
  150 + UIkit.modal(modal).hide();
  151 + return;
  152 + }
  153 + var idsStr='';
  154 + $.each(data.ids, function(){idsStr+=(','+this)});
  155 + data.idsStr=idsStr.substr(1);
  156 + //提交
  157 + gb_common.$post('/realSchedule/destroy', data, function(rs){
  158 + gb_schedule_table.updateSchedule(rs.ts);
  159 + UIkit.modal(modal).hide();
  160 + notify_succ('烂班操作成功!');
  161 + //calc 应发未发
  162 + gb_schedule_table.calc_yfwf_num(sch.xlBm);
  163 + });
  164 + });
  165 +
  166 + $('[name=adjustExps]', f).on('change', function(){
  167 + var rem=$('[name=remarks]', f);
  168 + rem.val(rem.val() + $(this).val() + ',').trigger('input');
  169 + });
  170 +
  171 + //路牌切换事件
  172 + $('[name=lpName]', f).on('change', function () {
  173 + var v = $(this).val();
  174 + var lbs = $('.sch-time-checkbox-list label', modal);
  175 + if(v=='-100'){
  176 + //显示全部
  177 + lbs.show();
  178 + }
  179 + else {
  180 + lbs.hide().each(function () {
  181 + if($(this).data('lp')==v)
  182 + $(this).show();
  183 + else{
  184 + //将隐藏的checkbox取消选中
  185 + $(this).find('input[type=checkbox]')[0].checked=false;
  186 + }
  187 + });
  188 + }
  189 + });
  190 +
  191 + //全选
  192 + $('[name=allCheck]', f).on('click', function () {
  193 + var cbs = $('.sch-time-checkbox-list label input[type=checkbox]:visible:enabled', modal);
  194 + var status = this.checked;
  195 + cbs.each(function () {
  196 + this.checked = status;
  197 + });
  198 + });
  199 + });
  200 + })();
  201 + </script>
  202 +</div>
... ...
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -435,7 +435,7 @@ var gb_schedule_table = (function () {
435 435  
436 436 //车辆rect 闪烁、
437 437 var wrap = $(that).parents('li.line_schedule');
438   - var nbbm = $(that).parents('dl').find('dd:eq(2)').data('nbbm');
  438 + var nbbm = $(that).parents('dl').find('dd:eq(3)').data('nbbm');
439 439 var device = gb_data_basic.nbbm2deviceMap()[nbbm];
440 440 var $rect = $('svg.line-chart g.gps-wrap rect[_id=rct_' + device + ']', wrap);
441 441  
... ...