Commit 9ec33a931a4c4874552b2245aa6cc665dc99a051
1 parent
ea49ae6f
update
Showing
3 changed files
with
14 additions
and
19 deletions
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
| 1 | package com.bsth.data.arrival; | 1 | package com.bsth.data.arrival; |
| 2 | 2 | ||
| 3 | -import com.bsth.Application; | ||
| 4 | import com.bsth.data.match.Arrival2Schedule; | 3 | import com.bsth.data.match.Arrival2Schedule; |
| 5 | import com.bsth.data.schedule.DayOfSchedule; | 4 | import com.bsth.data.schedule.DayOfSchedule; |
| 6 | import com.google.common.collect.ArrayListMultimap; | 5 | import com.google.common.collect.ArrayListMultimap; |
| @@ -12,7 +11,6 @@ import org.springframework.boot.CommandLineRunner; | @@ -12,7 +11,6 @@ import org.springframework.boot.CommandLineRunner; | ||
| 12 | import org.springframework.stereotype.Component; | 11 | import org.springframework.stereotype.Component; |
| 13 | 12 | ||
| 14 | import java.util.*; | 13 | import java.util.*; |
| 15 | -import java.util.concurrent.TimeUnit; | ||
| 16 | 14 | ||
| 17 | /** | 15 | /** |
| 18 | * | 16 | * |
| @@ -44,7 +42,7 @@ public class ArrivalData_GPS implements CommandLineRunner{ | @@ -44,7 +42,7 @@ public class ArrivalData_GPS implements CommandLineRunner{ | ||
| 44 | @Override | 42 | @Override |
| 45 | public void run(String... arg0) throws Exception { | 43 | public void run(String... arg0) throws Exception { |
| 46 | logger.info("ArrivalData_GPS,30,06"); | 44 | logger.info("ArrivalData_GPS,30,06"); |
| 47 | - Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 40, 6, TimeUnit.SECONDS); | 45 | + //Application.mainServices.scheduleWithFixedDelay(dataLoaderThread, 40, 6, TimeUnit.SECONDS); |
| 48 | } | 46 | } |
| 49 | 47 | ||
| 50 | @Component | 48 | @Component |
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
| 1 | package com.bsth.data.gpsdata; | 1 | package com.bsth.data.gpsdata; |
| 2 | 2 | ||
| 3 | -import java.io.BufferedReader; | ||
| 4 | -import java.io.InputStreamReader; | ||
| 5 | -import java.util.*; | ||
| 6 | -import java.util.concurrent.TimeUnit; | ||
| 7 | - | 3 | +import com.alibaba.fastjson.JSON; |
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.data.BasicData; | ||
| 6 | +import com.bsth.data.forecast.ForecastRealServer; | ||
| 7 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 8 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 9 | +import com.bsth.util.ConfigUtil; | ||
| 10 | +import com.google.common.collect.TreeMultimap; | ||
| 8 | import org.apache.commons.lang3.StringUtils; | 11 | import org.apache.commons.lang3.StringUtils; |
| 9 | import org.apache.http.HttpEntity; | 12 | import org.apache.http.HttpEntity; |
| 10 | import org.apache.http.client.methods.CloseableHttpResponse; | 13 | import org.apache.http.client.methods.CloseableHttpResponse; |
| @@ -17,15 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -17,15 +20,9 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
| 17 | import org.springframework.boot.CommandLineRunner; | 20 | import org.springframework.boot.CommandLineRunner; |
| 18 | import org.springframework.stereotype.Component; | 21 | import org.springframework.stereotype.Component; |
| 19 | 22 | ||
| 20 | -import com.alibaba.fastjson.JSON; | ||
| 21 | -import com.alibaba.fastjson.JSONObject; | ||
| 22 | -import com.bsth.Application; | ||
| 23 | -import com.bsth.data.BasicData; | ||
| 24 | -import com.bsth.data.forecast.ForecastRealServer; | ||
| 25 | -import com.bsth.data.schedule.DayOfSchedule; | ||
| 26 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 27 | -import com.bsth.util.ConfigUtil; | ||
| 28 | -import com.google.common.collect.TreeMultimap; | 23 | +import java.io.BufferedReader; |
| 24 | +import java.io.InputStreamReader; | ||
| 25 | +import java.util.*; | ||
| 29 | 26 | ||
| 30 | /** | 27 | /** |
| 31 | * | 28 | * |
| @@ -68,7 +65,7 @@ public class GpsRealData implements CommandLineRunner{ | @@ -68,7 +65,7 @@ public class GpsRealData implements CommandLineRunner{ | ||
| 68 | @Override | 65 | @Override |
| 69 | public void run(String... arg0) throws Exception { | 66 | public void run(String... arg0) throws Exception { |
| 70 | logger.info("gpsDataLoader,20,6"); | 67 | logger.info("gpsDataLoader,20,6"); |
| 71 | - Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); | 68 | + //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS); |
| 72 | } | 69 | } |
| 73 | 70 | ||
| 74 | public GpsEntity add(GpsEntity gps) { | 71 | public GpsEntity add(GpsEntity gps) { |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -131,7 +131,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -131,7 +131,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 131 | diff+=(1000*60*60*24); | 131 | diff+=(1000*60*60*24); |
| 132 | 132 | ||
| 133 | logger.info(diff/1000/60 + "分钟之后提交到运管处"); | 133 | logger.info(diff/1000/60 + "分钟之后提交到运管处"); |
| 134 | - Application.mainServices.scheduleWithFixedDelay(submitToTrafficManage, diff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); | 134 | + //Application.mainServices.scheduleWithFixedDelay(submitToTrafficManage, diff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | public Map<String, String> getCurrSchDate() { | 137 | public Map<String, String> getCurrSchDate() { |