Commit f5b73c76fc9538d2ada21420a93e29ceec08244b
1 parent
5da44207
智能排班的优化、自动调度里面与司售通对接的烂班、路牌对调等
Showing
27 changed files
with
1096 additions
and
175 deletions
src/main/java/com/bsth/controller/zndd/ZnddLbController.java
0 → 100644
| 1 | +package com.bsth.controller.zndd; | |
| 2 | + | |
| 3 | +import com.bsth.controller.BaseController; | |
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 5 | +import com.bsth.entity.zndd.ZnddLb; | |
| 6 | +import com.bsth.service.zndd.ZnddLbService; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 10 | +import org.springframework.web.bind.annotation.RestController; | |
| 11 | + | |
| 12 | +import java.util.Map; | |
| 13 | + | |
| 14 | +@RestController | |
| 15 | +@RequestMapping("znnd_lb") | |
| 16 | +public class ZnddLbController extends BaseController<ZnddLb, Integer> { | |
| 17 | + | |
| 18 | + @Autowired | |
| 19 | + ZnddLbService znddLbService; | |
| 20 | + //线路--车辆 | |
| 21 | + | |
| 22 | + @RequestMapping("lineCar") | |
| 23 | + public ScheduleRealInfo queryLineCar(@RequestParam Map m){ | |
| 24 | + return znddLbService.queryLineCar(m); | |
| 25 | + | |
| 26 | + } | |
| 27 | + //批量撤销烂班 | |
| 28 | + @RequestMapping("cxlb") | |
| 29 | + public Map cxlb(@RequestParam Map m){ | |
| 30 | + return znddLbService.cxlb(m); | |
| 31 | + | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/main/java/com/bsth/entity/zndd/ZnddLb.java
0 → 100644
| 1 | +package com.bsth.entity.zndd; | |
| 2 | + | |
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
| 4 | + | |
| 5 | +import javax.persistence.Entity; | |
| 6 | +import javax.persistence.Id; | |
| 7 | +import javax.persistence.Table; | |
| 8 | +import java.util.Date; | |
| 9 | + | |
| 10 | +@Entity | |
| 11 | +@Table(name = "zndd_lb") //智能调度记录查询表 | |
| 12 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | |
| 13 | +public class ZnddLb { | |
| 14 | + | |
| 15 | + | |
| 16 | + @Id | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + private String lineCode; | |
| 20 | + | |
| 21 | + private String lineName; | |
| 22 | + | |
| 23 | + //车辆自编号 | |
| 24 | + private String clZbh; | |
| 25 | + | |
| 26 | + //驾驶员工号 | |
| 27 | + private String jGh; | |
| 28 | + //请假类型 | |
| 29 | + private String qjType; | |
| 30 | + //请假日期 | |
| 31 | + private String rqStr; | |
| 32 | + //请假状态 | |
| 33 | + private String status; | |
| 34 | + //日期 | |
| 35 | + private String rq; | |
| 36 | + | |
| 37 | + | |
| 38 | + public String getRq() { | |
| 39 | + return rq; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setRq(String rq) { | |
| 43 | + this.rq = rq; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public String getLineCode() { | |
| 47 | + return lineCode; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setLineCode(String lineCode) { | |
| 51 | + this.lineCode = lineCode; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public String getLineName() { | |
| 55 | + return lineName; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setLineName(String lineName) { | |
| 59 | + this.lineName = lineName; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public String getClZbh() { | |
| 63 | + return clZbh; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setClZbh(String clZbh) { | |
| 67 | + this.clZbh = clZbh; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public String getjGh() { | |
| 71 | + return jGh; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setjGh(String jGh) { | |
| 75 | + this.jGh = jGh; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public String getQjType() { | |
| 79 | + return qjType; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void setQjType(String qjType) { | |
| 83 | + this.qjType = qjType; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public String getRqStr() { | |
| 87 | + return rqStr; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setRqStr(String rqStr) { | |
| 91 | + this.rqStr = rqStr; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public String getStatus() { | |
| 95 | + return status; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public void setStatus(String status) { | |
| 99 | + this.status = status; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public void setId(Long id) { | |
| 103 | + this.id = id; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public Long getId() { | |
| 107 | + return id; | |
| 108 | + } | |
| 109 | +} | ... | ... |
src/main/java/com/bsth/repository/zndd/ZnddLbRepository.java
0 → 100644
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1599,16 +1599,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1599 | 1599 | Long id = Long.parseLong(map.get("id")); |
| 1600 | 1600 | String remarks = map.get("remarks"), fcsjActual = map.get("fcsjActual"); |
| 1601 | 1601 | |
| 1602 | - ScheduleRealInfo sch = dayOfSchedule.get(id); | |
| 1603 | - | |
| 1604 | - long time = System.currentTimeMillis();//实际时间+2分钟 | |
| 1605 | - //超过待发时间 实发时间还是null的 | |
| 1606 | - if (sch.getFcsjT() < time){ | |
| 1607 | - return rs; | |
| 1602 | + // 维修上报 | |
| 1603 | + if (StringUtils.isNotBlank(map.get("reportTypes"))) { | |
| 1604 | + Map<String, Object> param = new HashMap<String, Object>(); | |
| 1605 | + param.putAll(map); | |
| 1606 | + rs = repairReport(param, false); | |
| 1608 | 1607 | } |
| 1609 | 1608 | |
| 1610 | - | |
| 1611 | - | |
| 1609 | + ScheduleRealInfo sch = dayOfSchedule.get(id); | |
| 1612 | 1610 | |
| 1613 | 1611 | LineConfig config = lineConfigData.get(sch.getXlBm()); |
| 1614 | 1612 | //小于线路开始运营时间,则默认跨过24点 |
| ... | ... | @@ -1739,7 +1737,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1739 | 1737 | ScheduleModifyLogger.cxsf(sch); |
| 1740 | 1738 | |
| 1741 | 1739 | sch.clearFcsjActual(); |
| 1742 | - sch.setRemarks(remarks); | |
| 1743 | 1740 | rs.put("status", ResponseCode.SUCCESS); |
| 1744 | 1741 | |
| 1745 | 1742 | ts.add(sch); |
| ... | ... | @@ -6835,13 +6832,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 6835 | 6832 | rr.setRepairType(repairTypes); |
| 6836 | 6833 | rr.setReportType(reportTypes); |
| 6837 | 6834 | rr.setReportDate(new Date()); |
| 6838 | - rr.setReportState(reportState); | |
| 6835 | + rr.setReportState(0); | |
| 6839 | 6836 | rr.setReportMode(isActive ? 1 : 0); |
| 6840 | 6837 | rr = repairReportRepository.save(rr); |
| 6841 | - dayOfSchedule.setLastestRepairReport(rr); | |
| 6838 | +/* dayOfSchedule.setLastestRepairReport(rr); | |
| 6842 | 6839 | // 如果上报失败,放到重传队列 |
| 6843 | 6840 | if (rr.getReportState() == -1) queue.add(rr); |
| 6844 | - | |
| 6841 | + */ | |
| 6845 | 6842 | return res; |
| 6846 | 6843 | } |
| 6847 | 6844 | ... | ... |
src/main/java/com/bsth/service/zndd/ZnddLbService.java
0 → 100644
| 1 | +package com.bsth.service.zndd; | |
| 2 | + | |
| 3 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 4 | +import com.bsth.entity.zndd.ZnddLb; | |
| 5 | +import com.bsth.service.BaseService; | |
| 6 | + | |
| 7 | +import java.util.Map; | |
| 8 | + | |
| 9 | +public interface ZnddLbService extends BaseService<ZnddLb, Integer> { | |
| 10 | + | |
| 11 | + ScheduleRealInfo queryLineCar(Map m); | |
| 12 | + | |
| 13 | + | |
| 14 | + Map cxlb(Map m); | |
| 15 | +} | ... | ... |
src/main/java/com/bsth/service/zndd/impl/ZnddLbServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.zndd.impl; | |
| 2 | + | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 4 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 5 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 6 | +import com.bsth.entity.zndd.ZnddLb; | |
| 7 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 8 | +import com.bsth.service.realcontrol.ScheduleRealInfoService; | |
| 9 | +import com.bsth.service.zndd.ZnddLbService; | |
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | +import org.springframework.stereotype.Service; | |
| 12 | + | |
| 13 | +import java.util.ArrayList; | |
| 14 | +import java.util.HashMap; | |
| 15 | +import java.util.List; | |
| 16 | +import java.util.Map; | |
| 17 | + | |
| 18 | +@Service | |
| 19 | +public class ZnddLbServiceImpl extends BaseServiceImpl<ZnddLb, Integer> implements ZnddLbService { | |
| 20 | + | |
| 21 | + @Autowired | |
| 22 | + DayOfSchedule dayOfSchedule; | |
| 23 | + | |
| 24 | + @Autowired | |
| 25 | + ScheduleRealInfoService scheduleRealInfoService; | |
| 26 | + public ScheduleRealInfo queryLineCar(Map m){ | |
| 27 | + String lineCode = m.get("lineCode").toString().trim(); | |
| 28 | + String clZbh = m.get("clZbh").toString().trim(); | |
| 29 | + List<ScheduleRealInfo> srList = dayOfSchedule.findByLineCode(lineCode); | |
| 30 | + for (ScheduleRealInfo st : srList){ | |
| 31 | + | |
| 32 | + if(st.getClZbh().equals(clZbh) && st.getBcType().equals("normal")){ | |
| 33 | + return st; | |
| 34 | + } | |
| 35 | + } | |
| 36 | + return null; | |
| 37 | + } | |
| 38 | + | |
| 39 | + | |
| 40 | + public Map cxlb(Map m){ | |
| 41 | + Map<String, Object> rs = new HashMap<>(); | |
| 42 | + String lineCode = m.get("lineCode").toString().trim(); | |
| 43 | + String clZbh = m.get("clZbh").toString().trim(); | |
| 44 | + List<ScheduleRealInfo> list = new ArrayList(); | |
| 45 | + List<ScheduleRealInfo> srList = dayOfSchedule.findByLineCode(lineCode); | |
| 46 | + for (ScheduleRealInfo st : srList){ | |
| 47 | + | |
| 48 | + if(st.getClZbh().equals(clZbh)){ | |
| 49 | + Map<String, Object> remap = scheduleRealInfoService.revokeDestroy(st.getId()); | |
| 50 | + //修改成功 | |
| 51 | + if (remap.get("status").toString().equals("200")){ | |
| 52 | + list.add(st); | |
| 53 | + } | |
| 54 | + } | |
| 55 | + } | |
| 56 | + | |
| 57 | + if (list.size() > 0){ | |
| 58 | + rs.put("status", ResponseCode.SUCCESS); | |
| 59 | + rs.put("list", list); | |
| 60 | + return rs; | |
| 61 | + } | |
| 62 | + | |
| 63 | + return rs; | |
| 64 | + } | |
| 65 | +} | ... | ... |
src/main/resources/static/pages/base/timesmodel/gantt.html
| ... | ... | @@ -125,11 +125,11 @@ |
| 125 | 125 | <i class="fa fa-close"></i> 删除路牌 |
| 126 | 126 | </a> |
| 127 | 127 | </li> |
| 128 | - <li> | |
| 128 | + <!-- <li> | |
| 129 | 129 | <a href="javascript:" class="tool-action balanceBc"> |
| 130 | 130 | <i class="fa fa-arrows-h"></i> 均匀发车 |
| 131 | 131 | </a> |
| 132 | - </li> | |
| 132 | + </li>--> | |
| 133 | 133 | <li> |
| 134 | 134 | <a href="javascript:" class="tool-action bcAdjust"> |
| 135 | 135 | <i class="fa fa-arrows-v"></i> 班次调整 | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/dateTimeTool.js
| ... | ... | @@ -34,6 +34,20 @@ var DateTimeTool = function () { |
| 34 | 34 | } |
| 35 | 35 | return dateTime; |
| 36 | 36 | }; |
| 37 | + | |
| 38 | + var getDateTime2 = function(time,fcno) { | |
| 39 | + var dateTime = new Date(); | |
| 40 | + if(time !=null && time !='' && typeof(time) !='undefined') { | |
| 41 | + timeArr = time.split(':'); | |
| 42 | + dateTime.setHours(parseInt(timeArr[0])); | |
| 43 | + dateTime.setMinutes(parseInt(timeArr[1])); | |
| 44 | + dateTime.setSeconds(0); | |
| 45 | + // 在0-3点之间(包括0和3)的时间都默认为下一天的时间 &&fcno不是首班车 | |
| 46 | + if(parseInt(timeArr[0]) <= 3 && parseInt(timeArr[0]) >= 0 && fcno > 5) | |
| 47 | + dateTime.setDate(dateTime.getDate() +1); | |
| 48 | + } | |
| 49 | + return dateTime; | |
| 50 | + }; | |
| 37 | 51 | /** |
| 38 | 52 | * @discription : (TODO) 获取时间格式[00:00] |
| 39 | 53 | * |
| ... | ... | @@ -78,6 +92,7 @@ var DateTimeTool = function () { |
| 78 | 92 | initSJD : initSJD, |
| 79 | 93 | calculateHours : calculateHours, |
| 80 | 94 | getDateTime : getDateTime, |
| 95 | + getDateTime2:getDateTime2, | |
| 81 | 96 | getHHmmStr : getHHmmStr, |
| 82 | 97 | judgmentTimeQuantum : judgmentTimeQuantum, |
| 83 | 98 | judgmentTimeQuantum1 : judgmentTimeQuantum1 | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/echartsDrawGanTT.js
| ... | ... | @@ -35,6 +35,8 @@ var echartsDrawGTT = function () { |
| 35 | 35 | bcType["major"] = '站'; |
| 36 | 36 | bcType["venting"] = '直'; |
| 37 | 37 | bcType["region"] = '区'; |
| 38 | + bcType["ldks"] = '空'; | |
| 39 | + | |
| 38 | 40 | |
| 39 | 41 | // 处理后班次数据 |
| 40 | 42 | var data = []; |
| ... | ... | @@ -79,8 +81,8 @@ var echartsDrawGTT = function () { |
| 79 | 81 | data = []; |
| 80 | 82 | bcData = newData; |
| 81 | 83 | echarts.util.each(bcData, function (bcObj, index) { |
| 82 | - var fcsj = Date.parse(DateTimeTool.getDateTime(bcObj.fcsj)), | |
| 83 | - ARRIVALTIME = Date.parse(DateTimeTool.getDateTime(bcObj.ARRIVALTIME)), | |
| 84 | + var fcsj = Date.parse(DateTimeTool.getDateTime2(bcObj.fcsj,bcObj.fcno)), | |
| 85 | + ARRIVALTIME = Date.parse(DateTimeTool.getDateTime2(bcObj.ARRIVALTIME,bcObj.fcno)), | |
| 84 | 86 | colorStr = bcObj.xlDir, |
| 85 | 87 | xlDir; |
| 86 | 88 | if(bcObj.xlDir == 'relationshipGraph-up') |
| ... | ... | @@ -146,18 +148,45 @@ var echartsDrawGTT = function () { |
| 146 | 148 | for(var j = 0,len=lpData.length; j < len; j++) { |
| 147 | 149 | var type = true; |
| 148 | 150 | var name = lpData[j]; |
| 149 | - for(var i = 0,len2=data.length; i < len2; i++) { | |
| 150 | - if(name == data[i].value[0]) { | |
| 151 | - if(type){ | |
| 152 | - lpDataCount[name] = [data[i].value[3]/60000+data[i].value[15],1,data[i].value[4]]; | |
| 153 | - type = false; | |
| 154 | - } else if(data[i].value[6] == 'in' || data[i].value[16] == 1){ | |
| 155 | - lpDataCount[name][0] += data[i].value[3]/60000; | |
| 156 | - lpDataCount[name][1] += 1; | |
| 157 | - } else { | |
| 158 | - lpDataCount[name][0] += (data[i].value[3]/60000+data[i].value[15]); | |
| 159 | - lpDataCount[name][1] += 1; | |
| 160 | - } | |
| 151 | + let _datast = []; | |
| 152 | + var dataSize = data.length; | |
| 153 | + //把当前路牌的班次摘出来 重新计算 | |
| 154 | + for (var t = 0 ; t < dataSize ; t++){ | |
| 155 | + if(data[t].value[0] == name) { | |
| 156 | + _datast.push({ | |
| 157 | + value: data[t].value, | |
| 158 | + itemStyle: data[t].itemStyle | |
| 159 | + }) | |
| 160 | + } | |
| 161 | + } | |
| 162 | + //根据发车时间排序 | |
| 163 | + _datast.sort(function(a,b){ | |
| 164 | + return a.value[1]-b.value[1]; | |
| 165 | + }); | |
| 166 | + //计算停站时间 | |
| 167 | + for(var i = 0; i < _datast.length -1; i++) { | |
| 168 | + //最后一个为0 | |
| 169 | + if (i ==_datast.length -1){ | |
| 170 | + _datast[i].value[15] = 0; | |
| 171 | + continue; | |
| 172 | + } | |
| 173 | + //出场班次空闲班次不算工时 | |
| 174 | + if(_datast[i].value[6] == 'in' || _datast[i].value[16] == 1) { | |
| 175 | + _datast[i].value[15] = 0; | |
| 176 | + continue; | |
| 177 | + } | |
| 178 | + //同一路牌下的下一个班次的发车时间 - 本班次的到站时间 = 停车时间 | |
| 179 | + _datast[i].value[15] = (_datast[i+1].value[1] - _datast[i].value[2])/60000; | |
| 180 | + } | |
| 181 | + //统计计算总计工时。 | |
| 182 | + for (let n in _datast){ | |
| 183 | + let das = _datast[n]; | |
| 184 | + if(type){ | |
| 185 | + lpDataCount[name] = [das.value[3]/60000+das.value[15],1,das.value[4]]; | |
| 186 | + type = false; | |
| 187 | + } else { | |
| 188 | + lpDataCount[name][0] += (das.value[3]/60000+das.value[15]); | |
| 189 | + lpDataCount[name][1] += 1; | |
| 161 | 190 | } |
| 162 | 191 | } |
| 163 | 192 | } |
| ... | ... | @@ -204,7 +233,7 @@ var echartsDrawGTT = function () { |
| 204 | 233 | +'<br>发车时间:' + getHoursAndMinutes(params.value[1]) |
| 205 | 234 | +'<br>到站时间:' + getHoursAndMinutes(params.value[2]) |
| 206 | 235 | +'<br>行驶时间:' + params.value[3]/60000 +'分钟' |
| 207 | - +'<br>停休时间:' + params.value[15] +'分钟' | |
| 236 | + +'<br>停休时间:' + Math.round(params.value[15]) +'分钟' | |
| 208 | 237 | +'<br>班次类型:' + bcTypeStr ; |
| 209 | 238 | return str; |
| 210 | 239 | } |
| ... | ... | @@ -240,10 +269,10 @@ var echartsDrawGTT = function () { |
| 240 | 269 | axisLabel:{ |
| 241 | 270 | formatter: function (value, index) { |
| 242 | 271 | var texts = [ |
| 243 | - value , | |
| 244 | - '{yAxisLeft|总工时:'+(lpDataCount[value][0]==0 ? 0:(lpDataCount[value][0]/60).toFixed(2)) + '}', | |
| 245 | - '{yAxisLeft|总班次:'+lpDataCount[value][1] + '}' | |
| 246 | - ]; | |
| 272 | + value , | |
| 273 | + '{yAxisLeft|总工时:'+(lpDataCount[value][0]==0 ? 0:(lpDataCount[value][0]/60).toFixed(2)) + '}', | |
| 274 | + '{yAxisLeft|总班次:'+lpDataCount[value][1] + '}' | |
| 275 | + ]; | |
| 247 | 276 | return texts.join('\n'); |
| 248 | 277 | }, |
| 249 | 278 | rich: { |
| ... | ... | @@ -321,7 +350,7 @@ var echartsDrawGTT = function () { |
| 321 | 350 | // 除了早晚例保,和进出场班次其余类型班次有停站时间 |
| 322 | 351 | if(type!='bd' && type!='lc' && type!='out' && type!='in') { |
| 323 | 352 | //if(params.data.value[15]>=0) |
| 324 | - stayStr = "停:" + params.data.value[15]; | |
| 353 | + stayStr = "停: " + params.data.value[15]; | |
| 325 | 354 | } |
| 326 | 355 | // 分班显示‘分’ |
| 327 | 356 | if(params.data.value[16] == 1) |
| ... | ... | @@ -609,7 +638,7 @@ var echartsDrawGTT = function () { |
| 609 | 638 | bcTypeStr = bcType[type]; |
| 610 | 639 | |
| 611 | 640 | if(type == 'normal') { |
| 612 | - stayStr = "停:" + params.data.value[15]; | |
| 641 | + stayStr = "停:" + Math.round(params.data.value[15]); | |
| 613 | 642 | } |
| 614 | 643 | var arr = [ |
| 615 | 644 | '{left|' + timeStr + '}{type|'+ ((dataZoomEnd - dataZoomStart) <= 70 ? bcType[type] : '') +'}', |
| ... | ... | @@ -664,22 +693,55 @@ var echartsDrawGTT = function () { |
| 664 | 693 | var p2 = [item.value[2],item.value[0]]; |
| 665 | 694 | var pp= chart.convertToPixel({xAxisIndex: 0, yAxisIndex:0},p); |
| 666 | 695 | var pp2= chart.convertToPixel({xAxisIndex: 0, yAxisIndex:0},p2); |
| 667 | - | |
| 696 | + let _datast = []; | |
| 668 | 697 | var dataSize = data.length; |
| 669 | - if(dataIndex<dataSize-1) { | |
| 670 | - for(var i=0;i<dataSize;i++) { | |
| 671 | - if(i==dataIndex) | |
| 672 | - continue; | |
| 673 | - if(data[dataIndex].value[6] == 'in' || data[dataIndex].value[16] == 1) { | |
| 674 | - data[dataIndex].value[15] = 0; | |
| 675 | - break; | |
| 676 | - } | |
| 677 | - if(data[dataIndex].value[4] == data[i].value[4] && data[dataIndex].value[7] == (data[i].value[7]-1)) {//同一路牌下的下一个班次的发车时间 - 本班次的到站时间 = 停车时间 | |
| 678 | - data[dataIndex].value[15] = (data[dataIndex+1].value[1] - data[dataIndex].value[2])/60000; | |
| 679 | - break; | |
| 680 | - } | |
| 698 | + //把当前路牌的班次摘出来 重新计算 | |
| 699 | + for (var t = 0 ; t < dataSize ; t++){ | |
| 700 | + if(data[t].value[0] == item.value[0]) { | |
| 701 | + _datast.push({ | |
| 702 | + value: data[t].value, | |
| 703 | + itemStyle: data[t].itemStyle | |
| 704 | + }) | |
| 681 | 705 | } |
| 682 | 706 | } |
| 707 | + | |
| 708 | + //根据发车时间排序 | |
| 709 | + _datast.sort(function(a,b){ | |
| 710 | + return a.value[1]-b.value[1]; | |
| 711 | + }); | |
| 712 | + | |
| 713 | + for(var i = 0; i < _datast.length -1; i++) { | |
| 714 | + //最后一个为0 | |
| 715 | + if (i ==_datast.length -1){ | |
| 716 | + _datast[i].value[15] = 0; | |
| 717 | + continue; | |
| 718 | + } | |
| 719 | + if(_datast[i].value[6] == 'in' || _datast[i].value[16] == 1) { | |
| 720 | + _datast[i].value[15] = 0; | |
| 721 | + continue | |
| 722 | + } | |
| 723 | + //同一路牌下的下一个班次的发车时间 - 本班次的到站时间 = 停车时间 | |
| 724 | + _datast[i].value[15] = (_datast[i+1].value[1] - _datast[i].value[2])/60000; | |
| 725 | + } | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + // rsultA = rsultA.concat(lpbc); | |
| 730 | + /* if(dataIndex<dataSize-1) { //点击阴影班次的总工时变化的罪魁祸首 | |
| 731 | + for(var i=0;i<dataSize;i++) { | |
| 732 | + if(i==dataIndex) | |
| 733 | + continue; | |
| 734 | + if(data[dataIndex].value[6] == 'in' || data[dataIndex].value[16] == 1) { | |
| 735 | + data[dataIndex].value[15] = 0; | |
| 736 | + break; | |
| 737 | + } | |
| 738 | + //同一路牌下的下一个班次的发车时间 - 本班次的到站时间 = 停车时间 | |
| 739 | + if(data[dataIndex].value[4] == data[i].value[4] && data[dataIndex].value[7] == (data[i].value[7]-1)) { | |
| 740 | + data[dataIndex].value[15] = (data[dataIndex+1].value[1] - data[dataIndex].value[2])/60000; | |
| 741 | + break; | |
| 742 | + } | |
| 743 | + } | |
| 744 | + }*/ | |
| 683 | 745 | return { |
| 684 | 746 | type: 'rect', |
| 685 | 747 | borderWidth: 4, |
| ... | ... | @@ -707,7 +769,7 @@ var echartsDrawGTT = function () { |
| 707 | 769 | }) |
| 708 | 770 | }); |
| 709 | 771 | }; |
| 710 | - // 刷新上下行发车时刻表数据 | |
| 772 | + // 刷新上下行发车时刻表数据 正常和区间的 | |
| 711 | 773 | var refreshUpDownData = function () { |
| 712 | 774 | // 清空数据 |
| 713 | 775 | dataUp=[]; |
| ... | ... | @@ -717,7 +779,7 @@ var echartsDrawGTT = function () { |
| 717 | 779 | for(var i = 0,len=data.length; i < len; i++) { |
| 718 | 780 | var type = []; |
| 719 | 781 | type = $.extend(true, [], type, data[i].value); |
| 720 | - if(data[i].value[6] == 'normal') { | |
| 782 | + if(data[i].value[6] == 'normal' || data[i].value[6] == 'region') { | |
| 721 | 783 | if (data[i].value[8] == 0) { |
| 722 | 784 | dataUp.push(type); |
| 723 | 785 | } else if (data[i].value[8] == 1) { | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/gantt.js
| ... | ... | @@ -62,7 +62,6 @@ |
| 62 | 62 | |
| 63 | 63 | // 创建ParameterObj |
| 64 | 64 | var _paramObj; |
| 65 | -debugger; | |
| 66 | 65 | if(map.baseRes== '0') { |
| 67 | 66 | CSMap = getMaxCarAndStopSpace0(map,seMap); |
| 68 | 67 | // 发车间隙 |
| ... | ... | @@ -71,19 +70,21 @@ debugger; |
| 71 | 70 | _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); |
| 72 | 71 | }else if(map.baseRes== '1') { |
| 73 | 72 | CSMap = getMaxCarAndStopSpace1(map); |
| 74 | - // 发车间隙 | |
| 75 | - map.fcjx = CSMap.fcjx; | |
| 73 | + // 发车间隙 | |
| 74 | + map.fcjx = CSMap.fcjx; | |
| 75 | + map.stt = "1"; | |
| 76 | + _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); | |
| 76 | 77 | }else if (map.baseRes == '2') { |
| 77 | - // TODO:之后可能有新的参数加入 | |
| 78 | - _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); | |
| 79 | - map.clzs = _paramObj.calcuClzx(); | |
| 80 | - CSMap = getMaxCarAndStopSpace1(map); | |
| 81 | - } else if (map.baseRes == '3') { // 主站停站使用v2_2版本 | |
| 82 | - _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); // TODO:暂时使用v2_1版本的方法,通用的,后续再放到v2_2版本中 | |
| 83 | - console.log(_paramObj); | |
| 84 | - map.clzs = InternalScheduleObj_v2_2.calcuClzx(_paramObj); | |
| 85 | - CSMap = getMaxCarAndStopSpace1(map); | |
| 86 | - } | |
| 78 | + // TODO:之后可能有新的参数加入 | |
| 79 | + _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); | |
| 80 | + map.clzs = _paramObj.calcuClzx(); | |
| 81 | + CSMap = getMaxCarAndStopSpace1(map); | |
| 82 | + } else if (map.baseRes == '3') { // 主站停站使用v2_2版本 | |
| 83 | + _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); // TODO:暂时使用v2_1版本的方法,通用的,后续再放到v2_2版本中 | |
| 84 | + console.log(_paramObj); | |
| 85 | + map.clzs = InternalScheduleObj_v2_2.calcuClzx(_paramObj); | |
| 86 | + CSMap = getMaxCarAndStopSpace1(map); | |
| 87 | + } | |
| 87 | 88 | |
| 88 | 89 | // 定义时间参数. |
| 89 | 90 | var stopArray = getsj(map); |
| ... | ... | @@ -93,20 +94,20 @@ debugger; |
| 93 | 94 | data = BaseFun.KLplaceClassesTime(CSMap.gattA,stopArray,CSMap.maxCar,map,seMap,dataMap); |
| 94 | 95 | }else if(map.baseRes== '1') { |
| 95 | 96 | // 采用班型人次数据获取渲染时刻表明细图形的配置参数数据. |
| 96 | - // data = BaseFun.BXPplaceClassesTime(stopArray,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | |
| 97 | - // data = BaseFun.BXPplaceClassesTime01(stopArray,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | |
| 98 | - // data = BaseFun.BXPplaceClassesTime02(stopArray,CSMap.maxCar,map,seMap,dataMap); | |
| 99 | - data = scheduleInitialize.scheduleInit(stopArray,CSMap.maxCar,map,seMap,dataMap); | |
| 100 | - $(".paramAdd").addClass("hidden"); | |
| 101 | - } else if (map.baseRes == '2') { | |
| 102 | - // TODO:绘制gantt图表 | |
| 103 | - // TODO:var seDate = getksjssj(null,seMap.s); 关联参数必须设置 | |
| 104 | - // TODO:CSMap.maxCar 之后要设定一下的 | |
| 105 | - data = Main_v2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); | |
| 106 | - Main_v2.exportDataConfig(data.aInternalLpObj); | |
| 107 | - } else if (map.baseRes == '3') { // 主站停站使用v2_2版本 | |
| 108 | - data = Main_v2_2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); | |
| 109 | - } | |
| 97 | + // data = BaseFun.BXPplaceClassesTime(stopArray,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | |
| 98 | + // data = BaseFun.BXPplaceClassesTime01(stopArray,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA); | |
| 99 | + // data = BaseFun.BXPplaceClassesTime02(stopArray,CSMap.maxCar,map,seMap,dataMap); | |
| 100 | + data = scheduleInitialize.scheduleInit(stopArray,CSMap.maxCar,map,seMap,dataMap); | |
| 101 | + $(".paramAdd").addClass("hidden"); | |
| 102 | + } else if (map.baseRes == '2') { | |
| 103 | + // TODO:绘制gantt图表 | |
| 104 | + // TODO:var seDate = getksjssj(null,seMap.s); 关联参数必须设置 | |
| 105 | + // TODO:CSMap.maxCar 之后要设定一下的 | |
| 106 | + data = Main_v2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); | |
| 107 | + Main_v2.exportDataConfig(data.aInternalLpObj); | |
| 108 | + } else if (map.baseRes == '3') { // 主站停站使用v2_2版本 | |
| 109 | + data = Main_v2_2.BXPplaceClassesTime03(_paramObj, CSMap.maxCar); | |
| 110 | + } | |
| 110 | 111 | |
| 111 | 112 | }else { |
| 112 | 113 | var jsonA = JSON.parse(objD); |
| ... | ... | @@ -130,23 +131,23 @@ debugger; |
| 130 | 131 | } |
| 131 | 132 | // 按照发车序号顺序排序. |
| 132 | 133 | lpbc_.sort(function(a,b){return a.fcno-b.fcno}); |
| 133 | - resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,stopArray[0].lbsj,map)); | |
| 134 | + resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,stopArray[0].lbsj,map)); | |
| 134 | 135 | } |
| 135 | 136 | data = {'json':rsjar,'bxrcgs':null}; |
| 136 | 137 | } |
| 137 | - debugger; | |
| 138 | - echartsDrawGTT.init(data.json,true,true); | |
| 138 | + echartsDrawGTT.init(data.json,true,true); | |
| 139 | 139 | // console.log(data.json); |
| 140 | - // 创建甘特图对象. | |
| 141 | - // var graph = d3.select('#ganttSvg').relationshipGraph( | |
| 142 | - // getGraphArgus({'ganttInitParams': map,'yAxisCarArray':CSMap.maxCar, | |
| 143 | - // 'startDateTime':seDate.kssj,'endDateTime':seDate.jssj,'stopArray':stopArray,'dataMap':dataMap,'bxrcgs':data.bxrcgs})); | |
| 144 | - // // 渲染数据. | |
| 145 | - // graph.data(data.json); | |
| 146 | - // // 记录操作记录. | |
| 147 | - // graph.addHistory(); | |
| 148 | - // // 初始化右键菜单. | |
| 149 | - // contextInit(graph); | |
| 140 | + // 创建甘特图对象. | |
| 141 | + // var graph = d3.select('#ganttSvg').relationshipGraph( | |
| 142 | + // getGraphArgus({'ganttInitParams': map,'yAxisCarArray':CSMap.maxCar, | |
| 143 | + // 'startDateTime':seDate.kssj,'endDateTime':seDate.jssj,'stopArray':stopArray,'dataMap':dataMap,'bxrcgs':data.bxrcgs})); | |
| 144 | + // // 渲染数据. | |
| 145 | + // graph.data(data.json); | |
| 146 | + // // 记录操作记录. | |
| 147 | + // graph.addHistory(); | |
| 148 | + // // 初始化右键菜单. | |
| 149 | + // contextInit(graph); | |
| 150 | + | |
| 150 | 151 | |
| 151 | 152 | if (map.baseRes == '3' || map.baseRes == '1' || map.baseRes == '0') { |
| 152 | 153 | // 导入导出设置 |
| ... | ... | @@ -186,13 +187,14 @@ debugger; |
| 186 | 187 | }); |
| 187 | 188 | } |
| 188 | 189 | |
| 189 | - console.log("重组前数据=" + _data); | |
| 190 | - console.log("重组后数据=" + _rtnBcArray); | |
| 191 | - return _rtnBcArray; | |
| 192 | - }; | |
| 193 | - | |
| 194 | - Main_v2_2.exportExcelConfig(_paramObj, _dfun); | |
| 195 | - } | |
| 190 | + console.log("重组前数据=" + _data); | |
| 191 | + console.log("重组后数据=" + _rtnBcArray); | |
| 192 | + return _rtnBcArray; | |
| 193 | + }; | |
| 194 | + if (_paramObj == null) | |
| 195 | + return | |
| 196 | + Main_v2_2.exportExcelConfig(_paramObj, _dfun); | |
| 197 | + } | |
| 196 | 198 | |
| 197 | 199 | // 关闭弹出层 |
| 198 | 200 | layer.close(indexLoad); | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/systemTools.js
| ... | ... | @@ -66,10 +66,10 @@ $('.deleteLp').on('click',function() { |
| 66 | 66 | $('#deletelp_mobal').trigger('deletelpMobal.show',[lpData,echartsDrawGTT]); |
| 67 | 67 | }); |
| 68 | 68 | }); |
| 69 | -/** 监听均匀发车事件.(点击) **/ | |
| 69 | +/** 监听均匀发车事件.(点击) * | |
| 70 | 70 | $('.balanceBc').on('click',function() { |
| 71 | 71 | layer.msg('功能暂未开放'); |
| 72 | -}); | |
| 72 | +});*/ | |
| 73 | 73 | /** 监听班次调整事件.(点击) **/ |
| 74 | 74 | $('.bcAdjust').on('click',function() { |
| 75 | 75 | var lpData = echartsDrawGTT.getLpData(); | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v1/AdjustTrip.js
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | * 4、如果还有没有满足要求的班次,此时需要智能修改分班路牌头尾班次,删除,或这加入,然后再次迭代 |
| 15 | 15 | */ |
| 16 | 16 | var AdjustTrip = function () { |
| 17 | - var departureClearanceAdjust = function (bcList, dataMap) { | |
| 17 | + var departureClearanceAdjust = function (carListH,bcList, dataMap,map) { | |
| 18 | 18 | var upDownbc = bcFun.getUpAndDownBc(bcList, dataMap); |
| 19 | 19 | |
| 20 | 20 | // 升序排序 |
| ... | ... | @@ -52,6 +52,329 @@ var AdjustTrip = function () { |
| 52 | 52 | } |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | + | |
| 56 | + | |
| 57 | + var departureClearanceZDY = function (carListH,bcList, dataMap,map){ | |
| 58 | + var upDownbc = bcFun.getUpAndDownBc(bcList, dataMap); | |
| 59 | + let nk = 0; | |
| 60 | + debugger | |
| 61 | + jyFCjg(upDownbc[0], dataMap, bcList, 0); | |
| 62 | + | |
| 63 | + jyFCjg(upDownbc[1], dataMap, bcList, 1); | |
| 64 | + //横向停站时间--- | |
| 65 | + //tzsjT(carListH, bcList); | |
| 66 | + //竖向判断 | |
| 67 | + //jyFCjgX(upDownbc[0], dataMap, bcList, 0, nk); | |
| 68 | + //jyFCjgX(upDownbc[1], dataMap, bcList, 1, nk); | |
| 69 | + //jyFCjgY(upDownbc[0], dataMap, bcList, 0, nk); | |
| 70 | + | |
| 71 | + //横向停站时间 | |
| 72 | + tzsj(carListH, bcList); | |
| 73 | + // 第三步 剔除营运时间外的班次 | |
| 74 | + bcList = bcFun.markFirstAndLastBusAlsoDietNotInRangeBc(bcList, dataMap,carListH); | |
| 75 | + | |
| 76 | + } | |
| 77 | + /** | |
| 78 | + * 均匀发车间隔时间 高峰时间为低谷时间的2/3 | |
| 79 | + * @param upDownbc | |
| 80 | + * @param bcList | |
| 81 | + * @param dataMap | |
| 82 | + */ | |
| 83 | + var departFcjg = function (carListH,upDownbc, bcList, dataMap){ | |
| 84 | + //排序 | |
| 85 | + upDownbc.sort(function(a,b){return DateTimeTool.getDateTime(a.fcsj)-DateTimeTool.getDateTime(b.fcsj)}); | |
| 86 | + //算出总工时 | |
| 87 | + let zgs = DateTimeTool.getDateTime(upDownbc[upDownbc.length - 1].fcsj ) - DateTimeTool.getDateTime(upDownbc[0].fcsj); | |
| 88 | + //平均发车间隙 毫秒 | |
| 89 | + let fcjx = (zgs / (upDownbc.length - 1)) - upDownbc[0].bcsj; | |
| 90 | + let k = carListH.length; | |
| 91 | + let k1 = 0; | |
| 92 | + //根据时间重新分配路牌 | |
| 93 | + for (let i = 0 ; i < upDownbc.length; i++){ | |
| 94 | + if (k1 == k) | |
| 95 | + k1 = 0; | |
| 96 | + upDownbc[i].parent = carListH[k1].parent; | |
| 97 | + upDownbc[i].lpNo = carListH[k1].lpNo; | |
| 98 | + upDownbc[i].lpName = carListH[k1].lpName; | |
| 99 | + upDownbc[i].lpType = carListH[k1].lpType; | |
| 100 | + upDownbc[i].parent = carListH[k1].lpNo; | |
| 101 | + k1 ++; | |
| 102 | + } | |
| 103 | + | |
| 104 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 105 | + //修改发车时间 | |
| 106 | + upDownbc[i + 1].fcsj = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + fcjx); | |
| 107 | + //修改到站时间 | |
| 108 | + upDownbc[i + 1].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i+1].fcsj).getTime() + upDownbc[i+1].bcsj * 60000 ); | |
| 109 | + | |
| 110 | + } | |
| 111 | + } | |
| 112 | + | |
| 113 | + //平均分配班次 | |
| 114 | + var jyFCjgX =function (upDownbc, dataMap,bcList,dir){ | |
| 115 | + | |
| 116 | + //排序 | |
| 117 | + upDownbc.sort(function(a,b){return DateTimeTool.getDateTime(a.fcsj)-DateTimeTool.getDateTime(b.fcsj)}); | |
| 118 | + //早高峰 | |
| 119 | + let zgfsjd = dataMap.zgfsjd; | |
| 120 | + //晚高峰 | |
| 121 | + let wgfsjd = dataMap.wgfsjd | |
| 122 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 123 | + /* //算出后一个班次 同一路牌下 横向发车间隔 | |
| 124 | + var bc = getLpPrevAndNextBc(bcList, upDownbc[i]), | |
| 125 | + nextBc = bc[1];*/ | |
| 126 | + | |
| 127 | + let fcsj = DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 128 | + let fcsj1 = DateTimeTool.getDateTime(upDownbc[i + 1].fcsj); | |
| 129 | + // 获取发车间隙:用发车时间判断 | |
| 130 | + let fcjxc = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i + 1].fcsj))]; | |
| 131 | + let fcjx = fcjxc.max * 60 *1000; | |
| 132 | + //早晚高峰 | |
| 133 | + if (zgfsjd[0].st.getTime() < fcsj && zgfsjd[0].ed.getTime() > fcsj){ | |
| 134 | + //修改发车时间 | |
| 135 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj.getTime()+ fcjx); | |
| 136 | + upDownbc[i].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 137 | + continue | |
| 138 | + | |
| 139 | + //晚高峰 | |
| 140 | + } else if (wgfsjd[0].st.getTime() < fcsj && wgfsjd[0].ed.getTime() > fcsj){ | |
| 141 | + //修改发车时间 | |
| 142 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj.getTime()+ fcjx); | |
| 143 | + upDownbc[i].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 144 | + continue | |
| 145 | + //平时 | |
| 146 | + }else{ | |
| 147 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj.getTime()+ fcjx); | |
| 148 | + upDownbc[i].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 149 | + continue | |
| 150 | + } | |
| 151 | + | |
| 152 | + | |
| 153 | + } | |
| 154 | + | |
| 155 | + } | |
| 156 | + | |
| 157 | + var jyFCjg =function (upDownbc, dataMap,bcList,dir){ | |
| 158 | + //排序 | |
| 159 | + upDownbc.sort(function(a,b){return DateTimeTool.getDateTime(a.fcsj)-DateTimeTool.getDateTime(b.fcsj)}); | |
| 160 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 161 | + //间隔过大的时间 | |
| 162 | + let zgs = DateTimeTool.getDateTime(upDownbc[i + 1].fcsj ) - DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 163 | + // 获取发车间隙:用发车时间判断 | |
| 164 | + var fcjxx = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i].fcsj))]; | |
| 165 | + | |
| 166 | + //最大间隔时间 | |
| 167 | + if (zgs > (fcjxx.max * 60000)){ | |
| 168 | + let fcsj = DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 169 | + let c = upDownbc[i+1]; | |
| 170 | + c.fcsj = DateTimeTool.getHHmmStr( fcsj.getTime()+ (fcjxx.max * 60000)); | |
| 171 | + c.ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 172 | + } | |
| 173 | + } | |
| 174 | + } | |
| 175 | + | |
| 176 | + | |
| 177 | + /*var jyFCjgX =function (upDownbc, dataMap,bcList,dir){ | |
| 178 | + let j = 0 ; //超时次数 | |
| 179 | + let k = 0; //超时时间 | |
| 180 | + //排序 | |
| 181 | + upDownbc.sort(function(a,b){return DateTimeTool.getDateTime(a.fcsj)-DateTimeTool.getDateTime(b.fcsj)}); | |
| 182 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 183 | + //间隔过大的时间 | |
| 184 | + let zgs = DateTimeTool.getDateTime(upDownbc[i + 1].fcsj ) - DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 185 | + // 获取发车间隙:用发车时间判断 | |
| 186 | + var fcjxx = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i].fcsj))]; | |
| 187 | + | |
| 188 | + //最大间隔时间 | |
| 189 | + if (zgs > (fcjxx.max * 60000)){ | |
| 190 | + j ++ ; | |
| 191 | + k = k + zgs; | |
| 192 | + } | |
| 193 | + } | |
| 194 | + | |
| 195 | + //算出总工时 | |
| 196 | + let zgs = DateTimeTool.getDateTime(dataMap.smbcsjArr[dir].jssj) - DateTimeTool.getDateTime(dataMap.smbcsjArr[dir].kssj); | |
| 197 | + //平均发车间隙 毫秒 | |
| 198 | + let fcjx = Math.floor(zgs / (upDownbc.length - 1)) - upDownbc[0].bcsj; | |
| 199 | + let l = k / (upDownbc.length - j - 1) | |
| 200 | + | |
| 201 | + //早高峰 | |
| 202 | + let zgfsjd = dataMap.zgfsjd; | |
| 203 | + //晚高峰 | |
| 204 | + let wgfsjd = dataMap.wgfsjd | |
| 205 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 206 | + //算出后一个班次 同一路牌下 横向发车间隔 | |
| 207 | + var bc = getLpPrevAndNextBc(bcList, upDownbc[i]), | |
| 208 | + nextBc = bc[1]; | |
| 209 | + | |
| 210 | + let fcsj = DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 211 | + let fcsj1 = DateTimeTool.getDateTime(upDownbc[i + 1].fcsj); | |
| 212 | + // 获取发车间隙:用发车时间判断 | |
| 213 | + let fcjxc = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i + 1].fcsj))]; | |
| 214 | + let fcjx = fcjxc.max * 60 *1000; | |
| 215 | + //早晚高峰 | |
| 216 | + if (zgfsjd[0].st.getTime() < fcsj && zgfsjd[0].ed.getTime() > fcsj){ | |
| 217 | + if ((fcsj1 - fcsj) < fcjx){ | |
| 218 | + //修改发车时间 | |
| 219 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()+ c); | |
| 220 | + k = k - c; | |
| 221 | + } | |
| 222 | + //晚高峰 | |
| 223 | + } else if (wgfsjd[0].st.getTime() < fcsj && wgfsjd[0].ed.getTime() > fcsj){ | |
| 224 | + if ((fcsj1 - fcsj) < fcjx){ | |
| 225 | + //修改发车时间 | |
| 226 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()+ c); | |
| 227 | + k = k - c; | |
| 228 | + } | |
| 229 | + //平时 | |
| 230 | + }else if ((fcsj1 - fcsj) < (fcjxc.min * 60 *1000)){ | |
| 231 | + upDownbc[i+1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()+ c); | |
| 232 | + k = k - c; | |
| 233 | + } | |
| 234 | + //修改对应的到站时间 | |
| 235 | + upDownbc[i].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 236 | + if (i == upDownbc.length -2 && k > 0){ | |
| 237 | + i = 1; | |
| 238 | + } | |
| 239 | + | |
| 240 | + } | |
| 241 | + | |
| 242 | + }*/ | |
| 243 | + var jyFCjgY =function (upDownbc, dataMap,bcList,dir,nk){ | |
| 244 | + let j = 0 ; //超时次数 | |
| 245 | + let k = 0; //超时时间 | |
| 246 | + //排序 | |
| 247 | + upDownbc.sort(function(a,b){return DateTimeTool.getDateTime(a.fcsj)-DateTimeTool.getDateTime(b.fcsj)}); | |
| 248 | + for (let i = 0 ; i < upDownbc.length -1; i++){ | |
| 249 | + //间隔过大的时间 | |
| 250 | + let zgs = DateTimeTool.getDateTime(upDownbc[i + 1].fcsj ) - DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 251 | + // 获取发车间隙:用发车时间判断 | |
| 252 | + var fcjxx = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i].fcsj))]; | |
| 253 | + | |
| 254 | + //最大间隔时间 | |
| 255 | + if (zgs > (fcjxx.max * 60000)){ | |
| 256 | + j ++ ; | |
| 257 | + k = k + zgs; | |
| 258 | + } | |
| 259 | + } | |
| 260 | + | |
| 261 | + //算出总工时 | |
| 262 | + let zgs = DateTimeTool.getDateTime(dataMap.smbcsjArr[dir].jssj) - DateTimeTool.getDateTime(dataMap.smbcsjArr[dir].kssj); | |
| 263 | + //平均发车间隙 毫秒 | |
| 264 | + let fcjx = Math.floor(zgs / (upDownbc.length - 1)) - upDownbc[0].bcsj; | |
| 265 | + let l = k / (upDownbc.length - j - 1) | |
| 266 | + | |
| 267 | + //早高峰 | |
| 268 | + let zgfsjd = dataMap.zgfsjd; | |
| 269 | + //晚高峰 | |
| 270 | + let wgfsjd = dataMap.wgfsjd | |
| 271 | + for (let i = upDownbc.length -1 ; i > 0; i--){ | |
| 272 | + /* if (nk != 0) | |
| 273 | + i = nk; | |
| 274 | + | |
| 275 | + if (k < 0) { | |
| 276 | + nk = i; | |
| 277 | + return | |
| 278 | + }*/ | |
| 279 | + | |
| 280 | + /* //算出后一个班次 同一路牌下 横向发车间隔 | |
| 281 | + var bc = getLpPrevAndNextBc(bcList, upDownbc[i]), | |
| 282 | + nextBc = bc[1];*/ | |
| 283 | + | |
| 284 | + let fcsj = DateTimeTool.getDateTime(upDownbc[i].fcsj); | |
| 285 | + let fcsj1 = DateTimeTool.getDateTime(upDownbc[i - 1].fcsj); | |
| 286 | + // 获取发车间隙:用发车时间判断 | |
| 287 | + let fcjxc = dataMap.fcjx[DateTimeTool.judgmentTimeQuantum(DateTimeTool.getDateTime(upDownbc[i - 1].fcsj))]; | |
| 288 | + let fcjx = fcjxc.max * 60 *1000; | |
| 289 | + //早晚高峰 | |
| 290 | + let c = (fcjx - (fcsj1 - fcsj)) / 2 ; | |
| 291 | + if (zgfsjd[0].st.getTime() < fcsj && zgfsjd[0].ed.getTime() > fcsj){ | |
| 292 | + if ((fcsj1 - fcsj) < fcjx){ | |
| 293 | + | |
| 294 | + //修改发车时间 | |
| 295 | + upDownbc[i-1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()-c); | |
| 296 | + k = k - c; | |
| 297 | + } | |
| 298 | + //晚高峰 | |
| 299 | + } else if (wgfsjd[0].st.getTime() < fcsj && wgfsjd[0].ed.getTime() > fcsj){ | |
| 300 | + if ((fcsj1 - fcsj) < fcjx){ | |
| 301 | + //修改发车时间 | |
| 302 | + upDownbc[i-1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()- c); | |
| 303 | + k = k - c; | |
| 304 | + } | |
| 305 | + //平时 | |
| 306 | + }else if ((fcsj1 - fcsj) < (fcjxc.min * 60 *1000)){ | |
| 307 | + upDownbc[i-1].fcsj = DateTimeTool.getHHmmStr( fcsj1.getTime()- c); | |
| 308 | + k = k - c; | |
| 309 | + } | |
| 310 | + //修改对应的到站时间 | |
| 311 | + upDownbc[i].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(upDownbc[i].fcsj).getTime() + upDownbc[i].bcsj * 60000); | |
| 312 | + /*if (i == upDownbc.length -2 && k > 0){ | |
| 313 | + i = 1; | |
| 314 | + }*/ | |
| 315 | + | |
| 316 | + } | |
| 317 | + | |
| 318 | + } | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + var tzsj = function(carListH,bcList){ | |
| 323 | + | |
| 324 | + | |
| 325 | + for (let cah in carListH){ | |
| 326 | + let lpbc = []; | |
| 327 | + for (var i = 0; i < bcList.length; i++) { | |
| 328 | + // 判断当期遍历的班次是否属于当前的路牌. | |
| 329 | + if (bcList[i].lpNo == carListH[cah].lpNo) { | |
| 330 | + lpbc.push(bcList[i]); | |
| 331 | + } | |
| 332 | + } | |
| 333 | + // 定义路牌编号、定义当前路牌下的所有班次. | |
| 334 | + lpbc.sort(function (a,b) { return a.fcno - b.fcno;}); | |
| 335 | + | |
| 336 | + for (let j = 0 ; j < lpbc.length - 1 ; j++){ | |
| 337 | + let zdsj = DateTimeTool.getDateTime(lpbc[j].ARRIVALTIME).getTime(); | |
| 338 | + let fcsj = DateTimeTool.getDateTime(lpbc[j].fcsj); | |
| 339 | + let fcsj1 = DateTimeTool.getDateTime(lpbc[j + 1].fcsj); | |
| 340 | + if (zdsj > fcsj1.getTime()){ | |
| 341 | + lpbc[j + 1].fcsj = lpbc[j].ARRIVALTIME; | |
| 342 | + lpbc[j + 1].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(lpbc[j + 1].fcsj).getTime() + lpbc[j + 1].bcsj * 60000); | |
| 343 | + } | |
| 344 | + } | |
| 345 | + } | |
| 346 | + } | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + var tzsjT = function(carListH,bcList){ | |
| 351 | + | |
| 352 | + | |
| 353 | + for (let cah in carListH){ | |
| 354 | + let lpbc = []; | |
| 355 | + for (var i = 0; i < bcList.length; i++) { | |
| 356 | + // 判断当期遍历的班次是否属于当前的路牌. | |
| 357 | + if (bcList[i].lpNo == carListH[cah].lpNo) { | |
| 358 | + lpbc.push(bcList[i]); | |
| 359 | + } | |
| 360 | + } | |
| 361 | + // 定义路牌编号、定义当前路牌下的所有班次. | |
| 362 | + lpbc.sort(function (a,b) { return a.fcno - b.fcno;}); | |
| 363 | + | |
| 364 | + for (let j = 0 ; j < lpbc.length - 1 ; j++){ | |
| 365 | + //不考虑别的 两个相连的班次紧凑起来 | |
| 366 | + if (j % 2 == 0){ | |
| 367 | + let zdsj = DateTimeTool.getDateTime(lpbc[j].ARRIVALTIME).getTime(); | |
| 368 | + let fcsj = DateTimeTool.getDateTime(lpbc[j].fcsj); | |
| 369 | + let fcsj1 = DateTimeTool.getDateTime(lpbc[j + 1].fcsj); | |
| 370 | + lpbc[j + 1].fcsj = lpbc[j].ARRIVALTIME; | |
| 371 | + lpbc[j + 1].ARRIVALTIME = DateTimeTool.getHHmmStr(DateTimeTool.getDateTime(lpbc[j + 1].fcsj).getTime() + lpbc[j + 1].bcsj * 60000); | |
| 372 | + } | |
| 373 | + } | |
| 374 | + } | |
| 375 | + } | |
| 376 | + | |
| 377 | + | |
| 55 | 378 | var iBcCountOfGroup = 3; // 3个班次一次参与计算 |
| 56 | 379 | var dirBcOfGroup = []; |
| 57 | 380 | var dirBcIntervalOfGroup = []; // 班次间隔列表,3个班次,2个间隔 |
| ... | ... | @@ -546,6 +869,7 @@ var AdjustTrip = function () { |
| 546 | 869 | return [prevBc, nextBc, cfBc]; |
| 547 | 870 | }; |
| 548 | 871 | return { |
| 549 | - departureClearanceAdjust : departureClearanceAdjust | |
| 872 | + departureClearanceAdjust : departureClearanceAdjust, | |
| 873 | + departureClearanceZDY : departureClearanceZDY | |
| 550 | 874 | } |
| 551 | 875 | }(); |
| 552 | 876 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v1/bcFun.js
| ... | ... | @@ -98,7 +98,8 @@ var bcFun = function() { |
| 98 | 98 | * @param jsonArray 初始化路牌下的所有班次并且已经均匀发车间隙的数组集合. |
| 99 | 99 | * @param dataMap 封装的 以上、下行方向成对存在的 一些参数数组 [下标0 -- 代表上行 ; 下标1 -- 代表下行]. |
| 100 | 100 | */ |
| 101 | - var markFirstAndLastBusAlsoDietNotInRangeBc = function(jsonArray , dataMap) { | |
| 101 | + var markFirstAndLastBusAlsoDietNotInRangeBc = function(jsonArray , dataMap,carListH) { | |
| 102 | + | |
| 102 | 103 | // 定义上、下行的正常、区间、空放、直放班次、返回数组集合. |
| 103 | 104 | var listMap = getUpAndDownBc( jsonArray , dataMap) , resultArray = new Array(); |
| 104 | 105 | for(var i = 0 ; i < listMap.length ; i++) { |
| ... | ... | @@ -106,12 +107,39 @@ var bcFun = function() { |
| 106 | 107 | // 剔除不在时间范围内的班次 |
| 107 | 108 | deleteNotInRangeBc(listMap[i] , dataMap.smbcsjArr[i].kssj, dataMap.smbcsjArr[i].jssj); |
| 108 | 109 | // 把班次顺序排序. |
| 109 | - listMap[i].sort(function(a,b){return a.fcint-b.fcint}); | |
| 110 | + listMap[i].sort(function(a,b){return a.lpNo-b.lpNo}); | |
| 110 | 111 | } |
| 111 | 112 | resultArray = resultArray.concat(listMap[i]); |
| 112 | 113 | } |
| 114 | + //横向相同方向两个班次 | |
| 115 | + if (carListH != null) { | |
| 116 | + debugger | |
| 117 | + resultArray.sort(function(a,b){return a.lpNo-b.lpNo}); | |
| 118 | + for (let cah in carListH) { | |
| 119 | + let lpbc = []; | |
| 120 | + for (var i = 0; i < resultArray.length; i++) { | |
| 121 | + // 判断当期遍历的班次是否属于当前的路牌. | |
| 122 | + if (resultArray[i].lpNo == carListH[cah].lpNo) { | |
| 123 | + lpbc.push(resultArray[i]); | |
| 124 | + resultArray.splice(i, 1); | |
| 125 | + i --; | |
| 126 | + } | |
| 127 | + } | |
| 128 | + // 定义路牌编号、定义当前路牌下的所有班次. | |
| 129 | + lpbc.sort(function (a, b) { | |
| 130 | + return a.fcsj - b.fcsj; | |
| 131 | + }); | |
| 132 | + for (let j = 0; j < lpbc.length - 1; j++) { | |
| 133 | + if (lpbc[j].xlDir == lpbc[j + 1].xlDir) { | |
| 134 | + lpbc.splice(j + 1, 1); | |
| 135 | + } | |
| 136 | + } | |
| 137 | + resultArray = resultArray.concat(lpbc); | |
| 138 | + } | |
| 139 | + } | |
| 113 | 140 | return resultArray; |
| 114 | 141 | }; |
| 142 | + | |
| 115 | 143 | /** |
| 116 | 144 | * @desription (TODO) 剔除不在时间范围内的班次. |
| 117 | 145 | * @param ar 某方向下的班次. |
| ... | ... | @@ -249,11 +277,11 @@ var bcFun = function() { |
| 249 | 277 | } else if(bc[b].isfb && b!=bc.length-1){ |
| 250 | 278 | fxdm = fxdm == 0 ? 1:0; |
| 251 | 279 | var qdbcddsj = DateTimeTool.getDateTime(bc[b].ARRIVALTIME); |
| 252 | - if(dataMap.jcsjArr[fxdm] > 0){ | |
| 280 | + /* if(dataMap.jcsjArr[fxdm] > 0){ | |
| 253 | 281 | result.push(getbcObj( |
| 254 | 282 | qdbcddsj,dataMap.jcsjArr[fxdm],car,dataMap.bcTypeArr.in_, |
| 255 | 283 | dataMap.dira[fxdm],++fcno,dataMap.jclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 进场班次 |
| 256 | - } | |
| 284 | + }*/ | |
| 257 | 285 | } |
| 258 | 286 | // dxfno = bc[b].fcno + fcno; |
| 259 | 287 | // bc[b].fcno = dxfno; |
| ... | ... | @@ -502,6 +530,9 @@ var bcFun = function() { |
| 502 | 530 | return false; |
| 503 | 531 | }; |
| 504 | 532 | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 505 | 536 | return{ |
| 506 | 537 | getbcObj : getbcObj, //封装班次属性值 |
| 507 | 538 | upDownStrConvertNum : upDownStrConvertNum, | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v1/lpFun.js
| ... | ... | @@ -195,7 +195,9 @@ var lpFun = function () { |
| 195 | 195 | bxRcList[i] = {'bx':bxRcList[i],'len':bxRcList[i].fpcls, 'ratio':Math.round(bxRcList[i].fpcls/count)} |
| 196 | 196 | } |
| 197 | 197 | for(var i=0; i<bxRcList.length; i++) { |
| 198 | - for(var j=0; j<bxRcList[i].ratio; j++) { | |
| 198 | + //重新生成的时候 | |
| 199 | + var ration = bxRcList[i].ratio != null ? bxRcList[i].ratio : bxRcList[i].bx.ratio; | |
| 200 | + for(var j=0; j<ration; j++) { | |
| 199 | 201 | mode.push(i); |
| 200 | 202 | } |
| 201 | 203 | } | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v1/scheduleInitialize.js
| ... | ... | @@ -213,7 +213,7 @@ var scheduleInitialize = function () { |
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | } |
| 216 | - var excessHours = (hoursV/60).toFixed(2) - car.hoursV, | |
| 216 | + var excessHours = ((hoursV/60) - car.hoursV).toFixed(2), | |
| 217 | 217 | dgAvgXssj = (dataMap.xssj[0][0]+dataMap.xssj[0][2]+dataMap.xssj[0][4]+dataMap.xssj[1][0]+dataMap.xssj[1][2]+dataMap.xssj[1][4])/6; |
| 218 | 218 | |
| 219 | 219 | // 抽车全在低谷,所以用低谷平均行驶时间 TODO:(分班本来需要大于3小时,现在暂时改为1小时) |
| ... | ... | @@ -726,7 +726,7 @@ var scheduleInitialize = function () { |
| 726 | 726 | arr.sort(function(m,n){return n.fcno-m.fcno}); |
| 727 | 727 | // 主站停车类型,分班班次只能主站停车 |
| 728 | 728 | if(dataMap.isMasterStop) { |
| 729 | - for(var a = 0 ; a < arr.length ; a ++) { | |
| 729 | + for(var a = 1 ; a < arr.length ; a ++) { | |
| 730 | 730 | var fcsj = DateTimeTool.getDateTime(arr[a].fcsj); |
| 731 | 731 | // 判断是否在高峰时间范围.【true--表示在,false--表示不在】. |
| 732 | 732 | if(!isPeakTimeScope(fcsj,dataMap) && fcsj > tcbcgzA[t].minsj && fcsj < tcbcgzA[t].maxsj) { |
| ... | ... | @@ -737,7 +737,7 @@ var scheduleInitialize = function () { |
| 737 | 737 | // 分班路牌需要主站停车 |
| 738 | 738 | if(sjdtype && tcbcgzA[t].minsj >= dataMap.zgfsjd[0].ed && tcbcgzA[t].maxsj <= dataMap.wgfsjd[0].st && bcFun.dirDmToIndex(arr[a-1].xlDir) == dataMap.zzfx){ |
| 739 | 739 | a++; |
| 740 | - if(isPeakTimeScope(arr[a+tcbcgzA[t].deletebcNum].fcsj,dataMap)) | |
| 740 | + if((a+tcbcgzA[t].deletebcNum) > arr.length && isPeakTimeScope(arr[a+tcbcgzA[t].deletebcNum].fcsj,dataMap)) | |
| 741 | 741 | tcbcgzA[t].deletebcNum--; |
| 742 | 742 | } |
| 743 | 743 | arr[a - 1].isfb = true; | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/v2_2/InternalScheduleObj.js
| ... | ... | @@ -224,6 +224,8 @@ var InternalScheduleObj_v2_2 = (function() { |
| 224 | 224 | |
| 225 | 225 | bcCount ++; |
| 226 | 226 | isUp = !isUp; |
| 227 | + if (bcCount > 10000) | |
| 228 | + break; | |
| 227 | 229 | } while(_kssj.isBefore(et)); |
| 228 | 230 | bcCount--; // 因为先做do,所以总的班次要减1 |
| 229 | 231 | |
| ... | ... | @@ -406,26 +408,32 @@ var InternalScheduleObj_v2_2 = (function() { |
| 406 | 408 | |
| 407 | 409 | for (i = 0; i < this._iBx_5_2_fb_lpcount - iC2; i++) { |
| 408 | 410 | iLpIndex = aNotLbIndexes[i * iC1]; |
| 409 | - this._internalLpArray[iLpIndex].setBxLb(false); | |
| 410 | - this._internalLpArray[iLpIndex].setBxFb(true); | |
| 411 | - this._internalLpArray[iLpIndex].setBxFb5_2(true); | |
| 412 | - this._internalLpArray[iLpIndex].setBxDesc("5休2分班"); | |
| 411 | + if (iLpIndex !=null) { | |
| 412 | + this._internalLpArray[iLpIndex].setBxLb(false); | |
| 413 | + this._internalLpArray[iLpIndex].setBxFb(true); | |
| 414 | + this._internalLpArray[iLpIndex].setBxFb5_2(true); | |
| 415 | + this._internalLpArray[iLpIndex].setBxDesc("5休2分班"); | |
| 416 | + } | |
| 413 | 417 | } |
| 414 | 418 | for (i = 0; i < iC2; i++) { |
| 415 | 419 | iLpIndex = aNotLbIndexes[this._iBx_5_2_fb_lpcount - iC2 + i * (iC1 + 1)]; |
| 416 | - this._internalLpArray[iLpIndex].setBxLb(false); | |
| 417 | - this._internalLpArray[iLpIndex].setBxFb(true); | |
| 418 | - this._internalLpArray[iLpIndex].setBxFb5_2(true); | |
| 419 | - this._internalLpArray[iLpIndex].setBxDesc("5休2分班"); | |
| 420 | + if (iLpIndex !=null) { | |
| 421 | + this._internalLpArray[iLpIndex].setBxLb(false); | |
| 422 | + this._internalLpArray[iLpIndex].setBxFb(true); | |
| 423 | + this._internalLpArray[iLpIndex].setBxFb5_2(true); | |
| 424 | + this._internalLpArray[iLpIndex].setBxDesc("5休2分班"); | |
| 425 | + } | |
| 420 | 426 | } |
| 421 | 427 | // 其他分班 |
| 422 | 428 | for (i = 0; i < aNotLbIndexes.length; i++) { |
| 423 | 429 | iLpIndex = aNotLbIndexes[i]; |
| 424 | - if (!this._internalLpArray[iLpIndex].isBxFb5_2()) { | |
| 425 | - this._internalLpArray[iLpIndex].setBxLb(false); | |
| 426 | - this._internalLpArray[iLpIndex].setBxFb(true); | |
| 427 | - this._internalLpArray[iLpIndex].setBxFb5_2(false); | |
| 428 | - this._internalLpArray[iLpIndex].setBxDesc("其他分班"); | |
| 430 | + if (iLpIndex !=null) { | |
| 431 | + if (!this._internalLpArray[iLpIndex].isBxFb5_2()) { | |
| 432 | + this._internalLpArray[iLpIndex].setBxLb(false); | |
| 433 | + this._internalLpArray[iLpIndex].setBxFb(true); | |
| 434 | + this._internalLpArray[iLpIndex].setBxFb5_2(false); | |
| 435 | + this._internalLpArray[iLpIndex].setBxDesc("其他分班"); | |
| 436 | + } | |
| 429 | 437 | } |
| 430 | 438 | } |
| 431 | 439 | ... | ... |
src/main/resources/static/pages/base/timesmodel/paramadd.html
| ... | ... | @@ -177,14 +177,14 @@ |
| 177 | 177 | <div class="col-md-6"> |
| 178 | 178 | <label class="control-label col-md-5">早高峰上行时间 :</label> |
| 179 | 179 | <div class="col-md-5"> |
| 180 | - <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" | |
| 180 | + <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime == null ? map.upTravelTime : map.earlyUpTime}}" id="earlyUpTime_id" | |
| 181 | 181 | placeholder="请输入早高峰上行时间"> |
| 182 | 182 | </div> |
| 183 | 183 | </div> |
| 184 | 184 | <div class="col-md-6"> |
| 185 | 185 | <label class="control-label col-md-5">早高峰下行时间 :</label> |
| 186 | 186 | <div class="col-md-5"> |
| 187 | - <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" | |
| 187 | + <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime== null ? map.downTravelTime :map.earlyDownTime}}" id="earlyDownTime_id" | |
| 188 | 188 | placeholder="请输入早高峰下行时间"> |
| 189 | 189 | </div> |
| 190 | 190 | </div> |
| ... | ... | @@ -194,14 +194,14 @@ |
| 194 | 194 | <div class="col-md-6"> |
| 195 | 195 | <label class="control-label col-md-5">晚高峰上行时间 :</label> |
| 196 | 196 | <div class="col-md-5"> |
| 197 | - <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id" | |
| 197 | + <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime == null ? map.upTravelTime :map.lateUpTime }}" id="lateUpTime_id" | |
| 198 | 198 | placeholder="请输入晚高峰上行时间"> |
| 199 | 199 | </div> |
| 200 | 200 | </div> |
| 201 | 201 | <div class="col-md-6"> |
| 202 | 202 | <label class="control-label col-md-5">晚高峰下行时间 :</label> |
| 203 | 203 | <div class="col-md-5"> |
| 204 | - <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id" | |
| 204 | + <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime== null ? map.downTravelTime :map.lateDownTime }}" id="lateDownTime_id" | |
| 205 | 205 | placeholder="请输入晚高峰下行时间"> |
| 206 | 206 | </div> |
| 207 | 207 | </div> |
| ... | ... | @@ -211,14 +211,14 @@ |
| 211 | 211 | <div class="col-md-6"> |
| 212 | 212 | <label class="control-label col-md-5">低谷上行时间 :</label> |
| 213 | 213 | <div class="col-md-5"> |
| 214 | - <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id" | |
| 214 | + <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime == null ? map.upTravelTime :map.troughUpTime}}" id="troughUpTime_id" | |
| 215 | 215 | placeholder="请输入低谷上行时间"> |
| 216 | 216 | </div> |
| 217 | 217 | </div> |
| 218 | 218 | <div class="col-md-6"> |
| 219 | 219 | <label class="control-label col-md-5">低谷下行时间 :</label> |
| 220 | 220 | <div class="col-md-5"> |
| 221 | - <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id" | |
| 221 | + <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime == null ? map.downTravelTime :map.troughDownTime }}" id="troughDownTime_id" | |
| 222 | 222 | placeholder="请输入低谷下行时间"> |
| 223 | 223 | </div> |
| 224 | 224 | </div> |
| ... | ... | @@ -425,8 +425,8 @@ |
| 425 | 425 | <script type="text/javascript"> |
| 426 | 426 | $('#paramadd_mobal').on('paramAddMobal.show', function(e, mainFun, mainFun2_2, oSchedule_v2_2){ |
| 427 | 427 | var _mainFun = mainFun; |
| 428 | - var _mainFun_v2_2 = mainFun2_2; | |
| 429 | - var _oSchedule_v2_2 = oSchedule_v2_2; | |
| 428 | + var _mainFun_v2_2 = Main_v2_2; | |
| 429 | + var _oSchedule_v2_2 = InternalScheduleObj_v2_2; | |
| 430 | 430 | |
| 431 | 431 | // 加载延迟200毫秒显示mobal |
| 432 | 432 | setTimeout(function(){$('#paramadd_mobal').modal({show : true,backdrop: 'static', keyboard: false});},200); |
| ... | ... | @@ -546,7 +546,8 @@ |
| 546 | 546 | if (ganttMap.baseRes == "2") { // v2版本 |
| 547 | 547 | data = _mainFun.BXPplaceClassesTime03(paramObj, csMap.maxCar); |
| 548 | 548 | _mainFun.exportDataConfig(data.aInternalLpObj); |
| 549 | - } else if (ganttMap.baseRes == "3") { // v2_2版本 | |
| 549 | + /* } else if (ganttMap.baseRes == "3") { // v2_2版本*/ | |
| 550 | + } else { // v2_2版本 | |
| 550 | 551 | csMap = getCSMap_v2(paramObj); |
| 551 | 552 | data = _mainFun_v2_2.BXPplaceClassesTime03(paramObj, csMap.maxCar); |
| 552 | 553 | } |
| ... | ... | @@ -915,7 +916,7 @@ |
| 915 | 916 | var _paramObj = _mainFun.getFactory().createParameterObj(map, dataMap); |
| 916 | 917 | |
| 917 | 918 | if (!_paramObj.isTwoWayStop()) { // 主站停站使用v2_2版本 |
| 918 | - map.clzs = InternalScheduleObj.calcuClzx(_paramObj); | |
| 919 | + map.clzs = InternalScheduleObj_v2_2.calcuClzx(_paramObj); | |
| 919 | 920 | } else { |
| 920 | 921 | map.clzs = _paramObj.calcuClzx(); |
| 921 | 922 | } | ... | ... |
src/main/resources/static/pages/base/timesmodel/tepms/bctype_temp.html
| ... | ... | @@ -245,14 +245,14 @@ |
| 245 | 245 | <label class="control-label col-md-1"> : </label> |
| 246 | 246 | <!-- 早高峰开始时间 (* 必填项) END --> |
| 247 | 247 | <div class="col-md-4"> |
| 248 | - <input type="text" class="form-control" name="upTravelTime1" value="{{map.troughUpTime}}" id="upTravelTimeInput1" | |
| 248 | + <input type="text" class="form-control" value="{{map.upTravelTime}}" name="upTravelTime1" id="upTravelTimeInput1" | |
| 249 | 249 | placeholder="上行行驶时间"> |
| 250 | 250 | </div> |
| 251 | 251 | </div> |
| 252 | 252 | <div class="col-md-6"> |
| 253 | 253 | <div class="col-md-5"></div> |
| 254 | 254 | <div class="col-md-5"> |
| 255 | - <input type="text" class="form-control" name="downTravelTime1" value="{{map.troughDownTime}}" id="downTravelTimeInput1" | |
| 255 | + <input type="text" class="form-control" value="{{map.downTravelTime}}" name="downTravelTime1" id="downTravelTimeInput1" | |
| 256 | 256 | placeholder="下行行驶时间"> |
| 257 | 257 | </div> |
| 258 | 258 | </div> |
| ... | ... | @@ -276,14 +276,14 @@ |
| 276 | 276 | <label class="control-label col-md-1"> : </label> |
| 277 | 277 | <!-- 表单分组组件 form-group END --> |
| 278 | 278 | <div class="col-md-4"> |
| 279 | - <input type="text" class="form-control" value="{{map.earlyUpTime}}" name="upTravelTime2" id="upTravelTimeInput2" | |
| 279 | + <input type="text" class="form-control" value="{{map.upTravelTime}}" name="upTravelTime2" id="upTravelTimeInput2" | |
| 280 | 280 | placeholder="上行行驶时间"> |
| 281 | 281 | </div> |
| 282 | 282 | </div> |
| 283 | 283 | <div class="col-md-6"> |
| 284 | 284 | <div class="col-md-5"></div> |
| 285 | 285 | <div class="col-md-5"> |
| 286 | - <input type="text" class="form-control" value="{{map.earlyDownTime}}" name="downTravelTime2" id="downTravelTimeInput2" | |
| 286 | + <input type="text" class="form-control" value="{{map.downTravelTime}}" name="downTravelTime2" id="downTravelTimeInput2" | |
| 287 | 287 | placeholder="下行行驶时间"> |
| 288 | 288 | </div> |
| 289 | 289 | </div> |
| ... | ... | @@ -306,14 +306,14 @@ |
| 306 | 306 | </div> |
| 307 | 307 | <label class="control-label col-md-1"> : </label> |
| 308 | 308 | <div class="col-md-4"> |
| 309 | - <input type="text" class="form-control" value="{{map.troughUpTime}}" name="upTravelTime3" id="upTravelTimeInput3" | |
| 309 | + <input type="text" class="form-control" value="{{map.upTravelTime}}" name="upTravelTime3" id="upTravelTimeInput3" | |
| 310 | 310 | placeholder="上行行驶时间"> |
| 311 | 311 | </div> |
| 312 | 312 | </div> |
| 313 | 313 | <div class="col-md-6"> |
| 314 | 314 | <div class="col-md-5"></div> |
| 315 | 315 | <div class="col-md-5"> |
| 316 | - <input type="text" class="form-control" value="{{map.troughDownTime}}" name="downTravelTime3" id="downTravelTimeInput3" | |
| 316 | + <input type="text" class="form-control" value="{{map.downTravelTime}}" name="downTravelTime3" id="downTravelTimeInput3" | |
| 317 | 317 | placeholder="下行行驶时间"> |
| 318 | 318 | </div> |
| 319 | 319 | </div> |
| ... | ... | @@ -336,14 +336,14 @@ |
| 336 | 336 | </div> |
| 337 | 337 | <label class="control-label col-md-1"> : </label> |
| 338 | 338 | <div class="col-md-4"> |
| 339 | - <input type="text" class="form-control" value="{{map.lateUpTime}}" name="upTravelTime4" id="upTravelTimeInput4" | |
| 339 | + <input type="text" class="form-control" value="{{map.upTravelTime}}" name="upTravelTime4" id="upTravelTimeInput4" | |
| 340 | 340 | placeholder="上行行驶时间"> |
| 341 | 341 | </div> |
| 342 | 342 | </div> |
| 343 | 343 | <div class="col-md-6"> |
| 344 | 344 | <div class="col-md-5"></div> |
| 345 | 345 | <div class="col-md-5"> |
| 346 | - <input type="text" class="form-control" value="{{map.lateDownTime}}" name="downTravelTime4" id="downTravelTimeInput4" | |
| 346 | + <input type="text" class="form-control" value="{{map.downTravelTime}}" name="downTravelTime4" id="downTravelTimeInput4" | |
| 347 | 347 | placeholder="下行行驶时间"> |
| 348 | 348 | </div> |
| 349 | 349 | </div> |
| ... | ... | @@ -366,14 +366,14 @@ |
| 366 | 366 | </div> |
| 367 | 367 | <label class="control-label col-md-1"> : </label> |
| 368 | 368 | <div class="col-md-4"> |
| 369 | - <input type="text" class="form-control" value="{{map.troughUpTime}}" name="upTravelTime5" id="upTravelTimeInput5" | |
| 369 | + <input type="text" class="form-control"value="{{map.upTravelTime}}" name="upTravelTime5" id="upTravelTimeInput5" | |
| 370 | 370 | placeholder="上行行驶时间"> |
| 371 | 371 | </div> |
| 372 | 372 | </div> |
| 373 | 373 | <div class="col-md-6"> |
| 374 | 374 | <div class="col-md-5"></div> |
| 375 | 375 | <div class="col-md-5"> |
| 376 | - <input type="text" class="form-control" value="{{map.troughDownTime}}" name="downTravelTime5" id="downTravelTimeInput5" | |
| 376 | + <input type="text" class="form-control" value="{{map.downTravelTime}}" name="downTravelTime5" id="downTravelTimeInput5" | |
| 377 | 377 | placeholder="下行行驶时间"> |
| 378 | 378 | </div> |
| 379 | 379 | </div> | ... | ... |
src/main/resources/static/pages/base/timesmodel/tepms/fcjx_temp.html
| ... | ... | @@ -126,14 +126,14 @@ |
| 126 | 126 | <div class="col-md-6"> |
| 127 | 127 | <label class="control-label col-md-5">早高峰上行时间 :</label> |
| 128 | 128 | <div class="col-md-5"> |
| 129 | - <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" | |
| 129 | + <input type="text" class="form-control" name="earlyUpTime" value="{{map.upTravelTime}}" id="earlyUpTime_id" | |
| 130 | 130 | placeholder="请输入早高峰上行时间"> |
| 131 | 131 | </div> |
| 132 | 132 | </div> |
| 133 | 133 | <div class="col-md-6"> |
| 134 | 134 | <label class="control-label col-md-5">早高峰下行时间 :</label> |
| 135 | 135 | <div class="col-md-5"> |
| 136 | - <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" | |
| 136 | + <input type="text" class="form-control" name="earlyDownTime" value="{{map.downTravelTime}}" id="earlyDownTime_id" | |
| 137 | 137 | placeholder="请输入早高峰下行时间"> |
| 138 | 138 | </div> |
| 139 | 139 | </div> |
| ... | ... | @@ -143,14 +143,14 @@ |
| 143 | 143 | <div class="col-md-6"> |
| 144 | 144 | <label class="control-label col-md-5">晚高峰上行时间 :</label> |
| 145 | 145 | <div class="col-md-5"> |
| 146 | - <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id" | |
| 146 | + <input type="text" class="form-control" name="lateUpTime" value="{{map.upTravelTime}}" id="lateUpTime_id" | |
| 147 | 147 | placeholder="请输入晚高峰上行时间"> |
| 148 | 148 | </div> |
| 149 | 149 | </div> |
| 150 | 150 | <div class="col-md-6"> |
| 151 | 151 | <label class="control-label col-md-5">晚高峰下行时间 :</label> |
| 152 | 152 | <div class="col-md-5"> |
| 153 | - <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id" | |
| 153 | + <input type="text" class="form-control" name="lateDownTime" value="{{map.downTravelTime}}" id="lateDownTime_id" | |
| 154 | 154 | placeholder="请输入晚高峰下行时间"> |
| 155 | 155 | </div> |
| 156 | 156 | </div> |
| ... | ... | @@ -160,14 +160,14 @@ |
| 160 | 160 | <div class="col-md-6"> |
| 161 | 161 | <label class="control-label col-md-5">低谷上行时间 :</label> |
| 162 | 162 | <div class="col-md-5"> |
| 163 | - <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id" | |
| 163 | + <input type="text" class="form-control" name="troughUpTime" value="{{map.upTravelTime}}" id="troughUpTime_id" | |
| 164 | 164 | placeholder="请输入低谷上行时间"> |
| 165 | 165 | </div> |
| 166 | 166 | </div> |
| 167 | 167 | <div class="col-md-6"> |
| 168 | 168 | <label class="control-label col-md-5">低谷下行时间 :</label> |
| 169 | 169 | <div class="col-md-5"> |
| 170 | - <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id" | |
| 170 | + <input type="text" class="form-control" name="troughDownTime" value="{{map.downTravelTime}}" id="troughDownTime_id" | |
| 171 | 171 | placeholder="请输入低谷下行时间"> |
| 172 | 172 | </div> |
| 173 | 173 | </div> |
| ... | ... | @@ -237,24 +237,24 @@ |
| 237 | 237 | <div class="col-md-6"> |
| 238 | 238 | <label class="control-label col-md-5"><span class="required"> * </span>早高峰发车间隔 :</label> |
| 239 | 239 | <div class="col-md-3" style="padding-right: 0px;"> |
| 240 | - <input type="text" class="form-control" name="zgffcjxmin" id="zgffcjxmin_id" | |
| 240 | + <input type="text" class="form-control" value="8" name="zgffcjxmin" id="zgffcjxmin_id" | |
| 241 | 241 | placeholder="最小间隔"> |
| 242 | 242 | </div> |
| 243 | 243 | <div class="col-md-1" style="padding-top: 10px; font-size: 85%;">至</div> |
| 244 | 244 | <div class="col-md-3" style="padding-left: 0px;"> |
| 245 | - <input type="text" class="form-control" name="zgffcjxmax" id="zgffcjxmax_id" | |
| 245 | + <input type="text" class="form-control" value="8" name="zgffcjxmax" id="zgffcjxmax_id" | |
| 246 | 246 | placeholder="最大间隔"> |
| 247 | 247 | </div> |
| 248 | 248 | </div> |
| 249 | 249 | <div class="col-md-6"> |
| 250 | 250 | <label class="control-label col-md-5"><span class="required"> * </span>晚高峰发车间隔 :</label> |
| 251 | 251 | <div class="col-md-3" style="padding-right: 0px;"> |
| 252 | - <input type="text" class="form-control" name="wffcjxmin" id="wffcjxmin_id" | |
| 252 | + <input type="text" class="form-control" value="8" name="wffcjxmin" id="wffcjxmin_id" | |
| 253 | 253 | placeholder="最小间隔"> |
| 254 | 254 | </div> |
| 255 | 255 | <div class="col-md-1" style="padding-top: 10px; font-size: 85%;">至</div> |
| 256 | 256 | <div class="col-md-3" style="padding-left: 0px;"> |
| 257 | - <input type="text" class="form-control" name="wffcjxmax" id="wffcjxmax_id" | |
| 257 | + <input type="text" class="form-control" value="8" name="wffcjxmax" id="wffcjxmax_id" | |
| 258 | 258 | placeholder="最大间隔"> |
| 259 | 259 | </div> |
| 260 | 260 | </div> |
| ... | ... | @@ -264,19 +264,19 @@ |
| 264 | 264 | <div class="col-md-6"> |
| 265 | 265 | <label class="control-label col-md-5"><span class="required"> * </span>低谷发车间隔 :</label> |
| 266 | 266 | <div class="col-md-3" style="padding-right: 0px;"> |
| 267 | - <input type="text" class="form-control" name="dgfcjxmin" id="dgfcjxmin_id" | |
| 267 | + <input type="text" class="form-control" value="10" name="dgfcjxmin" id="dgfcjxmin_id" | |
| 268 | 268 | placeholder="最小间隔"> |
| 269 | 269 | </div> |
| 270 | 270 | <div class="col-md-1" style="padding-top: 10px; font-size: 85%;">至</div> |
| 271 | 271 | <div class="col-md-3" style="padding-left: 0px;"> |
| 272 | - <input type="text" class="form-control" name="dgfcjxmax" id="dgfcjxmax_id" | |
| 272 | + <input type="text" class="form-control" value="20" name="dgfcjxmax" id="dgfcjxmax_id" | |
| 273 | 273 | placeholder="最大间隔"> |
| 274 | 274 | </div> |
| 275 | 275 | </div> |
| 276 | 276 | <div class="col-md-6"> |
| 277 | 277 | <label class="control-label col-md-5"><span class="required"> * </span>建议加班路牌数 :</label> |
| 278 | 278 | <div class="col-md-5"> |
| 279 | - <input type="text" class="form-control" name="jbclcount" id="jbclcount_id" | |
| 279 | + <input type="text" class="form-control" value="0" name="jbclcount" id="jbclcount_id" | |
| 280 | 280 | placeholder="为0表示是周末时刻表"> |
| 281 | 281 | </div> |
| 282 | 282 | </div> |
| ... | ... | @@ -323,7 +323,7 @@ |
| 323 | 323 | <label class="control-label col-md-5"> |
| 324 | 324 | <span class="required"> * </span> 建议高峰配车数 :</label> |
| 325 | 325 | <div class="col-md-5"> |
| 326 | - <input type="text" class="form-control" placeholder="车辆数" name="gfjypcs" id="gfjypcsInput" min="1"> | |
| 326 | + <input type="text" class="form-control" value="1" placeholder="车辆数" name="gfjypcs" id="gfjypcsInput" min="1"> | |
| 327 | 327 | </div> |
| 328 | 328 | </div> |
| 329 | 329 | ... | ... |
src/main/resources/static/pages/permission/authorize_all/user_auth.html
| ... | ... | @@ -36,6 +36,7 @@ |
| 36 | 36 | <li><label><input class="uk-checkbox" type="checkbox" data-event="cache_data_manage"> 缓存数据管理</label></li> |
| 37 | 37 | <li><label><input class="uk-checkbox" type="checkbox" data-event="history_sch_maintain"> 历史路单维护</label></li> |
| 38 | 38 | <li><label><input class="uk-checkbox" type="checkbox" data-event="sch_edit_info"> 班次修正日志</label></li> |
| 39 | + <li><label><input class="uk-checkbox" type="checkbox" data-event="sch_edit_qjgz"> 请假故障清单</label></li> | |
| 39 | 40 | </ul> |
| 40 | 41 | </div> |
| 41 | 42 | ... | ... |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
src/main/resources/static/real_control_v2/js/north/toolbar.js
| ... | ... | @@ -253,6 +253,10 @@ var gb_northToolbar = (function () { |
| 253 | 253 | form_loggerr_zndd: function () { |
| 254 | 254 | gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/zndd/logger_zndd.html', '智能调度执行记录'); |
| 255 | 255 | }, |
| 256 | + | |
| 257 | + sch_edit_qjgz: function () { | |
| 258 | + open_modal('/real_control_v2/zndd/qjgz/list.html', {}, modal_opts); | |
| 259 | + }, | |
| 256 | 260 | }; |
| 257 | 261 | |
| 258 | 262 | return { | ... | ... |
src/main/resources/static/real_control_v2/js/zndd/data_zndd.js
| ... | ... | @@ -123,7 +123,6 @@ var gb_dataZndd = (function (){ |
| 123 | 123 | alt_confirm(content, function () { |
| 124 | 124 | gb_common.$post('/realSchedule/revokeRealOutgo_zndd', { |
| 125 | 125 | id: that.data('id'), |
| 126 | - remarks:"_智能调度-异常实发", | |
| 127 | 126 | }, function (rs) { |
| 128 | 127 | gb_schedule_table.updateSchedule(rs.ts); |
| 129 | 128 | notify_succ('撤销实发操作成功!'); | ... | ... |
src/main/resources/static/real_control_v2/zndd/qjgz/list.html
0 → 100644
| 1 | +<div class="uk-modal" id="report-80-modal"> | |
| 2 | + <div class="uk-modal-dialog" style="width: 1260px;"> | |
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | |
| 4 | + <div class="uk-modal-header"> | |
| 5 | + <h2>人员请假车辆故障清单</h2></div> | |
| 6 | + | |
| 7 | + <div class="uk-panel uk-panel-box uk-panel-box-primary"> | |
| 8 | + <form class="uk-form search-form"> | |
| 9 | + <fieldset data-uk-margin> | |
| 10 | + <span class="horizontal-field">线路</span> | |
| 11 | + <select name="lineId" style="width: 140px;"></select> | |
| 12 | + <span class="horizontal-field">车辆</span> | |
| 13 | + <div class="uk-autocomplete uk-form autocomplete-cars" > | |
| 14 | + <input type="text" name="nbbm" placeholder="车辆自编号"> | |
| 15 | + </div> | |
| 16 | + | |
| 17 | + <button class="uk-button">检索</button> | |
| 18 | + </fieldset> | |
| 19 | + </form> | |
| 20 | + </div> | |
| 21 | + <div style="height: 495px;margin:5px 0 -18px;"> | |
| 22 | + <table class="ct-fixed-table uk-table uk-table-hover"> | |
| 23 | + <thead> | |
| 24 | + <tr> | |
| 25 | + <th style="width: 10%;">线路</th> | |
| 26 | + <th style="width: 10%;">车辆</th> | |
| 27 | + <th style="width: 10%;">人员</th> | |
| 28 | + <th style="width: 10%;">请假类型</th> | |
| 29 | + <th style="width: 15%;">时间</th> | |
| 30 | + <th style="width: 35%;">处理方式</th> | |
| 31 | + </tr> | |
| 32 | + </thead> | |
| 33 | + <tbody> | |
| 34 | + </tbody> | |
| 35 | + </table> | |
| 36 | + </div> | |
| 37 | + <div class="uk-modal-footer uk-text-right pagination-wrap"> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + | |
| 41 | + <script id="qjqz-modal-table-temp" type="text/html"> | |
| 42 | + {{each list as obj i}} | |
| 43 | + <tr> | |
| 44 | + <td>{{obj.lineName}}</td> | |
| 45 | + <td>{{obj.clZbh}}</td> | |
| 46 | + <td>{{obj.jGh}}</td> | |
| 47 | + <td> | |
| 48 | + {{if obj.qjType == 0}} | |
| 49 | + 短假 | |
| 50 | + {{else}} | |
| 51 | + 长假 | |
| 52 | + {{/if}} | |
| 53 | + </td> | |
| 54 | + <td>{{obj.rq}}</td> | |
| 55 | + <td > | |
| 56 | + {{if obj.qjType == 0}} | |
| 57 | + <button class="uk-button" id = "pllbon" data-id="{{obj.id}}"> 批量烂班</button> | |
| 58 | + <button class="uk-button" id = "hrhc" data-id="{{obj.id}}"> 批量换人换车</button> | |
| 59 | + <button class="uk-button" id ="lp_change" data-id="{{obj.id}}"> 路牌对调</button> | |
| 60 | + <button class="uk-button" id ="cxlb" data-id="{{obj.id}}"> 恢复烂班</button> | |
| 61 | + {{else}} | |
| 62 | + 计划调度 -> 调度执勤日报 | |
| 63 | + {{/if}} | |
| 64 | + </td> | |
| 65 | + </tr> | |
| 66 | + {{/each}} | |
| 67 | + </script> | |
| 68 | + | |
| 69 | + <script> | |
| 70 | + (function() { | |
| 71 | + var modal = '#report-80-modal'; | |
| 72 | + var form = $('.search-form', modal); | |
| 73 | + var page = 0; | |
| 74 | + var pageSize = 12; | |
| 75 | + var datas; | |
| 76 | + //线路下拉框 | |
| 77 | + var opts = '<option value="">全部</option>'; | |
| 78 | + $.each(gb_data_basic.activeLines, function () { | |
| 79 | + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>'; | |
| 80 | + }); | |
| 81 | + $('[name=lineId]', form).html(opts); | |
| 82 | + | |
| 83 | + $(modal).on('init', function(e, data) { | |
| 84 | + e.stopPropagation(); | |
| 85 | + query(); | |
| 86 | + }); | |
| 87 | + | |
| 88 | + //sumit event | |
| 89 | + form.on('submit', function(e) { | |
| 90 | + e.preventDefault(); | |
| 91 | + resetPagination = true; | |
| 92 | + page=0; | |
| 93 | + query(); | |
| 94 | + }); | |
| 95 | + var modal_opts = { | |
| 96 | + center: false, | |
| 97 | + bgclose: false | |
| 98 | + } | |
| 99 | + | |
| 100 | + | |
| 101 | + var folder = '/real_control_v2/fragments/line_schedule/context_menu'; | |
| 102 | + var query = function() { | |
| 103 | + var data = form.serializeJSON(); | |
| 104 | + data.page = page; | |
| 105 | + data.size = pageSize; | |
| 106 | + $.get('/znnd_lb', data, function(rs) { | |
| 107 | + | |
| 108 | + datas = rs.content; | |
| 109 | + | |
| 110 | + var bodyHtml = template('qjqz-modal-table-temp', { | |
| 111 | + list: datas | |
| 112 | + }); | |
| 113 | + | |
| 114 | + $('table tbody', modal).html(bodyHtml); | |
| 115 | + | |
| 116 | + //pagination | |
| 117 | + if (resetPagination) | |
| 118 | + pagination(rs.totalPages, rs.page); | |
| 119 | + //烂班 | |
| 120 | + $("#pllbon").on('click',function(e){ | |
| 121 | + debugger | |
| 122 | + var id = $(this).data('id'); | |
| 123 | + let datans = returndatas(id,datas); | |
| 124 | + $.get('/znnd_lb/lineCar', datans, function(rs) { | |
| 125 | + open_modal(folder + '/jhlb.html', { | |
| 126 | + sch: rs | |
| 127 | + }, modal_opts); | |
| 128 | + }); | |
| 129 | + }) | |
| 130 | + | |
| 131 | + | |
| 132 | + //换人换车 | |
| 133 | + $("#hrhc").on('click',function(e){ | |
| 134 | + var id = $(this).data('id'); | |
| 135 | + let datans = returndatas(id,datas); | |
| 136 | + debugger | |
| 137 | + $.get('/znnd_lb/lineCar', datans, function(rs) { | |
| 138 | + open_modal(folder + '/tzrc.html', { | |
| 139 | + sch: rs | |
| 140 | + }, modal_opts); | |
| 141 | + }); | |
| 142 | + | |
| 143 | + }) | |
| 144 | + //路牌对调 | |
| 145 | + $("#lp_change").on('click',function(e){ | |
| 146 | + var id = $(this).data('id'); | |
| 147 | + let datans = returndatas(id,datas); | |
| 148 | + | |
| 149 | + $.get('/znnd_lb/lineCar', datans, function(rs) { | |
| 150 | + open_modal(folder + '/lp_change.html', { | |
| 151 | + sch: rs | |
| 152 | + }, modal_opts); | |
| 153 | + }); | |
| 154 | + }); | |
| 155 | + | |
| 156 | + | |
| 157 | + $("#cxlb").on('click',function(e){ | |
| 158 | + | |
| 159 | + var id = $(this).data('id'); | |
| 160 | + let datans = returndatas(id,datas); | |
| 161 | + | |
| 162 | + var content = '<h3>确定要撤销<span style="color:red;margin: 0 5px;">' + datans.clZbh + '</span>所有的的烂班设置?</h3>' | |
| 163 | + alt_confirm(content, function () { | |
| 164 | + gb_common.$post('/znnd_lb/cxlb',datans, function (rs) { | |
| 165 | + debugger | |
| 166 | + if(rs.status!= null && rs.status == "SUCCESS"){ | |
| 167 | + for(var sc in rs.list){ | |
| 168 | + gb_schedule_table.updateSchedule(rs.list[sc]); | |
| 169 | + } | |
| 170 | + notify_succ('撤销烂班操作成功!'); | |
| 171 | + //calc 应发未发 | |
| 172 | + gb_schedule_table.calc_yfwf_num(datans.lineCode); | |
| 173 | + }else { | |
| 174 | + notify_err('无烂班班次可撤销,撤销失败!'); | |
| 175 | + } | |
| 176 | + }); | |
| 177 | + }, '确认撤销'); | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + }); | |
| 182 | + | |
| 183 | + | |
| 184 | + }) | |
| 185 | + }; | |
| 186 | + | |
| 187 | + | |
| 188 | + function returndatas(id,datas){ | |
| 189 | + let datans; | |
| 190 | + for (var t in datas){ | |
| 191 | + if(id == datas[t].id){ | |
| 192 | + datans = datas[t]; | |
| 193 | + } | |
| 194 | + } | |
| 195 | + return datans; | |
| 196 | + } | |
| 197 | + var resetPagination = true; | |
| 198 | + var pagination = function(pages, currentPage) { | |
| 199 | + var wrap = $('.pagination-wrap', modal).empty() | |
| 200 | + ,e = $('<ul class="uk-pagination"></ul>').appendTo(wrap); | |
| 201 | + | |
| 202 | + var pagination = UIkit.pagination(e, { | |
| 203 | + pages: pages, | |
| 204 | + currentPage: currentPage | |
| 205 | + }); | |
| 206 | + | |
| 207 | + e.on('select.uk.pagination', function(e, pageIndex){ | |
| 208 | + page = pageIndex; | |
| 209 | + query(); | |
| 210 | + }); | |
| 211 | + | |
| 212 | + resetPagination = false; | |
| 213 | + } | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + })(); | |
| 218 | + </script> | |
| 219 | +</div> | ... | ... |
src/main/resources/static/real_control_v2/zndd/type/djg1.html
| ... | ... | @@ -119,7 +119,7 @@ |
| 119 | 119 | var st_doms = gb_schedule_context_menu.get_add_sch_doms_v2(); |
| 120 | 120 | |
| 121 | 121 | |
| 122 | - $.post('/realSchedule/thissch/'+sch.sch.id, function(res) { | |
| 122 | + $.post('/logZndd/thissch/'+sch.sch.id, function(res) { | |
| 123 | 123 | |
| 124 | 124 | //normal |
| 125 | 125 | $('.normalCont', modal).html(st_doms.normal_dom) | ... | ... |
src/main/resources/static/real_control_v2/zndd/type/mz.html
| ... | ... | @@ -77,7 +77,7 @@ |
| 77 | 77 | |
| 78 | 78 | var st_doms = gb_schedule_context_menu.get_add_sch_doms_v2(); |
| 79 | 79 | |
| 80 | - $.post('/znddLogger/thissch/'+sch.ids, function(res) { | |
| 80 | + $.post('/logZndd/thissch/'+sch.ids, function(res) { | |
| 81 | 81 | //to and fro |
| 82 | 82 | $('.toAndFroCont', modal).html(st_doms.two_way_dom) |
| 83 | 83 | .trigger('init', {sch: res, submitFun: submit_temp_schedule_form, stationRoutes: stationRoutes}); |
| ... | ... | @@ -445,7 +445,7 @@ |
| 445 | 445 | </div> |
| 446 | 446 | </div> |
| 447 | 447 | <div class="uk-grid"> |
| 448 | - | |
| 448 | + | |
| 449 | 449 | <div class="uk-width-1-1"> |
| 450 | 450 | <div class="uk-form-row"> |
| 451 | 451 | <label class="uk-form-label">车内视频:</label> | ... | ... |
src/main/resources/static/real_control_v2/zndd/type/sftz_1.html
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | var modal = '#sftz-addsch-modal', |
| 12 | 12 | sch, stationRoutes, parks, information, carsArray, st_park_data,conf; |
| 13 | 13 | var f = $('.uk-form-horizontal', modal); |
| 14 | + var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}]; | |
| 14 | 15 | |
| 15 | 16 | $(modal).on('init', function (e, data) { |
| 16 | 17 | e.stopPropagation(); |
| ... | ... | @@ -24,7 +25,7 @@ |
| 24 | 25 | let route = stationRoutes[sch.xlDir]; |
| 25 | 26 | sch.startStation = route[0]; |
| 26 | 27 | sch.stopStation = route[route.length - 1]; |
| 27 | - var formHtml = template('sftz-form-temp', sch); | |
| 28 | + var formHtml = template('sftz-form-temp',{sch: sch, reportTypes:reportTypes}); | |
| 28 | 29 | $('form', modal).html(formHtml); |
| 29 | 30 | |
| 30 | 31 | //frequent_phrases.init(modal); |
| ... | ... | @@ -42,6 +43,8 @@ |
| 42 | 43 | id: sch.sch.id, |
| 43 | 44 | remarks:"_自动调度实发未发-车辆掉线", |
| 44 | 45 | fcsjActual:data.fcsjActual, |
| 46 | + reportTypes : data.reportTypes.join(";"), | |
| 47 | + clZbh:sch.sch.clZbh, | |
| 45 | 48 | }, function (rs) { |
| 46 | 49 | gb_schedule_table.updateSchedule(rs.ts); |
| 47 | 50 | notify_succ('实发未发操作成功!'); |
| ... | ... | @@ -145,7 +148,7 @@ |
| 145 | 148 | |
| 146 | 149 | |
| 147 | 150 | <script id="sftz-form-temp" type="text/html"> |
| 148 | - <input type="hidden" name="id" value=""/> | |
| 151 | + <input type="hidden" name="sch.id" value=""/> | |
| 149 | 152 | |
| 150 | 153 | <div class="uk-grid"> |
| 151 | 154 | <div class="uk-width-4-2"> |
| ... | ... | @@ -157,14 +160,14 @@ |
| 157 | 160 | <div class="uk-grid"> |
| 158 | 161 | <div class="uk-width-4-2"> |
| 159 | 162 | <div class="uk-form-row"> |
| 160 | - <label class="uk-form-labels" >{{lineName}} {{startStation.stationName}} -> {{stopStation.stationName}}方向 的 {{clzbh}} 出现实发异常</label> | |
| 163 | + <label class="uk-form-labels" >{{sch.lineName}} {{sch.startStation.stationName}} -> {{sch.stopStation.stationName}}方向 的 {{sch.clzbh}} 出现实发异常</label> | |
| 161 | 164 | </div> |
| 162 | 165 | </div> |
| 163 | 166 | </div> |
| 164 | 167 | <div class="uk-grid"> |
| 165 | 168 | <div class="uk-width-1-1"> |
| 166 | 169 | <div class="uk-form-row"> |
| 167 | - <label class="uk-form-labels">待发时间 {{sch.fcsj}}-> 实发时间 {{sch.fcsjActual}}</label> | |
| 170 | + <label class="uk-form-labels">待发时间 {{sch.sch.fcsj}}-> 实发时间 {{sch.sch.fcsjActual}}</label> | |
| 168 | 171 | |
| 169 | 172 | </div> |
| 170 | 173 | </div> |
| ... | ... | @@ -191,7 +194,7 @@ |
| 191 | 194 | <div class="uk-form-row"> |
| 192 | 195 | <label class="uk-form-label">线路名称</label> |
| 193 | 196 | <div class="uk-form-controls"> |
| 194 | - <input value="{{sch.xlName}}" disabled> | |
| 197 | + <input value="{{sch.sch.xlName}}" disabled> | |
| 195 | 198 | </div> |
| 196 | 199 | </div> |
| 197 | 200 | </div> |
| ... | ... | @@ -199,7 +202,7 @@ |
| 199 | 202 | <div class="uk-form-row"> |
| 200 | 203 | <label class="uk-form-label">线路名称</label> |
| 201 | 204 | <div class="uk-form-controls"> |
| 202 | - <input value="{{sch.xlName}}" disabled> | |
| 205 | + <input value="{{sch.sch.xlName}}" disabled> | |
| 203 | 206 | </div> |
| 204 | 207 | </div> |
| 205 | 208 | </div> |
| ... | ... | @@ -209,7 +212,7 @@ |
| 209 | 212 | <div class="uk-form-row"> |
| 210 | 213 | <label class="uk-form-label">待发时间</label> |
| 211 | 214 | <div class="uk-form-controls"> |
| 212 | - <input value="{{sch.dfsj}}" disabled> | |
| 215 | + <input value="{{sch.sch.dfsj}}" disabled> | |
| 213 | 216 | </div> |
| 214 | 217 | </div> |
| 215 | 218 | </div> |
| ... | ... | @@ -217,7 +220,7 @@ |
| 217 | 220 | <div class="uk-form-row"> |
| 218 | 221 | <label class="uk-form-label">待发时间</label> |
| 219 | 222 | <div class="uk-form-controls"> |
| 220 | - <input value="{{sch.dfsj}}" disabled> | |
| 223 | + <input value="{{sch.sch.dfsj}}" disabled> | |
| 221 | 224 | </div> |
| 222 | 225 | </div> |
| 223 | 226 | </div> |
| ... | ... | @@ -227,7 +230,7 @@ |
| 227 | 230 | <div class="uk-form-row"> |
| 228 | 231 | <label class="uk-form-label">实发时间</label> |
| 229 | 232 | <div class="uk-form-controls"> |
| 230 | - <input value="{{sch.fcsjActual}}" disabled> | |
| 233 | + <input value="{{sch.sch.fcsjActual}}" disabled> | |
| 231 | 234 | </div> |
| 232 | 235 | </div> |
| 233 | 236 | </div> |
| ... | ... | @@ -235,7 +238,7 @@ |
| 235 | 238 | <div class="uk-form-row"> |
| 236 | 239 | <label class="uk-form-label">实发时间</label> |
| 237 | 240 | <div class="uk-form-controls"> |
| 238 | - <input type="time" value="{{sch.fcsj}}" name="fcsjActual"> | |
| 241 | + <input type="time" value="{{sch.sch.fcsj}}" name="fcsjActual"> | |
| 239 | 242 | </div> |
| 240 | 243 | </div> |
| 241 | 244 | </div> |
| ... | ... | @@ -245,7 +248,7 @@ |
| 245 | 248 | <div class="uk-form-row"> |
| 246 | 249 | <label class="uk-form-label">车辆</label> |
| 247 | 250 | <div class="uk-form-controls"> |
| 248 | - <input value="{{sch.clZbh}}" disabled> | |
| 251 | + <input value="{{sch.sch.clZbh}}" disabled> | |
| 249 | 252 | </div> |
| 250 | 253 | </div> |
| 251 | 254 | </div> |
| ... | ... | @@ -253,7 +256,7 @@ |
| 253 | 256 | <div class="uk-form-row"> |
| 254 | 257 | <label class="uk-form-label">车辆</label> |
| 255 | 258 | <div class="uk-form-controls"> |
| 256 | - <input value="{{sch.clZbh}}" disabled> | |
| 259 | + <input value="{{sch.sch.clZbh}}" disabled> | |
| 257 | 260 | </div> |
| 258 | 261 | </div> |
| 259 | 262 | </div> |
| ... | ... | @@ -263,7 +266,7 @@ |
| 263 | 266 | <div class="uk-form-row"> |
| 264 | 267 | <label class="uk-form-label">路牌</label> |
| 265 | 268 | <div class="uk-form-controls"> |
| 266 | - <input value="{{sch.lpName}}" disabled> | |
| 269 | + <input value="{{sch.sch.lpName}}" disabled> | |
| 267 | 270 | </div> |
| 268 | 271 | </div> |
| 269 | 272 | </div> |
| ... | ... | @@ -271,7 +274,7 @@ |
| 271 | 274 | <div class="uk-form-row"> |
| 272 | 275 | <label class="uk-form-label">路牌</label> |
| 273 | 276 | <div class="uk-form-controls"> |
| 274 | - <input value="{{sch.lpName}}" disabled> | |
| 277 | + <input value="{{sch.sch.lpName}}" disabled> | |
| 275 | 278 | </div> |
| 276 | 279 | </div> |
| 277 | 280 | </div> |
| ... | ... | @@ -283,7 +286,7 @@ |
| 283 | 286 | <div class="uk-form-row"> |
| 284 | 287 | <label class="uk-form-label">备注</label> |
| 285 | 288 | <div class="uk-form-controls"> |
| 286 | - <input value="{{sch.remarks}}" disabled> | |
| 289 | + <input value="{{sch.sch.remarks}}" disabled> | |
| 287 | 290 | </div> |
| 288 | 291 | </div> |
| 289 | 292 | </div> |
| ... | ... | @@ -298,6 +301,23 @@ |
| 298 | 301 | </div> |
| 299 | 302 | |
| 300 | 303 | |
| 304 | + <div class="uk-grid"> | |
| 305 | + <div class="uk-width-1-1"> | |
| 306 | + <div class="uk-form-row"> | |
| 307 | + <label class="uk-form-label" >上报类型</label> | |
| 308 | + <div class="uk-form-controls report-type-checkbox-list"> | |
| 309 | + {{each reportTypes as report i}} | |
| 310 | + <label> | |
| 311 | + <input class="i-cbox" name="reportTypes[]" value="{{report.code}}" type="checkbox" title="{{report.name}}"> | |
| 312 | + {{report.name}} | |
| 313 | + </label> | |
| 314 | + {{/each}} | |
| 315 | + </div> | |
| 316 | + </div> | |
| 317 | + </div> | |
| 318 | + </div> | |
| 319 | + | |
| 320 | + | |
| 301 | 321 | <!-- <div class="uk-grid"> |
| 302 | 322 | <div class="uk-width-4-2"> |
| 303 | 323 | <div class="uk-form-row"> | ... | ... |