Commit c1b7e9d6be16d0ad59ddddce8dd3ce5f00fa498e
1 parent
22113a36
1.ip电话映射默认初始化,接口访问不到,妈个鸡
Showing
2 changed files
with
4 additions
and
7 deletions
src/main/java/com/bsth/XDApplication.java
| ... | ... | @@ -184,10 +184,11 @@ public class XDApplication implements CommandLineRunner { |
| 184 | 184 | //安全驾驶 |
| 185 | 185 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 186 | 186 | |
| 187 | + GpsDataLoaderThread.setFlag(-1); | |
| 187 | 188 | /** 线调业务 */ |
| 188 | 189 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 |
| 189 | 190 | sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点 |
| 190 | - sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据 | |
| 191 | + sexec.scheduleWithFixedDelay(gpsDataLoader, 0, 2, TimeUnit.SECONDS);//抓取GPS数据 | |
| 191 | 192 | sexec.scheduleWithFixedDelay(rfidDataLoader, 5, 5, TimeUnit.SECONDS);//抓取RFID数据 |
| 192 | 193 | sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码 |
| 193 | 194 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -24,11 +24,7 @@ import java.util.List; |
| 24 | 24 | import java.util.Map; |
| 25 | 25 | import java.util.Queue; |
| 26 | 26 | import java.util.Set; |
| 27 | -import java.util.concurrent.ConcurrentLinkedQueue; | |
| 28 | -import java.util.concurrent.Executors; | |
| 29 | -import java.util.concurrent.ScheduledExecutorService; | |
| 30 | -import java.util.concurrent.ThreadFactory; | |
| 31 | -import java.util.concurrent.TimeUnit; | |
| 27 | +import java.util.concurrent.*; | |
| 32 | 28 | import java.util.regex.Pattern; |
| 33 | 29 | |
| 34 | 30 | import org.apache.commons.io.IOUtils; |
| ... | ... | @@ -222,7 +218,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 222 | 218 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 223 | 219 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 224 | 220 | |
| 225 | - public static Map<String,String> DIRMAP ; // dvr电话 | |
| 221 | + public static Map<String,String> DIRMAP = new ConcurrentHashMap<>(); // dvr电话 | |
| 226 | 222 | private Queue<RepairReport> queue = new ConcurrentLinkedQueue<>(); |
| 227 | 223 | |
| 228 | 224 | private ScheduledExecutorService exec = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() { | ... | ... |