Commit ab3d47f3e04045226054dc4433c722389603fb58
1 parent
213f4c25
末二班车去除进出场、大客流拨打电话
Showing
13 changed files
with
368 additions
and
12 deletions
src/main/java/com/bsth/controller/sys/UserController.java
| @@ -479,4 +479,12 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -479,4 +479,12 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 479 | return result; | 479 | return result; |
| 480 | } | 480 | } |
| 481 | 481 | ||
| 482 | + | ||
| 483 | + @RequestMapping(value = "/getToken",method = RequestMethod.GET) | ||
| 484 | + public String getToken(HttpServletRequest request){ | ||
| 485 | + HttpSession session = request.getSession(); | ||
| 486 | + String toKen = (String) session.getAttribute(Constants.SSO_TOKEN); | ||
| 487 | + return toKen; | ||
| 488 | + } | ||
| 489 | + | ||
| 482 | } | 490 | } |
src/main/java/com/bsth/data/zndd/AutomaticSch.java
| @@ -442,12 +442,12 @@ public class AutomaticSch { | @@ -442,12 +442,12 @@ public class AutomaticSch { | ||
| 442 | } | 442 | } |
| 443 | 443 | ||
| 444 | for (Map.Entry<String, String> t : lineMap.entrySet()) { | 444 | for (Map.Entry<String, String> t : lineMap.entrySet()) { |
| 445 | - List<ScheduleRealInfo> mtwoList = new ArrayList<>(); //每条线路除去烂班的所有班次 | 445 | + List<ScheduleRealInfo> mtwoList = new ArrayList<>(); //每条线路除去烂班和进出场的所有班次 |
| 446 | List<ScheduleRealInfo> srList = dayOfSchedule.findByLineCode(t.getKey()); //每条线路所有班次 | 446 | List<ScheduleRealInfo> srList = dayOfSchedule.findByLineCode(t.getKey()); //每条线路所有班次 |
| 447 | Map<String, List<ScheduleRealInfo>> mapType = new HashMap(); | 447 | Map<String, List<ScheduleRealInfo>> mapType = new HashMap(); |
| 448 | //所有车辆 | 448 | //所有车辆 |
| 449 | for (ScheduleRealInfo s : srList) { | 449 | for (ScheduleRealInfo s : srList) { |
| 450 | - if(s.getStatus() != -1){ | 450 | + if(s.getStatus() != -1 &&(s.getBcType().equals("normal")|| s.getBcType().equals("region"))){ |
| 451 | mtwoList.add(s); | 451 | mtwoList.add(s); |
| 452 | } | 452 | } |
| 453 | 453 | ||
| @@ -457,7 +457,7 @@ public class AutomaticSch { | @@ -457,7 +457,7 @@ public class AutomaticSch { | ||
| 457 | List<ScheduleRealInfo> schadd = new ArrayList<>(); | 457 | List<ScheduleRealInfo> schadd = new ArrayList<>(); |
| 458 | //每辆车下的班次 | 458 | //每辆车下的班次 |
| 459 | for (ScheduleRealInfo sch : srList) { | 459 | for (ScheduleRealInfo sch : srList) { |
| 460 | - //筛选掉烂班 | 460 | + //筛选掉烂班 和进出场 |
| 461 | if (s.getClZbh().equals(sch.getClZbh()) && sch.getStatus() != -1) { | 461 | if (s.getClZbh().equals(sch.getClZbh()) && sch.getStatus() != -1) { |
| 462 | schadd.add(sch); | 462 | schadd.add(sch); |
| 463 | } | 463 | } |
src/main/java/com/bsth/data/zndd/dify/DifyEntrance.java
| @@ -57,6 +57,7 @@ public class DifyEntrance { | @@ -57,6 +57,7 @@ public class DifyEntrance { | ||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | + @RequestMapping(value = "export", method = RequestMethod.GET) | ||
| 60 | public String exportWaybillAll(String message){ | 61 | public String exportWaybillAll(String message){ |
| 61 | return loggerZnddService.exportWaybillAll(message); | 62 | return loggerZnddService.exportWaybillAll(message); |
| 62 | } | 63 | } |
src/main/java/com/bsth/data/zndd/hone/Home.java
0 → 100644
| 1 | +package com.bsth.data.zndd.hone; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.util.HttpClientUtils; | ||
| 6 | +import com.google.gson.Gson; | ||
| 7 | +import org.springframework.web.bind.annotation.*; | ||
| 8 | + | ||
| 9 | +import java.util.HashMap; | ||
| 10 | +import java.util.Map; | ||
| 11 | + | ||
| 12 | +@RestController | ||
| 13 | +@RequestMapping("/homemessage") | ||
| 14 | +public class Home { | ||
| 15 | + | ||
| 16 | + @RequestMapping(value="/home",method = RequestMethod.POST) | ||
| 17 | + public Map<String, String> ipHome (@RequestBody JSONObject jsonObject){ | ||
| 18 | + Map<String,String> redata = new HashMap(); | ||
| 19 | + Gson gson = new Gson(); | ||
| 20 | + try { | ||
| 21 | + String data = gson.toJson(jsonObject); | ||
| 22 | + StringBuilder sb = HttpClientUtils.post("http://10.10.150.89:9201/call/outCall", data); | ||
| 23 | + JSONObject obj = JSON.parseObject(sb.toString()); | ||
| 24 | + redata.put("code","200"); | ||
| 25 | + | ||
| 26 | + }catch (Exception e){ | ||
| 27 | + e.printStackTrace(); | ||
| 28 | + redata.put("code","500"); | ||
| 29 | + }finally { | ||
| 30 | + return redata; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + } | ||
| 34 | +} |
src/main/java/com/bsth/service/zndd/impl/LoggerZnddServiceImpl.java
| @@ -17,6 +17,7 @@ import com.bsth.entity.sys.RealControAuthority; | @@ -17,6 +17,7 @@ import com.bsth.entity.sys.RealControAuthority; | ||
| 17 | import com.bsth.entity.zndd.LoggerZndd; | 17 | import com.bsth.entity.zndd.LoggerZndd; |
| 18 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 18 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 19 | import com.bsth.repository.zndd.LoggerZnddRepository; | 19 | import com.bsth.repository.zndd.LoggerZnddRepository; |
| 20 | +import com.bsth.service.BusIntervalService; | ||
| 20 | import com.bsth.service.LineService; | 21 | import com.bsth.service.LineService; |
| 21 | import com.bsth.service.impl.BaseServiceImpl; | 22 | import com.bsth.service.impl.BaseServiceImpl; |
| 22 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 23 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| @@ -25,7 +26,9 @@ import com.bsth.service.sys.RealControAuthorityService; | @@ -25,7 +26,9 @@ import com.bsth.service.sys.RealControAuthorityService; | ||
| 25 | import com.bsth.service.zndd.LoggerZnddService; | 26 | import com.bsth.service.zndd.LoggerZnddService; |
| 26 | import com.bsth.util.CoordinateConverter; | 27 | import com.bsth.util.CoordinateConverter; |
| 27 | import com.bsth.util.DateUtils; | 28 | import com.bsth.util.DateUtils; |
| 29 | +import com.bsth.util.IpUtils; | ||
| 28 | import com.bsth.util.ReportUtils; | 30 | import com.bsth.util.ReportUtils; |
| 31 | +import com.google.gson.Gson; | ||
| 29 | import org.slf4j.Logger; | 32 | import org.slf4j.Logger; |
| 30 | import org.slf4j.LoggerFactory; | 33 | import org.slf4j.LoggerFactory; |
| 31 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -65,6 +68,8 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> | @@ -65,6 +68,8 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> | ||
| 65 | @Autowired | 68 | @Autowired |
| 66 | RealControAuthorityService realControAuthorityService; | 69 | RealControAuthorityService realControAuthorityService; |
| 67 | @Autowired | 70 | @Autowired |
| 71 | + BusIntervalService busIntervalService; | ||
| 72 | + @Autowired | ||
| 68 | JdbcTemplate jdbcTemplate; | 73 | JdbcTemplate jdbcTemplate; |
| 69 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 74 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 70 | private static SimpleDateFormat sdfMonth = new SimpleDateFormat("HH:mm"); | 75 | private static SimpleDateFormat sdfMonth = new SimpleDateFormat("HH:mm"); |
| @@ -514,10 +519,40 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> | @@ -514,10 +519,40 @@ public class LoggerZnddServiceImpl extends BaseServiceImpl<LoggerZndd, Integer> | ||
| 514 | 519 | ||
| 515 | public String exportWaybillAll(String message) { | 520 | public String exportWaybillAll(String message) { |
| 516 | 521 | ||
| 517 | - String jName= "金正中",jGh= "006163" ,clZbh= "W2L-023" ,lpName= "1", date= "2025-06-23", line= "11067"; | 522 | + String fyString = ""; |
| 523 | + String xl = null,xlName = null;//线路编码 //查询出线路 | ||
| 524 | + //获取所有线路 | ||
| 525 | + Map<String, String> lineMap = BasicData.lineCode2NameMap; | ||
| 526 | + for (Map.Entry<String, String> t : lineMap.entrySet()) { | ||
| 527 | + if (message.contains(t.getValue()) || t.getValue().contains(message)) { | ||
| 528 | + xl = t.getKey(); xlName = t.getValue(); | ||
| 529 | + } | ||
| 530 | + } | ||
| 531 | + String date = yyyyMMdd.format(new Date()); | ||
| 532 | + List<ScheduleRealInfo> srList = scheduleRealInfoService.queryUserInfo(xl,date,"2"); | ||
| 533 | + List<String[]> strs = new ArrayList<>(); | ||
| 534 | + for (ScheduleRealInfo info : srList) { | ||
| 535 | + String[] row = {info.getjName(), info.getClZbh(), info.getLpName(), info.getjGh()}; | ||
| 536 | + strs.add(row); | ||
| 537 | + } | ||
| 538 | + // 将 strs 转换为 JSON 格式的字符串 | ||
| 539 | + Gson gson = new Gson(); | ||
| 540 | + String resultStr = gson.toJson(strs); | ||
| 541 | + | ||
| 542 | + Map<String,Object> map = new HashMap<>(); | ||
| 543 | + map.put("date",date); | ||
| 544 | + map.put("line",xl); | ||
| 545 | + map.put("lineName",xlName); | ||
| 546 | + map.put("strs",resultStr); | ||
| 547 | + Map<String, Object> resMap =busIntervalService.exportWaybillMore(map); | ||
| 548 | + return "http://"+IpUtils.getLocalIpAddress()+":9088/downloadFile/download?fileName="+ resMap.get("fileName"); | ||
| 549 | + | ||
| 550 | + //单人导出 | ||
| 551 | + /* String jName= "沈秋林",jGh= "007423" ,clZbh= "W2L-021" ,lpName= "3", date= "2025-06-23", line= "11067"; | ||
| 518 | scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); | 552 | scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); |
| 553 | + return "http://"+IpUtils.getLocalIpAddress()+":9088/downloadFile/download?fileName="+ date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls";*/ | ||
| 554 | + | ||
| 519 | 555 | ||
| 520 | - return null; | ||
| 521 | } | 556 | } |
| 522 | 557 | ||
| 523 | 558 |
src/main/resources/static/real_control_v2/css/main.css
| @@ -2402,4 +2402,21 @@ g.gps-wrap rect.twinkle[updown="1"] { | @@ -2402,4 +2402,21 @@ g.gps-wrap rect.twinkle[updown="1"] { | ||
| 2402 | .messxx_ddsk:hover { | 2402 | .messxx_ddsk:hover { |
| 2403 | background-color: rgb(37, 150, 190); | 2403 | background-color: rgb(37, 150, 190); |
| 2404 | color: #f0f0f0; | 2404 | color: #f0f0f0; |
| 2405 | +} | ||
| 2406 | +.zndd_iphome_small{ | ||
| 2407 | + position: absolute; | ||
| 2408 | + right: 1px; | ||
| 2409 | + width: 30px; | ||
| 2410 | + height: 28px; | ||
| 2411 | + top: 1px; | ||
| 2412 | + border-radius: 4px; | ||
| 2413 | + display: flex; | ||
| 2414 | + justify-content: center; | ||
| 2415 | + color: #666; | ||
| 2416 | + font-size: 14px; | ||
| 2417 | + cursor: pointer; | ||
| 2418 | + transition: all 0.2s ease-in-out; | ||
| 2419 | + /* z-index: 10; */ | ||
| 2420 | + align-items: center; | ||
| 2421 | + flex-wrap: nowrap; | ||
| 2405 | } | 2422 | } |
| 2406 | \ No newline at end of file | 2423 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/temp_sch_v2/add_normal_znddType.html
| @@ -89,6 +89,9 @@ | @@ -89,6 +89,9 @@ | ||
| 89 | <div class="uk-form-controls"> | 89 | <div class="uk-form-controls"> |
| 90 | <div class="uk-autocomplete uk-form jsy-autocom"> | 90 | <div class="uk-autocomplete uk-form jsy-autocom"> |
| 91 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> | 91 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> |
| 92 | + <a href="javascript:void(0)" class="uk-icon-button uk-margin-small-left zndd_iphome_small" title="查看电话" > | ||
| 93 | + <i class="uk-icon-search"></i> | ||
| 94 | + </a> | ||
| 92 | </div> | 95 | </div> |
| 93 | </div> | 96 | </div> |
| 94 | </div> | 97 | </div> |
| @@ -143,6 +146,25 @@ | @@ -143,6 +146,25 @@ | ||
| 143 | submitFun = data.submitFun; | 146 | submitFun = data.submitFun; |
| 144 | 147 | ||
| 145 | nf = addForm(); | 148 | nf = addForm(); |
| 149 | + | ||
| 150 | + $(".zndd_iphome_small",nf).on("click",function () { | ||
| 151 | + | ||
| 152 | + var jgh = $f('jsy', nf).val().split('/')[0]; | ||
| 153 | + | ||
| 154 | + $.get('/personnel/all', null, function(array){ | ||
| 155 | + // 遍历array | ||
| 156 | + $.each(array, function(i,d){ | ||
| 157 | + if(d.jobCodeori == jgh){ | ||
| 158 | + folder = '/real_control_v2/zndd/type'; | ||
| 159 | + open_modal(folder + '/dklTelphone.html', { | ||
| 160 | + data: d | ||
| 161 | + }, {center: true, close: false, modal: false}); | ||
| 162 | + } | ||
| 163 | + }); | ||
| 164 | + }); | ||
| 165 | + | ||
| 166 | + }); | ||
| 167 | + | ||
| 146 | //提交 | 168 | //提交 |
| 147 | nf.on('success.form.fv', function (e) { | 169 | nf.on('success.form.fv', function (e) { |
| 148 | e.preventDefault(); | 170 | e.preventDefault(); |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/temp_sch_v2/add_two_way_znddType.html
| @@ -89,6 +89,9 @@ | @@ -89,6 +89,9 @@ | ||
| 89 | <div class="uk-form-controls"> | 89 | <div class="uk-form-controls"> |
| 90 | <div class="uk-autocomplete uk-form jsy-autocom"> | 90 | <div class="uk-autocomplete uk-form jsy-autocom"> |
| 91 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> | 91 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> |
| 92 | + <a href="javascript:void(0)" class="uk-icon-button uk-margin-small-left zndd_iphome_small" title="查看电话" > | ||
| 93 | + <i class="uk-icon-search"></i> | ||
| 94 | + </a> | ||
| 92 | </div> | 95 | </div> |
| 93 | </div> | 96 | </div> |
| 94 | </div> | 97 | </div> |
| @@ -217,6 +220,9 @@ | @@ -217,6 +220,9 @@ | ||
| 217 | <div class="uk-form-controls"> | 220 | <div class="uk-form-controls"> |
| 218 | <div class="uk-autocomplete uk-form jsy-autocom"> | 221 | <div class="uk-autocomplete uk-form jsy-autocom"> |
| 219 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> | 222 | <input type="text" class="zndd_text_input_color" value="{{jGh}}/{{jName}}" name="jsy" required> |
| 223 | + <a href="javascript:void(0)" class="uk-icon-button uk-margin-small-left zndd_iphome_small" title="查看电话" > | ||
| 224 | + <i class="uk-icon-search"></i> | ||
| 225 | + </a> | ||
| 220 | </div> | 226 | </div> |
| 221 | </div> | 227 | </div> |
| 222 | </div> | 228 | </div> |
| @@ -292,6 +298,43 @@ | @@ -292,6 +298,43 @@ | ||
| 292 | $f('remarks', f2).val(data.value); | 298 | $f('remarks', f2).val(data.value); |
| 293 | }); | 299 | }); |
| 294 | 300 | ||
| 301 | + $(".zndd_iphome_small",f1).on("click",function () { | ||
| 302 | + | ||
| 303 | + var jgh = $f('jsy', f1).val().split('/')[0]; | ||
| 304 | + | ||
| 305 | + $.get('/personnel/all', null, function(array){ | ||
| 306 | + // 遍历array | ||
| 307 | + $.each(array, function(i,d){ | ||
| 308 | + if(d.jobCodeori == jgh){ | ||
| 309 | + folder = '/real_control_v2/zndd/type'; | ||
| 310 | + open_modal(folder + '/dklTelphone.html', { | ||
| 311 | + data: d | ||
| 312 | + }, {center: true, close: false, modal: false}); | ||
| 313 | + } | ||
| 314 | + }); | ||
| 315 | + }); | ||
| 316 | + | ||
| 317 | + }); | ||
| 318 | + $(".zndd_iphome_small",f2).on("click",function () { | ||
| 319 | + | ||
| 320 | + var jgh = $f('jsy', f2).val().split('/')[0]; | ||
| 321 | + | ||
| 322 | + $.get('/personnel/all', null, function(array){ | ||
| 323 | + // 遍历array | ||
| 324 | + $.each(array, function(i,d){ | ||
| 325 | + if(d.jobCodeori == jgh){ | ||
| 326 | + folder = '/real_control_v2/zndd/type'; | ||
| 327 | + open_modal(folder + '/dklTelphone.html', { | ||
| 328 | + data: d | ||
| 329 | + }, {center: true, close: false, modal: false}); | ||
| 330 | + } | ||
| 331 | + }); | ||
| 332 | + }); | ||
| 333 | + | ||
| 334 | + }); | ||
| 335 | + | ||
| 336 | + | ||
| 337 | + | ||
| 295 | //人车级联 | 338 | //人车级联 |
| 296 | $f('clZbh',f1).on('input change', function () { | 339 | $f('clZbh',f1).on('input change', function () { |
| 297 | $f('clZbh', f2).val($(this).val()); | 340 | $f('clZbh', f2).val($(this).val()); |
| @@ -361,6 +404,9 @@ | @@ -361,6 +404,9 @@ | ||
| 361 | fs.formValidation('validate'); | 404 | fs.formValidation('validate'); |
| 362 | }); | 405 | }); |
| 363 | }); | 406 | }); |
| 407 | + | ||
| 408 | + | ||
| 409 | + | ||
| 364 | var dataArray; | 410 | var dataArray; |
| 365 | 411 | ||
| 366 | var submit = function () { | 412 | var submit = function () { |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
| @@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
| 47 | {{if kl !=null && kl.num > 10}} | 47 | {{if kl !=null && kl.num > 10}} |
| 48 | <p>状态:<a href="javascript:;" style="color:red" onclick="javascript:gb_map_play_back.showPhoto('{{kl.photo}}');">拥挤</a></p> | 48 | <p>状态:<a href="javascript:;" style="color:red" onclick="javascript:gb_map_play_back.showPhoto('{{kl.photo}}');">拥挤</a></p> |
| 49 | {{/if}} | 49 | {{/if}} |
| 50 | - <a href="javascript:;" style="float: left;" onclick="javascript:window.open('http://58.34.52.130:4490/transport_server/dvr_monitor2.html?userid=4&zbh={{nbbm}}');">DVR</a> | 50 | + <a href="javascript:;" style="float: left;" onclick="javascript:gb_map_play_back.openJK('{{deviceId}}');");">DVR</a> |
| 51 | <a href="W9:{{dvrcode}}@139.196.29.203?method=call" style="margin-left: 50px;" >拨打电话</a> | 51 | <a href="W9:{{dvrcode}}@139.196.29.203?method=call" style="margin-left: 50px;" >拨打电话</a> |
| 52 | <a href="javascript:;" style="float: right;" onclick="javascript:gb_map_play_back.initParams({deviceId: '{{deviceId}}', nbbm: '{{nbbm}}'});">轨迹回放</a> | 52 | <a href="javascript:;" style="float: right;" onclick="javascript:gb_map_play_back.initParams({deviceId: '{{deviceId}}', nbbm: '{{nbbm}}'});">轨迹回放</a> |
| 53 | </div> | 53 | </div> |
src/main/resources/static/real_control_v2/mapmonitor/js/playback.js
| @@ -112,10 +112,19 @@ var gb_map_play_back = (function () { | @@ -112,10 +112,19 @@ var gb_map_play_back = (function () { | ||
| 112 | ], {keyboard: false}); | 112 | ], {keyboard: false}); |
| 113 | lightbox.show(); | 113 | lightbox.show(); |
| 114 | }; | 114 | }; |
| 115 | + function openJK(deviceId){ | ||
| 116 | + $.get("/user/getToken",function (re){ | ||
| 117 | + //http://10.10.150.87:18083/getInfo?token={token}&deviceId={deviceId} | ||
| 118 | + window.open("http://10.10.150.87:18083/getInfo?token="+re+"&deviceId="+deviceId); | ||
| 119 | + | ||
| 120 | + }) | ||
| 121 | + }; | ||
| 122 | + | ||
| 115 | return { | 123 | return { |
| 116 | initParams: initParams, | 124 | initParams: initParams, |
| 117 | listToExcel: listToExcel, | 125 | listToExcel: listToExcel, |
| 118 | setParam: setParam, | 126 | setParam: setParam, |
| 119 | - showPhoto:showPhoto | 127 | + showPhoto:showPhoto, |
| 128 | + openJK:openJK | ||
| 120 | } | 129 | } |
| 121 | })(); | 130 | })(); |
| 122 | \ No newline at end of file | 131 | \ No newline at end of file |
src/main/resources/static/real_control_v2/zndd/type/dkl.html
| @@ -437,6 +437,7 @@ | @@ -437,6 +437,7 @@ | ||
| 437 | return $('[name=' + name + ']', f); | 437 | return $('[name=' + name + ']', f); |
| 438 | } | 438 | } |
| 439 | 439 | ||
| 440 | + var bdiphne = true; | ||
| 440 | /** | 441 | /** |
| 441 | * 提交表单 | 442 | * 提交表单 |
| 442 | */ | 443 | */ |
| @@ -472,14 +473,27 @@ | @@ -472,14 +473,27 @@ | ||
| 472 | gb_common.$post('/realSchedule', data, function (rs) { | 473 | gb_common.$post('/realSchedule', data, function (rs) { |
| 473 | notify_succ('新增临加班次成功'); | 474 | notify_succ('新增临加班次成功'); |
| 474 | cb && cb(rs); | 475 | cb && cb(rs); |
| 475 | - /*var folder = '/real_control_v2/zndd/yanshi'; | ||
| 476 | - open_modal(folder + '/yanshi.html', { | ||
| 477 | - }, {center: true, bgclose: false, modal: true});*/ | ||
| 478 | - //添加成功后添加车辆监控消息 | ||
| 479 | //更新大客流是否加入信息dklid | 476 | //更新大客流是否加入信息dklid |
| 480 | $.post('/dkl_logger/updatedkl/'+sch.dklid,function(dklll){}) | 477 | $.post('/dkl_logger/updatedkl/'+sch.dklid,function(dklll){}) |
| 478 | + //是否拨打电话 | ||
| 479 | + if (bdiphne){ | ||
| 480 | + var datasch = rs.t; | ||
| 481 | + var jgh = datasch.jGh; | ||
| 482 | + $.get('/personnel/all', null, function(array){ | ||
| 483 | + // 遍历array | ||
| 484 | + $.each(array, function(i,d){ | ||
| 485 | + if(d.jobCodeori == jgh){ | ||
| 486 | + datasch.telphone = d.telphone; | ||
| 487 | + folder = '/real_control_v2/zndd/type'; | ||
| 488 | + open_modal(folder + '/dkl_bd_Telphone.html', { | ||
| 489 | + data: datasch | ||
| 490 | + }, {center: true, close: false, modal: false}); | ||
| 491 | + } | ||
| 492 | + }); | ||
| 493 | + }); | ||
| 494 | + bdiphne = false; | ||
| 495 | + } | ||
| 481 | 496 | ||
| 482 | - // gb_common.$post('/logZndd/addMessage', rs, function (ks) {}, err); | ||
| 483 | 497 | ||
| 484 | }, err); | 498 | }, err); |
| 485 | //手动提交的时候清除一下,防止二次提交 | 499 | //手动提交的时候清除一下,防止二次提交 |
src/main/resources/static/real_control_v2/zndd/type/dklTelphone.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal ct_move_modal" id="dkl-telphone-modal-v2"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 600px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <div class="uk-modal-header"> | ||
| 5 | + <h2">驾驶员信息</h2> | ||
| 6 | + </div> | ||
| 7 | + <div class="uk-grid"> | ||
| 8 | + <div class="uk-width-5-5 sjzlist uk-form uk-form-horizontal add-sch-form two_form"> | ||
| 9 | + | ||
| 10 | + </div> | ||
| 11 | + </div> | ||
| 12 | + </div> | ||
| 13 | + | ||
| 14 | + <script> | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + (function () { | ||
| 19 | + var modal = '#dkl-telphone-modal-v2', | ||
| 20 | + sch, stationRoutes, parks, information, carsArray, st_park_data,conf; | ||
| 21 | + | ||
| 22 | + $(modal).on('init', function (e, data) { | ||
| 23 | + sch = data.data; | ||
| 24 | + var formHtmls = template('telphone_form-temp1', sch); | ||
| 25 | + $('.sjzlist', modal).html(formHtmls); | ||
| 26 | + }); | ||
| 27 | + | ||
| 28 | + })(); | ||
| 29 | + </script> | ||
| 30 | + <script id="telphone_form-temp1" type="text/html"> | ||
| 31 | + <div class="uk-grid"> | ||
| 32 | + <div class="uk-width-1-1"> | ||
| 33 | + <div class="uk-form-row"> | ||
| 34 | + <label class="uk-form-label">驾驶员:</label> | ||
| 35 | + <div class="uk-form-controls"> | ||
| 36 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 37 | + <input class="form-control" value="{{personnelName}}" disabled> | ||
| 38 | + </div> | ||
| 39 | + </div> | ||
| 40 | + </div> | ||
| 41 | + </div> | ||
| 42 | + </div> | ||
| 43 | + <div class="uk-grid"> | ||
| 44 | + <div class="uk-width-1-1"> | ||
| 45 | + <div class="uk-form-row"> | ||
| 46 | + <label class="uk-form-label">电话:</label> | ||
| 47 | + <div class="uk-form-controls"> | ||
| 48 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 49 | + <input class="form-control" value="{{telphone}}" disabled> | ||
| 50 | + </div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + </div> | ||
| 54 | + </div> | ||
| 55 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | ||
| 56 | + <button type="button" class="uk-button uk-modal-close">关闭</button> | ||
| 57 | + </div> | ||
| 58 | + </script> | ||
| 59 | +</div> |
src/main/resources/static/real_control_v2/zndd/type/dkl_bd_Telphone.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal ct_move_modal" id="dkl-telphone-modal-v2"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 600px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <div class="uk-modal-header"> | ||
| 5 | + <h2">驾驶员信息</h2> | ||
| 6 | + </div> | ||
| 7 | + <div> | ||
| 8 | + <form class="uk-form uk-form-horizontal add-sch-form one_form addtelphone"> | ||
| 9 | + | ||
| 10 | + </form> | ||
| 11 | + </div> | ||
| 12 | + </div> | ||
| 13 | + </div> | ||
| 14 | + | ||
| 15 | + <script> | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + (function () { | ||
| 20 | + var modal = '#dkl-telphone-modal-v2', | ||
| 21 | + sch, stationRoutes, parks, information, carsArray, st_park_data,conf; | ||
| 22 | + | ||
| 23 | + var f = $('.addtelphone', modal); | ||
| 24 | + $(modal).on('init', function (e, data) { | ||
| 25 | + sch = data.data; | ||
| 26 | + var content = sch.jName+',您好,请驾驶车辆'+sch.clZbh+",,执行"+sch.dfsj+",由"+sch.qdzName+"发往"+sch.zdzName+"的班次"; | ||
| 27 | + sch.content = content; | ||
| 28 | + var formHtmls = template('telphone_form-temp1', sch); | ||
| 29 | + $('.addtelphone', modal).html(formHtmls); | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + f.formValidation(gb_form_validation_opts); | ||
| 33 | + f.on('success.form.fv', function (e) { | ||
| 34 | + e.preventDefault(); | ||
| 35 | + var data = $(this).serializeJSON(); | ||
| 36 | + debugger | ||
| 37 | + var datas = { | ||
| 38 | + contacts: data.jName, | ||
| 39 | + phone: data.telphone, | ||
| 40 | + content: data.text | ||
| 41 | + }; | ||
| 42 | + var callInfosStr = "[{'phone': '" + datas.phone + "', 'contacts': '" + datas.contacts + "', 'content': '" + datas.content + "'}]"; | ||
| 43 | + var json = { | ||
| 44 | + taskName: String(sch.id), // 强制转换为字符串 | ||
| 45 | + callInfos: callInfosStr | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + debugger | ||
| 49 | + $.ajax({ | ||
| 50 | + url: "/homemessage/home", | ||
| 51 | + type: "POST", | ||
| 52 | + contentType: "application/json", // 设置 Content-Type 为 JSON | ||
| 53 | + data: JSON.stringify(json), // 将对象序列化为 JSON 字符串 | ||
| 54 | + success: function (data) { | ||
| 55 | + UIkit.modal(modal).hide(); | ||
| 56 | + if (data.code == 200) | ||
| 57 | + layer.msg('发送成功'); | ||
| 58 | + else | ||
| 59 | + layer.msg('发送失败...'); | ||
| 60 | + } | ||
| 61 | + }); | ||
| 62 | + | ||
| 63 | + }); | ||
| 64 | + | ||
| 65 | + }) | ||
| 66 | + })(); | ||
| 67 | + </script> | ||
| 68 | + <script id="telphone_form-temp1" type="text/html"> | ||
| 69 | + | ||
| 70 | + <div class="uk-grid"> | ||
| 71 | + <div class="uk-width-1-1"> | ||
| 72 | + <div class="uk-form-row"> | ||
| 73 | + <label class="uk-form-label">驾驶员:</label> | ||
| 74 | + <div class="uk-form-controls"> | ||
| 75 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 76 | + <input class="form-control" name ="jName" value="{{jName}}"> | ||
| 77 | + </div> | ||
| 78 | + </div> | ||
| 79 | + </div> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + <div class="uk-grid"> | ||
| 83 | + <div class="uk-width-1-1"> | ||
| 84 | + <div class="uk-form-row"> | ||
| 85 | + <label class="uk-form-label">电话:</label> | ||
| 86 | + <div class="uk-form-controls"> | ||
| 87 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 88 | + <input class="form-control" name ="telphone" value="{{telphone}}"> | ||
| 89 | + </div> | ||
| 90 | + </div> | ||
| 91 | + </div> | ||
| 92 | + </div> | ||
| 93 | + </div> | ||
| 94 | + <div class="uk-grid"> | ||
| 95 | + <div class="uk-width-1-1"> | ||
| 96 | + <div class="uk-form-row"> | ||
| 97 | + <label class="uk-form-label">信息:</label> | ||
| 98 | + <div class="uk-form-controls"> | ||
| 99 | + <div class="uk-autocomplete uk-form jsy-autocom"> | ||
| 100 | + <textarea class="form-control" name ="text" placeholder="要发送的信息" style="width: 100%;height: 50px;">{{content}}</textarea> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | + </div> | ||
| 105 | + </div> | ||
| 106 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | ||
| 107 | + <button type="button" class="uk-button uk-modal-close">取消</button> | ||
| 108 | + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-send"></i> 发送</button> | ||
| 109 | + </div> | ||
| 110 | + </script> | ||
| 111 | +</div> |