Commit 05743b50ce084b94c43103c1939e5244f1aadab2

Authored by yiming
1 parent cbca7767

语音通话上送设备号

src/main/java/com/bsth/data/zndd/OutEntrance.java
@@ -71,9 +71,12 @@ public class OutEntrance { @@ -71,9 +71,12 @@ public class OutEntrance {
71 m.put("lineName",BasicData.lineCode2NameMap.get(ssLogger.getLineCode())); 71 m.put("lineName",BasicData.lineCode2NameMap.get(ssLogger.getLineCode()));
72 m.put("num",ssLogger.getNum()); 72 m.put("num",ssLogger.getNum());
73 m.put("dir",ssLogger.getDir()); 73 m.put("dir",ssLogger.getDir());
74 - 74 + m.put("calleeId",ssLogger.getCalleeId());
75 //线调页面推送 75 //线调页面推送
76 - sendUtils.stationcf(m); 76 + if(ssLogger.getNum()>15){
  77 + sendUtils.stationcf(m);
  78 + }
  79 +
77 80
78 //查询班次情况自动回复 81 //查询班次情况自动回复
79 //当前日期 82 //当前日期
@@ -130,6 +133,10 @@ public class OutEntrance { @@ -130,6 +133,10 @@ public class OutEntrance {
130 return rtn; 133 return rtn;
131 } 134 }
132 String num=jsonObject.getString("num"); 135 String num=jsonObject.getString("num");
  136 + if(Integer.parseInt(num)<15){
  137 + rtn.put("status",ResponseCode.SUCCESS);
  138 + return rtn;
  139 + }
133 String image=jsonObject.getString("image"); 140 String image=jsonObject.getString("image");
134 String img=uploadBase64Img(image); 141 String img=uploadBase64Img(image);
135 JSONArray jsonArray = jsonObject.getJSONArray("stations"); 142 JSONArray jsonArray = jsonObject.getJSONArray("stations");
@@ -139,16 +146,17 @@ public class OutEntrance { @@ -139,16 +146,17 @@ public class OutEntrance {
139 JSONObject line=jsonArray.getJSONObject(i); 146 JSONObject line=jsonArray.getJSONObject(i);
140 String lineCode = line.get("lineCode").toString(); 147 String lineCode = line.get("lineCode").toString();
141 String stationCode = line.get("stationCode").toString(); 148 String stationCode = line.get("stationCode").toString();
142 - StationRoute stationRoute=BasicData.stationCode2StationMap.get(lineCode+"_"+stationCode); 149 + String dir = line.get("dir").toString();
  150 + /*StationRoute stationRoute=BasicData.stationCode2StationMap.get(lineCode+"_"+stationCode);*/
143 Map m = new HashMap(); 151 Map m = new HashMap();
144 m.put("image", img); 152 m.put("image", img);
145 m.put("stationCode", stationCode); 153 m.put("stationCode", stationCode);
146 - m.put("lineCode", stationRoute.getLineCode());  
147 - m.put("stationName",BasicData.stationCode2NameMap.get(stationRoute.getLineCode()+"_"+stationRoute.getDirections()+"_"+stationRoute.getStationCode()));  
148 - m.put("lineName",BasicData.lineCode2NameMap.get(stationRoute.getLineCode())); 154 + m.put("lineCode", lineCode);
  155 + m.put("stationName",BasicData.stationCode2NameMap.get(lineCode+"_"+dir+"_"+stationCode));
  156 + m.put("lineName",BasicData.lineCode2NameMap.get(lineCode));
149 m.put("num",num); 157 m.put("num",num);
150 - m.put("xlDir",stationRoute.getDirections());  
151 - List<ScheduleRealInfo> srList=dayOfSchedule.findByLineAndUpDown(stationRoute.getLineCode(),stationRoute.getDirections()); 158 + m.put("xlDir",dir);
  159 + List<ScheduleRealInfo> srList=dayOfSchedule.findByLineAndUpDown(lineCode,Integer.parseInt(dir));
152 List<ScheduleRealInfo> sl=new ArrayList<>(); 160 List<ScheduleRealInfo> sl=new ArrayList<>();
153 for (ScheduleRealInfo scheduleRealInfo : srList) {//筛选出运营班次 161 for (ScheduleRealInfo scheduleRealInfo : srList) {//筛选出运营班次
154 if((scheduleRealInfo.getBcType().equals("normal")||scheduleRealInfo.getBcType().equals("region"))){ 162 if((scheduleRealInfo.getBcType().equals("normal")||scheduleRealInfo.getBcType().equals("region"))){
@@ -165,7 +173,7 @@ public class OutEntrance { @@ -165,7 +173,7 @@ public class OutEntrance {
165 for (int i1 = 0; i1 < sl.size(); i1++) {//最近的已发车班次 173 for (int i1 = 0; i1 < sl.size(); i1++) {//最近的已发车班次
166 ScheduleRealInfo scheduleRealInfo=sl.get(i1); 174 ScheduleRealInfo scheduleRealInfo=sl.get(i1);
167 LocalTime fcsj=LocalTime.parse(scheduleRealInfo.getFcsj(),dateTimeFormatter); 175 LocalTime fcsj=LocalTime.parse(scheduleRealInfo.getFcsj(),dateTimeFormatter);
168 - if((scheduleRealInfo.getBcType().equals("normal")||scheduleRealInfo.getBcType().equals("region")) &&scheduleRealInfo.getXlDir().equals(String.valueOf(stationRoute.getDirections())) && fcsj.isAfter(localTime)){ 176 + if((scheduleRealInfo.getBcType().equals("normal")||scheduleRealInfo.getBcType().equals("region")) &&scheduleRealInfo.getXlDir().equals(dir) && fcsj.isAfter(localTime)){
169 schedule =sl.get(i1-1);; 177 schedule =sl.get(i1-1);;
170 break; 178 break;
171 } 179 }
src/main/java/com/bsth/data/zndd/carMonitor.java
@@ -26,7 +26,7 @@ public class carMonitor { @@ -26,7 +26,7 @@ public class carMonitor {
26 public List<Map> carMonitor(String lineCode,String directions,String station) { 26 public List<Map> carMonitor(String lineCode,String directions,String station) {
27 27
28 List<Map> list = new ArrayList<>(); //返回的接口数据 28 List<Map> list = new ArrayList<>(); //返回的接口数据
29 - url = "http://127.0.0.1:9777/xxfb/jd/carMonitor?lineid="+lineCode+"&stopid="+station+"&direction="+directions; 29 + url = "http://58.34.52.130:9777/xxfb/jd/carMonitor?lineid="+lineCode+"&stopid="+station+"&direction="+directions;
30 InputStream in = null; 30 InputStream in = null;
31 OutputStream out = null; 31 OutputStream out = null;
32 try { 32 try {
src/main/java/com/bsth/entity/zndd/StationSignsLogger.java
@@ -28,6 +28,8 @@ public class StationSignsLogger { @@ -28,6 +28,8 @@ public class StationSignsLogger {
28 28
29 private String sign; 29 private String sign;
30 30
  31 + private String calleeId;
  32 +
31 33
32 34
33 public String getLineCode() { 35 public String getLineCode() {
@@ -101,4 +103,12 @@ public class StationSignsLogger { @@ -101,4 +103,12 @@ public class StationSignsLogger {
101 public void setSign(String sign) { 103 public void setSign(String sign) {
102 this.sign = sign; 104 this.sign = sign;
103 } 105 }
  106 +
  107 + public String getCalleeId() {
  108 + return calleeId;
  109 + }
  110 +
  111 + public void setCalleeId(String calleeId) {
  112 + this.calleeId = calleeId;
  113 + }
104 } 114 }
src/main/resources/static/real_control_v2/call/assets/css/index.css
@@ -133,18 +133,19 @@ p { @@ -133,18 +133,19 @@ p {
133 } */ 133 } */
134 134
135 .container-fluid { 135 .container-fluid {
136 - /* height: 52px; */ 136 + height: 52px;
  137 + width: 105px;
137 padding: 14px 0; 138 padding: 14px 0;
138 border-color: #40a3fc; 139 border-color: #40a3fc;
139 background: #40a3fc; 140 background: #40a3fc;
140 - /* border-radius: 26px; */ 141 + border-radius: 26px;
141 box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.17); 142 box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.17);
142 font-size: 1.2em; 143 font-size: 1.2em;
143 display: flex; 144 display: flex;
144 justify-content: center; 145 justify-content: center;
145 align-items: center; 146 align-items: center;
146 - margin: 0 10px;  
147 color: #fff !important; 147 color: #fff !important;
  148 + margin-top:400px;
148 } 149 }
149 150
150 .login-form_ownid { 151 .login-form_ownid {
@@ -429,7 +430,7 @@ p { @@ -429,7 +430,7 @@ p {
429 /* */ 430 /* */
430 .invitation { 431 .invitation {
431 padding: 40px 15px; 432 padding: 40px 15px;
432 - width: 420px; 433 + width: 100%;
433 background-color: #169bd5; 434 background-color: #169bd5;
434 } 435 }
435 436
@@ -442,7 +443,7 @@ p { @@ -442,7 +443,7 @@ p {
442 background: url(../images/call_bg.png) no-repeat; 443 background: url(../images/call_bg.png) no-repeat;
443 background-position: center; 444 background-position: center;
444 background-size: initial; 445 background-size: initial;
445 - border-radius: 20px; 446 + /*border-radius: 20px;*/
446 box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3); 447 box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
447 } 448 }
448 449
src/main/resources/static/real_control_v2/call/assets/js/index.js
@@ -1325,13 +1325,14 @@ var OperationPackge = { @@ -1325,13 +1325,14 @@ var OperationPackge = {
1325 }, 1325 },
1326 p2p: { 1326 p2p: {
1327 // 语音呼叫 1327 // 语音呼叫
1328 - makeVoiceCall: async function () { 1328 + makeVoiceCall: async function (calleeId) {
1329 // 关闭设置 1329 // 关闭设置
1330 await OperationPackge.p2p.closeSeting(); 1330 await OperationPackge.p2p.closeSeting();
1331 // 获取输入的用户 1331 // 获取输入的用户
1332 - var oPeerId = await OperationPackge.p2p.getPeerUserId(); 1332 + /*var oPeerId = await OperationPackge.p2p.getPeerUserId();*/
1333 // 查询输入用户合法性 1333 // 查询输入用户合法性
1334 - Store.peerUserId = await OperationPackge.p2p.peerUserVaplidity(oPeerId); 1334 + console.log("呼叫:"+calleeId)
  1335 + Store.peerUserId = await OperationPackge.p2p.peerUserVaplidity(calleeId);
1335 if (Store.peerUserId) { 1336 if (Store.peerUserId) {
1336 Store.repetitionClick = true; 1337 Store.repetitionClick = true;
1337 Store.network = Object.assign(Store.network, { 1338 Store.network = Object.assign(Store.network, {
@@ -2783,9 +2784,10 @@ var OperationPackge = { @@ -2783,9 +2784,10 @@ var OperationPackge = {
2783 Utils.inputChangId("#userInputs > input"); 2784 Utils.inputChangId("#userInputs > input");
2784 // 语音呼叫 2785 // 语音呼叫
2785 $("#p2pAudioMakeCall").click(function () { 2786 $("#p2pAudioMakeCall").click(function () {
  2787 + var calleeId=$(this).val();
2786 if (navigator.onLine && Store.lineworkRTC && Store.lineworkRTM) { 2788 if (navigator.onLine && Store.lineworkRTC && Store.lineworkRTM) {
2787 if (!Store.repetitionClick) { 2789 if (!Store.repetitionClick) {
2788 - OperationPackge.p2p.makeVoiceCall(); 2790 + OperationPackge.p2p.makeVoiceCall(calleeId);
2789 } 2791 }
2790 } else { 2792 } else {
2791 // 页面提示 2793 // 页面提示
src/main/resources/static/real_control_v2/call/index.html
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 > 33 >
34 <!-- --> 34 <!-- -->
35 - <div class="login d-flex flex-row align-items-stretch"> 35 + <div>
36 <!-- 警告框 --> 36 <!-- 警告框 -->
37 <div class="warning_box" id="warningBox"></div> 37 <div class="warning_box" id="warningBox"></div>
38 <!-- --> 38 <!-- -->
@@ -726,4 +726,11 @@ @@ -726,4 +726,11 @@
726 </div> 726 </div>
727 <script src="/real_control_v2/call/assets/js/index.js"></script> 727 <script src="/real_control_v2/call/assets/js/index.js"></script>
728 </body> 728 </body>
  729 +<script>
  730 + (function() {
  731 + const urlParams = new URLSearchParams(window.location.search);
  732 + const calleeId = urlParams.get('calleeId');
  733 + $("#p2pAudioMakeCall").val(calleeId);
  734 + })();
  735 +</script>
729 </html> 736 </html>
src/main/resources/static/real_control_v2/js/stationcf/stationcf.js
@@ -26,7 +26,8 @@ var gb_stationcf = (function () { @@ -26,7 +26,8 @@ var gb_stationcf = (function () {
26 26
27 $wrap.on('click', '.all', function () { 27 $wrap.on('click', '.all', function () {
28 var type = $(this).data('ip'); 28 var type = $(this).data('ip');
29 - let pageUrl ="/real_control_v2/call/index.html"; 29 + var calleeId = $(this).data('call')
  30 + let pageUrl ="/real_control_v2/call/index.html?calleeId="+calleeId;
30 //将片段路径写入 localStorage 31 //将片段路径写入 localStorage
31 window.localStorage.setItem('real_control_form_embed_pageUrl', pageUrl); 32 window.localStorage.setItem('real_control_form_embed_pageUrl', pageUrl);
32 var index = layer.open({ 33 var index = layer.open({
src/main/resources/static/real_control_v2/main.html
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 <script src="/real_control_v2/js/forms/form_embed.js" merge="custom_js"></script> 236 <script src="/real_control_v2/js/forms/form_embed.js" merge="custom_js"></script>
237 <!-- 模态框扩展 --> 237 <!-- 模态框扩展 -->
238 <script src="/real_control_v2/js/modal_extend.js" merge="custom_js"></script> 238 <script src="/real_control_v2/js/modal_extend.js" merge="custom_js"></script>
239 - 239 +<script src="/real_control_v2/call/assets/js/index.js" merge="custom_js"></script>
240 <!-- #### 安全驾驶 start ### --> 240 <!-- #### 安全驾驶 start ### -->
241 <div class="multi_plat_msg_pop_wrap" ></div> 241 <div class="multi_plat_msg_pop_wrap" ></div>
242 <script id="sd_plat_msg_template" type="text/html"> 242 <script id="sd_plat_msg_template" type="text/html">
@@ -270,7 +270,7 @@ @@ -270,7 +270,7 @@
270 <span class="tests">站点人数&nbsp;&nbsp;&nbsp;{{num}}</span> 270 <span class="tests">站点人数&nbsp;&nbsp;&nbsp;{{num}}</span>
271 <span class="time">催发时间:{{timeStr}}</span> 271 <span class="time">催发时间:{{timeStr}}</span>
272 </div> 272 </div>
273 - <button class="all uk-button uk-modal-close" class="title" data-ip="{{dir}}" value="{{dir}}">拨打站台电话</button> 273 + <button class="all uk-button uk-modal-close" class="title" data-call="{{calleeId}}" data-ip="{{dir}}" value="{{dir}}">拨打站台电话</button>
274 <button class="images uk-button uk-modal-close" data-image="{{image}}" value="{{dir}}">查看图片</button> 274 <button class="images uk-button uk-modal-close" data-image="{{image}}" value="{{dir}}">查看图片</button>
275 </div> 275 </div>
276 </script> 276 </script>