Commit 4413865ab3e3320e15ca07fb4021b5fc3531b8f4
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control
into pudong
Showing
18 changed files
with
116 additions
and
703 deletions
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
| @@ -121,4 +121,9 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | @@ -121,4 +121,9 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | ||
| 121 | public Map<String, Object> setAutoExec(@RequestParam Map<String, String> map){ | 121 | public Map<String, Object> setAutoExec(@RequestParam Map<String, String> map){ |
| 122 | return lineConfigService.setAutoExec(map); | 122 | return lineConfigService.setAutoExec(map); |
| 123 | } | 123 | } |
| 124 | + | ||
| 125 | + @RequestMapping(value = "/setReadReverse") | ||
| 126 | + public Map<String, Object> setReadReverse(@RequestParam int status,@RequestParam String lineCode){ | ||
| 127 | + return lineConfigService.setReadReverse(status, lineCode); | ||
| 128 | + } | ||
| 124 | } | 129 | } |
src/main/java/com/bsth/data/LineConfigData.java
| @@ -131,6 +131,7 @@ public class LineConfigData implements CommandLineRunner { | @@ -131,6 +131,7 @@ public class LineConfigData implements CommandLineRunner { | ||
| 131 | if (null == line) | 131 | if (null == line) |
| 132 | throw new NullPointerException("异常的lineCode"); | 132 | throw new NullPointerException("异常的lineCode"); |
| 133 | 133 | ||
| 134 | + conf.setReadReverse(true); | ||
| 134 | conf.setLine(line); | 135 | conf.setLine(line); |
| 135 | //开始运营时间 | 136 | //开始运营时间 |
| 136 | conf.setStartOpt("02:00"); | 137 | conf.setStartOpt("02:00"); |
src/main/java/com/bsth/data/gpsdata_v2/cache/GpsCacheData.java
| @@ -152,11 +152,11 @@ public class GpsCacheData { | @@ -152,11 +152,11 @@ public class GpsCacheData { | ||
| 152 | 152 | ||
| 153 | private static List<StationRoute> searchLinked(LinkedList<GpsEntity> list, int upDown){ | 153 | private static List<StationRoute> searchLinked(LinkedList<GpsEntity> list, int upDown){ |
| 154 | List<StationRoute> rs = new ArrayList<>(); | 154 | List<StationRoute> rs = new ArrayList<>(); |
| 155 | - Iterator<GpsEntity> iterator = list.iterator(); | 155 | + |
| 156 | GpsEntity gps; | 156 | GpsEntity gps; |
| 157 | int prevCode=0; | 157 | int prevCode=0; |
| 158 | - while (iterator.hasNext()){ | ||
| 159 | - gps = iterator.next(); | 158 | + for(int i = list.size() - 1; i > 0; i --){ |
| 159 | + gps = list.get(i); | ||
| 160 | if(gps.getInstation()!=1) | 160 | if(gps.getInstation()!=1) |
| 161 | continue; | 161 | continue; |
| 162 | 162 |
src/main/java/com/bsth/data/gpsdata_v2/handlers/InStationProcess.java
| @@ -43,6 +43,11 @@ public class InStationProcess { | @@ -43,6 +43,11 @@ public class InStationProcess { | ||
| 43 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 43 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 44 | 44 | ||
| 45 | public void process(GpsEntity gps) { | 45 | public void process(GpsEntity gps) { |
| 46 | + //自动执行的班次信号,滚蛋 | ||
| 47 | + LineConfig config = lineConfigData.get(gps.getLineId()); | ||
| 48 | + if(null != config && config.isAutoExec()) | ||
| 49 | + return; | ||
| 50 | + | ||
| 46 | GpsEntity prev = GpsCacheData.getPrev(gps); | 51 | GpsEntity prev = GpsCacheData.getPrev(gps); |
| 47 | 52 | ||
| 48 | if(null == prev) | 53 | if(null == prev) |
| @@ -81,7 +86,7 @@ public class InStationProcess { | @@ -81,7 +86,7 @@ public class InStationProcess { | ||
| 81 | //要经过2个中途站才能进 | 86 | //要经过2个中途站才能进 |
| 82 | int count = GpsCacheData.lastInTrailsSize(gps); | 87 | int count = GpsCacheData.lastInTrailsSize(gps); |
| 83 | List<StationRoute> routes = GeoCacheData.getStationRoute(gps.getLineId(), gps.getUpDown()); | 88 | List<StationRoute> routes = GeoCacheData.getStationRoute(gps.getLineId(), gps.getUpDown()); |
| 84 | - if (isNotInOut(sch) && gps.getInstation() == 1 && routes.size() > 4 | 89 | + if (null != sch && isNormalSch(sch) && gps.getInstation() == 1 && routes.size() > 4 |
| 85 | && count < 2) { | 90 | && count < 2) { |
| 86 | logger.info("没有进中途站,拒绝进站... -" + gps.getNbbm() + " -time:" + gps.getTimestamp()); | 91 | logger.info("没有进中途站,拒绝进站... -" + gps.getNbbm() + " -time:" + gps.getTimestamp()); |
| 87 | flow = false; | 92 | flow = false; |
| @@ -90,7 +95,8 @@ public class InStationProcess { | @@ -90,7 +95,8 @@ public class InStationProcess { | ||
| 90 | boolean isEnd = false; | 95 | boolean isEnd = false; |
| 91 | 96 | ||
| 92 | //进终点 | 97 | //进终点 |
| 93 | - if (flow && null != sch && sch.getZdzCode().equals(gps.getStopNo())) { | 98 | + if (flow && null != sch && |
| 99 | + ((sch.getZdzCode().equals(gps.getStopNo()) && gps.getInstation()>0) || sch.getZdzCode().equals(gps.getCarparkNo()))) { | ||
| 94 | inEndStation(sch, gps); | 100 | inEndStation(sch, gps); |
| 95 | isEnd = true; | 101 | isEnd = true; |
| 96 | } | 102 | } |
| @@ -98,6 +104,10 @@ public class InStationProcess { | @@ -98,6 +104,10 @@ public class InStationProcess { | ||
| 98 | GpsCacheData.in(gps, isEnd); | 104 | GpsCacheData.in(gps, isEnd); |
| 99 | } | 105 | } |
| 100 | 106 | ||
| 107 | + private boolean isNormalSch(ScheduleRealInfo sch) { | ||
| 108 | + return sch.getBcType().equals("normal"); | ||
| 109 | + } | ||
| 110 | + | ||
| 101 | private boolean isNotInOut(ScheduleRealInfo sch) { | 111 | private boolean isNotInOut(ScheduleRealInfo sch) { |
| 102 | return !sch.getBcType().equals("in") && !sch.getBcType().equals("out"); | 112 | return !sch.getBcType().equals("in") && !sch.getBcType().equals("out"); |
| 103 | } | 113 | } |
src/main/java/com/bsth/data/gpsdata_v2/handlers/OutStationProcess.java
| @@ -41,28 +41,34 @@ public class OutStationProcess { | @@ -41,28 +41,34 @@ public class OutStationProcess { | ||
| 41 | GpsStatusManager gpsStatusManager; | 41 | GpsStatusManager gpsStatusManager; |
| 42 | private final static int MAX_BEFORE_TIME = 1000 * 60 * 120; | 42 | private final static int MAX_BEFORE_TIME = 1000 * 60 * 120; |
| 43 | 43 | ||
| 44 | - public void process(GpsEntity gps){ | 44 | + public void process(GpsEntity gps) { |
| 45 | + //自动执行的班次信号,滚蛋 | ||
| 46 | + LineConfig config = lineConfigData.get(gps.getLineId()); | ||
| 47 | + if (null != config && config.isAutoExec()) | ||
| 48 | + return; | ||
| 49 | + | ||
| 45 | GpsEntity prev = GpsCacheData.getPrev(gps); | 50 | GpsEntity prev = GpsCacheData.getPrev(gps); |
| 46 | 51 | ||
| 47 | - if(null == prev) | 52 | + if (null == prev) |
| 48 | return; | 53 | return; |
| 49 | 54 | ||
| 50 | //从站内到站外 | 55 | //从站内到站外 |
| 51 | - if(prev.getInstation() > 0 && gps.getInstation() == 0) | 56 | + if (prev.getInstation() > 0 && gps.getInstation() == 0) |
| 52 | outStation(gps, prev); | 57 | outStation(gps, prev); |
| 53 | 58 | ||
| 54 | //从站内到另一个站内 | 59 | //从站内到另一个站内 |
| 55 | - if(prev.getInstation() > 0 && gps.getInstation() > 0 | 60 | + if (prev.getInstation() > 0 && gps.getInstation() > 0 |
| 56 | && !prev.getStopNo().equals(gps.getStopNo())) | 61 | && !prev.getStopNo().equals(gps.getStopNo())) |
| 57 | outStation(gps, prev); | 62 | outStation(gps, prev); |
| 58 | 63 | ||
| 59 | //在被起点站覆盖的情况下出场 | 64 | //在被起点站覆盖的情况下出场 |
| 60 | - if(isOutPark(gps, prev)) | 65 | + if (isOutPark(gps, prev)) |
| 61 | outStation(gps, prev); | 66 | outStation(gps, prev); |
| 62 | } | 67 | } |
| 63 | 68 | ||
| 64 | /** | 69 | /** |
| 65 | * 出站 | 70 | * 出站 |
| 71 | + * | ||
| 66 | * @param gps | 72 | * @param gps |
| 67 | */ | 73 | */ |
| 68 | private void outStation(GpsEntity gps, GpsEntity prev) { | 74 | private void outStation(GpsEntity gps, GpsEntity prev) { |
| @@ -70,22 +76,24 @@ public class OutStationProcess { | @@ -70,22 +76,24 @@ public class OutStationProcess { | ||
| 70 | 76 | ||
| 71 | //起点发车 | 77 | //起点发车 |
| 72 | if (null != sch && | 78 | if (null != sch && |
| 73 | - (sch.getQdzCode().equals(prev.getStopNo()) || sch.getQdzCode().equals(prev.getCarparkNo()))){ | 79 | + ((sch.getQdzCode().equals(prev.getStopNo()) |
| 80 | + && (gps.getInstation() == 0 || !gps.getStopNo().equals(prev.getStopNo()))) | ||
| 81 | + || sch.getQdzCode().equals(prev.getCarparkNo()))) { | ||
| 74 | //发车班次匹配 | 82 | //发车班次匹配 |
| 75 | - if(!signalSchPlanMatcher.outMatch(gps, sch)){ | 83 | + if (!signalSchPlanMatcher.outMatch(gps, sch)) { |
| 76 | outStation(gps, prev); | 84 | outStation(gps, prev); |
| 77 | return; | 85 | return; |
| 78 | } | 86 | } |
| 79 | 87 | ||
| 80 | int diff = (int) (sch.getDfsjT() - gps.getTimestamp()); | 88 | int diff = (int) (sch.getDfsjT() - gps.getTimestamp()); |
| 81 | //首班出场最多提前2小时 | 89 | //首班出场最多提前2小时 |
| 82 | - if((dayOfSchedule.isFirstOut(sch) && diff > MAX_BEFORE_TIME) || diff > MAX_BEFORE_TIME / 2) | 90 | + if ((dayOfSchedule.isFirstOut(sch) && diff > MAX_BEFORE_TIME) || diff > MAX_BEFORE_TIME / 2) |
| 83 | return; | 91 | return; |
| 84 | 92 | ||
| 85 | gps.setPremiseCode(null);//清除前置围栏标记 | 93 | gps.setPremiseCode(null);//清除前置围栏标记 |
| 86 | 94 | ||
| 87 | - if(StringUtils.isNotEmpty(sch.getFcsjActual()) | ||
| 88 | - && !outManyFit(gps, sch)){ | 95 | + if (StringUtils.isNotEmpty(sch.getFcsjActual()) |
| 96 | + && !outManyFit(gps, sch)) { | ||
| 89 | return;//班次已经实发 | 97 | return;//班次已经实发 |
| 90 | } | 98 | } |
| 91 | 99 | ||
| @@ -108,7 +116,7 @@ public class OutStationProcess { | @@ -108,7 +116,7 @@ public class OutStationProcess { | ||
| 108 | LateAdjustHandle.remove(sch.getClZbh()); | 116 | LateAdjustHandle.remove(sch.getClZbh()); |
| 109 | 117 | ||
| 110 | //发车的时候,同步一下状态 | 118 | //发车的时候,同步一下状态 |
| 111 | - if(!gps.isService() && !dayOfSchedule.emptyService(sch)) | 119 | + if (!gps.isService() && !dayOfSchedule.emptyService(sch)) |
| 112 | gpsStatusManager.changeServiceState(sch.getClZbh(), sch.getXlDir(), 0, "发车@系统"); | 120 | gpsStatusManager.changeServiceState(sch.getClZbh(), sch.getXlDir(), 0, "发车@系统"); |
| 113 | 121 | ||
| 114 | logger.info("车辆:" + sch.getClZbh() + " 班次:" + sch.getDfsj() + "发车, 时间:" + sch.getFcsjActual()); | 122 | logger.info("车辆:" + sch.getClZbh() + " 班次:" + sch.getDfsj() + "发车, 时间:" + sch.getFcsjActual()); |
| @@ -119,16 +127,17 @@ public class OutStationProcess { | @@ -119,16 +127,17 @@ public class OutStationProcess { | ||
| 119 | 127 | ||
| 120 | /** | 128 | /** |
| 121 | * 是否是一个更合适的发车信号 | 129 | * 是否是一个更合适的发车信号 |
| 130 | + * | ||
| 122 | * @param gps | 131 | * @param gps |
| 123 | * @param sch | 132 | * @param sch |
| 124 | * @return | 133 | * @return |
| 125 | */ | 134 | */ |
| 126 | private boolean outManyFit(GpsEntity gps, ScheduleRealInfo sch) { | 135 | private boolean outManyFit(GpsEntity gps, ScheduleRealInfo sch) { |
| 127 | LineConfig conf = lineConfigData.get(sch.getXlBm()); | 136 | LineConfig conf = lineConfigData.get(sch.getXlBm()); |
| 128 | - if(null != conf && conf.isLockFirstOutTime()) | 137 | + if (null != conf && conf.isLockFirstOutTime()) |
| 129 | return false; | 138 | return false; |
| 130 | 139 | ||
| 131 | - if(StringUtils.isNotEmpty(sch.getZdsjActual())) | 140 | + if (StringUtils.isNotEmpty(sch.getZdsjActual())) |
| 132 | return false; | 141 | return false; |
| 133 | 142 | ||
| 134 | long t1 = sch.getFcsjActualTime(); | 143 | long t1 = sch.getFcsjActualTime(); |
| @@ -136,18 +145,18 @@ public class OutStationProcess { | @@ -136,18 +145,18 @@ public class OutStationProcess { | ||
| 136 | long c = sch.getDfsjT(); | 145 | long c = sch.getDfsjT(); |
| 137 | 146 | ||
| 138 | int threshold = 1000 * 60 * 5; | 147 | int threshold = 1000 * 60 * 5; |
| 139 | - if(Math.abs(t2 - c) < threshold && c - t1 > threshold){ | 148 | + if (Math.abs(t2 - c) < threshold && c - t1 > threshold) { |
| 140 | return true; | 149 | return true; |
| 141 | } | 150 | } |
| 142 | 151 | ||
| 143 | - if(c - t1 > 1000 * 60 * 60 * 2 && Math.abs(t2 - c) < c - t1){ | 152 | + if (c - t1 > 1000 * 60 * 60 * 2 && Math.abs(t2 - c) < c - t1) { |
| 144 | return true; | 153 | return true; |
| 145 | } | 154 | } |
| 146 | return false; | 155 | return false; |
| 147 | } | 156 | } |
| 148 | 157 | ||
| 149 | - private void outStationAndOutPark(ScheduleRealInfo sch){ | ||
| 150 | - try{ | 158 | + private void outStationAndOutPark(ScheduleRealInfo sch) { |
| 159 | + try { | ||
| 151 | LineConfig config = lineConfigData.get(sch.getXlBm()); | 160 | LineConfig config = lineConfigData.get(sch.getXlBm()); |
| 152 | //限定出站既出场的停车场 | 161 | //限定出站既出场的停车场 |
| 153 | String park = config.getTwinsPark(); | 162 | String park = config.getTwinsPark(); |
| @@ -168,26 +177,26 @@ public class OutStationProcess { | @@ -168,26 +177,26 @@ public class OutStationProcess { | ||
| 168 | dayOfSchedule.save(schPrev); | 177 | dayOfSchedule.save(schPrev); |
| 169 | } | 178 | } |
| 170 | } | 179 | } |
| 171 | - }catch (Exception e){ | 180 | + } catch (Exception e) { |
| 172 | logger.error("", e); | 181 | logger.error("", e); |
| 173 | } | 182 | } |
| 174 | } | 183 | } |
| 175 | 184 | ||
| 176 | - private boolean isEmptyMileage(ScheduleRealInfo sch){ | ||
| 177 | - return sch.getBcsj()==0 || sch.getJhlcOrig().intValue()==0; | 185 | + private boolean isEmptyMileage(ScheduleRealInfo sch) { |
| 186 | + return sch.getBcsj() == 0 || sch.getJhlcOrig().intValue() == 0; | ||
| 178 | } | 187 | } |
| 179 | 188 | ||
| 180 | - private boolean isOut(ScheduleRealInfo sch){ | 189 | + private boolean isOut(ScheduleRealInfo sch) { |
| 181 | return sch != null && sch.getBcType().equals("out"); | 190 | return sch != null && sch.getBcType().equals("out"); |
| 182 | } | 191 | } |
| 183 | 192 | ||
| 184 | - private void endSch(ScheduleRealInfo sch, Long t){ | 193 | + private void endSch(ScheduleRealInfo sch, Long t) { |
| 185 | sch.setFcsjActualAll(t); | 194 | sch.setFcsjActualAll(t); |
| 186 | sch.setZdsjActualAll(t); | 195 | sch.setZdsjActualAll(t); |
| 187 | } | 196 | } |
| 188 | 197 | ||
| 189 | - private boolean isOutPark(GpsEntity gps, GpsEntity prve){ | ||
| 190 | - if(StringUtils.isNotEmpty(prve.getCarparkNo()) && StringUtils.isEmpty(gps.getCarparkNo())) | 198 | + private boolean isOutPark(GpsEntity gps, GpsEntity prve) { |
| 199 | + if (StringUtils.isNotEmpty(prve.getCarparkNo()) && StringUtils.isEmpty(gps.getCarparkNo())) | ||
| 191 | return true; | 200 | return true; |
| 192 | return false; | 201 | return false; |
| 193 | } | 202 | } |
src/main/java/com/bsth/data/gpsdata_v2/handlers/ReverseRouteProcess.java
| 1 | package com.bsth.data.gpsdata_v2.handlers; | 1 | package com.bsth.data.gpsdata_v2.handlers; |
| 2 | 2 | ||
| 3 | +import com.bsth.data.LineConfigData; | ||
| 3 | import com.bsth.data.gpsdata_v2.cache.GeoCacheData; | 4 | import com.bsth.data.gpsdata_v2.cache.GeoCacheData; |
| 4 | import com.bsth.data.gpsdata_v2.cache.GpsCacheData; | 5 | import com.bsth.data.gpsdata_v2.cache.GpsCacheData; |
| 5 | import com.bsth.data.gpsdata_v2.entity.GpsEntity; | 6 | import com.bsth.data.gpsdata_v2.entity.GpsEntity; |
| 6 | import com.bsth.data.gpsdata_v2.entity.StationRoute; | 7 | import com.bsth.data.gpsdata_v2.entity.StationRoute; |
| 7 | import com.bsth.data.schedule.DayOfSchedule; | 8 | import com.bsth.data.schedule.DayOfSchedule; |
| 9 | +import com.bsth.entity.realcontrol.LineConfig; | ||
| 8 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 10 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.stereotype.Component; | 12 | import org.springframework.stereotype.Component; |
| @@ -18,15 +20,22 @@ import java.util.List; | @@ -18,15 +20,22 @@ import java.util.List; | ||
| 18 | @Component | 20 | @Component |
| 19 | public class ReverseRouteProcess { | 21 | public class ReverseRouteProcess { |
| 20 | 22 | ||
| 21 | - private static final int REVER_THRESHOLD = 3; | 23 | + private static final int REVER_THRESHOLD = 6; |
| 22 | 24 | ||
| 23 | - private static final long TIME_THRESHOLD = 1000 * 60 * 120; | 25 | + private static final long TIME_THRESHOLD = 1000 * 60 * 30; |
| 24 | 26 | ||
| 25 | @Autowired | 27 | @Autowired |
| 26 | DayOfSchedule dayOfSchedule; | 28 | DayOfSchedule dayOfSchedule; |
| 27 | 29 | ||
| 30 | + @Autowired | ||
| 31 | + LineConfigData lineConfigData; | ||
| 32 | + | ||
| 28 | public void process(GpsEntity gps){ | 33 | public void process(GpsEntity gps){ |
| 29 | - if(reversRoute(gps) && !GeoCacheData.isLoopLine(gps.getLineId())){ | 34 | + |
| 35 | + LineConfig config = lineConfigData.get(gps.getLineId()); | ||
| 36 | + if(null != config && config.isReadReverse() && | ||
| 37 | + reversRoute(gps) && !GeoCacheData.isLoopLine(gps.getLineId())){ | ||
| 38 | + | ||
| 30 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); | 39 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); |
| 31 | if(isInOut(sch) || !sch.getXlBm().equals(gps.getLineId())) | 40 | if(isInOut(sch) || !sch.getXlBm().equals(gps.getLineId())) |
| 32 | return; | 41 | return; |
src/main/java/com/bsth/data/gpsdata_v2/utils/GpsDataRecovery.java
| @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | ||
| 60 | for (String nbbm : keys) { | 60 | for (String nbbm : keys) { |
| 61 | Collections.sort(listMap.get(nbbm), comp); | 61 | Collections.sort(listMap.get(nbbm), comp); |
| 62 | threadPool.submit(new RecoveryThread(listMap.get(nbbm), count)); | 62 | threadPool.submit(new RecoveryThread(listMap.get(nbbm), count)); |
| 63 | - /*if(nbbm.equals("W7C-035")) | 63 | + /*if(nbbm.equals("W1E-169")) |
| 64 | new RecoveryThread(listMap.get(nbbm), count).run();*/ | 64 | new RecoveryThread(listMap.get(nbbm), count).run();*/ |
| 65 | /*if(lineId.equals("60028")) | 65 | /*if(lineId.equals("60028")) |
| 66 | new RecoveryThread(listMap.get(lineId), count).run();*/ | 66 | new RecoveryThread(listMap.get(lineId), count).run();*/ |
| @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | ||
| 84 | Calendar calendar = Calendar.getInstance(); | 84 | Calendar calendar = Calendar.getInstance(); |
| 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); | 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); |
| 86 | 86 | ||
| 87 | - String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE,SERVER_TS from bsth_c_gps_info where days_year=327"; //+ dayOfYear; | 87 | + String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE,SERVER_TS from bsth_c_gps_info where days_year=329"; //+ dayOfYear; |
| 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); | 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); |
| 89 | 89 | ||
| 90 | List<GpsEntity> list = | 90 | List<GpsEntity> list = |
| @@ -154,7 +154,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | @@ -154,7 +154,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | ||
| 154 | for (GpsEntity gps : list) { | 154 | for (GpsEntity gps : list) { |
| 155 | try { | 155 | try { |
| 156 | 156 | ||
| 157 | - /*if(gps.getTimestamp() >= 1511396220000L) | 157 | + /*if(gps.getTimestamp() >= 1511569544000L) |
| 158 | System.out.println("aaa");*/ | 158 | System.out.println("aaa");*/ |
| 159 | 159 | ||
| 160 | if(Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) > 1000 * 60 * 20) | 160 | if(Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) > 1000 * 60 * 20) |
src/main/java/com/bsth/data/gpsdata_v2/utils/GpsDataUtils.java
| @@ -25,7 +25,7 @@ public class GpsDataUtils { | @@ -25,7 +25,7 @@ public class GpsDataUtils { | ||
| 25 | 25 | ||
| 26 | try { | 26 | try { |
| 27 | for (GpsEntity gps : list) { | 27 | for (GpsEntity gps : list) { |
| 28 | - if (gps.getValid() == 0 && Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) > 1000 * 60 * 20) | 28 | + if (gps.getValid() == 0 && Math.abs(gps.getTimestamp() - gps.getServerTimestamp()) < 1000 * 60 * 20) |
| 29 | rs.add(gps); | 29 | rs.add(gps); |
| 30 | } | 30 | } |
| 31 | 31 |
src/main/java/com/bsth/data/gpsdata_v2/utils/SignalSchPlanMatcher.java
| @@ -41,11 +41,15 @@ public class SignalSchPlanMatcher { | @@ -41,11 +41,15 @@ public class SignalSchPlanMatcher { | ||
| 41 | try{ | 41 | try{ |
| 42 | //晚于待发时间 10 分钟 ,匹配一下最佳的班次 | 42 | //晚于待发时间 10 分钟 ,匹配一下最佳的班次 |
| 43 | if(t - sch.getDfsjT() > 1000 * 60 * 10){ | 43 | if(t - sch.getDfsjT() > 1000 * 60 * 10){ |
| 44 | - ScheduleRealInfo near = searchNearOut(gps); | 44 | + ScheduleRealInfo near = searchNearSch(gps, sch.getQdzCode()); |
| 45 | 45 | ||
| 46 | if(null != near && !near.getId().equals(sch.getId())){ | 46 | if(null != near && !near.getId().equals(sch.getId())){ |
| 47 | - dayOfSchedule.addExecPlan(near); | ||
| 48 | - return false; | 47 | + |
| 48 | + if(Math.abs(t - near.getDfsjT()) < Math.abs((t - sch.getDfsjT()))){ | ||
| 49 | + | ||
| 50 | + dayOfSchedule.addExecPlan(near); | ||
| 51 | + return false; | ||
| 52 | + } | ||
| 49 | } | 53 | } |
| 50 | } | 54 | } |
| 51 | 55 | ||
| @@ -101,7 +105,7 @@ public class SignalSchPlanMatcher { | @@ -101,7 +105,7 @@ public class SignalSchPlanMatcher { | ||
| 101 | * @param gps | 105 | * @param gps |
| 102 | * @return | 106 | * @return |
| 103 | */ | 107 | */ |
| 104 | - private ScheduleRealInfo searchNearOut(GpsEntity gps) { | 108 | + private ScheduleRealInfo searchNearSch(GpsEntity gps, String qdzCode) { |
| 105 | List<ScheduleRealInfo> list = dayOfSchedule.findByNbbm(gps.getNbbm()); | 109 | List<ScheduleRealInfo> list = dayOfSchedule.findByNbbm(gps.getNbbm()); |
| 106 | //排序 | 110 | //排序 |
| 107 | Collections.sort(list, schComp); | 111 | Collections.sort(list, schComp); |
| @@ -109,6 +113,8 @@ public class SignalSchPlanMatcher { | @@ -109,6 +113,8 @@ public class SignalSchPlanMatcher { | ||
| 109 | ScheduleRealInfo near = null; | 113 | ScheduleRealInfo near = null; |
| 110 | int diff, minDiff=-1; | 114 | int diff, minDiff=-1; |
| 111 | for(ScheduleRealInfo sch : list){ | 115 | for(ScheduleRealInfo sch : list){ |
| 116 | + if(!sch.getQdzCode().equals(qdzCode)) | ||
| 117 | + continue; | ||
| 112 | 118 | ||
| 113 | if(StringUtils.isNotEmpty(sch.getFcsjActual())) | 119 | if(StringUtils.isNotEmpty(sch.getFcsjActual())) |
| 114 | continue; | 120 | continue; |
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
| @@ -98,7 +98,7 @@ public class SchAttrCalculator { | @@ -98,7 +98,7 @@ public class SchAttrCalculator { | ||
| 98 | 98 | ||
| 99 | // 计划终点时间 | 99 | // 计划终点时间 |
| 100 | if (sch.getBcsj() != null) { | 100 | if (sch.getBcsj() != null) { |
| 101 | - sch.setZdsjT(sch.getDfsjT() + (sch.getBcsj() * 60 * 1000)); | 101 | + sch.setZdsjT(sch.getFcsjT() + (sch.getBcsj() * 60 * 1000)); |
| 102 | sch.setZdsj(fmtHHmm.print(sch.getZdsjT())); | 102 | sch.setZdsj(fmtHHmm.print(sch.getZdsjT())); |
| 103 | } | 103 | } |
| 104 | } catch (ParseException e) { | 104 | } catch (ParseException e) { |
src/main/java/com/bsth/data/schedule/auto_exec/RealScheduleAutoExecHandler.java
| @@ -37,6 +37,7 @@ public class RealScheduleAutoExecHandler { | @@ -37,6 +37,7 @@ public class RealScheduleAutoExecHandler { | ||
| 37 | 37 | ||
| 38 | if (StringUtils.isEmpty(sch.getZdsjActual()) && sch.getZdsjT() < t) { | 38 | if (StringUtils.isEmpty(sch.getZdsjActual()) && sch.getZdsjT() < t) { |
| 39 | sch.setZdsjActualAll(sch.getZdsjT()); | 39 | sch.setZdsjActualAll(sch.getZdsjT()); |
| 40 | + flag = true; | ||
| 40 | 41 | ||
| 41 | //准备执行下一个班次 | 42 | //准备执行下一个班次 |
| 42 | ScheduleRealInfo next = dayOfSchedule.next(sch); | 43 | ScheduleRealInfo next = dayOfSchedule.next(sch); |
| @@ -48,11 +49,13 @@ public class RealScheduleAutoExecHandler { | @@ -48,11 +49,13 @@ public class RealScheduleAutoExecHandler { | ||
| 48 | } | 49 | } |
| 49 | } | 50 | } |
| 50 | 51 | ||
| 51 | - //路牌的下一个班次,线调页面显示 | 52 | + //路牌有下一个班次,线调页面显示 |
| 52 | ScheduleRealInfo nextLp = dayOfSchedule.nextByLp(sch); | 53 | ScheduleRealInfo nextLp = dayOfSchedule.nextByLp(sch); |
| 53 | if (null != nextLp) { | 54 | if (null != nextLp) { |
| 54 | - nextLp.setQdzArrDatesj(sch.getZdsjActual()); | 55 | + //入库 |
| 56 | + dayOfSchedule.save(sch); | ||
| 55 | 57 | ||
| 58 | + nextLp.setQdzArrDatesj(sch.getZdsjActual()); | ||
| 56 | List<ScheduleRealInfo> refs = new ArrayList<>(); | 59 | List<ScheduleRealInfo> refs = new ArrayList<>(); |
| 57 | refs.add(sch); | 60 | refs.add(sch); |
| 58 | refs.add(nextLp); | 61 | refs.add(nextLp); |
src/main/java/com/bsth/security/WebSecurityConfig.java
| @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | ||
| 36 | public void configure(WebSecurity web) throws Exception { | 36 | public void configure(WebSecurity web) throws Exception { |
| 37 | // 白名单 | 37 | // 白名单 |
| 38 | web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA, | 38 | web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA, |
| 39 | - Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES); | 39 | + Constants.SERVICE_INTERFACE, Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @Override | 42 | @Override |
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
| @@ -28,4 +28,6 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | @@ -28,4 +28,6 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | ||
| 28 | Map<String,Object> findByIdx(String idx); | 28 | Map<String,Object> findByIdx(String idx); |
| 29 | 29 | ||
| 30 | Map<String,Object> setAutoExec(Map<String, String> map); | 30 | Map<String,Object> setAutoExec(Map<String, String> map); |
| 31 | + | ||
| 32 | + Map<String,Object> setReadReverse(int status, String lineCode); | ||
| 31 | } | 33 | } |
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
| @@ -245,4 +245,22 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | @@ -245,4 +245,22 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | ||
| 245 | } | 245 | } |
| 246 | return rs; | 246 | return rs; |
| 247 | } | 247 | } |
| 248 | + | ||
| 249 | + @Override | ||
| 250 | + public Map<String, Object> setReadReverse(int status, String lineCode) { | ||
| 251 | + Map<String, Object> rs = new HashMap<>(); | ||
| 252 | + try { | ||
| 253 | + LineConfig conf = lineConfigData.get(lineCode); | ||
| 254 | + conf.setReadReverse(status==1?true:false); | ||
| 255 | + | ||
| 256 | + lineConfigData.set(conf); | ||
| 257 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 258 | + rs.put("conf", conf); | ||
| 259 | + } catch (Exception e) { | ||
| 260 | + rs.put("status", ResponseCode.ERROR); | ||
| 261 | + rs.put("msg", e.getMessage()); | ||
| 262 | + logger.error("", e); | ||
| 263 | + } | ||
| 264 | + return rs; | ||
| 265 | + } | ||
| 248 | } | 266 | } |
src/main/java/com/bsth/websocket/entity/WsScheduleRealInfo.java deleted
100644 → 0
| 1 | -package com.bsth.websocket.entity; | ||
| 2 | - | ||
| 3 | -import com.bsth.entity.realcontrol.ChildTaskPlan; | ||
| 4 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 5 | - | ||
| 6 | -import javax.persistence.FetchType; | ||
| 7 | -import javax.persistence.OneToMany; | ||
| 8 | -import javax.persistence.Transient; | ||
| 9 | -import java.util.ArrayList; | ||
| 10 | -import java.util.HashSet; | ||
| 11 | -import java.util.List; | ||
| 12 | -import java.util.Set; | ||
| 13 | - | ||
| 14 | -/** | ||
| 15 | - * 精简字段的实际排班 entity | ||
| 16 | - * webSocket 传输用,去掉了页面不需要的一些字段 | ||
| 17 | - * Created by panzhao on 2017/11/14. | ||
| 18 | - */ | ||
| 19 | -public class WsScheduleRealInfo { | ||
| 20 | - | ||
| 21 | - public static WsScheduleRealInfo getInstance(ScheduleRealInfo sch){ | ||
| 22 | - if(null == sch) | ||
| 23 | - return null; | ||
| 24 | - WsScheduleRealInfo wss = new WsScheduleRealInfo(); | ||
| 25 | - wss.id = sch.getId(); | ||
| 26 | - wss.scheduleDateStr = sch.getScheduleDateStr(); | ||
| 27 | - wss.realExecDate = sch.getRealExecDate(); | ||
| 28 | - wss.xlName = sch.getXlName(); | ||
| 29 | - wss.xlBm = sch.getXlBm(); | ||
| 30 | - wss.lpName = sch.getLpName(); | ||
| 31 | - wss.clZbh = sch.getClZbh(); | ||
| 32 | - wss.jGh = sch.getjGh(); | ||
| 33 | - wss.jName = sch.getjName(); | ||
| 34 | - wss.sGh = sch.getsGh(); | ||
| 35 | - wss.sName = sch.getsName(); | ||
| 36 | - wss.xlDir = sch.getXlDir(); | ||
| 37 | - wss.qdzCode = sch.getQdzCode(); | ||
| 38 | - wss.qdzName = sch.getQdzName(); | ||
| 39 | - wss.zdzCode = sch.getZdzCode(); | ||
| 40 | - wss.zdzName = sch.getZdzName(); | ||
| 41 | - wss.fcsj = sch.getFcsj(); | ||
| 42 | - wss.fcsjT = sch.getFcsjT(); | ||
| 43 | - wss.zdsj = sch.getZdsj(); | ||
| 44 | - wss.zdsjT = sch.getZdsjT(); | ||
| 45 | - wss.jhlc = sch.getJhlc(); | ||
| 46 | - wss.jhlcOrig = sch.getJhlcOrig(); | ||
| 47 | - wss.bcsj = sch.getBcsj(); | ||
| 48 | - wss.bcType = sch.getBcType(); | ||
| 49 | - wss.majorStationName = sch.getMajorStationName(); | ||
| 50 | - wss.fcsjActual = sch.getFcsjActual(); | ||
| 51 | - wss.fcsjActualTime = sch.getFcsjActualTime(); | ||
| 52 | - wss.zdsjActual = sch.getZdsjActual(); | ||
| 53 | - wss.zdsjActualTime = sch.getZdsjActualTime(); | ||
| 54 | - wss.status = sch.getStatus(); | ||
| 55 | - wss.adjustExps = sch.getAdjustExps(); | ||
| 56 | - wss.sflj = sch.isSflj(); | ||
| 57 | - wss.late = sch.isLate(); | ||
| 58 | - wss.late2 = sch.isLate2(); | ||
| 59 | - wss.lateMinute = sch.getLateMinute(); | ||
| 60 | - wss.remarks = sch.getRemarks(); | ||
| 61 | - wss.dfsj = sch.getDfsj(); | ||
| 62 | - wss.dfsjT = sch.getDfsjT(); | ||
| 63 | - wss.directiveState = sch.getDirectiveState(); | ||
| 64 | - wss.qdzArrDatejh = sch.getQdzArrDatejh(); | ||
| 65 | - wss.qdzArrDatesj = sch.getQdzArrDatesj(); | ||
| 66 | - wss.cTasks = sch.getcTasks(); | ||
| 67 | - wss.gsName = sch.getGsName(); | ||
| 68 | - wss.gsBm = sch.getGsBm(); | ||
| 69 | - wss.fgsName = sch.getFgsName(); | ||
| 70 | - wss.fgsBm = sch.getFgsBm(); | ||
| 71 | - wss.dfAuto = sch.isDfAuto(); | ||
| 72 | - wss.online = sch.isOnline(); | ||
| 73 | - wss.reissue = sch.isReissue(); | ||
| 74 | - wss.driftStatus = sch.getDriftStatus(); | ||
| 75 | - wss.ccService = sch.isCcService(); | ||
| 76 | - return wss; | ||
| 77 | - } | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - public static List<WsScheduleRealInfo> getMultiInstance(List<ScheduleRealInfo> list){ | ||
| 81 | - List<WsScheduleRealInfo> rs = new ArrayList<>(); | ||
| 82 | - for(ScheduleRealInfo sch : list){ | ||
| 83 | - rs.add(getInstance(sch)); | ||
| 84 | - } | ||
| 85 | - return rs; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - /** 主键Id */ | ||
| 89 | - private Long id; | ||
| 90 | - | ||
| 91 | - /** 排班日期字符串 YYYY-MM-DD */ | ||
| 92 | - private String scheduleDateStr; | ||
| 93 | - | ||
| 94 | - /** 真实执行时间 yyyy-MM-dd */ | ||
| 95 | - private String realExecDate; | ||
| 96 | - | ||
| 97 | - /** 线路名称 */ | ||
| 98 | - private String xlName; | ||
| 99 | - /** 线路编码 */ | ||
| 100 | - private String xlBm; | ||
| 101 | - | ||
| 102 | - /** 路牌名称 */ | ||
| 103 | - private String lpName; | ||
| 104 | - | ||
| 105 | - /** 车辆自编号 */ | ||
| 106 | - private String clZbh; | ||
| 107 | - | ||
| 108 | - /** 驾驶员工号 */ | ||
| 109 | - private String jGh; | ||
| 110 | - /** 驾驶员名字 */ | ||
| 111 | - private String jName; | ||
| 112 | - /** 售票员工号 */ | ||
| 113 | - private String sGh; | ||
| 114 | - /** 售票员名字 */ | ||
| 115 | - private String sName; | ||
| 116 | - | ||
| 117 | - /** 线路方向 */ | ||
| 118 | - private String xlDir; | ||
| 119 | - /** 起点站code*/ | ||
| 120 | - private String qdzCode; | ||
| 121 | - /** 起点站名字 */ | ||
| 122 | - private String qdzName; | ||
| 123 | - | ||
| 124 | - /** 终点站code*/ | ||
| 125 | - private String zdzCode; | ||
| 126 | - /** 终点站名字 */ | ||
| 127 | - private String zdzName; | ||
| 128 | - | ||
| 129 | - /** 计划发车时间(格式 HH:mm) */ | ||
| 130 | - private String fcsj; | ||
| 131 | - /** 计划发车时间戳*/ | ||
| 132 | - @Transient | ||
| 133 | - private Long fcsjT; | ||
| 134 | - | ||
| 135 | - /** 计划终点时间(格式 HH:mm) */ | ||
| 136 | - private String zdsj; | ||
| 137 | - /** 计划终点时间戳*/ | ||
| 138 | - @Transient | ||
| 139 | - private Long zdsjT; | ||
| 140 | - | ||
| 141 | - /** 计划里程 */ | ||
| 142 | - private Double jhlc; | ||
| 143 | - | ||
| 144 | - /** 原始计划里程 (原计调的数据) */ | ||
| 145 | - private Double jhlcOrig; | ||
| 146 | - /** 班次历时 */ | ||
| 147 | - private Integer bcsj; | ||
| 148 | - | ||
| 149 | - /** | ||
| 150 | - * 班次类型 TODO:正常班次、出场、进场、加油、区间班次、放空班次、放大站班次、两点间空驶 | ||
| 151 | - */ | ||
| 152 | - private String bcType; | ||
| 153 | - | ||
| 154 | - //放站班次 站点名称 | ||
| 155 | - private String majorStationName; | ||
| 156 | - | ||
| 157 | - /** 实际发车时间*/ | ||
| 158 | - private String fcsjActual; | ||
| 159 | - /** 实际发车时间戳*/ | ||
| 160 | - @Transient | ||
| 161 | - private Long fcsjActualTime; | ||
| 162 | - /**实际终点时间 */ | ||
| 163 | - private String zdsjActual; | ||
| 164 | - /** 实际终点时间戳*/ | ||
| 165 | - @Transient | ||
| 166 | - private Long zdsjActualTime; | ||
| 167 | - | ||
| 168 | - /**班次状态 0 未执行 1 正在执行 2 已执行 -1 已烂班 */ | ||
| 169 | - private int status; | ||
| 170 | - | ||
| 171 | - private String adjustExps; | ||
| 172 | - | ||
| 173 | - /** 是否是临加班次 */ | ||
| 174 | - private boolean sflj; | ||
| 175 | - | ||
| 176 | - /** 是否误点 (应发未发)*/ | ||
| 177 | - @Transient | ||
| 178 | - private boolean late; | ||
| 179 | - | ||
| 180 | - /** 是否误点 (应发未到) */ | ||
| 181 | - @Transient | ||
| 182 | - private boolean late2; | ||
| 183 | - /** 误点停靠时间 */ | ||
| 184 | - @Transient | ||
| 185 | - private float lateMinute; | ||
| 186 | - | ||
| 187 | - /** 备注*/ | ||
| 188 | - private String remarks; | ||
| 189 | - | ||
| 190 | - /**待发时间(格式 HH:mm) */ | ||
| 191 | - private String dfsj; | ||
| 192 | - | ||
| 193 | - /**待发时间戳 */ | ||
| 194 | - @Transient | ||
| 195 | - private Long dfsjT; | ||
| 196 | - | ||
| 197 | - /** 指令下发状态 60: 已发送, 100: 设备确认收到, 200:驾驶员确认 0:失败 */ | ||
| 198 | - private Integer directiveState = -1; | ||
| 199 | - | ||
| 200 | - /** 起点站计划到达时间 */ | ||
| 201 | - @Transient | ||
| 202 | - private String qdzArrDatejh; | ||
| 203 | - | ||
| 204 | - /** 起点站实际到达时间 */ | ||
| 205 | - @Transient | ||
| 206 | - private String qdzArrDatesj; | ||
| 207 | - | ||
| 208 | - /** 子任务 */ | ||
| 209 | - @OneToMany(fetch = FetchType.LAZY, mappedBy = "schedule") | ||
| 210 | - private Set<ChildTaskPlan> cTasks = new HashSet<>(); | ||
| 211 | - | ||
| 212 | - /** 关联的公司名称 */ | ||
| 213 | - private String gsName; | ||
| 214 | - /** 关联的公司编码 */ | ||
| 215 | - private String gsBm; | ||
| 216 | - /** 关联的分公司名称 */ | ||
| 217 | - private String fgsName; | ||
| 218 | - /** 关联的分公司编码 */ | ||
| 219 | - private String fgsBm; | ||
| 220 | - | ||
| 221 | - //待发调试(是否自动调整) | ||
| 222 | - private boolean dfAuto; | ||
| 223 | - //是否有GPS信号 | ||
| 224 | - private boolean online; | ||
| 225 | - | ||
| 226 | - /** 是否有补发GPS信号 */ | ||
| 227 | - private boolean reissue; | ||
| 228 | - | ||
| 229 | - /** | ||
| 230 | - * 漂移状态 | ||
| 231 | - * 1: 发车漂移 | ||
| 232 | - * 2:到站漂移 | ||
| 233 | - * 3:中途漂移 | ||
| 234 | - */ | ||
| 235 | - private Integer driftStatus = 0; | ||
| 236 | - | ||
| 237 | - /** | ||
| 238 | - * 换车营运标记 true 表示该主任务由 【中途换车子任务】 级联生成 | ||
| 239 | - */ | ||
| 240 | - private boolean ccService; | ||
| 241 | - | ||
| 242 | - public Long getId() { | ||
| 243 | - return id; | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - public void setId(Long id) { | ||
| 247 | - this.id = id; | ||
| 248 | - } | ||
| 249 | - | ||
| 250 | - public String getScheduleDateStr() { | ||
| 251 | - return scheduleDateStr; | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - public void setScheduleDateStr(String scheduleDateStr) { | ||
| 255 | - this.scheduleDateStr = scheduleDateStr; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - public String getRealExecDate() { | ||
| 259 | - return realExecDate; | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - public void setRealExecDate(String realExecDate) { | ||
| 263 | - this.realExecDate = realExecDate; | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - public String getXlName() { | ||
| 267 | - return xlName; | ||
| 268 | - } | ||
| 269 | - | ||
| 270 | - public void setXlName(String xlName) { | ||
| 271 | - this.xlName = xlName; | ||
| 272 | - } | ||
| 273 | - | ||
| 274 | - public String getXlBm() { | ||
| 275 | - return xlBm; | ||
| 276 | - } | ||
| 277 | - | ||
| 278 | - public void setXlBm(String xlBm) { | ||
| 279 | - this.xlBm = xlBm; | ||
| 280 | - } | ||
| 281 | - | ||
| 282 | - public String getLpName() { | ||
| 283 | - return lpName; | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - public void setLpName(String lpName) { | ||
| 287 | - this.lpName = lpName; | ||
| 288 | - } | ||
| 289 | - | ||
| 290 | - public String getClZbh() { | ||
| 291 | - return clZbh; | ||
| 292 | - } | ||
| 293 | - | ||
| 294 | - public void setClZbh(String clZbh) { | ||
| 295 | - this.clZbh = clZbh; | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - public String getjGh() { | ||
| 299 | - return jGh; | ||
| 300 | - } | ||
| 301 | - | ||
| 302 | - public void setjGh(String jGh) { | ||
| 303 | - this.jGh = jGh; | ||
| 304 | - } | ||
| 305 | - | ||
| 306 | - public String getjName() { | ||
| 307 | - return jName; | ||
| 308 | - } | ||
| 309 | - | ||
| 310 | - public void setjName(String jName) { | ||
| 311 | - this.jName = jName; | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - public String getsGh() { | ||
| 315 | - return sGh; | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - public void setsGh(String sGh) { | ||
| 319 | - this.sGh = sGh; | ||
| 320 | - } | ||
| 321 | - | ||
| 322 | - public String getsName() { | ||
| 323 | - return sName; | ||
| 324 | - } | ||
| 325 | - | ||
| 326 | - public void setsName(String sName) { | ||
| 327 | - this.sName = sName; | ||
| 328 | - } | ||
| 329 | - | ||
| 330 | - public String getXlDir() { | ||
| 331 | - return xlDir; | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - public void setXlDir(String xlDir) { | ||
| 335 | - this.xlDir = xlDir; | ||
| 336 | - } | ||
| 337 | - | ||
| 338 | - public String getQdzCode() { | ||
| 339 | - return qdzCode; | ||
| 340 | - } | ||
| 341 | - | ||
| 342 | - public void setQdzCode(String qdzCode) { | ||
| 343 | - this.qdzCode = qdzCode; | ||
| 344 | - } | ||
| 345 | - | ||
| 346 | - public String getQdzName() { | ||
| 347 | - return qdzName; | ||
| 348 | - } | ||
| 349 | - | ||
| 350 | - public void setQdzName(String qdzName) { | ||
| 351 | - this.qdzName = qdzName; | ||
| 352 | - } | ||
| 353 | - | ||
| 354 | - public String getZdzCode() { | ||
| 355 | - return zdzCode; | ||
| 356 | - } | ||
| 357 | - | ||
| 358 | - public void setZdzCode(String zdzCode) { | ||
| 359 | - this.zdzCode = zdzCode; | ||
| 360 | - } | ||
| 361 | - | ||
| 362 | - public String getZdzName() { | ||
| 363 | - return zdzName; | ||
| 364 | - } | ||
| 365 | - | ||
| 366 | - public void setZdzName(String zdzName) { | ||
| 367 | - this.zdzName = zdzName; | ||
| 368 | - } | ||
| 369 | - | ||
| 370 | - public String getFcsj() { | ||
| 371 | - return fcsj; | ||
| 372 | - } | ||
| 373 | - | ||
| 374 | - public void setFcsj(String fcsj) { | ||
| 375 | - this.fcsj = fcsj; | ||
| 376 | - } | ||
| 377 | - | ||
| 378 | - public Long getFcsjT() { | ||
| 379 | - return fcsjT; | ||
| 380 | - } | ||
| 381 | - | ||
| 382 | - public void setFcsjT(Long fcsjT) { | ||
| 383 | - this.fcsjT = fcsjT; | ||
| 384 | - } | ||
| 385 | - | ||
| 386 | - public String getZdsj() { | ||
| 387 | - return zdsj; | ||
| 388 | - } | ||
| 389 | - | ||
| 390 | - public void setZdsj(String zdsj) { | ||
| 391 | - this.zdsj = zdsj; | ||
| 392 | - } | ||
| 393 | - | ||
| 394 | - public Long getZdsjT() { | ||
| 395 | - return zdsjT; | ||
| 396 | - } | ||
| 397 | - | ||
| 398 | - public void setZdsjT(Long zdsjT) { | ||
| 399 | - this.zdsjT = zdsjT; | ||
| 400 | - } | ||
| 401 | - | ||
| 402 | - public Double getJhlc() { | ||
| 403 | - return jhlc; | ||
| 404 | - } | ||
| 405 | - | ||
| 406 | - public void setJhlc(Double jhlc) { | ||
| 407 | - this.jhlc = jhlc; | ||
| 408 | - } | ||
| 409 | - | ||
| 410 | - public Double getJhlcOrig() { | ||
| 411 | - return jhlcOrig; | ||
| 412 | - } | ||
| 413 | - | ||
| 414 | - public void setJhlcOrig(Double jhlcOrig) { | ||
| 415 | - this.jhlcOrig = jhlcOrig; | ||
| 416 | - } | ||
| 417 | - | ||
| 418 | - public Integer getBcsj() { | ||
| 419 | - return bcsj; | ||
| 420 | - } | ||
| 421 | - | ||
| 422 | - public void setBcsj(Integer bcsj) { | ||
| 423 | - this.bcsj = bcsj; | ||
| 424 | - } | ||
| 425 | - | ||
| 426 | - public String getBcType() { | ||
| 427 | - return bcType; | ||
| 428 | - } | ||
| 429 | - | ||
| 430 | - public void setBcType(String bcType) { | ||
| 431 | - this.bcType = bcType; | ||
| 432 | - } | ||
| 433 | - | ||
| 434 | - public String getMajorStationName() { | ||
| 435 | - return majorStationName; | ||
| 436 | - } | ||
| 437 | - | ||
| 438 | - public void setMajorStationName(String majorStationName) { | ||
| 439 | - this.majorStationName = majorStationName; | ||
| 440 | - } | ||
| 441 | - | ||
| 442 | - public String getFcsjActual() { | ||
| 443 | - return fcsjActual; | ||
| 444 | - } | ||
| 445 | - | ||
| 446 | - public void setFcsjActual(String fcsjActual) { | ||
| 447 | - this.fcsjActual = fcsjActual; | ||
| 448 | - } | ||
| 449 | - | ||
| 450 | - public Long getFcsjActualTime() { | ||
| 451 | - return fcsjActualTime; | ||
| 452 | - } | ||
| 453 | - | ||
| 454 | - public void setFcsjActualTime(Long fcsjActualTime) { | ||
| 455 | - this.fcsjActualTime = fcsjActualTime; | ||
| 456 | - } | ||
| 457 | - | ||
| 458 | - public String getZdsjActual() { | ||
| 459 | - return zdsjActual; | ||
| 460 | - } | ||
| 461 | - | ||
| 462 | - public void setZdsjActual(String zdsjActual) { | ||
| 463 | - this.zdsjActual = zdsjActual; | ||
| 464 | - } | ||
| 465 | - | ||
| 466 | - public Long getZdsjActualTime() { | ||
| 467 | - return zdsjActualTime; | ||
| 468 | - } | ||
| 469 | - | ||
| 470 | - public void setZdsjActualTime(Long zdsjActualTime) { | ||
| 471 | - this.zdsjActualTime = zdsjActualTime; | ||
| 472 | - } | ||
| 473 | - | ||
| 474 | - public int getStatus() { | ||
| 475 | - return status; | ||
| 476 | - } | ||
| 477 | - | ||
| 478 | - public void setStatus(int status) { | ||
| 479 | - this.status = status; | ||
| 480 | - } | ||
| 481 | - | ||
| 482 | - public String getAdjustExps() { | ||
| 483 | - return adjustExps; | ||
| 484 | - } | ||
| 485 | - | ||
| 486 | - public void setAdjustExps(String adjustExps) { | ||
| 487 | - this.adjustExps = adjustExps; | ||
| 488 | - } | ||
| 489 | - | ||
| 490 | - public boolean isSflj() { | ||
| 491 | - return sflj; | ||
| 492 | - } | ||
| 493 | - | ||
| 494 | - public void setSflj(boolean sflj) { | ||
| 495 | - this.sflj = sflj; | ||
| 496 | - } | ||
| 497 | - | ||
| 498 | - public boolean isLate() { | ||
| 499 | - return late; | ||
| 500 | - } | ||
| 501 | - | ||
| 502 | - public void setLate(boolean late) { | ||
| 503 | - this.late = late; | ||
| 504 | - } | ||
| 505 | - | ||
| 506 | - public boolean isLate2() { | ||
| 507 | - return late2; | ||
| 508 | - } | ||
| 509 | - | ||
| 510 | - public void setLate2(boolean late2) { | ||
| 511 | - this.late2 = late2; | ||
| 512 | - } | ||
| 513 | - | ||
| 514 | - public float getLateMinute() { | ||
| 515 | - return lateMinute; | ||
| 516 | - } | ||
| 517 | - | ||
| 518 | - public void setLateMinute(float lateMinute) { | ||
| 519 | - this.lateMinute = lateMinute; | ||
| 520 | - } | ||
| 521 | - | ||
| 522 | - public String getRemarks() { | ||
| 523 | - return remarks; | ||
| 524 | - } | ||
| 525 | - | ||
| 526 | - public void setRemarks(String remarks) { | ||
| 527 | - this.remarks = remarks; | ||
| 528 | - } | ||
| 529 | - | ||
| 530 | - public String getDfsj() { | ||
| 531 | - return dfsj; | ||
| 532 | - } | ||
| 533 | - | ||
| 534 | - public void setDfsj(String dfsj) { | ||
| 535 | - this.dfsj = dfsj; | ||
| 536 | - } | ||
| 537 | - | ||
| 538 | - public Long getDfsjT() { | ||
| 539 | - return dfsjT; | ||
| 540 | - } | ||
| 541 | - | ||
| 542 | - public void setDfsjT(Long dfsjT) { | ||
| 543 | - this.dfsjT = dfsjT; | ||
| 544 | - } | ||
| 545 | - | ||
| 546 | - public Integer getDirectiveState() { | ||
| 547 | - return directiveState; | ||
| 548 | - } | ||
| 549 | - | ||
| 550 | - public void setDirectiveState(Integer directiveState) { | ||
| 551 | - this.directiveState = directiveState; | ||
| 552 | - } | ||
| 553 | - | ||
| 554 | - public String getQdzArrDatejh() { | ||
| 555 | - return qdzArrDatejh; | ||
| 556 | - } | ||
| 557 | - | ||
| 558 | - public void setQdzArrDatejh(String qdzArrDatejh) { | ||
| 559 | - this.qdzArrDatejh = qdzArrDatejh; | ||
| 560 | - } | ||
| 561 | - | ||
| 562 | - public String getQdzArrDatesj() { | ||
| 563 | - return qdzArrDatesj; | ||
| 564 | - } | ||
| 565 | - | ||
| 566 | - public void setQdzArrDatesj(String qdzArrDatesj) { | ||
| 567 | - this.qdzArrDatesj = qdzArrDatesj; | ||
| 568 | - } | ||
| 569 | - | ||
| 570 | - public Set<ChildTaskPlan> getcTasks() { | ||
| 571 | - return cTasks; | ||
| 572 | - } | ||
| 573 | - | ||
| 574 | - public void setcTasks(Set<ChildTaskPlan> cTasks) { | ||
| 575 | - this.cTasks = cTasks; | ||
| 576 | - } | ||
| 577 | - | ||
| 578 | - public String getGsName() { | ||
| 579 | - return gsName; | ||
| 580 | - } | ||
| 581 | - | ||
| 582 | - public void setGsName(String gsName) { | ||
| 583 | - this.gsName = gsName; | ||
| 584 | - } | ||
| 585 | - | ||
| 586 | - public String getGsBm() { | ||
| 587 | - return gsBm; | ||
| 588 | - } | ||
| 589 | - | ||
| 590 | - public void setGsBm(String gsBm) { | ||
| 591 | - this.gsBm = gsBm; | ||
| 592 | - } | ||
| 593 | - | ||
| 594 | - public String getFgsName() { | ||
| 595 | - return fgsName; | ||
| 596 | - } | ||
| 597 | - | ||
| 598 | - public void setFgsName(String fgsName) { | ||
| 599 | - this.fgsName = fgsName; | ||
| 600 | - } | ||
| 601 | - | ||
| 602 | - public String getFgsBm() { | ||
| 603 | - return fgsBm; | ||
| 604 | - } | ||
| 605 | - | ||
| 606 | - public void setFgsBm(String fgsBm) { | ||
| 607 | - this.fgsBm = fgsBm; | ||
| 608 | - } | ||
| 609 | - | ||
| 610 | - public boolean isDfAuto() { | ||
| 611 | - return dfAuto; | ||
| 612 | - } | ||
| 613 | - | ||
| 614 | - public void setDfAuto(boolean dfAuto) { | ||
| 615 | - this.dfAuto = dfAuto; | ||
| 616 | - } | ||
| 617 | - | ||
| 618 | - public boolean isOnline() { | ||
| 619 | - return online; | ||
| 620 | - } | ||
| 621 | - | ||
| 622 | - public void setOnline(boolean online) { | ||
| 623 | - this.online = online; | ||
| 624 | - } | ||
| 625 | - | ||
| 626 | - public boolean isReissue() { | ||
| 627 | - return reissue; | ||
| 628 | - } | ||
| 629 | - | ||
| 630 | - public void setReissue(boolean reissue) { | ||
| 631 | - this.reissue = reissue; | ||
| 632 | - } | ||
| 633 | - | ||
| 634 | - public Integer getDriftStatus() { | ||
| 635 | - return driftStatus; | ||
| 636 | - } | ||
| 637 | - | ||
| 638 | - public void setDriftStatus(Integer driftStatus) { | ||
| 639 | - this.driftStatus = driftStatus; | ||
| 640 | - } | ||
| 641 | - | ||
| 642 | - public boolean isCcService() { | ||
| 643 | - return ccService; | ||
| 644 | - } | ||
| 645 | - | ||
| 646 | - public void setCcService(boolean ccService) { | ||
| 647 | - this.ccService = ccService; | ||
| 648 | - } | ||
| 649 | -} |
src/main/java/com/bsth/websocket/handler/SendUtils.java
| @@ -7,7 +7,6 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity; | @@ -7,7 +7,6 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity; | ||
| 7 | import com.bsth.data.safe_driv.SafeDriv; | 7 | import com.bsth.data.safe_driv.SafeDriv; |
| 8 | import com.bsth.entity.directive.D80; | 8 | import com.bsth.entity.directive.D80; |
| 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 10 | -import com.bsth.websocket.entity.WsScheduleRealInfo; | ||
| 11 | import com.fasterxml.jackson.core.JsonProcessingException; | 10 | import com.fasterxml.jackson.core.JsonProcessingException; |
| 12 | import com.fasterxml.jackson.databind.ObjectMapper; | 11 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 13 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
| @@ -39,7 +38,7 @@ public class SendUtils{ | @@ -39,7 +38,7 @@ public class SendUtils{ | ||
| 39 | 38 | ||
| 40 | Map<String, Object> map = new HashMap<>(); | 39 | Map<String, Object> map = new HashMap<>(); |
| 41 | map.put("fn", "faChe"); | 40 | map.put("fn", "faChe"); |
| 42 | - map.put("t", WsScheduleRealInfo.getInstance(sch)); | 41 | + map.put("t", sch); |
| 43 | map.put("dataStr", sdf.format(new Date())); | 42 | map.put("dataStr", sdf.format(new Date())); |
| 44 | 43 | ||
| 45 | ObjectMapper mapper = new ObjectMapper(); | 44 | ObjectMapper mapper = new ObjectMapper(); |
| @@ -63,7 +62,7 @@ public class SendUtils{ | @@ -63,7 +62,7 @@ public class SendUtils{ | ||
| 63 | 62 | ||
| 64 | Map<String, Object> map = new HashMap<>(); | 63 | Map<String, Object> map = new HashMap<>(); |
| 65 | map.put("fn", "refreshSch"); | 64 | map.put("fn", "refreshSch"); |
| 66 | - map.put("ts", WsScheduleRealInfo.getMultiInstance(list)); | 65 | + map.put("ts", list); |
| 67 | 66 | ||
| 68 | ObjectMapper mapper = new ObjectMapper(); | 67 | ObjectMapper mapper = new ObjectMapper(); |
| 69 | 68 | ||
| @@ -83,8 +82,8 @@ public class SendUtils{ | @@ -83,8 +82,8 @@ public class SendUtils{ | ||
| 83 | 82 | ||
| 84 | Map<String, Object> map = new HashMap<>(); | 83 | Map<String, Object> map = new HashMap<>(); |
| 85 | map.put("fn", "zhongDian"); | 84 | map.put("fn", "zhongDian"); |
| 86 | - map.put("t", WsScheduleRealInfo.getInstance(sch)); | ||
| 87 | - map.put("nt", WsScheduleRealInfo.getInstance(nextSch)); | 85 | + map.put("t", sch); |
| 86 | + map.put("nt", nextSch); | ||
| 88 | map.put("finish", finish); | 87 | map.put("finish", finish); |
| 89 | map.put("dataStr", sdf.format(new Date())); | 88 | map.put("dataStr", sdf.format(new Date())); |
| 90 | 89 | ||
| @@ -124,7 +123,7 @@ public class SendUtils{ | @@ -124,7 +123,7 @@ public class SendUtils{ | ||
| 124 | 123 | ||
| 125 | Map<String, Object> map = new HashMap<>(); | 124 | Map<String, Object> map = new HashMap<>(); |
| 126 | map.put("fn", "directive"); | 125 | map.put("fn", "directive"); |
| 127 | - map.put("t", WsScheduleRealInfo.getInstance(sch));; | 126 | + map.put("t", sch);; |
| 128 | 127 | ||
| 129 | ObjectMapper mapper = new ObjectMapper(); | 128 | ObjectMapper mapper = new ObjectMapper(); |
| 130 | 129 |
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
| @@ -43,10 +43,10 @@ | @@ -43,10 +43,10 @@ | ||
| 43 | </select> | 43 | </select> |
| 44 | </div> | 44 | </div> |
| 45 | <button class="uk-button search-btn" title="只支持后模糊">检索</button> | 45 | <button class="uk-button search-btn" title="只支持后模糊">检索</button> |
| 46 | - <label class="auto-refresh" > | 46 | + <!--<label class="auto-refresh" > |
| 47 | <input type="checkbox" value="1" name="schCBox" class="i-cbox"> | 47 | <input type="checkbox" value="1" name="schCBox" class="i-cbox"> |
| 48 | 自动刷新 | 48 | 自动刷新 |
| 49 | - </label> | 49 | + </label>--> |
| 50 | </fieldset> | 50 | </fieldset> |
| 51 | </form> | 51 | </form> |
| 52 | </div> | 52 | </div> |
src/main/resources/static/real_control_v2/js/main.js
| @@ -168,8 +168,8 @@ var disabled_submit_btn = function (form) { | @@ -168,8 +168,8 @@ var disabled_submit_btn = function (form) { | ||
| 168 | function showUpdateDescription() { | 168 | function showUpdateDescription() { |
| 169 | //更新说明 | 169 | //更新说明 |
| 170 | var updateDescription = { | 170 | var updateDescription = { |
| 171 | - date: '2017-11-24', | ||
| 172 | - text: '<h5>1、修复23号下午更新后出现的部分线路班次执行问题。</h5><h5>2、尝试接入成山路停车场的RFID信号,以弥补成山路停车场高峰时GPS信号弱的问题。</h5><h5>3、报表管理里加入 “班次车辆人员日统计”</h5><h5>4、现在“历史班次调整”里可以修改烂班原因和售票员</h5>' | 171 | + date: '2017-11-25_中午', |
| 172 | + text: '<h5>1、修复这个版本的一个问题,这个问题导致首站和第二站重叠的时候无法发车。</h5><h5>2、修复455路因 昌邑路民生路 和 昌邑路苗圃路 站点顺序颠倒引发的上下行跳动问题。</h5><h5>3、放宽对中途站的检测机制,如果仍然有线路出现上下行乱跳的问题,及时上报管理员。</h5>' | ||
| 173 | }; | 173 | }; |
| 174 | 174 | ||
| 175 | var storage = window.localStorage | 175 | var storage = window.localStorage |