Commit f7452c1f0b9bdcd0693d432811b6d999e0f2f5ea

Authored by 潘钊
1 parent ddc1a933

update...

src/main/java/com/bsth/XDApplication.java
... ... @@ -10,6 +10,7 @@ import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread;
10 10 import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread;
11 11 import com.bsth.data.msg_queue.DirectivePushQueue;
12 12 import com.bsth.data.msg_queue.WebSocketPushQueue;
  13 +import com.bsth.data.safe_driv.SafeDrivDataLoadThread;
13 14 import com.bsth.data.schedule.DayOfSchedule;
14 15 import com.bsth.data.schedule.auto_exec.AutoExecScanThread;
15 16 import com.bsth.data.schedule.edit_logs.SeiPstThread;
... ... @@ -75,6 +76,9 @@ public class XDApplication implements CommandLineRunner {
75 76 @Autowired
76 77 LineVersionsData lineVersionsData;
77 78  
  79 + @Autowired
  80 + SafeDrivDataLoadThread safeDrivDataLoadThread;
  81 +
78 82 private static long timeDiff;
79 83 private static long timeDiffTraffic;
80 84  
... ... @@ -122,7 +126,7 @@ public class XDApplication implements CommandLineRunner {
122 126 //实际排班更新线程
123 127 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
124 128 //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行
125   - //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
  129 + WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
126 130 //实际排班延迟入库线程
127 131 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
128 132 //班次修正日志延迟入库
... ... @@ -131,11 +135,16 @@ public class XDApplication implements CommandLineRunner {
131 135 //sexec.scheduleWithFixedDelay(directivesPstThread, 180, 180, TimeUnit.SECONDS);
132 136 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
133 137 //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
  138 +
  139 + //安全驾驶
  140 + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS);
134 141 }
135 142  
136 143 public void prodInit(){
137 144 log.info("prodInit...");
138 145 ScheduledExecutorService sexec = Application.mainServices;
  146 + //安全驾驶
  147 + sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS);
139 148  
140 149 /** 线调业务 */
141 150 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
... ...
src/main/resources/static/real_control_v2/js/safe_driv/CallCenterPluginDemo.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8" />
  5 + <title></title>
  6 +</head>
  7 +<body>
  8 + <script src="http://180.168.57.114:4244/Scripts/CallCenterPlugin.js" type="text/javascript"></script>
  9 +</body>
  10 +</html>
0 11 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
... ... @@ -14,7 +14,7 @@ var gb_safe_driv = (function () {
14 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 19 var $wrap = $('.safe_driv_pop_wrap');
20 20 var max = 5;
... ... @@ -43,16 +43,24 @@ var gb_safe_driv = (function () {
43 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 47 '<div class="uk-modal-dialog uk-modal-dialog-large">' +
48 48 '<button type="button" class="uk-modal-close uk-close"></button>' +
49 49 '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+
50 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 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 62 $wrap.on('click', '.safe_driv_pop', function () {
55   - var title = $(this).data('title') + '&nbsp;<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') + '&nbsp;<button class="uk-button uk-button-mini uk-button-primary" id="openPhoneModalBtn" type="button">打电话</button>';
56 64 var url = $(this).data('url');
57 65 $(this).remove();
58 66 var lightbox = UIkit.lightbox.create([
... ... @@ -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 126 return {
93 127 pop: pop,
94 128 safeCode: codes,
... ...