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 | 175 | dayOfSchedule.save(sch); |
| 176 | 176 | |
| 177 | 177 | //清理应发未发标记 |
| 178 | - LateAdjustHandle.remove(sch); | |
| 178 | + LateAdjustHandle.remove(sch.getClZbh()); | |
| 179 | 179 | |
| 180 | 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 | 84 | Calendar calendar = Calendar.getInstance(); |
| 85 | 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 | 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); |
| 89 | 89 | |
| 90 | 90 | List<GpsEntity> list = | ... | ... |
src/main/java/com/bsth/data/pilot80/PilotReport.java
| ... | ... | @@ -162,6 +162,15 @@ public class PilotReport { |
| 162 | 162 | |
| 163 | 163 | LineConfig conf = lineConfigData.get(sch.getXlBm()); |
| 164 | 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 | 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 | 102 | sch.setLate2(false); |
| 103 | 103 | sch.setLateMinute(0); |
| 104 | 104 | sch.setDfAuto(false); |
| 105 | + | |
| 106 | + logger.info("移除误点调整 -" + sch.getClZbh()); | |
| 105 | 107 | } |
| 106 | 108 | }catch (Exception e){ |
| 107 | 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 | 126 | * @param gps |
| ... | ... | @@ -127,10 +140,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ |
| 127 | 140 | /*&& sch.getLateMinute() > 0*/){ |
| 128 | 141 | //自动调整待发 到达时间 + 停靠时间 |
| 129 | 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 | 155 | lateSchMap.remove(sch.getClZbh()); |
| 136 | 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 | 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 | 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 | 1699 | |
| 1700 | 1700 | .display_hide{ |
| 1701 | 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 | 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 | 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 | 205 | notify_err("当前操作需要选择调整原因!"); |
| 203 | 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 | 213 | UIkit.modal.prompt(confHtml, data.remarks, function(remarks){ |
| 210 | 214 | if(remarks){ |
| 211 | 215 | //在这里写操作日志 |
| ... | ... | @@ -221,10 +225,10 @@ |
| 221 | 225 | Ok: '确定修改公里并保存', |
| 222 | 226 | Cancel: '取消' |
| 223 | 227 | } |
| 224 | - }); | |
| 225 | - } | |
| 226 | - else | |
| 227 | - postData(data); | |
| 228 | + });*/ | |
| 229 | + //} | |
| 230 | + //else | |
| 231 | + postData(data); | |
| 228 | 232 | }); |
| 229 | 233 | |
| 230 | 234 | var postData = function (data) { | ... | ... |
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
src/main/resources/static/real_control_v2/js/line_schedule/legend.js
| ... | ... | @@ -8,7 +8,7 @@ var gb_sch_legend = (function () { |
| 8 | 8 | var animationend = 'webkitAnimationEnd animationend'; |
| 9 | 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 | 14 | $('.schedule-wrap .fixed_legend_close', cont).on('click', function () { |
| ... | ... | @@ -35,13 +35,34 @@ var gb_sch_legend = (function () { |
| 35 | 35 | |
| 36 | 36 | var flag=storage.getItem(locaKey); |
| 37 | 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 | 64 | var openLegend = function () { |
| 44 | - $('.qtip.sch-tl-tip').qtip('destroy', true); | |
| 65 | + /*$('.qtip.sch-tl-tip').qtip('destroy', true); | |
| 45 | 66 | |
| 46 | 67 | //隐藏ICON |
| 47 | 68 | $('.schedule-wrap i.uk-icon-question-circle').hide(); |
| ... | ... | @@ -58,7 +79,7 @@ var gb_sch_legend = (function () { |
| 58 | 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 | 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 | 105 | //标记路牌最后一个班次 |
| 106 | 106 | markerLastByLine(lineCode); |
| 107 | 107 | //初始化图例相关,dbclick 不能代理事件 |
| 108 | - gb_sch_legend.init(this); | |
| 108 | + //gb_sch_legend.init(this); | |
| 109 | 109 | }); |
| 110 | + //初始化图例 | |
| 111 | + gb_sch_legend.init(); | |
| 110 | 112 | var content = $('.line_schedule .ct_table_wrap'); |
| 111 | 113 | //初始化滚动条 |
| 112 | 114 | content.perfectScrollbar({suppressScrollX: true}); | ... | ... |
src/main/resources/static/real_control_v2/js/main.js
src/main/resources/static/real_control_v2/js/utils/ct_table.js