Commit 3c77c0da4e5e9585edc97c45ba1b78e1fe9f54ce

Authored by 潘钊
1 parent 8723dd64

update...

src/main/java/com/bsth/data/gpsdata/GpsRealData.java
1 1 package com.bsth.data.gpsdata;
2 2  
  3 +import com.bsth.Application;
3 4 import com.bsth.data.BasicData;
4 5 import com.bsth.data.forecast.ForecastRealServer;
5 6 import com.bsth.data.gpsdata.thread.GpsDataLoaderThread;
... ... @@ -18,6 +19,7 @@ import org.springframework.stereotype.Component;
18 19 import java.util.*;
19 20 import java.util.concurrent.ConcurrentHashMap;
20 21 import java.util.concurrent.ConcurrentMap;
  22 +import java.util.concurrent.TimeUnit;
21 23  
22 24 /**
23 25 * @author PanZhao
... ... @@ -62,7 +64,7 @@ public class GpsRealData implements CommandLineRunner {
62 64 public void run(String... arg0) throws Exception {
63 65 logger.info("gpsDataLoader,20,3");
64 66 //http形式获取GPS数据
65   - //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 2, TimeUnit.SECONDS);
  67 + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 2, TimeUnit.SECONDS);
66 68 //定时扫描掉离线
67 69 //Application.mainServices.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);
68 70  
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -146,7 +146,7 @@ public class DayOfSchedule implements CommandLineRunner {
146 146 basicDataLoader.loadAllData();
147 147  
148 148 //翻班线程
149   -// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
  149 + Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
150 150 //入库
151 151 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 30, TimeUnit.SECONDS);
152 152 //班次误点扫描
... ...
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
... ... @@ -132,14 +132,14 @@ public class DirectiveServiceImpl extends BaseServiceImpl<D60, Integer> implemen
132 132 // 发送指令
133 133 int code = GatewayHttpUtils.postJson(jObj.toJSONString());
134 134  
135   - // 添加到缓存,等待入库
136 135 d60.setDispatch(true);
137 136 d60.setSch(sch);
138 137 d60.setHttpCode(code);
139   - dayOfDirectives.put60(d60);
140 138  
141 139 if (code == 0) {
142 140 sch.setDirectiveState(60);
  141 + // 添加到缓存,延迟入库
  142 + dayOfDirectives.put60(d60);
143 143 // 通知页面
144 144 sendD60ToPage(sch);
145 145 }
... ...
src/main/resources/application-dev.properties
... ... @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
8 8 spring.jpa.database= MYSQL
9 9 spring.jpa.show-sql= true
10 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11   -spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  11 +spring.datasource.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 12 spring.datasource.username= root
13   -spring.datasource.password=
  13 +spring.datasource.password= panzhao
14 14 #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
15 15 #spring.datasource.username= root
16 16 #spring.datasource.password= root
... ... @@ -32,4 +32,4 @@ spring.datasource.validation-query=select 1
32 32 http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/
33 33 #http.gps.real.url= http://27.115.69.123:8800/transport_server/rtgps/
34 34 ##\u6D88\u606F\u4E0B\u53D1
35   -http.send.directive = http://192.168.168.201:9090/transport_server/message/
36 35 \ No newline at end of file
  36 +http.send.directive = http://192.168.168.201:9090/transport_server/message/
... ...