Commit f7452c1f0b9bdcd0693d432811b6d999e0f2f5ea
1 parent
ddc1a933
update...
Showing
3 changed files
with
58 additions
and
5 deletions
src/main/java/com/bsth/XDApplication.java
| @@ -10,6 +10,7 @@ import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread; | @@ -10,6 +10,7 @@ import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread; | ||
| 10 | import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread; | 10 | import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread; |
| 11 | import com.bsth.data.msg_queue.DirectivePushQueue; | 11 | import com.bsth.data.msg_queue.DirectivePushQueue; |
| 12 | import com.bsth.data.msg_queue.WebSocketPushQueue; | 12 | import com.bsth.data.msg_queue.WebSocketPushQueue; |
| 13 | +import com.bsth.data.safe_driv.SafeDrivDataLoadThread; | ||
| 13 | import com.bsth.data.schedule.DayOfSchedule; | 14 | import com.bsth.data.schedule.DayOfSchedule; |
| 14 | import com.bsth.data.schedule.auto_exec.AutoExecScanThread; | 15 | import com.bsth.data.schedule.auto_exec.AutoExecScanThread; |
| 15 | import com.bsth.data.schedule.edit_logs.SeiPstThread; | 16 | import com.bsth.data.schedule.edit_logs.SeiPstThread; |
| @@ -75,6 +76,9 @@ public class XDApplication implements CommandLineRunner { | @@ -75,6 +76,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 75 | @Autowired | 76 | @Autowired |
| 76 | LineVersionsData lineVersionsData; | 77 | LineVersionsData lineVersionsData; |
| 77 | 78 | ||
| 79 | + @Autowired | ||
| 80 | + SafeDrivDataLoadThread safeDrivDataLoadThread; | ||
| 81 | + | ||
| 78 | private static long timeDiff; | 82 | private static long timeDiff; |
| 79 | private static long timeDiffTraffic; | 83 | private static long timeDiffTraffic; |
| 80 | 84 | ||
| @@ -122,7 +126,7 @@ public class XDApplication implements CommandLineRunner { | @@ -122,7 +126,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 122 | //实际排班更新线程 | 126 | //实际排班更新线程 |
| 123 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | 127 | //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); |
| 124 | //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 | 128 | //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行 |
| 125 | - //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | 129 | + WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 |
| 126 | //实际排班延迟入库线程 | 130 | //实际排班延迟入库线程 |
| 127 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); | 131 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); |
| 128 | //班次修正日志延迟入库 | 132 | //班次修正日志延迟入库 |
| @@ -131,11 +135,16 @@ public class XDApplication implements CommandLineRunner { | @@ -131,11 +135,16 @@ public class XDApplication implements CommandLineRunner { | ||
| 131 | //sexec.scheduleWithFixedDelay(directivesPstThread, 180, 180, TimeUnit.SECONDS); | 135 | //sexec.scheduleWithFixedDelay(directivesPstThread, 180, 180, TimeUnit.SECONDS); |
| 132 | //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) | 136 | //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) |
| 133 | //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); | 137 | //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); |
| 138 | + | ||
| 139 | + //安全驾驶 | ||
| 140 | + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS); | ||
| 134 | } | 141 | } |
| 135 | 142 | ||
| 136 | public void prodInit(){ | 143 | public void prodInit(){ |
| 137 | log.info("prodInit..."); | 144 | log.info("prodInit..."); |
| 138 | ScheduledExecutorService sexec = Application.mainServices; | 145 | ScheduledExecutorService sexec = Application.mainServices; |
| 146 | + //安全驾驶 | ||
| 147 | + sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | ||
| 139 | 148 | ||
| 140 | /** 线调业务 */ | 149 | /** 线调业务 */ |
| 141 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 | 150 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 |
src/main/resources/static/real_control_v2/js/safe_driv/CallCenterPluginDemo.html
0 → 100644
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
| @@ -14,7 +14,7 @@ var gb_safe_driv = (function () { | @@ -14,7 +14,7 @@ var gb_safe_driv = (function () { | ||
| 14 | 'A9': '玩手机' | 14 | 'A9': '玩手机' |
| 15 | }; | 15 | }; |
| 16 | 16 | ||
| 17 | - var path = 'http://118.178.187.115/CurrentSafeDriving/'; | 17 | + var path = 'http://180.166.5.82:9005/CurrentSafeDriving/'; |
| 18 | 18 | ||
| 19 | var $wrap = $('.safe_driv_pop_wrap'); | 19 | var $wrap = $('.safe_driv_pop_wrap'); |
| 20 | var max = 5; | 20 | var max = 5; |
| @@ -43,16 +43,24 @@ var gb_safe_driv = (function () { | @@ -43,16 +43,24 @@ var gb_safe_driv = (function () { | ||
| 43 | $wrap.append(htmlStr); | 43 | $wrap.append(htmlStr); |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | - var vedioModal = '<div id="ssspVedioModal" class="uk-modal ct_move_modal">' + | 46 | +/* var vedioModal = '<div id="ssspVedioModal" class="uk-modal ct_move_modal">' + |
| 47 | '<div class="uk-modal-dialog uk-modal-dialog-large">' + | 47 | '<div class="uk-modal-dialog uk-modal-dialog-large">' + |
| 48 | '<button type="button" class="uk-modal-close uk-close"></button>' + | 48 | '<button type="button" class="uk-modal-close uk-close"></button>' + |
| 49 | '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+ | 49 | '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+ |
| 50 | '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=^^channel^^"></iframe>' + | 50 | '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=^^channel^^"></iframe>' + |
| 51 | '</div>' + | 51 | '</div>' + |
| 52 | - '</div>'; | 52 | + '</div>';*/ |
| 53 | + | ||
| 54 | + var phoneModal = '<div id="callPhoneModal" class="uk-modal ct_move_modal">' + | ||
| 55 | + '<div class="uk-modal-dialog">' + | ||
| 56 | + '<button type="button" class="uk-modal-close uk-close"></button>' + | ||
| 57 | + '<div class="uk-modal-header"> <h2>打电话</h2> </div> '+ | ||
| 58 | + '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe style="width: 100%;height: 280px;" id="phoneIframe" src="/real_control_v2/js/safe_driv/CallCenterPluginDemo.html"></iframe>' + | ||
| 59 | + '</div>' + | ||
| 60 | + '</div>'; | ||
| 53 | 61 | ||
| 54 | $wrap.on('click', '.safe_driv_pop', function () { | 62 | $wrap.on('click', '.safe_driv_pop', function () { |
| 55 | - var title = $(this).data('title') + ' <button data-type="'+$(this).data('type')+'" class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>'; | 63 | + var title = $(this).data('title') + ' <button class="uk-button uk-button-mini uk-button-primary" id="openPhoneModalBtn" type="button">打电话</button>'; |
| 56 | var url = $(this).data('url'); | 64 | var url = $(this).data('url'); |
| 57 | $(this).remove(); | 65 | $(this).remove(); |
| 58 | var lightbox = UIkit.lightbox.create([ | 66 | var lightbox = UIkit.lightbox.create([ |
| @@ -89,6 +97,32 @@ var gb_safe_driv = (function () { | @@ -89,6 +97,32 @@ var gb_safe_driv = (function () { | ||
| 89 | }); | 97 | }); |
| 90 | 98 | ||
| 91 | 99 | ||
| 100 | + var showCallPhoneModal = function () { | ||
| 101 | + open_modal_dom(phoneModal ,{}, {modal: false}); | ||
| 102 | + $('#callPhoneModal #phoneIframe').on('load', function () { | ||
| 103 | + var that = this; | ||
| 104 | + var iframe = this.contentWindow.document.body; | ||
| 105 | + setTimeout(function () { | ||
| 106 | + //修改css | ||
| 107 | + $(iframe).find('.CallCenterToolBar').css('height', '200px').css('width', '100%').css('top', '10px').css('left', 'calc(50% - 148px)').css('box-shadow', 'none'); | ||
| 108 | + $(iframe).find('.CallCenterToolBar .top').css('display', 'none'); | ||
| 109 | + | ||
| 110 | + $('.toolBar td[data-action=call]', iframe).trigger('click'); | ||
| 111 | + | ||
| 112 | + //焦点 | ||
| 113 | + $('input#telNumber', iframe).focus(); | ||
| 114 | + | ||
| 115 | + $(that).show(); | ||
| 116 | + $('#callPhoneModal p.loading').remove(); | ||
| 117 | + }, 700); | ||
| 118 | + }); | ||
| 119 | + }; | ||
| 120 | + | ||
| 121 | + $(document).on('click', '#openPhoneModalBtn', function () { | ||
| 122 | + showCallPhoneModal(); | ||
| 123 | + }); | ||
| 124 | + | ||
| 125 | + | ||
| 92 | return { | 126 | return { |
| 93 | pop: pop, | 127 | pop: pop, |
| 94 | safeCode: codes, | 128 | safeCode: codes, |