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 | 1 | package com.bsth.data.schedule.auto_exec; |
| 2 | 2 | |
| 3 | +import com.bsth.data.gpsdata.status_manager.GpsStatusManager; | |
| 3 | 4 | import com.bsth.data.schedule.DayOfSchedule; |
| 4 | 5 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 5 | 6 | import com.bsth.websocket.handler.SendUtils; |
| ... | ... | @@ -21,6 +22,8 @@ public class RealScheduleAutoExecHandler { |
| 21 | 22 | @Autowired |
| 22 | 23 | DayOfSchedule dayOfSchedule; |
| 23 | 24 | |
| 25 | + @Autowired | |
| 26 | + GpsStatusManager gpsStatusManager; | |
| 24 | 27 | |
| 25 | 28 | public void exec(ScheduleRealInfo sch) { |
| 26 | 29 | boolean flag = false; |
| ... | ... | @@ -33,13 +36,24 @@ public class RealScheduleAutoExecHandler { |
| 33 | 36 | |
| 34 | 37 | if (sch.getZdsjT() < t) { |
| 35 | 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 | 54 | List<ScheduleRealInfo> refs = new ArrayList<>(); |
| 41 | 55 | refs.add(sch); |
| 42 | - refs.add(next); | |
| 56 | + refs.add(nextLp); | |
| 43 | 57 | sendUtils.refreshSch(refs); |
| 44 | 58 | return; |
| 45 | 59 | } | ... | ... |