Commit 28c7a87db77ae1184569b21d48eaa981a0283fbe

Authored by 潘钊
1 parent afed5209

update...

src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
... ... @@ -260,7 +260,7 @@ public class InOutStationSignalHandle extends SignalHandle{
260 260 if (config != null && config.getOutConfig() == 2) {
261 261 //出站既出场
262 262 ScheduleRealInfo schPrev = dayOfSchedule.prev(sch);
263   - if (schPrev != null && schPrev.getBcType().equals("out") && (schPrev.getBcsj()==0 || schPrev.getJhlcOrig().equals(0))
  263 + if (schPrev != null && schPrev.getBcType().equals("out") && (schPrev.getBcsj()==0 || schPrev.getJhlcOrig().intValue()==0)
264 264 && (!limitPark || park.equals(schPrev.getQdzCode()))) {
265 265  
266 266 schPrev.setFcsjActualAll(sch.getFcsjActualTime());
... ... @@ -429,7 +429,7 @@ public class InOutStationSignalHandle extends SignalHandle{
429 429 String stopId = gps.getStopNo();
430 430 for(int i = 0; i < halfList.size(); i ++){
431 431 sch = halfList.get(i);
432   - if(!sch.getZdzCode().equals(stopId))
  432 + if(!sch.getZdzCode().equals(stopId) || sch.getStatus()==2)
433 433 continue;
434 434  
435 435 if(sch.getZdsjT() < gps.getTimestamp())
... ...
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
... ... @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 60 for (String nbbm : keys) {
61 61 Collections.sort(listMap.get(nbbm), comp);
62 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63   - /*if(nbbm.equals("W09-164"))
  63 + /*if(nbbm.equals("S0K-004"))
64 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 65 /*if(lineId.equals("60028"))
66 66 new RecoveryThread(listMap.get(lineId), count).run();*/
... ... @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
84 84 Calendar calendar = Calendar.getInstance();
85 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 from bsth_c_gps_info where days_year=241";// + dayOfYear;
  87 + String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=245";// + dayOfYear;
88 88 JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource());
89 89  
90 90 List<GpsEntity> list =
... ... @@ -153,7 +153,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
153 153 boolean task;
154 154 for (GpsEntity gps : list) {
155 155 try {
156   - /*if(gps.getTimestamp() >= 1503960000000L){
  156 + /*if(gps.getTimestamp() >= 1504298280000L){
157 157 System.out.println("debugger...");
158 158 }*/
159 159 //是否有任务
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -592,7 +592,7 @@ public class DayOfSchedule {
592 592 * @param sch 当前班次
593 593 * @return
594 594 */
595   - private ScheduleRealInfo next2(Collection<ScheduleRealInfo> list, ScheduleRealInfo sch) {
  595 + private ScheduleRealInfo next2_lp(Collection<ScheduleRealInfo> list, ScheduleRealInfo sch) {
596 596 int outConfig = -1;
597 597 LineConfig config = lineConfigData.get(sch.getXlBm());
598 598 if (config != null)
... ... @@ -605,8 +605,35 @@ public class DayOfSchedule {
605 605 flag = true;
606 606 continue;
607 607 }
608   - //忽略烂班
609   - if (temp.isDestroy())
  608 +
  609 + if (flag) {
  610 + next = temp;
  611 + break;
  612 + }
  613 + }
  614 + return next;
  615 + }
  616 +
  617 + private ScheduleRealInfo next3_lp(Collection<ScheduleRealInfo> list, ScheduleRealInfo sch) {
  618 + int outConfig = -1;
  619 + LineConfig config = lineConfigData.get(sch.getXlBm());
  620 + if (config != null)
  621 + outConfig = config.getOutConfig();
  622 +
  623 + //限定出站既出场的停车场
  624 + String park = config.getTwinsPark();
  625 + boolean limitPark = StringUtils.isNotEmpty(park);
  626 + boolean flag = false;
  627 + ScheduleRealInfo next = null;
  628 + for (ScheduleRealInfo temp : list) {
  629 + if (temp.getId() == sch.getId()) {
  630 + flag = true;
  631 + continue;
  632 + }
  633 +
  634 + //出站既出场,忽略出场班次
  635 + if (outConfig == 2 && temp.getBcType().equals("out") && (temp.getBcsj()==0 || temp.getJhlcOrig().equals(0))
  636 + && (!limitPark || park.equals(temp.getQdzCode())))
610 637 continue;
611 638  
612 639 if (flag) {
... ... @@ -1121,7 +1148,7 @@ public class DayOfSchedule {
1121 1148 public ScheduleRealInfo nextByLp(ScheduleRealInfo sch) {
1122 1149 List<ScheduleRealInfo> list = lpScheduleMap.get(sch.getXlBm() + "_" + sch.getLpName());
1123 1150 Collections.sort(list, schFCSJComparator);
1124   - return next(list, sch);
  1151 + return next3_lp(list, sch);
1125 1152 }
1126 1153  
1127 1154 /**
... ... @@ -1133,7 +1160,7 @@ public class DayOfSchedule {
1133 1160 public ScheduleRealInfo nextByLp2(ScheduleRealInfo sch) {
1134 1161 List<ScheduleRealInfo> list = lpScheduleMap.get(sch.getXlBm() + "_" + sch.getLpName());
1135 1162 Collections.sort(list, schFCSJComparator);
1136   - return next2(list, sch);
  1163 + return next2_lp(list, sch);
1137 1164 }
1138 1165  
1139 1166 public ArrayListMultimap<String, ScheduleRealInfo> getLpScheduleMap() {
... ...
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
... ... @@ -223,7 +223,7 @@ public class ScheduleRealInfo {
223 223 * 2:到站漂移
224 224 * 3:中途漂移
225 225 */
226   - private int driftStatus = 0;
  226 + private Integer driftStatus = 0;
227 227  
228 228 public boolean isDfAuto() {
229 229 return dfAuto;
... ... @@ -942,11 +942,11 @@ public class ScheduleRealInfo {
942 942 this.siginCompate = siginCompate;
943 943 }
944 944  
945   - public int getDriftStatus() {
  945 + public Integer getDriftStatus() {
946 946 return driftStatus;
947 947 }
948 948  
949   - public void setDriftStatus(int driftStatus) {
  949 + public void setDriftStatus(Integer driftStatus) {
950 950 this.driftStatus = driftStatus;
951 951 }
952 952 }
... ...