Commit 8ac2b4cddaf7edfc11a0fe2d52585d082fbd693c
1 parent
dd39e319
update...
Showing
1 changed file
with
18 additions
and
4 deletions
src/main/java/com/bsth/data/schedule/auto_exec/RealScheduleAutoExecHandler.java
| 1 | package com.bsth.data.schedule.auto_exec; | 1 | package com.bsth.data.schedule.auto_exec; |
| 2 | 2 | ||
| 3 | +import com.bsth.data.gpsdata.status_manager.GpsStatusManager; | ||
| 3 | import com.bsth.data.schedule.DayOfSchedule; | 4 | import com.bsth.data.schedule.DayOfSchedule; |
| 4 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 5 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 5 | import com.bsth.websocket.handler.SendUtils; | 6 | import com.bsth.websocket.handler.SendUtils; |
| @@ -21,6 +22,8 @@ public class RealScheduleAutoExecHandler { | @@ -21,6 +22,8 @@ public class RealScheduleAutoExecHandler { | ||
| 21 | @Autowired | 22 | @Autowired |
| 22 | DayOfSchedule dayOfSchedule; | 23 | DayOfSchedule dayOfSchedule; |
| 23 | 24 | ||
| 25 | + @Autowired | ||
| 26 | + GpsStatusManager gpsStatusManager; | ||
| 24 | 27 | ||
| 25 | public void exec(ScheduleRealInfo sch) { | 28 | public void exec(ScheduleRealInfo sch) { |
| 26 | boolean flag = false; | 29 | boolean flag = false; |
| @@ -33,13 +36,24 @@ public class RealScheduleAutoExecHandler { | @@ -33,13 +36,24 @@ public class RealScheduleAutoExecHandler { | ||
| 33 | 36 | ||
| 34 | if (sch.getZdsjT() < t) { | 37 | if (sch.getZdsjT() < t) { |
| 35 | sch.setZdsjActualAll(sch.getZdsjT()); | 38 | sch.setZdsjActualAll(sch.getZdsjT()); |
| 36 | - ScheduleRealInfo next = dayOfSchedule.nextByLp(sch); | ||
| 37 | - if (null != next) { | ||
| 38 | - next.setQdzArrDatesj(sch.getZdsjActual()); | 39 | + |
| 40 | + //准备执行下一个班次 | ||
| 41 | + ScheduleRealInfo next = dayOfSchedule.next(sch); | ||
| 42 | + if (next != null) { | ||
| 43 | + //套跑 -下发线路切换指令 | ||
| 44 | + if(!next.getXlBm().equals(sch.getXlBm())){ | ||
| 45 | + gpsStatusManager.changeLine(next.getClZbh(), next.getXlBm(), "套跑@系统"); | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + //路牌的下一个班次,线调页面显示 | ||
| 50 | + ScheduleRealInfo nextLp = dayOfSchedule.nextByLp(sch); | ||
| 51 | + if (null != nextLp) { | ||
| 52 | + nextLp.setQdzArrDatesj(sch.getZdsjActual()); | ||
| 39 | 53 | ||
| 40 | List<ScheduleRealInfo> refs = new ArrayList<>(); | 54 | List<ScheduleRealInfo> refs = new ArrayList<>(); |
| 41 | refs.add(sch); | 55 | refs.add(sch); |
| 42 | - refs.add(next); | 56 | + refs.add(nextLp); |
| 43 | sendUtils.refreshSch(refs); | 57 | sendUtils.refreshSch(refs); |
| 44 | return; | 58 | return; |
| 45 | } | 59 | } |