Commit ba009f5714d6c06da2b9f99322f68a1f7b07a962

Authored by 王通
1 parent 7edb7de8

青浦老版本地图因新版本数据不兼容的修正

src/main/java/com/bsth/XDApplication.java
@@ -127,7 +127,7 @@ public class XDApplication implements CommandLineRunner { @@ -127,7 +127,7 @@ public class XDApplication implements CommandLineRunner {
127 log.info("devInit..."); 127 log.info("devInit...");
128 ScheduledExecutorService sexec = Application.mainServices; 128 ScheduledExecutorService sexec = Application.mainServices;
129 //抓取GPS数据 129 //抓取GPS数据
130 - gpsDataLoader.setFlag(-1); 130 + GpsDataLoaderThread.setFlag(-1);
131 //dayOfSchedule.dataRecovery(); 131 //dayOfSchedule.dataRecovery();
132 //sexec.scheduleWithFixedDelay(gpsDataLoader, 60, 4, TimeUnit.SECONDS); 132 //sexec.scheduleWithFixedDelay(gpsDataLoader, 60, 4, TimeUnit.SECONDS);
133 //实际排班更新线程 133 //实际排班更新线程
@@ -161,6 +161,7 @@ public class XDApplication implements CommandLineRunner { @@ -161,6 +161,7 @@ public class XDApplication implements CommandLineRunner {
161 /** 线调业务 */ 161 /** 线调业务 */
162 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 162 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
163 sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点 163 sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
  164 + GpsDataLoaderThread.setFlag(-1);
164 sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据 165 sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
165 sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码 166 sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
166 167
src/main/java/com/bsth/data/gpsdata_v2/load/GatewayHttpLoader.java
@@ -76,7 +76,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{ @@ -76,7 +76,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{
76 76
77 list = JSON.parseArray(JSON.parseObject(sb.toString()).getString("data"), GpsEntity.class); 77 list = JSON.parseArray(JSON.parseObject(sb.toString()).getString("data"), GpsEntity.class);
78 //过滤掉无效的点位 78 //过滤掉无效的点位
79 - list = GpsDataUtils.clearInvalid(list); 79 + //list = GpsDataUtils.clearInvalid(list);
80 80
81 List<GpsEntity> ups = new ArrayList<>(); 81 List<GpsEntity> ups = new ArrayList<>();
82 String nbbm; 82 String nbbm;
src/main/java/com/bsth/data/gpsdata_v2/load/SocketClientLoader.java
@@ -13,7 +13,6 @@ import org.apache.http.impl.client.CloseableHttpClient; @@ -13,7 +13,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
13 import org.apache.http.impl.client.HttpClients; 13 import org.apache.http.impl.client.HttpClients;
14 import org.slf4j.Logger; 14 import org.slf4j.Logger;
15 import org.slf4j.LoggerFactory; 15 import org.slf4j.LoggerFactory;
16 -import org.springframework.stereotype.Component;  
17 16
18 import java.io.BufferedReader; 17 import java.io.BufferedReader;
19 import java.io.InputStreamReader; 18 import java.io.InputStreamReader;
@@ -24,7 +23,6 @@ import java.util.List; @@ -24,7 +23,6 @@ import java.util.List;
24 * 从专用的socket client 加载数据 23 * 从专用的socket client 加载数据
25 * Created by panzhao on 2017/11/15. 24 * Created by panzhao on 2017/11/15.
26 */ 25 */
27 -@Component  
28 public class SocketClientLoader { 26 public class SocketClientLoader {
29 27
30 static Logger logger = LoggerFactory.getLogger(SocketClientLoader.class); 28 static Logger logger = LoggerFactory.getLogger(SocketClientLoader.class);
src/main/resources/application-prod.properties
@@ -2,15 +2,15 @@ server.port=9088 @@ -2,15 +2,15 @@ server.port=9088
2 management.port= 9001 2 management.port= 9001
3 management.address= 127.0.0.1 3 management.address= 127.0.0.1
4 4
5 -spring.jpa.hibernate.ddl-auto= none 5 +spring.jpa.hibernate.ddl-auto= update
6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy 6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7 #DATABASE 7 #DATABASE
8 spring.jpa.database= MYSQL 8 spring.jpa.database= MYSQL
9 -spring.jpa.show-sql= false 9 +spring.jpa.show-sql= true
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 -spring.datasource.url= jdbc:mysql://10.10.150.20:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 +spring.datasource.url= jdbc:mysql://192.168.40.100:3306/qp_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
13 -spring.datasource.password= root2jsp@JSP 13 +spring.datasource.password= root@JSP2jsp
14 #DATASOURCE 14 #DATASOURCE
15 spring.datasource.max-active=100 15 spring.datasource.max-active=100
16 spring.datasource.max-idle=8 16 spring.datasource.max-idle=8
@@ -23,9 +23,7 @@ spring.datasource.test-on-return=true @@ -23,9 +23,7 @@ spring.datasource.test-on-return=true
23 spring.datasource.test-while-idle=true 23 spring.datasource.test-while-idle=true
24 spring.datasource.validation-query=select 1 24 spring.datasource.validation-query=select 1
25 25
26 -## gps client data  
27 -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all  
28 ## gateway real data 26 ## gateway real data
29 -http.gps.real.url= http://10.10.150.21:8080/transport_server/rtgps/ 27 +http.gps.real.url= http://192.168.40.82:8080/transport_server/rtgps/
30 ## gateway send directive 28 ## gateway send directive
31 -http.send.directive = http://10.10.150.21:8080/transport_server/message/  
32 \ No newline at end of file 29 \ No newline at end of file
  30 +http.send.directive = http://192.168.40.82:8080/transport_server/message/
33 \ No newline at end of file 31 \ No newline at end of file
src/main/resources/application.properties
1 spring.profiles: dev,prod 1 spring.profiles: dev,prod
2 -spring.profiles.active: dev 2 +spring.profiles.active: prod
3 3
4 spring.view.suffix=.html 4 spring.view.suffix=.html
5 server.session-timeout=-1 5 server.session-timeout=-1
src/main/resources/ms-jdbc.properties
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 #ms.mysql.password= 123456 4 #ms.mysql.password= 123456
5 5
6 ms.mysql.driver= com.mysql.jdbc.Driver 6 ms.mysql.driver= com.mysql.jdbc.Driver
7 -ms.mysql.url= jdbc:mysql://10.10.200.226:3306/ms?useUnicode=true&characterEncoding=utf-8 7 +ms.mysql.url= jdbc:mysql://192.168.40.82:3306/ms?useUnicode=true&characterEncoding=utf-8
8 ms.mysql.username= root 8 ms.mysql.username= root
9 -ms.mysql.password= root2jsp 9 +ms.mysql.password= 123456
src/main/resources/static/index.html
@@ -220,7 +220,7 @@ @@ -220,7 +220,7 @@
220 <!-- LOGO --> 220 <!-- LOGO -->
221 <div class="page-logo"> 221 <div class="page-logo">
222 <a href="index.html" class="logo-default logo-default-text"> 222 <a href="index.html" class="logo-default logo-default-text">
223 - 浦东公交调度系统 </a> 223 + 青浦公交调度系统 </a>
224 <div class="menu-toggler sidebar-toggler"></div> 224 <div class="menu-toggler sidebar-toggler"></div>
225 </div> 225 </div>
226 <!-- END LOGO --> 226 <!-- END LOGO -->
src/main/resources/static/login.html
@@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
181 <div class="wrapper ng-scope"> 181 <div class="wrapper ng-scope">
182 <div id="loginPanel" class="dialog dialog-shadow"> 182 <div id="loginPanel" class="dialog dialog-shadow">
183 <br> 183 <br>
184 - <h3 class="logo-text">浦东公交调度系统</h3> 184 + <h3 class="logo-text">青浦公交调度系统</h3>
185 <hr> 185 <hr>
186 <form style="padding: 0px 35px;"> 186 <form style="padding: 0px 35px;">
187 <div class="form-group" style="margin-bottom: 0"> 187 <div class="form-group" style="margin-bottom: 0">
src/main/resources/static/pages/control/line/index.html
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <div class="portlet-title banner" > 18 <div class="portlet-title banner" >
19 <div class="caption col_hide_1280" style="color: #FFF;"> 19 <div class="caption col_hide_1280" style="color: #FFF;">
20 <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span 20 <i class="fa fa-life-ring" style="font-size: 22px;color: #FFF;"></i> <span
21 - class="caption-subject bold" style="font-size: 24px;">浦东公交线路调度系统</span> 21 + class="caption-subject bold" style="font-size: 24px;">青浦公交线路调度系统</span>
22 </div> 22 </div>
23 <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;"> 23 <div class="col_hide_1440" style="color: white;font-size: 18px;position: absolute;right: 25px;top: 75px;">
24 <span class="top_username"></span> <span class="operation_mode_text animated" ></span> 24 <span class="top_username"></span> <span class="operation_mode_text animated" ></span>
src/main/resources/static/pages/mapmonitor/alone/wrap.html
@@ -46,8 +46,10 @@ @@ -46,8 +46,10 @@
46 }); 46 });
47 47
48 function getGpsSuccess(gpsList){ 48 function getGpsSuccess(gpsList){
49 - if(!gpsList || gpsList.length == 0) 49 + if(!gpsList || !gpsList.gpsList || gpsList.gpsList.length == 0)
50 return; 50 return;
  51 +
  52 + gpsList = gpsList.gpsList;
51 53
52 for(var i = 0, gps; gps=gpsList[i++];){ 54 for(var i = 0, gps; gps=gpsList[i++];){
53 allGps[gps.deviceId] = gps; 55 allGps[gps.deviceId] = gps;
src/main/resources/static/real_control_v2/main.html
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 <div class="uk-width-4-10"> 55 <div class="uk-width-4-10">
56 <div class="uk-panel"> 56 <div class="uk-panel">
57 <h2 class="north-logo"> 57 <h2 class="north-logo">
58 - <!--<i class="uk-icon-life-ring"></i>--> 浦东公交线路调度 58 + <!--<i class="uk-icon-life-ring"></i>--> 青浦公交线路调度
59 </h2> 59 </h2>
60 </div> 60 </div>
61 </div> 61 </div>
src/main/resources/traffic-jdbc.properties
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 #ms.mysql.password= 123456 4 #ms.mysql.password= 123456
5 5
6 ms.mysql.driver= com.mysql.jdbc.Driver 6 ms.mysql.driver= com.mysql.jdbc.Driver
7 -ms.mysql.url= jdbc:mysql://10.10.150.21:3306/ms?useUnicode=true&characterEncoding=utf-8 7 +ms.mysql.url= jdbc:mysql://192.168.40.82:3306/ms?useUnicode=true&characterEncoding=utf-8
8 ms.mysql.username= root 8 ms.mysql.username= root
9 -ms.mysql.password= root2jsp@JSP 9 +ms.mysql.password= 123456
10 10