Commit ce97f7232427306ca56183c9f5bd2f98237c8541

Authored by 潘钊
1 parent 98de694d

update...

src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
... ... @@ -43,7 +43,7 @@ public class CarOutInfoHandler {
43 43 bcTypeMap.put("ldks", "两点间空驶");
44 44 }
45 45  
46   - private static ScheduleComparator.FCSJ schFCSJComparator = new ScheduleComparator.FCSJ();
  46 + private static ScheduleComparator.DFSJ schDFSJComparator = new ScheduleComparator.DFSJ();
47 47  
48 48 @Autowired
49 49 JdbcTemplate jdbcTemplate;
... ... @@ -165,9 +165,9 @@ public class CarOutInfoHandler {
165 165 */
166 166 private ScheduleRealInfo[] nexts(List<ScheduleRealInfo> list) {
167 167 ScheduleRealInfo[] array = new ScheduleRealInfo[3];
168   - Collections.sort(list, schFCSJComparator);
  168 + Collections.sort(list, schDFSJComparator);
169 169  
170   - int count = 0, threshold = 1000 * 60 * 30;
  170 + int count = 0, threshold = 1000 * 60 * 60;
171 171 long t = System.currentTimeMillis();
172 172 for (ScheduleRealInfo sch : list) {
173 173 if (count == 3)
... ...
src/main/java/com/bsth/data/schedule/ScheduleComparator.java
... ... @@ -28,4 +28,12 @@ public class ScheduleComparator {
28 28 return (int) (s1.getFcsjT() - s2.getFcsjT());
29 29 }
30 30 }
  31 +
  32 + public static class DFSJ implements Comparator<ScheduleRealInfo>{
  33 +
  34 + @Override
  35 + public int compare(ScheduleRealInfo s1, ScheduleRealInfo s2) {
  36 + return (int) (s1.getDfsjT() - s2.getDfsjT());
  37 + }
  38 + }
31 39 }
... ...