Commit 65ac686b701dd66019da06b10df2b0bdd7aebc6e
1 parent
1aa8b03f
行车路单添加:发车误点快慢(包括导出)
Showing
1 changed file
with
30 additions
and
0 deletions
Too many changes to show.
To preserve performance only 1 of 5 files are displayed.
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -2954,6 +2954,36 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2954 | 2954 | maps.put("fast", ""); |
| 2955 | 2955 | maps.put("slow", ""); |
| 2956 | 2956 | } |
| 2957 | + | |
| 2958 | + String fcsj = scheduleRealInfo.getFcsj(); | |
| 2959 | + String fcsjActual = scheduleRealInfo.getFcsjActual(); | |
| 2960 | + if (fcsj != null && fcsjActual != null && | |
| 2961 | + !fcsj.equals(fcsjActual) && | |
| 2962 | + !fcsj.equals("") && | |
| 2963 | + !fcsjActual.equals("")) { | |
| 2964 | + int fcsjT = Integer.valueOf(fcsj.split(":")[0]) * 60 + Integer.valueOf(fcsj.split(":")[1]); | |
| 2965 | + int fcsjAT = Integer.valueOf(fcsjActual.split(":")[0]) * 60 + Integer.valueOf(fcsjActual.split(":")[1]); | |
| 2966 | + if (fcsj.compareTo(fcsjActual) > 0) { | |
| 2967 | + if (fcsjT - fcsjAT > 1000) { | |
| 2968 | + maps.put("fast_start", ""); | |
| 2969 | + maps.put("slow_start", fcsjAT - fcsjT + 1440); | |
| 2970 | + } else { | |
| 2971 | + maps.put("fast_start", TimeUtils.getTimeDifference(fcsj, fcsjActual)); | |
| 2972 | + maps.put("slow_start", ""); | |
| 2973 | + } | |
| 2974 | + } else { | |
| 2975 | + if (fcsjAT - fcsjT > 1000) { | |
| 2976 | + maps.put("fast_start", fcsjT - fcsjAT + 1440); | |
| 2977 | + maps.put("slow_start", ""); | |
| 2978 | + } else { | |
| 2979 | + maps.put("fast_start", ""); | |
| 2980 | + maps.put("slow_start", TimeUtils.getTimeDifference(fcsj, fcsjActual)); | |
| 2981 | + } | |
| 2982 | + } | |
| 2983 | + } else { | |
| 2984 | + maps.put("fast_start", ""); | |
| 2985 | + maps.put("slow_start", ""); | |
| 2986 | + } | |
| 2957 | 2987 | listMap.add(maps); |
| 2958 | 2988 | } catch (Exception e) { |
| 2959 | 2989 | e.printStackTrace(); | ... | ... |