Commit 206a275cd9fbc89006ac21ecc6d3d3393532057f
Merge branch 'pudong' of 192.168.168.201:panzhaov5/bsth_control into pudong
Showing
8 changed files
with
242 additions
and
64 deletions
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | |
| 3 | +import java.io.ByteArrayOutputStream; | |
| 4 | +import java.io.IOException; | |
| 5 | +import java.io.InputStream; | |
| 6 | +import java.io.OutputStream; | |
| 7 | +import java.net.HttpURLConnection; | |
| 8 | +import java.net.URL; | |
| 9 | +import java.util.ArrayList; | |
| 10 | +import java.util.Collection; | |
| 11 | +import java.util.HashMap; | |
| 12 | +import java.util.List; | |
| 13 | +import java.util.Map; | |
| 14 | + | |
| 15 | +import org.apache.commons.io.IOUtils; | |
| 16 | +import org.apache.commons.lang3.StringEscapeUtils; | |
| 17 | +import org.joda.time.format.DateTimeFormat; | |
| 18 | +import org.joda.time.format.DateTimeFormatter; | |
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 20 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 21 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 22 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 23 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 24 | +import org.springframework.web.bind.annotation.RestController; | |
| 25 | + | |
| 3 | 26 | import com.alibaba.fastjson.JSONArray; |
| 4 | 27 | import com.bsth.common.ResponseCode; |
| 5 | 28 | import com.bsth.controller.BaseController; |
| ... | ... | @@ -10,14 +33,11 @@ import com.bsth.data.schedule.DayOfSchedule; |
| 10 | 33 | import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; |
| 11 | 34 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 12 | 35 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 36 | +import com.bsth.entity.sys.SysUser; | |
| 37 | +import com.bsth.security.util.SecurityUtils; | |
| 13 | 38 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 14 | -import org.apache.commons.lang3.StringEscapeUtils; | |
| 15 | -import org.joda.time.format.DateTimeFormat; | |
| 16 | -import org.joda.time.format.DateTimeFormatter; | |
| 17 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 18 | -import org.springframework.web.bind.annotation.*; | |
| 19 | - | |
| 20 | -import java.util.*; | |
| 39 | +import com.bsth.util.ConfigUtil; | |
| 40 | +import com.fasterxml.jackson.databind.ObjectMapper; | |
| 21 | 41 | |
| 22 | 42 | @RestController |
| 23 | 43 | @RequestMapping("/realSchedule") |
| ... | ... | @@ -691,4 +711,74 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 691 | 711 | public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ |
| 692 | 712 | return scheduleRealInfoService.deleteToHistory(id); |
| 693 | 713 | } |
| 714 | + | |
| 715 | + /** | |
| 716 | + * 从历史库里删除临加班次 | |
| 717 | + * @param sch | |
| 718 | + * @return | |
| 719 | + */ | |
| 720 | + @RequestMapping(value = "wxsb", method = RequestMethod.POST) | |
| 721 | + public Map<String, Object> deleteToHistory(@RequestParam Map<String, Object> param){ | |
| 722 | + SysUser user = SecurityUtils.getCurrentUser(); | |
| 723 | + String uname = user.getUserName(); | |
| 724 | + StringBuilder url = new StringBuilder(ConfigUtil.get("http.report.url")); | |
| 725 | + url.append("?nbbm=").append(param.get("nbbm")).append("&bxy=").append(uname).append("&bxbm=").append(param.get("bxType")); | |
| 726 | + // 分公司保存格式 分公司编码_公司编码 | |
| 727 | + String val = BasicData.nbbm2FgsCompanyCodeMap.get(param.get("nbbm")); | |
| 728 | + String[] arr = val.split("_"); | |
| 729 | + if (!"22".equals(arr[1])) { | |
| 730 | + Map<String, Object> res = new HashMap<String, Object>(); | |
| 731 | + res.put("status", ResponseCode.ERROR); | |
| 732 | + res.put("msg", "除金高公司外暂未开通此功能"); | |
| 733 | + | |
| 734 | + return res; | |
| 735 | + } | |
| 736 | + url.append("&fgs=").append(arr[0]); | |
| 737 | + | |
| 738 | + return request(url.toString()); | |
| 739 | + } | |
| 740 | + | |
| 741 | + @SuppressWarnings("unchecked") | |
| 742 | + private static Map<String, Object> request(String url) { | |
| 743 | + Map<String, Object> res = new HashMap<String, Object>(); | |
| 744 | + res.put("status", ResponseCode.SUCCESS); | |
| 745 | + InputStream in = null; | |
| 746 | + HttpURLConnection con = null; | |
| 747 | + try { | |
| 748 | + con = (HttpURLConnection)new URL(url).openConnection(); | |
| 749 | + con.setRequestMethod("POST"); | |
| 750 | + con.setRequestProperty("keep-alive", "true"); | |
| 751 | + con.setRequestProperty("accept", "application/json"); | |
| 752 | + con.setRequestProperty("content-type", "application/json"); | |
| 753 | + con.setDoInput(true); | |
| 754 | + con.setReadTimeout(2500); | |
| 755 | + con.setConnectTimeout(2500); | |
| 756 | + | |
| 757 | + con.connect(); | |
| 758 | + if (con.getResponseCode() == 200) { | |
| 759 | + in = con.getInputStream(); | |
| 760 | + ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
| 761 | + IOUtils.copy(in, bout); bout.close(); | |
| 762 | + Map<String, Object> response = new ObjectMapper().readValue(bout.toByteArray(), Map.class); | |
| 763 | + if (!"报修成功".equals(response.get("msg"))) { | |
| 764 | + res.put("status", ResponseCode.ERROR); | |
| 765 | + res.putAll(response); | |
| 766 | + } | |
| 767 | + } | |
| 768 | + } catch (IOException e) { | |
| 769 | + // TODO Auto-generated catch block | |
| 770 | + res.put("status", ResponseCode.ERROR); | |
| 771 | + res.put("msg", "调用上报接口异常"); | |
| 772 | + } finally { | |
| 773 | + try { | |
| 774 | + if (in != null) in.close(); | |
| 775 | + if (con != null) con.disconnect(); | |
| 776 | + } catch (IOException e) { | |
| 777 | + // TODO Auto-generated catch block | |
| 778 | + e.printStackTrace(); | |
| 779 | + } | |
| 780 | + } | |
| 781 | + | |
| 782 | + return res; | |
| 783 | + } | |
| 694 | 784 | } | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/handlers/InStationProcess.java
| ... | ... | @@ -121,7 +121,7 @@ public class InStationProcess { |
| 121 | 121 | private void inEndStation(ScheduleRealInfo sch, GpsEntity gps) { |
| 122 | 122 | String nbbm = sch.getClZbh(); |
| 123 | 123 | //校验进站前置约束 |
| 124 | - if (!validInPremise(gps)) | |
| 124 | + if (!validInPremise(gps) && isNormalSch(sch)) | |
| 125 | 125 | return; |
| 126 | 126 | |
| 127 | 127 | //实达时间不覆盖 | ... | ... |
src/main/java/com/bsth/data/gpsdata_v2/handlers/OutStationProcess.java
| ... | ... | @@ -74,7 +74,7 @@ public class OutStationProcess { |
| 74 | 74 | * @param gps |
| 75 | 75 | */ |
| 76 | 76 | private void outStation(GpsEntity gps, GpsEntity prev) { |
| 77 | - logger.info("进站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); | |
| 77 | + logger.info("出站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); | |
| 78 | 78 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); |
| 79 | 79 | |
| 80 | 80 | //起点发车 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -611,111 +611,119 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 611 | 611 | * 临加班次 |
| 612 | 612 | */ |
| 613 | 613 | @Override |
| 614 | - public Map<String, Object> save(ScheduleRealInfo t) { | |
| 614 | + public Map<String, Object> save(ScheduleRealInfo sch) { | |
| 615 | 615 | Map<String, Object> rs = new HashMap<>(); |
| 616 | 616 | try { |
| 617 | - if (!carExist(t.getGsBm(), t.getClZbh())) { | |
| 618 | - rs.put("msg", "车辆 " + t.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | |
| 619 | - rs.put("status", ResponseCode.ERROR); | |
| 620 | - return rs; | |
| 617 | + String clZbh = sch.getClZbh(); | |
| 618 | + if (StringUtils.isNotEmpty(clZbh)) { | |
| 619 | + //检测 | |
| 620 | + if (!carExist(sch.getGsBm(), clZbh)) { | |
| 621 | + rs.put("status", ResponseCode.ERROR); | |
| 622 | + rs.put("msg", "车辆 " + clZbh + " 不存在!"); | |
| 623 | + return rs; | |
| 624 | + } else if (!sch.getGsBm().equals(BasicData.nbbm2CompanyCodeMap.get(clZbh))) { | |
| 625 | + rs.put("status", ResponseCode.ERROR); | |
| 626 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到自编号为【" + clZbh + "】的车辆"); | |
| 627 | + return rs; | |
| 628 | + } | |
| 621 | 629 | } |
| 622 | 630 | |
| 623 | 631 | SysUser user = SecurityUtils.getCurrentUser(); |
| 624 | - String schDate = DayOfSchedule.currSchDateMap.get(t.getXlBm()); | |
| 632 | + String schDate = DayOfSchedule.currSchDateMap.get(sch.getXlBm()); | |
| 625 | 633 | |
| 626 | 634 | SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd"), sdfyyyyMMddHHmm = new SimpleDateFormat("yyyy-MM-ddHH:mm"); |
| 627 | 635 | |
| 628 | - if (StringUtils.isEmpty(t.getjGh())) { | |
| 636 | + if (StringUtils.isEmpty(sch.getjGh())) { | |
| 629 | 637 | rs.put("status", ResponseCode.ERROR); |
| 630 | 638 | rs.put("msg", "驾驶员工号不能为空!"); |
| 631 | 639 | return rs; |
| 632 | 640 | } |
| 633 | 641 | //截取驾驶员工号 |
| 634 | - if (t.getjGh().indexOf("-") != -1) { | |
| 635 | - t.setjGh(t.getjGh().split("-")[1]); | |
| 642 | + if (sch.getjGh().indexOf("-") != -1) { | |
| 643 | + sch.setjGh(sch.getjGh().split("-")[1]); | |
| 636 | 644 | } |
| 637 | 645 | //检查驾驶员工号 |
| 638 | - String jName = getPersonName(t.getGsBm(), t.getjGh()); | |
| 646 | + String jName = getPersonName(sch.getGsBm(), sch.getjGh()); | |
| 639 | 647 | if (StringUtils.isEmpty(jName)) { |
| 640 | - rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的驾驶员"); | |
| 648 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getjGh() + "】的驾驶员"); | |
| 641 | 649 | rs.put("status", ResponseCode.ERROR); |
| 642 | 650 | return rs; |
| 643 | - } else if (StringUtils.isEmpty(t.getjName())) { | |
| 644 | - t.setjName(jName);//补上驾驶员名称 | |
| 651 | + } else if (StringUtils.isEmpty(sch.getjName())) { | |
| 652 | + sch.setjName(jName);//补上驾驶员名称 | |
| 645 | 653 | } |
| 646 | 654 | |
| 647 | 655 | //有售票员 |
| 648 | - if (StringUtils.isNotEmpty(t.getsGh())) { | |
| 649 | - String sName = getPersonName(t.getGsBm(), t.getsGh()); | |
| 656 | + if (StringUtils.isNotEmpty(sch.getsGh())) { | |
| 657 | + String sName = getPersonName(sch.getGsBm(), sch.getsGh()); | |
| 650 | 658 | if (StringUtils.isEmpty(sName)) { |
| 651 | - rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的售票员"); | |
| 659 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getjGh() + "】的售票员"); | |
| 652 | 660 | rs.put("status", ResponseCode.ERROR); |
| 653 | 661 | return rs; |
| 654 | - } else if (StringUtils.isEmpty(t.getsName())) { | |
| 655 | - t.setsName(sName);//补上售票员名称 | |
| 662 | + } else if (StringUtils.isEmpty(sch.getsName())) { | |
| 663 | + sch.setsName(sName);//补上售票员名称 | |
| 656 | 664 | } |
| 657 | 665 | } else { |
| 658 | - t.setsGh(""); | |
| 659 | - t.setsName(""); | |
| 666 | + sch.setsGh(""); | |
| 667 | + sch.setsName(""); | |
| 660 | 668 | } |
| 661 | 669 | |
| 662 | 670 | //公司 和 分公司名称 |
| 663 | - t.setGsName(BasicData.businessCodeNameMap.get(t.getGsBm())); | |
| 664 | - t.setFgsName(BasicData.businessFgsCodeNameMap.get(t.getFgsBm() + "_" + t.getGsBm())); | |
| 665 | - t.setCreateDate(new Date()); | |
| 666 | - t.setScheduleDateStr(schDate); | |
| 667 | - t.setScheduleDate(sdfyyyyMMdd.parse(schDate)); | |
| 668 | - t.setRealExecDate(schDate); | |
| 669 | - | |
| 670 | - t.setCreateBy(user); | |
| 671 | - t.setSflj(true); | |
| 672 | - t.setLate(false); | |
| 673 | - t.setDfsj(t.getFcsj()); | |
| 674 | - t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime()); | |
| 675 | - t.setJhlcOrig(t.getJhlc()); | |
| 676 | - t.setCreateDate(new Date()); | |
| 677 | - t.setUpdateDate(new Date()); | |
| 678 | - t.setSpId(-1L); | |
| 671 | + sch.setGsName(BasicData.businessCodeNameMap.get(sch.getGsBm())); | |
| 672 | + sch.setFgsName(BasicData.businessFgsCodeNameMap.get(sch.getFgsBm() + "_" + sch.getGsBm())); | |
| 673 | + sch.setCreateDate(new Date()); | |
| 674 | + sch.setScheduleDateStr(schDate); | |
| 675 | + sch.setScheduleDate(sdfyyyyMMdd.parse(schDate)); | |
| 676 | + sch.setRealExecDate(schDate); | |
| 677 | + | |
| 678 | + sch.setCreateBy(user); | |
| 679 | + sch.setSflj(true); | |
| 680 | + sch.setLate(false); | |
| 681 | + sch.setDfsj(sch.getFcsj()); | |
| 682 | + sch.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + sch.getZdsj()).getTime()); | |
| 683 | + sch.setJhlcOrig(sch.getJhlc()); | |
| 684 | + sch.setCreateDate(new Date()); | |
| 685 | + sch.setUpdateDate(new Date()); | |
| 686 | + sch.setSpId(-1L); | |
| 679 | 687 | //起终点名称 |
| 680 | - String prefix = t.getXlBm() + "_" + t.getXlDir() + "_"; | |
| 681 | - t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix)); | |
| 682 | - t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix)); | |
| 688 | + String prefix = sch.getXlBm() + "_" + sch.getXlDir() + "_"; | |
| 689 | + sch.setQdzName(BasicData.getStationNameByCode(sch.getQdzCode(), prefix)); | |
| 690 | + sch.setZdzName(BasicData.getStationNameByCode(sch.getZdzCode(), prefix)); | |
| 683 | 691 | |
| 684 | 692 | //计算班次实际执行时间 |
| 685 | - schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t); | |
| 693 | + schAttrCalculator.calcRealDate(sch).calcAllTimeByFcsj(sch); | |
| 686 | 694 | |
| 687 | 695 | //处理计达跨24点 |
| 688 | - LineConfig conf = lineConfigData.get(t.getXlBm()); | |
| 689 | - if (t.getZdsj().compareTo(conf.getStartOpt()) < 0) { | |
| 690 | - t.setZdsjT(sdfyyyyMMddHHmm.parse(t.getScheduleDateStr() + t.getZdsj()).getTime() + (1000 * 60 * 60 * 24)); | |
| 696 | + LineConfig conf = lineConfigData.get(sch.getXlBm()); | |
| 697 | + if (sch.getZdsj().compareTo(conf.getStartOpt()) < 0) { | |
| 698 | + sch.setZdsjT(sdfyyyyMMddHHmm.parse(sch.getScheduleDateStr() + sch.getZdsj()).getTime() + (1000 * 60 * 60 * 24)); | |
| 691 | 699 | } |
| 692 | 700 | |
| 693 | 701 | //班次历时 |
| 694 | - t.setBcsj((int) ((t.getZdsjT() - t.getDfsjT()) / 1000 / 60)); | |
| 695 | - if (t.getZdsjT() < t.getFcsjT()) { | |
| 702 | + sch.setBcsj((int) ((sch.getZdsjT() - sch.getDfsjT()) / 1000 / 60)); | |
| 703 | + if (sch.getZdsjT() < sch.getFcsjT()) { | |
| 696 | 704 | rs.put("status", ResponseCode.ERROR); |
| 697 | 705 | rs.put("msg", "起终点时间异常!"); |
| 698 | 706 | return rs; |
| 699 | 707 | } |
| 700 | 708 | |
| 701 | - t.setId(dayOfSchedule.getId()); | |
| 709 | + sch.setId(dayOfSchedule.getId()); | |
| 702 | 710 | //实时入库 |
| 703 | - super.save(t); | |
| 711 | + super.save(sch); | |
| 704 | 712 | |
| 705 | 713 | // 加入缓存 |
| 706 | - dayOfSchedule.put(t); | |
| 714 | + dayOfSchedule.put(sch); | |
| 707 | 715 | |
| 708 | 716 | //更新起点应到时间 |
| 709 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t); | |
| 717 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch); | |
| 710 | 718 | |
| 711 | 719 | //重新计算车辆当前执行班次 |
| 712 | - dayOfSchedule.reCalcExecPlan(t.getClZbh()); | |
| 720 | + dayOfSchedule.reCalcExecPlan(sch.getClZbh()); | |
| 713 | 721 | |
| 714 | 722 | //记录站到场历时数据 |
| 715 | - Station2ParkBuffer.put(t); | |
| 723 | + Station2ParkBuffer.put(sch); | |
| 716 | 724 | |
| 717 | 725 | rs.put("ts", ts); |
| 718 | - rs.put("t", t); | |
| 726 | + rs.put("t", sch); | |
| 719 | 727 | } catch (Exception e) { |
| 720 | 728 | logger.error("", e); |
| 721 | 729 | rs.put("status", ResponseCode.ERROR); | ... | ... |
src/main/resources/application-prod.properties
| ... | ... | @@ -28,4 +28,6 @@ http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all |
| 28 | 28 | ## gateway real data |
| 29 | 29 | http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ |
| 30 | 30 | ## gateway send directive |
| 31 | -http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 32 | 31 | \ No newline at end of file |
| 32 | +http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 33 | +## maintenance report | |
| 34 | +http.report.url = http://116.247.73.122:9098/jgjwsystem_j2ee/ | |
| 33 | 35 | \ No newline at end of file | ... | ... |
src/main/resources/application.properties
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/wxsb.html
0 → 100644
| 1 | +<div class="uk-modal ct-form-modal ct_move_modal" id="schedule-wxsb-modal"> | |
| 2 | + <div class="uk-modal-dialog"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>维修上报</h2></div> | |
| 6 | + <form class="uk-form uk-form-horizontal"> | |
| 7 | + </form> | |
| 8 | + </div> | |
| 9 | + | |
| 10 | + <script id="schedule-wxsb-form-temp" type="text/html"> | |
| 11 | + <input type="hidden" name="id" value="{{id}}"/> | |
| 12 | + <div class="uk-grid"> | |
| 13 | + <div class="uk-width-1-2"> | |
| 14 | + <div class="uk-form-row"> | |
| 15 | + <label class="uk-form-label" >车辆编码</label> | |
| 16 | + <div class="uk-form-controls"> | |
| 17 | + <input type="text" name="nbbm" value="{{clZbh}}" readonly> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + <div class="uk-width-1-2"> | |
| 22 | + <div class="uk-form-row"> | |
| 23 | + <label class="uk-form-label" >报修类型</label> | |
| 24 | + <div class="uk-form-controls"> | |
| 25 | + <select name="bxType"></select> | |
| 26 | + </div> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + </div> | |
| 30 | + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> | |
| 31 | + <button type="button" class="uk-button uk-modal-close">取消</button> | |
| 32 | + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> 保存</button> | |
| 33 | + </div> | |
| 34 | + </script> | |
| 35 | + | |
| 36 | + <script> | |
| 37 | + (function() { | |
| 38 | + var modal = '#schedule-wxsb-modal' | |
| 39 | + ,sch; | |
| 40 | + | |
| 41 | + $(modal).on('init', function(e, data) { | |
| 42 | + e.stopPropagation(); | |
| 43 | + sch=data.sch; | |
| 44 | + var formHtml = template('schedule-wxsb-form-temp', sch); | |
| 45 | + $('form', modal).html(formHtml); | |
| 46 | + | |
| 47 | + //班次类型字典 | |
| 48 | + var bxtypes=[{code:"9101", des:"轨迹不连续"}, {code:"9102", des:"无轨迹"}, {code:"9103", des:"收不到调度指令"}, {code:"9104", des:"漂移"}, {code:"9109", des:"其它"}],opts=''; | |
| 49 | + for(var i = 0;i < bxtypes.length;i++){ | |
| 50 | + opts+='<option value="'+bxtypes[i].code+'">'+bxtypes[i].des+'</option>'; | |
| 51 | + } | |
| 52 | + $('[name=bxType]', modal).html(opts); | |
| 53 | + | |
| 54 | + //submit | |
| 55 | + var f = $('form', modal).formValidation(gb_form_validation_opts); | |
| 56 | + f.on('success.form.fv', function(e) { | |
| 57 | + e.preventDefault(); | |
| 58 | + $('[type=submit]', f).attr('disabled', 'disabled'); | |
| 59 | + var data = $(this).serializeJSON(); | |
| 60 | + gb_common.$post('/realSchedule/wxsb', data, function(rs){ | |
| 61 | + //更新班次信息 | |
| 62 | + notify_succ('操作成功!'); | |
| 63 | + UIkit.modal(modal).hide(); | |
| 64 | + }); | |
| 65 | + }); | |
| 66 | + }); | |
| 67 | + })(); | |
| 68 | + </script> | |
| 69 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
| ... | ... | @@ -281,6 +281,11 @@ var gb_schedule_context_menu = (function () { |
| 281 | 281 | open_modal(folder + '/sub_task_v2/main.html', { |
| 282 | 282 | sch: sch |
| 283 | 283 | }, modal_opts); |
| 284 | + }, | |
| 285 | + wxsb: function (sch) { | |
| 286 | + open_modal(folder + '/wxsb.html', { | |
| 287 | + sch: sch | |
| 288 | + }, modal_opts); | |
| 284 | 289 | } |
| 285 | 290 | }; |
| 286 | 291 | |
| ... | ... | @@ -339,9 +344,13 @@ var gb_schedule_context_menu = (function () { |
| 339 | 344 | 'wdtz': { |
| 340 | 345 | name: '误点调整' |
| 341 | 346 | }, |
| 342 | - 'sep4': '---------', | |
| 347 | + 'sep5': '---------', | |
| 343 | 348 | 'lp_change': { |
| 344 | 349 | name: '路牌对调' |
| 350 | + }, | |
| 351 | + 'sep6': '---------', | |
| 352 | + 'wxsb': { | |
| 353 | + name: '维修上报' | |
| 345 | 354 | } |
| 346 | 355 | } |
| 347 | 356 | }); | ... | ... |