Commit 1413a7b9b518f8bc083203b16aa1cf726b2c343b
Merge branch 'minhang' into pudong
Showing
13 changed files
with
116 additions
and
23 deletions
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
| @@ -175,7 +175,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -175,7 +175,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 175 | dayOfSchedule.save(sch); | 175 | dayOfSchedule.save(sch); |
| 176 | 176 | ||
| 177 | //清理应发未发标记 | 177 | //清理应发未发标记 |
| 178 | - LateAdjustHandle.remove(sch); | 178 | + LateAdjustHandle.remove(sch.getClZbh()); |
| 179 | 179 | ||
| 180 | if(!gps.isService() && !dayOfSchedule.emptyService(sch)){ | 180 | if(!gps.isService() && !dayOfSchedule.emptyService(sch)){ |
| 181 | //切换成营运状态 | 181 | //切换成营运状态 |
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
| @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | ||
| 84 | Calendar calendar = Calendar.getInstance(); | 84 | Calendar calendar = Calendar.getInstance(); |
| 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); | 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); |
| 86 | 86 | ||
| 87 | - String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=267";// + dayOfYear; | 87 | + String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=285";// + dayOfYear; |
| 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); | 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); |
| 89 | 89 | ||
| 90 | List<GpsEntity> list = | 90 | List<GpsEntity> list = |
src/main/java/com/bsth/data/pilot80/PilotReport.java
| @@ -162,6 +162,15 @@ public class PilotReport { | @@ -162,6 +162,15 @@ public class PilotReport { | ||
| 162 | 162 | ||
| 163 | LineConfig conf = lineConfigData.get(sch.getXlBm()); | 163 | LineConfig conf = lineConfigData.get(sch.getXlBm()); |
| 164 | if (conf.getOutConfig() == 1) { | 164 | if (conf.getOutConfig() == 1) { |
| 165 | + | ||
| 166 | + try{ | ||
| 167 | + //最大允许时间阈值 2 小时 | ||
| 168 | + if(Math.abs(d80.getTimestamp() - sch.getDfsjT()) > 1000 * 60 * 60 * 2) | ||
| 169 | + return; | ||
| 170 | + }catch (Exception e){ | ||
| 171 | + logger.error("", e); | ||
| 172 | + } | ||
| 173 | + | ||
| 165 | //为相关班次写入请求出场时间 | 174 | //为相关班次写入请求出场时间 |
| 166 | sch.setFcsjActualAll(d80.getTimestamp()); | 175 | sch.setFcsjActualAll(d80.getTimestamp()); |
| 167 | 176 |
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
| @@ -102,12 +102,25 @@ public class LateAdjustHandle implements ApplicationContextAware{ | @@ -102,12 +102,25 @@ public class LateAdjustHandle implements ApplicationContextAware{ | ||
| 102 | sch.setLate2(false); | 102 | sch.setLate2(false); |
| 103 | sch.setLateMinute(0); | 103 | sch.setLateMinute(0); |
| 104 | sch.setDfAuto(false); | 104 | sch.setDfAuto(false); |
| 105 | + | ||
| 106 | + logger.info("移除误点调整 -" + sch.getClZbh()); | ||
| 105 | } | 107 | } |
| 106 | }catch (Exception e){ | 108 | }catch (Exception e){ |
| 107 | logger.error("", e); | 109 | logger.error("", e); |
| 108 | } | 110 | } |
| 109 | } | 111 | } |
| 110 | 112 | ||
| 113 | + public static void remove(String nbbm){ | ||
| 114 | + if(lateSchMap.containsKey(nbbm)){ | ||
| 115 | + ScheduleRealInfo sch = lateSchMap.get(nbbm); | ||
| 116 | + sch.setLate2(false); | ||
| 117 | + sch.setLateMinute(0); | ||
| 118 | + sch.setDfAuto(false); | ||
| 119 | + | ||
| 120 | + logger.info("移除误点调整 nbbm -" + nbbm); | ||
| 121 | + } | ||
| 122 | + } | ||
| 123 | + | ||
| 111 | /** | 124 | /** |
| 112 | * 车辆到站 | 125 | * 车辆到站 |
| 113 | * @param gps | 126 | * @param gps |
| @@ -127,10 +140,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ | @@ -127,10 +140,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ | ||
| 127 | /*&& sch.getLateMinute() > 0*/){ | 140 | /*&& sch.getLateMinute() > 0*/){ |
| 128 | //自动调整待发 到达时间 + 停靠时间 | 141 | //自动调整待发 到达时间 + 停靠时间 |
| 129 | long dt = Arith.addLong(gps.getTimestamp(), (sch.getLateMinute() * 60 * 1000)); | 142 | long dt = Arith.addLong(gps.getTimestamp(), (sch.getLateMinute() * 60 * 1000)); |
| 130 | - sch.setDfsjAll(dt); | ||
| 131 | - sch.setDfAuto(true); | ||
| 132 | - //取消应发未到标记 | ||
| 133 | - sch.setLate2(false); | 143 | + |
| 144 | + //超过2小时最大阈值,放弃 | ||
| 145 | + if(Math.abs(dt - sch.getDfsjT()) > 1000 * 60 * 60 * 2){ | ||
| 146 | + logger.info(sch.getClZbh() + " 超过误点调整阈值,放弃"); | ||
| 147 | + } | ||
| 148 | + else{ | ||
| 149 | + sch.setDfsjAll(dt); | ||
| 150 | + sch.setDfAuto(true); | ||
| 151 | + //取消应发未到标记 | ||
| 152 | + sch.setLate2(false); | ||
| 153 | + } | ||
| 134 | 154 | ||
| 135 | lateSchMap.remove(sch.getClZbh()); | 155 | lateSchMap.remove(sch.getClZbh()); |
| 136 | logger.info("【应发未到】车辆到站 " + sch.getClZbh() + " -" + sch.getDfsj() + " -到站时间:" + gps.getTimestamp() + " -停靠时间:" + sch.getLateMinute() + " -自动设置的待发时间:" + dt); | 156 | logger.info("【应发未到】车辆到站 " + sch.getClZbh() + " -" + sch.getDfsj() + " -到站时间:" + gps.getTimestamp() + " -停靠时间:" + sch.getLateMinute() + " -自动设置的待发时间:" + dt); |
src/main/resources/static/pages/summary/work_hours/list.html
| @@ -263,8 +263,8 @@ | @@ -263,8 +263,8 @@ | ||
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | //日期选择器 | 265 | //日期选择器 |
| 266 | - $('[name=rq_eq]', f).val('2017-09-24'); | ||
| 267 | - flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-09-24', minDate: '2017-07-01'}); | 266 | + $('[name=rq_eq]', f).val('2017-10-10'); |
| 267 | + flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-10', minDate: '2017-07-01'}); | ||
| 268 | 268 | ||
| 269 | var comps; | 269 | var comps; |
| 270 | //构建公司级联下拉框 | 270 | //构建公司级联下拉框 |
src/main/resources/static/real_control_v2/css/handicapped_style.css
0 → 100644
| 1 | +/** 为残疾人提供的一份样式 , .ct_table.line-schedule-table dl dt*/ | ||
| 2 | + | ||
| 3 | +.ct_table.line-schedule-table dl dd{ | ||
| 4 | + border-right-color: #000000 !important; | ||
| 5 | + border-top: 1px solid #000000 !important; | ||
| 6 | + color: #000000; | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +.schedule-body .ct_table.line-schedule-table dl:nth-child(even){ | ||
| 10 | + background: rgba(114, 197, 210, 0.33) !important; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.tl-yzx{ | ||
| 14 | + background: rgb(151, 151, 223) !important; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.tl-zzzx { | ||
| 18 | + background: rgb(152, 217, 54) !important; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.tl-xxfc { | ||
| 22 | + background: rgb(15, 220, 220) !important; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.ct_table>.ct_table_body{ | ||
| 26 | + border-bottom: 1px solid #000000 !important; | ||
| 27 | +} |
src/main/resources/static/real_control_v2/css/main.css
| @@ -1699,4 +1699,13 @@ dl.active>dd.disabled{ | @@ -1699,4 +1699,13 @@ dl.active>dd.disabled{ | ||
| 1699 | 1699 | ||
| 1700 | .display_hide{ | 1700 | .display_hide{ |
| 1701 | display: none; | 1701 | display: none; |
| 1702 | +} | ||
| 1703 | + | ||
| 1704 | +.ct_eye_icon{ | ||
| 1705 | + font-size: 16px; | ||
| 1706 | + cursor: pointer; | ||
| 1707 | +} | ||
| 1708 | + | ||
| 1709 | +.ct_eye_icon.active{ | ||
| 1710 | + color: #444; | ||
| 1702 | } | 1711 | } |
| 1703 | \ No newline at end of file | 1712 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| @@ -197,15 +197,19 @@ | @@ -197,15 +197,19 @@ | ||
| 197 | return; | 197 | return; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | - if(!data.adjustExps && (data.status==-1 | ||
| 201 | - || (data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'))){ | 200 | + //正常班次里程修改为0 |
| 201 | + var normalDestory = data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'; | ||
| 202 | + //修改里程 | ||
| 203 | + var editJhlc = data.jhlc != sch.jhlc && data.jhlc != 0; | ||
| 204 | + if(!data.adjustExps && (data.status==-1 || normalDestory || editJhlc)){ | ||
| 202 | notify_err("当前操作需要选择调整原因!"); | 205 | notify_err("当前操作需要选择调整原因!"); |
| 203 | return; | 206 | return; |
| 204 | } | 207 | } |
| 205 | 208 | ||
| 206 | //里程有修改 | 209 | //里程有修改 |
| 207 | - if(data.jhlc != sch.jhlc && data.jhlc != 0){ | ||
| 208 | - var confHtml = '<h4 style="color: #c04c4c;margin-bottom: 9px;">确认要将班次里程由'+sch.jhlc+' 修改为'+data.jhlc+' </h4><small>备注:</small>'; | 210 | + //if(data.jhlc != sch.jhlc && data.jhlc != 0){ |
| 211 | + | ||
| 212 | + /*var confHtml = '<h4 style="color: #c04c4c;margin-bottom: 9px;">确认要将班次里程由'+sch.jhlc+' 修改为'+data.jhlc+' </h4><small>备注:</small>'; | ||
| 209 | UIkit.modal.prompt(confHtml, data.remarks, function(remarks){ | 213 | UIkit.modal.prompt(confHtml, data.remarks, function(remarks){ |
| 210 | if(remarks){ | 214 | if(remarks){ |
| 211 | //在这里写操作日志 | 215 | //在这里写操作日志 |
| @@ -221,10 +225,10 @@ | @@ -221,10 +225,10 @@ | ||
| 221 | Ok: '确定修改公里并保存', | 225 | Ok: '确定修改公里并保存', |
| 222 | Cancel: '取消' | 226 | Cancel: '取消' |
| 223 | } | 227 | } |
| 224 | - }); | ||
| 225 | - } | ||
| 226 | - else | ||
| 227 | - postData(data); | 228 | + });*/ |
| 229 | + //} | ||
| 230 | + //else | ||
| 231 | + postData(data); | ||
| 228 | }); | 232 | }); |
| 229 | 233 | ||
| 230 | var postData = function (data) { | 234 | var postData = function (data) { |
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
| @@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
| 23 | </a> | 23 | </a> |
| 24 | </div> | 24 | </div> |
| 25 | </div> | 25 | </div> |
| 26 | + <i class="uk-icon-eye uk-icon-hover ct_eye_icon"></i> | ||
| 26 | <div class="search_sch_panel"> | 27 | <div class="search_sch_panel"> |
| 27 | <form class="uk-form" onsubmit="javascript:return false;"> | 28 | <form class="uk-form" onsubmit="javascript:return false;"> |
| 28 | <div class="uk-autocomplete sch-search-autocom"> | 29 | <div class="uk-autocomplete sch-search-autocom"> |
src/main/resources/static/real_control_v2/js/line_schedule/legend.js
| @@ -8,7 +8,7 @@ var gb_sch_legend = (function () { | @@ -8,7 +8,7 @@ var gb_sch_legend = (function () { | ||
| 8 | var animationend = 'webkitAnimationEnd animationend'; | 8 | var animationend = 'webkitAnimationEnd animationend'; |
| 9 | var initLegend = function (cont) { | 9 | var initLegend = function (cont) { |
| 10 | //双击展开 | 10 | //双击展开 |
| 11 | - $('.schedule-wrap i.uk-icon-question-circle', cont).dblclick(openLegend); | 11 | + /*$('.schedule-wrap i.uk-icon-question-circle', cont).dblclick(openLegend); |
| 12 | 12 | ||
| 13 | //关闭事件 | 13 | //关闭事件 |
| 14 | $('.schedule-wrap .fixed_legend_close', cont).on('click', function () { | 14 | $('.schedule-wrap .fixed_legend_close', cont).on('click', function () { |
| @@ -35,13 +35,34 @@ var gb_sch_legend = (function () { | @@ -35,13 +35,34 @@ var gb_sch_legend = (function () { | ||
| 35 | 35 | ||
| 36 | var flag=storage.getItem(locaKey); | 36 | var flag=storage.getItem(locaKey); |
| 37 | if(flag && flag==1) | 37 | if(flag && flag==1) |
| 38 | - openLegend(); | 38 | + openLegend();*/ |
| 39 | + | ||
| 40 | + //eye init | ||
| 41 | + var eyeState = storage.getItem('eye_state'); | ||
| 42 | + if(eyeState && eyeState==1) | ||
| 43 | + $(eye_dom).eq(0).trigger('click'); | ||
| 39 | }; | 44 | }; |
| 40 | 45 | ||
| 46 | + var eye_dom = '.schedule-wrap i.ct_eye_icon'; | ||
| 47 | + $(document).on('click', eye_dom, changeHandicappedStyle); | ||
| 48 | + function changeHandicappedStyle() { | ||
| 49 | + if($(this).hasClass('active')){ | ||
| 50 | + $(eye_dom).removeClass('active'); | ||
| 51 | + $('#handicappedStyleLink', 'head').remove(); | ||
| 52 | + storage.setItem('eye_state', 0); | ||
| 53 | + } | ||
| 54 | + else{ | ||
| 55 | + $(eye_dom).addClass('active'); | ||
| 56 | + $("<link>").attr({rel: "stylesheet", type: "text/css", href: "/real_control_v2/css/handicapped_style.css", | ||
| 57 | + id: 'handicappedStyleLink' | ||
| 58 | + }).appendTo("head"); | ||
| 59 | + storage.setItem('eye_state', 1); | ||
| 60 | + } | ||
| 61 | + } | ||
| 41 | 62 | ||
| 42 | //展开图例 | 63 | //展开图例 |
| 43 | var openLegend = function () { | 64 | var openLegend = function () { |
| 44 | - $('.qtip.sch-tl-tip').qtip('destroy', true); | 65 | + /*$('.qtip.sch-tl-tip').qtip('destroy', true); |
| 45 | 66 | ||
| 46 | //隐藏ICON | 67 | //隐藏ICON |
| 47 | $('.schedule-wrap i.uk-icon-question-circle').hide(); | 68 | $('.schedule-wrap i.uk-icon-question-circle').hide(); |
| @@ -58,7 +79,7 @@ var gb_sch_legend = (function () { | @@ -58,7 +79,7 @@ var gb_sch_legend = (function () { | ||
| 58 | $('.schedule-wrap .fixed_legend').css('display', 'inline-block'); | 79 | $('.schedule-wrap .fixed_legend').css('display', 'inline-block'); |
| 59 | 80 | ||
| 60 | //记录状态 | 81 | //记录状态 |
| 61 | - storage.setItem(locaKey, 1); | 82 | + storage.setItem(locaKey, 1);*/ |
| 62 | }; | 83 | }; |
| 63 | 84 | ||
| 64 | return { | 85 | return { |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| @@ -105,8 +105,10 @@ var gb_schedule_table = (function () { | @@ -105,8 +105,10 @@ var gb_schedule_table = (function () { | ||
| 105 | //标记路牌最后一个班次 | 105 | //标记路牌最后一个班次 |
| 106 | markerLastByLine(lineCode); | 106 | markerLastByLine(lineCode); |
| 107 | //初始化图例相关,dbclick 不能代理事件 | 107 | //初始化图例相关,dbclick 不能代理事件 |
| 108 | - gb_sch_legend.init(this); | 108 | + //gb_sch_legend.init(this); |
| 109 | }); | 109 | }); |
| 110 | + //初始化图例 | ||
| 111 | + gb_sch_legend.init(); | ||
| 110 | var content = $('.line_schedule .ct_table_wrap'); | 112 | var content = $('.line_schedule .ct_table_wrap'); |
| 111 | //初始化滚动条 | 113 | //初始化滚动条 |
| 112 | content.perfectScrollbar({suppressScrollX: true}); | 114 | content.perfectScrollbar({suppressScrollX: true}); |
src/main/resources/static/real_control_v2/js/main.js
| @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(), | @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(), | ||
| 47 | $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); | 47 | $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); |
| 48 | }, 1000); | 48 | }, 1000); |
| 49 | //弹出更新说明 | 49 | //弹出更新说明 |
| 50 | - showUpdateDescription(); | 50 | + //showUpdateDescription(); |
| 51 | }); | 51 | }); |
| 52 | 52 | ||
| 53 | function g_emit(id) { | 53 | function g_emit(id) { |
src/main/resources/static/real_control_v2/js/utils/ct_table.js
| @@ -49,7 +49,7 @@ var gb_ct_table = (function() { | @@ -49,7 +49,7 @@ var gb_ct_table = (function() { | ||
| 49 | $tbody.empty().append(dls); | 49 | $tbody.empty().append(dls); |
| 50 | //console.log('replaceAfter..', replaceAfter); | 50 | //console.log('replaceAfter..', replaceAfter); |
| 51 | replaceAfter && replaceAfter($tbody); | 51 | replaceAfter && replaceAfter($tbody); |
| 52 | - } | 52 | + }; |
| 53 | 53 | ||
| 54 | function toggleOrder(that) { | 54 | function toggleOrder(that) { |
| 55 | var order = $(that).data('order'); | 55 | var order = $(that).data('order'); |