Commit bb5620c909bce3f76307ecc0c0e410bb1f219d3f

Authored by 王通
1 parent 4da535d2

1.共和县

src/main/java/com/bsth/XDApplication.java
... ... @@ -116,6 +116,9 @@ public class XDApplication implements CommandLineRunner {
116 116 try {
117 117 //Tools tools = new Tools("application.properties");
118 118 //String environment = tools.getValue("spring.profiles.active");
  119 + if (!"dev".equals(environment) && !"test".equals(environment)) {
  120 + environment = "prod";
  121 + }
119 122 //预先加载基础的对照数据
120 123 basicDataLoader.loadAllData();
121 124 switch (environment){
... ... @@ -128,9 +131,6 @@ public class XDApplication implements CommandLineRunner {
128 131 case "test":
129 132 testInit();
130 133 break;
131   - case "cloud":
132   - cloudInit();
133   - break;
134 134 default:
135 135 break;
136 136 }
... ... @@ -279,49 +279,4 @@ public class XDApplication implements CommandLineRunner {
279 279 //线路版本更新
280 280 //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS);
281 281 }
282   -
283   - public void cloudInit(){
284   - log.info("cloudInit...");
285   - ScheduledExecutorService sexec = Application.mainServices;
286   - //安全驾驶
287   - sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS);
288   - sexec.scheduleWithFixedDelay(mtPlanDataLoadThread, 180, 10, TimeUnit.SECONDS);
289   -
290   - GpsDataLoaderThread.setFlag(-1);
291   - /** 线调业务 */
292   - sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
293   - sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
294   - sexec.scheduleWithFixedDelay(gpsDataLoader, 0, 2, TimeUnit.SECONDS);//抓取GPS数据
295   - sexec.scheduleWithFixedDelay(rfidDataLoader, 5, 5, TimeUnit.SECONDS);//抓取RFID数据
296   - sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
297   -
298   - sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线
299   - sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程
300   - sexec.scheduleWithFixedDelay(seiPstThread, 180, 60, TimeUnit.SECONDS);//班次修正日志入库
301   - sexec.scheduleWithFixedDelay(directivesPstThread, 120, 60, TimeUnit.SECONDS);//调度指令延迟入库
302   - sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
303   - sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据
304   - sexec.scheduleWithFixedDelay(basicDataLoader, 1, 1, TimeUnit.HOURS);//基础数据更新
305   - sexec.scheduleWithFixedDelay(autoExecScanThread, 180, 50, TimeUnit.SECONDS);//班次自动执行
306   - DirectivePushQueue.start();//消息队列 -指令,系统下发的
307   - WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
308   -
309   - /** 线调为其他程序提供的数据 --写入数据库 */
310   - sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布)
311   - //线路首末班数据(网关用,班次更新时写入)
312   - //com.bsth.data.schedule.f_a_l.FirstAndLastHandler
313   - sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号)
314   -
315   - //运管处静态数据提交
316   - log.info(timeDiff / 1000 / 60 + "分钟之后提交到运管处");
317   - sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
318   - //计算油、公里加注
319   - sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
320   -
321   - //线路版本更新
322   - sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS);
323   -
324   - //线路版本更新
325   - //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS);
326   - }
327 282 }
... ...
src/main/java/com/bsth/controller/LineController.java
... ... @@ -137,13 +137,4 @@ public class LineController extends BaseController<Line, Integer> {
137 137 return service.remove(id);
138 138 }
139 139  
140   - /**
141   - * 查询外部行业编码是否有更新
142   - * @param id
143   - * @return
144   - */
145   - @RequestMapping(value ="/getLineMatchStationIsUpdate" , method = RequestMethod.GET)
146   - public Map<String, Object> getLineMatchStationIsUpdate(@RequestParam(defaultValue = "id") Integer id){
147   - return service.getLineMatchStationIsUpdate(id);
148   - }
149 140 }
... ...
src/main/java/com/bsth/controller/StationRouteController.java
1   -package com.bsth.controller;
2   -
3   -import java.util.List;
4   -import java.util.Map;
5   -
6   -import javax.servlet.http.HttpServletResponse;
7   -
8   -import org.springframework.beans.factory.annotation.Autowired;
9   -import org.springframework.web.bind.annotation.RequestMapping;
10   -import org.springframework.web.bind.annotation.RequestMethod;
11   -import org.springframework.web.bind.annotation.RequestParam;
12   -import org.springframework.web.bind.annotation.RestController;
13   -
14   -import com.bsth.entity.LsStationRoute;
15   -import com.bsth.entity.StationRoute;
16   -import com.bsth.entity.StationRouteCache;
17   -import com.bsth.repository.StationRouteCacheRepository;
18   -import com.bsth.repository.StationRouteRepository;
19   -import com.bsth.service.StationRouteService;
20   -
21   -/**
22   - *
23   - * @ClassName: StationRouteController(站点路由控制器)
24   - *
25   - * @Extends : BaseController
26   - *
27   - * @Description: TODO(站点路由控制层)
28   - *
29   - * @Author bsth@lq
30   - *
31   - * @Date 2016年5月03日 上午9:21:17
32   - *
33   - * @Dersion 公交调度系统BS版 0.1
34   - *
35   - */
36   -@RestController
37   -@RequestMapping("stationroute")
38   -public class StationRouteController extends BaseController<StationRoute, Integer> {
39   -
40   - @Autowired
41   - StationRouteService service;
42   - @Autowired
43   - StationRouteRepository stationRouteRepository;
44   - @Autowired
45   - StationRouteCacheRepository stationRouteCacheRepository;
46   -
47   -
48   - @RequestMapping(value = "/allls", method = RequestMethod.GET)
49   - public Map allls(@RequestParam Map<String, Object> map) {
50   -
51   - return service.pageLs(map);
52   - }
53   -
54   - @RequestMapping(value = "/all_ls", method = RequestMethod.GET)
55   - public Iterable<LsStationRoute> list_ls(@RequestParam Map<String, Object> map) {
56   - return service.list_ls(map);
57   - }
58   -
59   -
60   - @RequestMapping(value = "/all", method = RequestMethod.GET)
61   - public Iterable<StationRoute> list(@RequestParam Map<String, Object> map) {
62   - return service.list(map);
63   - }
64   -
65   - @RequestMapping(value = "/cacheList", method = RequestMethod.GET)
66   - public List<StationRouteCache> cacheList(@RequestParam Map<String, Object> map) {
67   - return service.cacheList(map);
68   - }
69   -
70   - /**
71   - * @Description :TODO(查询路段信息)
72   - *
73   - * @param id
74   - *
75   - * @return Map<String, Object>
76   - */
77   - @RequestMapping(value = "/export" , method = RequestMethod.GET)
78   - public Map<String, Object> export(@RequestParam Integer id, HttpServletResponse resp) {
79   - return service.getSectionRouteExport(id, resp);
80   - }
81   -
82   - /**
83   - * @param map
84   - * @throws
85   - * @Description: TODO(批量撤销站点)
86   - */
87   - @RequestMapping(value = "/batchDestroy", method = RequestMethod.POST)
88   - public Map<String, Object> updateBatch(@RequestParam Map<String, Object> map) {
89   - return service.updateStationRouteInfoFormId(map);
90   - }
91   -
92   - /**
93   - * @Description :TODO(查询树站点与路段数据)
94   - *
95   - * @param map <line.id_eq:线路ID; directions_eq:方向>
96   - *
97   - * @return List<Map<String, Object>>
98   - */
99   - @RequestMapping(value = "/findStations" , method = RequestMethod.GET)
100   - public List<Map<String, Object>> findStations(@RequestParam Map<String, Object> map) {
101   - return service.findPoints(map);
102   - }
103   -
104   - @RequestMapping(value = "/systemQuote" , method = RequestMethod.POST)
105   - public Map<String, Object> systemQuote(@RequestParam Map<String, Object> map) {
106   - return service.systemQuote(map);
107   - }
108   -
109   - /**
110   - * @Description :TODO(查询线路某方向下的站点序号与类型)
111   - *
112   - * @param map <lineId:线路ID; direction:方向;stationRouteCode:站点编码>
113   - *
114   - * @return List<Map<String, Object>>
115   - */
116   - @RequestMapping(value = "/findUpStationRouteCode" , method = RequestMethod.GET)
117   - public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) {
118   - return service.findUpStationRouteCode(map);
119   - }
120   -
121   - /**
122   - * @Description :TODO(查询线路某方向下的站点序号与类型)
123   - */
124   - @RequestMapping(value = "/findCacheUpStationRouteCode" , method = RequestMethod.GET)
125   - public List<Map<String, Object>> findCacheUpStationRouteCode(@RequestParam Map<String, Object> map) {
126   - return service.findCacheUpStationRouteCode(map);
127   - }
128   -
129   - /**
130   - * @Description :TODO(查询站点的下一个缓存站点)
131   - */
132   - @RequestMapping(value = "/findDownStationRoute" , method = RequestMethod.GET)
133   - public List<Map<String, Object>> findDownStationRoute(@RequestParam Map<String, Object> map) {
134   - return service.findDownStationRoute(map);
135   - }
136   -
137   - /**
138   - * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
139   - *
140   - * @param map <lineId:线路ID; direction:方向>
141   - *
142   - * @return List<Map<String, Object>>
143   - */
144   - @RequestMapping(value = "/getStationRouteCenterPoints" , method = RequestMethod.GET)
145   - public List<Map<String, Object>> getStationRouteCenterPoints(@RequestParam Map<String, Object> map) {
146   - return service.getStationRouteCenterPoints(map);
147   - }
148   -
149   - /**
150   - * @Description :TODO(查询线路某方向下所有站点)
151   - *
152   - * @param map <lineId:线路ID; direction:方向>
153   - *
154   - * @return List<Map<String, Object>>
155   - */
156   - @RequestMapping(value = "/getStationRouteList" , method = RequestMethod.GET)
157   - public List<Map<String, Object>> getStationRouteList(@RequestParam Map<String, Object> map) {
158   - return service.getStationRouteList(map);
159   - }
160   -
161   - /**
162   - * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
163   - *
164   - * @param map <lineId:线路ID; direction:方向>
165   - *
166   - * @return List<Map<String, Object>>
167   - */
168   - @RequestMapping(value = "/getStationRouteCacheCenterPoints" , method = RequestMethod.GET)
169   - public List<Map<String, Object>> getStationRouteCacheCenterPoints(@RequestParam Map<String, Object> map) {
170   - return service.getStationRouteCacheCenterPoints(map);
171   - }
172   -
173   - /**
174   - * @Description :TODO(撤销站点)
175   - *
176   - * @param map <lineId:线路ID; destroy:是否撤销(0:否;1:是)>
177   - *
178   - * @return Map<String, Object> <SUCCESS ; ERROR>
179   - */
180   - @RequestMapping(value = "/stationRouteIsDestroy" , method = RequestMethod.POST)
181   - public Map<String, Object> stationRouteIsDestroy(@RequestParam Map<String, Object> map) {
182   - return service.stationRouteIsDestroy(map);
183   - }
184   -
185   - /**
186   - * @Description : TODO(根据线路ID生成行单)
187   - *
188   - * @param map <id:线路ID>
189   - *
190   - * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
191   - */
192   - @RequestMapping(value = "/usingSingle",method = RequestMethod.POST)
193   - public Map<String, Object> usingSingle(@RequestParam Map<String, Object> map) {
194   - return service.usingSingle(map);
195   - }
196   -
197   -
198   - /**
199   - * @Description : TODO(根据站点路由Id查询详情)
200   - *
201   - * @param map <id:站点路由ID>
202   - *
203   - * @return List<Map<String, Object>>
204   - */
205   - @RequestMapping(value = "/findStationRouteInfo",method = RequestMethod.GET)
206   - public List<Map<String, Object>> findStationRouteInfo(@RequestParam Map<String, Object> map) {
207   - return service.findStationRouteInfo(map);
208   - }
209   -
210   - @RequestMapping(value = "/stations", method = RequestMethod.GET)
211   - public List<Map<String, Object>> findStations(Integer xlid, Integer xldir) {
212   - return stationRouteRepository.findStations(xlid, xldir);
213   - }
214   -
215   - /**
216   - *
217   - * @Title: findByMultiLine
218   - * @Description: TODO(多线路路由查询)
219   - */
220   - @RequestMapping(value = "/multiLine", method = RequestMethod.GET)
221   - public Map<String, Object> findByMultiLine(@RequestParam String lineIds){
222   - return service.findByMultiLine(lineIds);
223   - }
224   -
225   - /**
226   - *
227   - * @Title: updSwitchDir
228   - * @Description: TODO(上下行切换)
229   - */
230   - @RequestMapping(value = "/updSwitchDir", method = RequestMethod.POST)
231   - public Map<String, Object> updSwitchDir(@RequestParam String lineIds, @RequestParam(value = "status", required = false)int status){
232   - return service.updSwitchDir(lineIds,status);
233   - }
234   -
235   - /**
236   - *
237   - * @Title: upddis
238   - * @Description: TODO(更新站距)
239   - */
240   - @RequestMapping(value = "/upddis",method = RequestMethod.POST)
241   - public Map<String, Object> upddis(@RequestParam Map<String, Object> map) {
242   - return service.upddis(map);
243   - }
244   -
245   - /**
246   - *
247   - * @Title: findCacheStationRoute
248   - * @Description: TODO(查询缓存路由)
249   - */
250   - @RequestMapping(value = "/findCacheStationRoute",method = RequestMethod.GET)
251   - public List<StationRouteCache> findCacheStationRoute(@RequestParam Map<String, Object> map) {
252   - int lineId = Integer.parseInt(map.get("lineId").toString());
253   - int dir = Integer.parseInt(map.get("dir").toString());
254   - return stationRouteCacheRepository.findstationRoute(lineId, dir);
255   - }
256   -
257   - /**
258   - *
259   - * @Title: findCachePoint
260   - *
261   - * @param map <lineId:线路ID; dir:方向>
262   - *
263   - * @Description: TODO(查询缓存路由)
264   - */
265   - @RequestMapping(value = "/findCachePoint",method = RequestMethod.GET)
266   - public List<Map<String, Object>> findCachePoint(@RequestParam Map<String, Object> map) {
267   - int lineId = Integer.parseInt(map.get("lineId").toString());
268   - int dir = Integer.parseInt(map.get("dir").toString());
269   - return service.findCachePoint(lineId, dir);
270   - }
271   -
272   -
273   - /**
274   - * 查询博协站点
275   - * @param map
276   - * @return
277   - */
278   - @RequestMapping(value = "/findMatchStation", method = RequestMethod.GET)
279   - public Map<String, Object> findMatchStation(@RequestParam Map<String, Object> map){
280   - return service.findMatchStation(map);
281   - }
282   -
283   - /**
284   - * 批量修改行业编码
285   - * @param map
286   - * @return
287   - */
288   - @RequestMapping(value = "/updIndustryCode",method = RequestMethod.POST)
289   - public Map<String, Object> updIndustryCode(@RequestParam Map<String, Object> map) {
290   - return service.updIndustryCode(map);
291   - }
292   -
293   - /**
294   - * 匹配外部站点行业编码
295   - * @param map
296   - * @return
297   - */
298   - @RequestMapping(value = "/matchIndustryCode",method = RequestMethod.POST)
299   - public Map<String, Object> matchIndustryCode(@RequestParam Map<String, Object> map) {
300   - return service.matchIndustryCode(map);
301   - }
302   - /**
303   - * 匹配附近站点行业编码
304   - * @param map
305   - * @return
306   - */
307   - @RequestMapping(value = "/matchNearbyStation",method = RequestMethod.GET)
308   - public Map<String, Object> matchNearbyStation(@RequestParam Map<String, Object> map) {
309   - return service.matchNearbyStation(map);
310   - }
311   -}
  1 +package com.bsth.controller;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import javax.servlet.http.HttpServletResponse;
  7 +
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestMethod;
  11 +import org.springframework.web.bind.annotation.RequestParam;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import com.bsth.entity.LsStationRoute;
  15 +import com.bsth.entity.StationRoute;
  16 +import com.bsth.entity.StationRouteCache;
  17 +import com.bsth.repository.StationRouteCacheRepository;
  18 +import com.bsth.repository.StationRouteRepository;
  19 +import com.bsth.service.StationRouteService;
  20 +
  21 +/**
  22 + *
  23 + * @ClassName: StationRouteController(站点路由控制器)
  24 + *
  25 + * @Extends : BaseController
  26 + *
  27 + * @Description: TODO(站点路由控制层)
  28 + *
  29 + * @Author bsth@lq
  30 + *
  31 + * @Date 2016年5月03日 上午9:21:17
  32 + *
  33 + * @Dersion 公交调度系统BS版 0.1
  34 + *
  35 + */
  36 +@RestController
  37 +@RequestMapping("stationroute")
  38 +public class StationRouteController extends BaseController<StationRoute, Integer> {
  39 +
  40 + @Autowired
  41 + StationRouteService service;
  42 + @Autowired
  43 + StationRouteRepository stationRouteRepository;
  44 + @Autowired
  45 + StationRouteCacheRepository stationRouteCacheRepository;
  46 +
  47 +
  48 + @RequestMapping(value = "/allls", method = RequestMethod.GET)
  49 + public Map allls(@RequestParam Map<String, Object> map) {
  50 +
  51 + return service.pageLs(map);
  52 + }
  53 +
  54 + @RequestMapping(value = "/all_ls", method = RequestMethod.GET)
  55 + public Iterable<LsStationRoute> list_ls(@RequestParam Map<String, Object> map) {
  56 + return service.list_ls(map);
  57 + }
  58 +
  59 +
  60 + @RequestMapping(value = "/all", method = RequestMethod.GET)
  61 + public Iterable<StationRoute> list(@RequestParam Map<String, Object> map) {
  62 + return service.list(map);
  63 + }
  64 +
  65 + @RequestMapping(value = "/cacheList", method = RequestMethod.GET)
  66 + public List<StationRouteCache> cacheList(@RequestParam Map<String, Object> map) {
  67 + return service.cacheList(map);
  68 + }
  69 +
  70 + /**
  71 + * @Description :TODO(查询路段信息)
  72 + *
  73 + * @param id
  74 + *
  75 + * @return Map<String, Object>
  76 + */
  77 + @RequestMapping(value = "/export" , method = RequestMethod.GET)
  78 + public Map<String, Object> export(@RequestParam Integer id, HttpServletResponse resp) {
  79 + return service.getSectionRouteExport(id, resp);
  80 + }
  81 +
  82 + /**
  83 + * @param map
  84 + * @throws
  85 + * @Description: TODO(批量撤销站点)
  86 + */
  87 + @RequestMapping(value = "/batchDestroy", method = RequestMethod.POST)
  88 + public Map<String, Object> updateBatch(@RequestParam Map<String, Object> map) {
  89 + return service.updateStationRouteInfoFormId(map);
  90 + }
  91 +
  92 + /**
  93 + * @Description :TODO(查询树站点与路段数据)
  94 + *
  95 + * @param map <line.id_eq:线路ID; directions_eq:方向>
  96 + *
  97 + * @return List<Map<String, Object>>
  98 + */
  99 + @RequestMapping(value = "/findStations" , method = RequestMethod.GET)
  100 + public List<Map<String, Object>> findStations(@RequestParam Map<String, Object> map) {
  101 + return service.findPoints(map);
  102 + }
  103 +
  104 + @RequestMapping(value = "/systemQuote" , method = RequestMethod.POST)
  105 + public Map<String, Object> systemQuote(@RequestParam Map<String, Object> map) {
  106 + return service.systemQuote(map);
  107 + }
  108 +
  109 + /**
  110 + * @Description :TODO(查询线路某方向下的站点序号与类型)
  111 + *
  112 + * @param map <lineId:线路ID; direction:方向;stationRouteCode:站点编码>
  113 + *
  114 + * @return List<Map<String, Object>>
  115 + */
  116 + @RequestMapping(value = "/findUpStationRouteCode" , method = RequestMethod.GET)
  117 + public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) {
  118 + return service.findUpStationRouteCode(map);
  119 + }
  120 +
  121 + /**
  122 + * @Description :TODO(查询线路某方向下的站点序号与类型)
  123 + */
  124 + @RequestMapping(value = "/findCacheUpStationRouteCode" , method = RequestMethod.GET)
  125 + public List<Map<String, Object>> findCacheUpStationRouteCode(@RequestParam Map<String, Object> map) {
  126 + return service.findCacheUpStationRouteCode(map);
  127 + }
  128 +
  129 + /**
  130 + * @Description :TODO(查询站点的下一个缓存站点)
  131 + */
  132 + @RequestMapping(value = "/findDownStationRoute" , method = RequestMethod.GET)
  133 + public List<Map<String, Object>> findDownStationRoute(@RequestParam Map<String, Object> map) {
  134 + return service.findDownStationRoute(map);
  135 + }
  136 +
  137 + /**
  138 + * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
  139 + *
  140 + * @param map <lineId:线路ID; direction:方向>
  141 + *
  142 + * @return List<Map<String, Object>>
  143 + */
  144 + @RequestMapping(value = "/getStationRouteCenterPoints" , method = RequestMethod.GET)
  145 + public List<Map<String, Object>> getStationRouteCenterPoints(@RequestParam Map<String, Object> map) {
  146 + return service.getStationRouteCenterPoints(map);
  147 + }
  148 +
  149 + /**
  150 + * @Description :TODO(查询线路某方向下所有站点)
  151 + *
  152 + * @param map <lineId:线路ID; direction:方向>
  153 + *
  154 + * @return List<Map<String, Object>>
  155 + */
  156 + @RequestMapping(value = "/getStationRouteList" , method = RequestMethod.GET)
  157 + public List<Map<String, Object>> getStationRouteList(@RequestParam Map<String, Object> map) {
  158 + return service.getStationRouteList(map);
  159 + }
  160 +
  161 + /**
  162 + * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
  163 + *
  164 + * @param map <lineId:线路ID; direction:方向>
  165 + *
  166 + * @return List<Map<String, Object>>
  167 + */
  168 + @RequestMapping(value = "/getStationRouteCacheCenterPoints" , method = RequestMethod.GET)
  169 + public List<Map<String, Object>> getStationRouteCacheCenterPoints(@RequestParam Map<String, Object> map) {
  170 + return service.getStationRouteCacheCenterPoints(map);
  171 + }
  172 +
  173 + /**
  174 + * @Description :TODO(撤销站点)
  175 + *
  176 + * @param map <lineId:线路ID; destroy:是否撤销(0:否;1:是)>
  177 + *
  178 + * @return Map<String, Object> <SUCCESS ; ERROR>
  179 + */
  180 + @RequestMapping(value = "/stationRouteIsDestroy" , method = RequestMethod.POST)
  181 + public Map<String, Object> stationRouteIsDestroy(@RequestParam Map<String, Object> map) {
  182 + return service.stationRouteIsDestroy(map);
  183 + }
  184 +
  185 + /**
  186 + * @Description : TODO(根据线路ID生成行单)
  187 + *
  188 + * @param map <id:线路ID>
  189 + *
  190 + * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
  191 + */
  192 + @RequestMapping(value = "/usingSingle",method = RequestMethod.POST)
  193 + public Map<String, Object> usingSingle(@RequestParam Map<String, Object> map) {
  194 + return service.usingSingle(map);
  195 + }
  196 +
  197 +
  198 + /**
  199 + * @Description : TODO(根据站点路由Id查询详情)
  200 + *
  201 + * @param map <id:站点路由ID>
  202 + *
  203 + * @return List<Map<String, Object>>
  204 + */
  205 + @RequestMapping(value = "/findStationRouteInfo",method = RequestMethod.GET)
  206 + public List<Map<String, Object>> findStationRouteInfo(@RequestParam Map<String, Object> map) {
  207 + return service.findStationRouteInfo(map);
  208 + }
  209 +
  210 + @RequestMapping(value = "/stations", method = RequestMethod.GET)
  211 + public List<Map<String, Object>> findStations(Integer xlid, Integer xldir) {
  212 + return stationRouteRepository.findStations(xlid, xldir);
  213 + }
  214 +
  215 + /**
  216 + *
  217 + * @Title: findByMultiLine
  218 + * @Description: TODO(多线路路由查询)
  219 + */
  220 + @RequestMapping(value = "/multiLine", method = RequestMethod.GET)
  221 + public Map<String, Object> findByMultiLine(@RequestParam String lineIds){
  222 + return service.findByMultiLine(lineIds);
  223 + }
  224 +
  225 + /**
  226 + *
  227 + * @Title: updSwitchDir
  228 + * @Description: TODO(上下行切换)
  229 + */
  230 + @RequestMapping(value = "/updSwitchDir", method = RequestMethod.POST)
  231 + public Map<String, Object> updSwitchDir(@RequestParam String lineIds, @RequestParam(value = "status", required = false)int status){
  232 + return service.updSwitchDir(lineIds,status);
  233 + }
  234 +
  235 + /**
  236 + *
  237 + * @Title: upddis
  238 + * @Description: TODO(更新站距)
  239 + */
  240 + @RequestMapping(value = "/upddis",method = RequestMethod.POST)
  241 + public Map<String, Object> upddis(@RequestParam Map<String, Object> map) {
  242 + return service.upddis(map);
  243 + }
  244 +
  245 + /**
  246 + *
  247 + * @Title: findCacheStationRoute
  248 + * @Description: TODO(查询缓存路由)
  249 + */
  250 + @RequestMapping(value = "/findCacheStationRoute",method = RequestMethod.GET)
  251 + public List<StationRouteCache> findCacheStationRoute(@RequestParam Map<String, Object> map) {
  252 + int lineId = Integer.parseInt(map.get("lineId").toString());
  253 + int dir = Integer.parseInt(map.get("dir").toString());
  254 + return stationRouteCacheRepository.findstationRoute(lineId, dir);
  255 + }
  256 +
  257 + /**
  258 + *
  259 + * @Title: findCachePoint
  260 + *
  261 + * @param map <lineId:线路ID; dir:方向>
  262 + *
  263 + * @Description: TODO(查询缓存路由)
  264 + */
  265 + @RequestMapping(value = "/findCachePoint",method = RequestMethod.GET)
  266 + public List<Map<String, Object>> findCachePoint(@RequestParam Map<String, Object> map) {
  267 + int lineId = Integer.parseInt(map.get("lineId").toString());
  268 + int dir = Integer.parseInt(map.get("dir").toString());
  269 + return service.findCachePoint(lineId, dir);
  270 + }
  271 +}
... ...
src/main/java/com/bsth/service/LineService.java
1   -package com.bsth.service;
2   -
3   -import com.bsth.entity.Line;
4   -
5   -import java.util.Map;
6   -
7   -/**
8   - *
9   - * @Interface: LineService(线路service业务层实现接口)
10   - *
11   - * @extends : BaseService
12   - *
13   - * @Description: TODO(线路service业务层实现接口)
14   - *
15   - * @Author bsth@lq
16   - *
17   - * @Date 2016年4月28日 上午9:21:17
18   - *
19   - * @Version 公交调度系统BS版 0.1
20   - *
21   - */
22   -public interface LineService extends BaseService<Line, Integer> {
23   -
24   - /**
25   - * 获取线路编码
26   - *
27   - * @return long <lineCode:线路编码>
28   - */
29   - long selectMaxIdToLineCode();
30   -
31   - Line findByLineCode(String lineCode);
32   -
33   - Line findById(Integer id);
34   -
35   - String lineCodeVerification(String lineCode);
36   -
37   - Map<String, Object> update(Line l);
38   -
39   - Map<String,Object> remove(Integer id);
40   -
41   - Map<String, Boolean> lineNature();
42   -
43   - Map<String,Object> getLineMatchStationIsUpdate(Integer id);
44   -}
  1 +package com.bsth.service;
  2 +
  3 +import com.bsth.entity.Line;
  4 +
  5 +import java.util.Map;
  6 +
  7 +/**
  8 + *
  9 + * @Interface: LineService(线路service业务层实现接口)
  10 + *
  11 + * @extends : BaseService
  12 + *
  13 + * @Description: TODO(线路service业务层实现接口)
  14 + *
  15 + * @Author bsth@lq
  16 + *
  17 + * @Date 2016年4月28日 上午9:21:17
  18 + *
  19 + * @Version 公交调度系统BS版 0.1
  20 + *
  21 + */
  22 +public interface LineService extends BaseService<Line, Integer> {
  23 +
  24 + /**
  25 + * 获取线路编码
  26 + *
  27 + * @return long <lineCode:线路编码>
  28 + */
  29 + long selectMaxIdToLineCode();
  30 +
  31 + Line findByLineCode(String lineCode);
  32 +
  33 + Line findById(Integer id);
  34 +
  35 + String lineCodeVerification(String lineCode);
  36 +
  37 + Map<String, Object> update(Line l);
  38 +
  39 + Map<String,Object> remove(Integer id);
  40 +
  41 + Map<String, Boolean> lineNature();
  42 +}
... ...
src/main/java/com/bsth/service/StationRouteService.java
1   -package com.bsth.service;
2   -
3   -import java.util.Iterator;
4   -import java.util.List;
5   -import java.util.Map;
6   -
7   -import javax.servlet.http.HttpServletResponse;
8   -
9   -import org.springframework.data.domain.Page;
10   -import org.springframework.data.domain.PageRequest;
11   -
12   -import com.bsth.entity.LsStationRoute;
13   -import com.bsth.entity.StationRoute;
14   -import com.bsth.entity.StationRouteCache;
15   -
16   -/**
17   - *
18   - * @Interface: StationRouteService(站点路由service业务层实现接口)
19   - *
20   - * @Extends : BaseService
21   - *
22   - * @Description: TODO(站点路由service业务层实现接口)
23   - *
24   - * @Author bsth@lq
25   - *
26   - * @Date 2016年5月03日 上午9:21:17
27   - *
28   - * @Version 公交调度系统BS版 0.1
29   - *
30   - */
31   -public interface StationRouteService extends BaseService<StationRoute, Integer> {
32   -
33   - /**
34   - * 历史查询。
35   - * @param map
36   - * @return
37   - */
38   - Iterable<LsStationRoute> list_ls(Map<String, Object> map);
39   -
40   - /**
41   - *
42   - * @Title: list
43   - * @Description: TODO(多条件查询)
44   - * @throws
45   - */
46   - Iterable<StationRoute> list(Map<String, Object> map);
47   -
48   - List<StationRouteCache> cacheList(Map<String, Object> map);
49   -
50   - /**
51   - * @Description : TODO(根据路段站点Id批量撤销站点)
52   - *
53   - * @param map <id:站点路由ID>
54   - *
55   - * @return List<Map<String, Object>>
56   - */
57   - Map<String, Object> updateStationRouteInfoFormId(Map<String, Object> map);
58   -
59   - /**
60   - * @Description :TODO(查询树站点与路段数据)
61   - *
62   - * @param map <line.id_eq:线路ID; directions_eq:方向>
63   - *
64   - * @return List<Map<String, Object>>
65   - */
66   - List<Map<String, Object>> findPoints(Map<String, Object> map);
67   -
68   - Map<String, Object> systemQuote(Map<String, Object> map);
69   -
70   - /**
71   - * @Description :TODO(查询线路某方向下的站点序号与类型)
72   - *
73   - * @param map <lineId:线路ID; direction:方向;stationRouteCode:站点编码>
74   - *
75   - * @return List<Map<String, Object>>
76   - */
77   - List<Map<String, Object>> findUpStationRouteCode(Map<String, Object> map);
78   -
79   - List<Map<String, Object>> findCacheUpStationRouteCode(Map<String, Object> map);
80   -
81   - /**
82   - * @Description :TODO(查询下一个站点)
83   - *
84   - * @param map <站点路由id; direction:方向;stationRouteCode:站点编码>
85   - *
86   - * @return List<Map<String, Object>>
87   - */
88   - List<Map<String, Object>> findDownStationRoute(Map<String, Object> map);
89   -
90   - /**
91   - * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
92   - *
93   - * @param map <lineId:线路ID; direction:方向>
94   - *
95   - * @return List<Map<String, Object>>
96   - */
97   - List<Map<String, Object>> getStationRouteCenterPoints(Map<String, Object> map);
98   -
99   - /**
100   - * @Description :TODO(查询线路某方向下所有站点)
101   - *
102   - * @param map <lineId:线路ID; direction:方向>
103   - *
104   - * @return List<Map<String, Object>>
105   - */
106   - List<Map<String, Object>> getStationRouteList(Map<String, Object> map);
107   -
108   - /**
109   - * @Description :TODO(撤销站点)
110   - *
111   - * @param map <lineId:线路ID; destroy:是否撤销(0:否;1:是)>
112   - *
113   - * @return Map<String, Object> <SUCCESS ; ERROR>
114   - */
115   - Map<String, Object> stationRouteIsDestroy(Map<String, Object> map);
116   -
117   -
118   - List<Map<String, Object>> getStationRouteCacheCenterPoints(Map<String, Object> map);
119   -
120   - /**
121   - * @Description : TODO(根据线路ID生成行单)
122   - *
123   - * @param map <id:线路ID>
124   - *
125   - * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
126   - */
127   - Map<String, Object> usingSingle(Map<String, Object> map);
128   -
129   -
130   - /**
131   - * @Description : TODO(根据站点路由Id查询详情)
132   - *
133   - * @param map <id:站点路由ID>
134   - *
135   - * @return List<Map<String, Object>>
136   - */
137   - List<Map<String, Object>> findStationRouteInfo(Map<String, Object> map);
138   -
139   - Map<String, Object> findByMultiLine(String lineIds);
140   -
141   - Map<String, Object> updSwitchDir(String lineIds,int stauts);
142   -
143   - Map<String, Object> upddis(Map<String, Object> map);
144   -
145   - /**
146   - * @param id
147   - * @return
148   - */
149   - Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp);
150   -
151   - void batchUpdate(Integer lineId, String lineCode);
152   -
153   - /**
154   - * @Description :TODO(查询缓存站点信息)
155   - *
156   - * @param map <line.id_eq:线路ID; directions_eq:方向>
157   - *
158   - * @return List<Map<String, Object>>
159   - */
160   - List<Map<String, Object>> findCachePoint(int lineId, int dir);
161   -
162   - Map<String, Object> findMatchStation(Map<String, Object> map);
163   -
164   - Map<String, Object> updIndustryCode(Map<String, Object> map);
165   -
166   - Map<String, Object> matchIndustryCode(Map<String, Object> map);
167   -
168   - Map<String, Object> matchNearbyStation(Map<String, Object> map);
169   -
170   - Map pageLs(Map<String, Object> map);
171   -}
  1 +package com.bsth.service;
  2 +
  3 +import java.util.Iterator;
  4 +import java.util.List;
  5 +import java.util.Map;
  6 +
  7 +import javax.servlet.http.HttpServletResponse;
  8 +
  9 +import org.springframework.data.domain.Page;
  10 +import org.springframework.data.domain.PageRequest;
  11 +
  12 +import com.bsth.entity.LsStationRoute;
  13 +import com.bsth.entity.StationRoute;
  14 +import com.bsth.entity.StationRouteCache;
  15 +
  16 +/**
  17 + *
  18 + * @Interface: StationRouteService(站点路由service业务层实现接口)
  19 + *
  20 + * @Extends : BaseService
  21 + *
  22 + * @Description: TODO(站点路由service业务层实现接口)
  23 + *
  24 + * @Author bsth@lq
  25 + *
  26 + * @Date 2016年5月03日 上午9:21:17
  27 + *
  28 + * @Version 公交调度系统BS版 0.1
  29 + *
  30 + */
  31 +public interface StationRouteService extends BaseService<StationRoute, Integer> {
  32 +
  33 + /**
  34 + * 历史查询。
  35 + * @param map
  36 + * @return
  37 + */
  38 + Iterable<LsStationRoute> list_ls(Map<String, Object> map);
  39 +
  40 + /**
  41 + *
  42 + * @Title: list
  43 + * @Description: TODO(多条件查询)
  44 + * @throws
  45 + */
  46 + Iterable<StationRoute> list(Map<String, Object> map);
  47 +
  48 + List<StationRouteCache> cacheList(Map<String, Object> map);
  49 +
  50 + /**
  51 + * @Description : TODO(根据路段站点Id批量撤销站点)
  52 + *
  53 + * @param map <id:站点路由ID>
  54 + *
  55 + * @return List<Map<String, Object>>
  56 + */
  57 + Map<String, Object> updateStationRouteInfoFormId(Map<String, Object> map);
  58 +
  59 + /**
  60 + * @Description :TODO(查询树站点与路段数据)
  61 + *
  62 + * @param map <line.id_eq:线路ID; directions_eq:方向>
  63 + *
  64 + * @return List<Map<String, Object>>
  65 + */
  66 + List<Map<String, Object>> findPoints(Map<String, Object> map);
  67 +
  68 + Map<String, Object> systemQuote(Map<String, Object> map);
  69 +
  70 + /**
  71 + * @Description :TODO(查询线路某方向下的站点序号与类型)
  72 + *
  73 + * @param map <lineId:线路ID; direction:方向;stationRouteCode:站点编码>
  74 + *
  75 + * @return List<Map<String, Object>>
  76 + */
  77 + List<Map<String, Object>> findUpStationRouteCode(Map<String, Object> map);
  78 +
  79 + List<Map<String, Object>> findCacheUpStationRouteCode(Map<String, Object> map);
  80 +
  81 + /**
  82 + * @Description :TODO(查询下一个站点)
  83 + *
  84 + * @param map <站点路由id; direction:方向;stationRouteCode:站点编码>
  85 + *
  86 + * @return List<Map<String, Object>>
  87 + */
  88 + List<Map<String, Object>> findDownStationRoute(Map<String, Object> map);
  89 +
  90 + /**
  91 + * @Description :TODO(查询线路某方向下所有站点的中心百度坐标)
  92 + *
  93 + * @param map <lineId:线路ID; direction:方向>
  94 + *
  95 + * @return List<Map<String, Object>>
  96 + */
  97 + List<Map<String, Object>> getStationRouteCenterPoints(Map<String, Object> map);
  98 +
  99 + /**
  100 + * @Description :TODO(查询线路某方向下所有站点)
  101 + *
  102 + * @param map <lineId:线路ID; direction:方向>
  103 + *
  104 + * @return List<Map<String, Object>>
  105 + */
  106 + List<Map<String, Object>> getStationRouteList(Map<String, Object> map);
  107 +
  108 + /**
  109 + * @Description :TODO(撤销站点)
  110 + *
  111 + * @param map <lineId:线路ID; destroy:是否撤销(0:否;1:是)>
  112 + *
  113 + * @return Map<String, Object> <SUCCESS ; ERROR>
  114 + */
  115 + Map<String, Object> stationRouteIsDestroy(Map<String, Object> map);
  116 +
  117 +
  118 + List<Map<String, Object>> getStationRouteCacheCenterPoints(Map<String, Object> map);
  119 +
  120 + /**
  121 + * @Description : TODO(根据线路ID生成行单)
  122 + *
  123 + * @param map <id:线路ID>
  124 + *
  125 + * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
  126 + */
  127 + Map<String, Object> usingSingle(Map<String, Object> map);
  128 +
  129 +
  130 + /**
  131 + * @Description : TODO(根据站点路由Id查询详情)
  132 + *
  133 + * @param map <id:站点路由ID>
  134 + *
  135 + * @return List<Map<String, Object>>
  136 + */
  137 + List<Map<String, Object>> findStationRouteInfo(Map<String, Object> map);
  138 +
  139 + Map<String, Object> findByMultiLine(String lineIds);
  140 +
  141 + Map<String, Object> updSwitchDir(String lineIds,int stauts);
  142 +
  143 + Map<String, Object> upddis(Map<String, Object> map);
  144 +
  145 + /**
  146 + * @param id
  147 + * @return
  148 + */
  149 + Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp);
  150 +
  151 + void batchUpdate(Integer lineId, String lineCode);
  152 +
  153 + /**
  154 + * @Description :TODO(查询缓存站点信息)
  155 + *
  156 + * @param map <line.id_eq:线路ID; directions_eq:方向>
  157 + *
  158 + * @return List<Map<String, Object>>
  159 + */
  160 + List<Map<String, Object>> findCachePoint(int lineId, int dir);
  161 +
  162 + Map pageLs(Map<String, Object> map);
  163 +}
... ...
src/main/java/com/bsth/service/impl/LineServiceImpl.java
... ... @@ -5,7 +5,6 @@ import com.bsth.entity.Line;
5 5 import com.bsth.entity.StationMatchData;
6 6 import com.bsth.repository.LineRepository;
7 7 import com.bsth.service.LineService;
8   -import com.bsth.util.db.DBUtils_station;
9 8 import org.apache.commons.lang3.StringUtils;
10 9 import org.springframework.beans.factory.annotation.Autowired;
11 10 import org.springframework.jdbc.core.JdbcTemplate;
... ... @@ -162,37 +161,4 @@ public class LineServiceImpl extends BaseServiceImpl&lt;Line, Integer&gt; implements L
162 161 }
163 162 return map;
164 163 }
165   -
166   - @Override
167   - public Map<String, Object> getLineMatchStationIsUpdate(Integer id){
168   - Map<String, Object> map = new HashMap<>();
169   - Line l = repository.findById(id).get();
170   - Connection conn = null;
171   - PreparedStatement ps = null;
172   - ResultSet rs = null;
173   -
174   - List<StationMatchData> listMD = new ArrayList<>();
175   - String sql = "select `type` from roadline where RoadLine =\""+l.getName()+"\"";
176   - if(!StringUtils.isEmpty(l.getShanghaiLinecode())){
177   - sql += " or LineStandardCode=\""+l.getShanghaiLinecode()+"\"";
178   - }
179   - try {
180   - conn = DBUtils_station.getConnection();
181   - ps = conn.prepareStatement(sql);
182   -// int stauts = ps.executeQuery().getInt(1);
183   - String stauts = "0";
184   - rs = ps.executeQuery();
185   - while (rs.next()) {
186   - stauts = rs.getString("type");
187   - }
188   - map.put("status",ResponseCode.SUCCESS);
189   - map.put("data",stauts);
190   - }catch(Exception e){
191   - logger.error(e.toString(), e);
192   - map.put("status",ResponseCode.ERROR);
193   - }finally {
194   - DBUtils_station.close(rs, ps, conn);
195   - }
196   - return map;
197   - }
198 164 }
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -27,7 +27,6 @@ import com.bsth.util.JWDUtil;
27 27 import com.bsth.util.PackTarGZUtils;
28 28 import com.bsth.util.TransGPS;
29 29 import com.bsth.util.db.DBUtils_MS;
30   -import com.bsth.util.db.DBUtils_station;
31 30 import com.google.common.base.Splitter;
32 31 import org.apache.commons.lang3.StringUtils;
33 32 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -1681,352 +1680,4 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1681 1680 }
1682 1681 return staitonRouteList;
1683 1682 }
1684   -
1685   -
1686   - @Override
1687   - public Map<String, Object> findMatchStation(Map<String, Object> map){
1688   - Map<String, Object> rsMap = new HashMap<>();
1689   - Connection conn = null;
1690   - PreparedStatement ps = null;
1691   - ResultSet rs = null;
1692   -
1693   - try{
1694   - int lineId = Integer.parseInt(map.get("lineId").toString());
1695   - int dir = Integer.parseInt(map.get("dir").toString());
1696   - Line line = lineRepository.findById(lineId).get();
1697   - String lineName = line.getName();
1698   - String shanghaiCode = (line.getShanghaiLinecode() == null || line.getShanghaiLinecode().equals(""))?"0":line.getShanghaiLinecode();
1699   - List<LsStationRoute> lists = lsStationRouteRepository.findByLine(lineId,dir);
1700   - rsMap.put("station",lists);
1701   -
1702   - List<StationMatchData> listMD = new ArrayList<>();
1703   - String sql = "select * from roadlinestop WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\" ORDER BY RoadLine,LineStandardCode,UpStream,LevelId";
1704   -
1705   - conn = DBUtils_station.getConnection();
1706   - ps = conn.prepareStatement(sql);
1707   - rs = ps.executeQuery();
1708   - while(rs.next()){
1709   - StationMatchData arr = new StationMatchData();
1710   - arr.setRoadLine(rs.getString("RoadLine"));
1711   - arr.setLineStandardCode(rs.getString("LineStandardCode"));
1712   - arr.setStationName(rs.getString("StationName"));
1713   - arr.setStationStandardCode(rs.getString("StationStandardCode"));
1714   - arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
1715   - arr.setLevelId(rs.getString("LevelId"));
1716   - arr.setStationType(rs.getString("StationType"));
1717   -
1718   - listMD.add(arr);
1719   - }
1720   - if(listMD.size() > 0){
1721   - List<StationMatchData> listMDUp = new ArrayList<>();
1722   - List<StationMatchData> listMDDown = new ArrayList<>();
1723   - for(StationMatchData smd:listMD){
1724   - if(smd.getUpStream() == 0){
1725   - listMDUp.add(smd);
1726   - } else
1727   - listMDDown.add(smd);
1728   - }
1729   -
1730   - Collections.sort(listMDUp, new Comparator<StationMatchData>() {
1731   - public int compare(StationMatchData station1, StationMatchData station2) {
1732   - return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
1733   - }
1734   - });
1735   - Collections.sort(listMDDown, new Comparator<StationMatchData>() {
1736   - public int compare(StationMatchData station1, StationMatchData station2) {
1737   - return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
1738   - }
1739   - });
1740   - Map<String, List<StationMatchData>> smdMap = new HashMap<>();
1741   - if(listMDUp!= null && listMDUp.size()>0){
1742   -
1743   - smdMap.put(listMDUp.get(0).getStationName()+"-"+listMDUp.get(listMDUp.size()-1).getStationName(),listMDUp);
1744   - }
1745   - if(listMDDown!= null && listMDDown.size()>0) {
1746   - smdMap.put(listMDDown.get(0).getStationName() + "-" + listMDDown.get(listMDDown.size() - 1).getStationName(), listMDDown);
1747   - }
1748   - rsMap.put("mStation",smdMap);
1749   - } else {
1750   - rsMap.put("mStation",null);
1751   - }
1752   -
1753   - rsMap.put("status",ResponseCode.SUCCESS);
1754   - }catch(Exception e){
1755   - logger.error(e.toString(), e);
1756   - rsMap.put("status",ResponseCode.ERROR);
1757   - return rsMap;
1758   - }finally {
1759   - DBUtils_station.close(rs, ps, conn);
1760   - return rsMap;
1761   - }
1762   - }
1763   -
1764   - @Override
1765   - @Transactional
1766   - public Map<String, Object> updIndustryCode(Map<String, Object> map) {
1767   - Map<String, Object> rs = new HashMap<>();
1768   - try{
1769   - Iterator it = map.entrySet().iterator();
1770   - while(it.hasNext()){
1771   - java.util.Map.Entry entry = (java.util.Map.Entry)it.next();
1772   - Integer id = Integer.parseInt(entry.getKey().toString().split("_")[1]); //返回对应的键
1773   - String industryCode = entry.getValue().toString(); //返回对应的值
1774   - if(map.get("status") == null || Integer.parseInt(map.get("status").toString()) == 1) {
1775   - repository.updIndustryCode(id, industryCode);
1776   - }else if(Integer.parseInt(map.get("status").toString()) == 2) {
1777   - lsStationRouteRepository.updIndustryCode(id, industryCode);
1778   - }
1779   - }
1780   - rs.put("status", ResponseCode.SUCCESS);
1781   - }catch(Exception e){
1782   - logger.error("", e);
1783   - rs.put("status", ResponseCode.ERROR);
1784   - }finally {
1785   - return rs;
1786   - }
1787   - }
1788   -
1789   - @Override
1790   - @Transactional
1791   - public Map<String, Object> matchIndustryCode(Map<String, Object> map) {
1792   - Map<String, Object> rsMap = new HashMap<>();
1793   - Connection conn = null;
1794   - PreparedStatement ps = null;
1795   - ResultSet rs = null;
1796   -
1797   - try{
1798   - int lineId = 0;
1799   - if(map.get("lineId") != null){
1800   - lineId = Integer.parseInt(map.get("lineId").toString());
1801   - } else {
1802   - rsMap.put("status","lineIdIsNull");
1803   - return rsMap;
1804   - }
1805   -
1806   - Line line = lineRepository.findById(lineId).get();
1807   - String lineName = line.getName();
1808   - String shanghaiCode = (line.getShanghaiLinecode() == null || line.getShanghaiLinecode().equals(""))?"codeNull":line.getShanghaiLinecode();
1809   - List<StationRoute> listsUp = repository.findByLine(lineId,0);
1810   - List<StationRoute> listsDown = repository.findByLine(lineId,1);
1811   -
1812   - List<StationMatchData> listMD = new ArrayList<>();
1813   - String sql = "select * from roadlinestop WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\" ";
1814   -
1815   - conn = DBUtils_station.getConnection();
1816   - ps = conn.prepareStatement(sql);
1817   - rs = ps.executeQuery();
1818   - while(rs.next()){
1819   - StationMatchData arr = new StationMatchData();
1820   - arr.setRoadLine(rs.getString("RoadLine"));
1821   - arr.setLineStandardCode(rs.getString("LineStandardCode"));
1822   - arr.setStationName(rs.getString("StationName"));
1823   - arr.setStationStandardCode(rs.getString("StationStandardCode"));
1824   - arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
1825   - arr.setLevelId(rs.getString("LevelId"));
1826   - arr.setStationType(rs.getString("StationType"));
1827   -
1828   - listMD.add(arr);
1829   - }
1830   - if(listMD.size() > 0){
1831   - List<StationMatchData> listMDUp = new ArrayList<>();
1832   - List<StationMatchData> listMDDown = new ArrayList<>();
1833   - for(StationMatchData smd:listMD){
1834   - if(smd.getUpStream() == 0){
1835   - listMDUp.add(smd);
1836   - } else
1837   - listMDDown.add(smd);
1838   - }
1839   -
1840   - Collections.sort(listMDUp, new Comparator<StationMatchData>() {
1841   - public int compare(StationMatchData station1, StationMatchData station2) {
1842   - return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
1843   - }
1844   - });
1845   - Collections.sort(listMDDown, new Comparator<StationMatchData>() {
1846   - public int compare(StationMatchData station1, StationMatchData station2) {
1847   - return Integer.parseInt(station1.getLevelId()) - Integer.parseInt(station2.getLevelId());
1848   - }
1849   - });
1850   -
1851   -// if(listMDUp != null && !listMDUp.equals("null") && listMDUp.size() > 0)
1852   -// rsMap.put("upMatch",matchDir(listsUp,listMDUp));
1853   -//
1854   -// if(listMDDown != null && !listMDDown.equals("null") && listMDDown.size() > 0)
1855   -// rsMap.put("downMatch", matchDir(listsDown,listMDDown));
1856   -
1857   - List<StationRoute> matcheUp = matchDir(listsUp,listMDUp);
1858   - List<StationRoute> matcheDown = new ArrayList<>();
1859   - if(matcheUp.size() <= 0){
1860   - matcheUp = matchDir(listsUp,listMDDown);
1861   - matcheDown = matchDir(listsDown,listMDUp);
1862   - } else {
1863   - matcheDown = matchDir(listsDown,listMDDown);
1864   - }
1865   - String sqlUpdate = "update roadline set `type`=0 WHERE RoadLine = \""+lineName+"\" OR LineStandardCode = \""+shanghaiCode+"\"";
1866   -
1867   - conn = DBUtils_station.getConnection();
1868   - ps = conn.prepareStatement(sqlUpdate);
1869   - int stauts = ps.executeUpdate();
1870   - rsMap.put("upMatch",matcheUp);
1871   - rsMap.put("downMatch",matcheDown);
1872   - rsMap.put("typeIsUpdate",stauts);
1873   - }
1874   -
1875   - rsMap.put("status",ResponseCode.SUCCESS);
1876   - }catch(Exception e){
1877   - logger.error(e.toString(), e);
1878   - rsMap.put("status",ResponseCode.ERROR);
1879   - return rsMap;
1880   - }finally {
1881   - DBUtils_station.close(rs, ps, conn);
1882   - }
1883   - return rsMap;
1884   - }
1885   -
1886   - public List<StationRoute> matchDir(List<StationRoute> stations, List<StationMatchData> stationMDs){
1887   - int size = 0;
1888   - int pps1 = 0;
1889   -
1890   - List<StationRoute> listMactah = new ArrayList<>();
1891   - if(stationMDs != null && !stationMDs.equals("null") && stationMDs.size() > 0) {
1892   - if(stationMDs.size() <= stations.size()){
1893   - size = stationMDs.size();
1894   - }
1895   - for (int i = 0; i < size; i++) {
1896   - if (stations.get(i).getStationName().indexOf(stationMDs.get(i).getStationName()) != -1 || stationMDs.get(i).getStationName().indexOf(stations.get(i).getStationName()) != -1 ) {
1897   - pps1++;
1898   - }
1899   - }
1900   - String stationB = stations.get(0).getStationName();
1901   - if((pps1>2 || stationB.indexOf(stationMDs.get(0).getStationName()) != -1 || stations.get(stations.size()-1).getStationName().indexOf(stationMDs.get(stationMDs.size()-1).getStationName()) != -1 || stationMDs.get(0).getStationName().indexOf(stationB) != -1 || stationMDs.get(stationMDs.size()-1).getStationName().indexOf(stations.get(stations.size()-1).getStationName()) != -1 ) ){
1902   - matchCode(stations,stationMDs,listMactah);
1903   - } else if(stations.get(1).getStationName().indexOf(stationMDs.get(1).getStationName()) != -1 && stations.get(2).getStationName().indexOf(stationMDs.get(2).getStationName()) != -1 && stations.get(3).getStationName().indexOf(stationMDs.get(3).getStationName()) != -1 ){
1904   - matchCode(stations,stationMDs,listMactah);
1905   - }
1906   - repository.saveAll(listMactah);
1907   - }
1908   - return listMactah;
1909   - }
1910   -
1911   - public void matchCode(List<StationRoute> stationRoutes,List<StationMatchData> stationMatchData, List<StationRoute> listMactah){
1912   - int listsSize = stationRoutes.size();
1913   - if(listsSize > 0 && stationMatchData.size() > 0){
1914   - if(stationMatchData.size() == listsSize){
1915   - for (int i=0; i<listsSize; i++) {
1916   - if(!StringUtils.isEmpty(stationMatchData.get(i).getStationStandardCode())){
1917   - stationRoutes.get(i).setIndustryCode(stationMatchData.get(i).getStationStandardCode());
1918   - listMactah.add(stationRoutes.get(i));
1919   - }
1920   - }
1921   - } else {
1922   - Map<String,String> smdMap = new HashMap<>();
1923   - for (int i=0; i<listsSize; i++) {
1924   -
1925   - String name = stationRoutes.get(i).getStationName();
1926   - String names[] = null;
1927   - if(name.indexOf("(") != -1){
1928   - names = name.split("(");
1929   - } else if(name.indexOf("(") != -1){
1930   - names = name.split("\\(");
1931   - }
1932   -
1933   - for (StationMatchData smd:stationMatchData) {
1934   - smdMap.put(smd.getStationName(),smd.getStationStandardCode());
1935   - String stationName =smd.getStationName();
1936   - String stationName2 =smd.getStationName2();
1937   - String industryCode =smd.getStationStandardCode();
1938   - if(StringUtils.isEmpty(industryCode)){
1939   - continue;
1940   - }
1941   - if(names != null && names.length > 1){
1942   -// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (stationName.indexOf(names[0]) != -1 || stationName.indexOf(names[1].substring(0,names[1].length()-1)) != -1 || stationName2.indexOf(names[0]) != -1 || stationName2.indexOf(names[1].substring(0,names[1].length()-1)) != -1)){
1943   - if((stationName.indexOf(names[0]) != -1 || stationName.indexOf(names[1].substring(0,names[1].length()-1)) != -1 || stationName2.indexOf(names[0]) != -1 || stationName2.indexOf(names[1].substring(0,names[1].length()-1)) != -1)){
1944   - stationRoutes.get(i).setIndustryCode(industryCode);
1945   - listMactah.add(stationRoutes.get(i));
1946   - break;
1947   - }
1948   - }else {
1949   -// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (stationName.indexOf(name) != -1 || stationName2.indexOf(name) != -1)){
1950   - if(stationName.indexOf(name) != -1 || stationName2.indexOf(name) != -1){
1951   -// if(stationRoutes.get(i).getStationMark().equals(smd.getStationType()) && (name.equals(stationName) || name.equals(stationName2))){
1952   -
1953   - stationRoutes.get(i).setIndustryCode(industryCode);
1954   - listMactah.add(stationRoutes.get(i));
1955   - break;
1956   - }
1957   - }
1958   - }
1959   - }
1960   - }
1961   - }
1962   - }
1963   -
1964   -
1965   - @Override
1966   - public Map<String, Object> matchNearbyStation(@RequestParam Map<String, Object> map) {
1967   - Map<String, Object> rsMap = new HashMap<>();
1968   - Connection conn = null;
1969   - PreparedStatement ps = null;
1970   - ResultSet rs = null;
1971   -
1972   - try{
1973   - //stationGlaty: 31.360653
1974   - //stationGlonx
1975   -
1976   - double laty ,lonx;
1977   - if(map.get("stationGlaty") != null && map.get("stationGlonx") != null){
1978   - laty = Double.parseDouble(map.get("stationGlaty").toString());
1979   - lonx = Double.parseDouble(map.get("stationGlonx").toString());
1980   - } else {
1981   - rsMap.put("status","gpsIsNull");
1982   - return rsMap;
1983   - }
1984   -
1985   - List<StationMatchData> listMD = new ArrayList<>();
1986   - String sql = "select * from roadstop where StationStandardCode != ''";
1987   -
1988   - conn = DBUtils_station.getConnection();
1989   - ps = conn.prepareStatement(sql);
1990   - rs = ps.executeQuery();
1991   - while(rs.next()){
1992   - StationMatchData arr = new StationMatchData();
1993   - arr.setStopId(rs.getString("StopId"));
1994   - arr.setLineList(rs.getString("LineList"));
1995   - arr.setCityCoordinate(rs.getString("CityCoordinate"));
1996   - arr.setStationName(rs.getString("StationName"));
1997   - arr.setStationStandardCode(rs.getString("StationStandardCode"));
1998   - listMD.add(arr);
1999   - }
2000   -
2001   - List<StationMatchData> rsList = new ArrayList<>();
2002   - Point point = new Point(lonx, laty);
2003   - for (StationMatchData s : listMD) {
2004   - String libraryPointstr = s.getCityCoordinate();
2005   - String points[] = libraryPointstr.toString().split(",");
2006   - if(points.length > 1){
2007   - Map map_2 = JWDUtil.ConvertSHToJW(Double.parseDouble(points[0]), Double.parseDouble(points[1]));
2008   -
2009   -
2010   - Point center = new Point(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
2011   - // 在60m内认为是同一个站点
2012   - Circle circle = new Circle(center, 200);
2013   - // 匹配到了用数据库中的点替换
2014   - if (GeoUtils.isPointInCircle(point, circle)) {
2015   - TransGPS.Location location = TransGPS.LocationMake(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
2016   - location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
2017   - s.setbJwpoints(location.getLng()+" "+location.getLat());
2018   - rsList.add(s);
2019   - }
2020   - }
2021   - }
2022   - rsMap.put("matchList",rsList);
2023   - rsMap.put("status",ResponseCode.SUCCESS);
2024   - }catch(Exception e){
2025   - logger.error(e.toString(), e);
2026   - rsMap.put("status",ResponseCode.ERROR);
2027   - }finally {
2028   - DBUtils_station.close(rs, ps, conn);
2029   - return rsMap;
2030   - }
2031   - }
2032 1683 }
... ...
src/main/java/com/bsth/util/db/DBUtils_station.java deleted 100644 → 0
1   -package com.bsth.util.db;
2   -
3   -import com.bsth.data.BasicData;
4   -import com.bsth.data.forecast.entity.ArrivalEntity;
5   -import com.bsth.entity.StationMatchData;
6   -import com.mchange.v2.c3p0.DataSources;
7   -import org.apache.log4j.Logger;
8   -
9   -import javax.sql.DataSource;
10   -import java.io.FileNotFoundException;
11   -import java.io.IOException;
12   -import java.sql.Connection;
13   -import java.sql.PreparedStatement;
14   -import java.sql.ResultSet;
15   -import java.sql.SQLException;
16   -import java.sql.Statement;
17   -import java.util.ArrayList;
18   -import java.util.Calendar;
19   -import java.util.HashMap;
20   -import java.util.List;
21   -import java.util.Map;
22   -import java.util.Properties;
23   -
24   -/**
25   - * 站点行业编码库库连接池
26   - * @author YouRuiFeng
27   - *
28   - */
29   -//@Component
30   -public class DBUtils_station {
31   -
32   - private static String url = null;
33   -
34   - private static String username = null;
35   -
36   - private static String pwd = null;
37   -
38   - private static DataSource ds_pooled;
39   -
40   - static Logger logger = Logger.getLogger(DBUtils_station.class);
41   -
42   - static {
43   - Properties env = new Properties();
44   -
45   - try {
46   - env.load(DBUtils_station.class.getClassLoader().getResourceAsStream("station-jdbc.properties"));
47   - // 1. 加载驱动类
48   - Class.forName(env.getProperty("station.mysql.driver"));
49   -
50   - url = env.getProperty("station.mysql.url");
51   - username = env.getProperty("station.mysql.username");
52   - pwd = env.getProperty("station.mysql.password");
53   -
54   - // 设置连接数据库的配置信息
55   - DataSource ds_unpooled = DataSources.unpooledDataSource(url,
56   - username, pwd);
57   -
58   - Map<String, Object> pool_conf = new HashMap<String, Object>();
59   - // 设置最大连接数
60   - pool_conf.put("maxPoolSize", 10);
61   -
62   - pool_conf.put("testConnectionOnCheckout", false);
63   - //异步检测连接的有效性
64   - pool_conf.put("testConnectionOnCheckin", true);
65   - //30秒检测一次
66   - pool_conf.put("idleConnectionTestPeriod", 30);
67   - ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf);
68   - } catch (FileNotFoundException e) {
69   - logger.error(e.toString());
70   - e.printStackTrace();
71   - } catch (IOException e) {
72   - logger.error(e.toString());
73   - e.printStackTrace();
74   - } catch (ClassNotFoundException e) {
75   - logger.error(e.toString());
76   - e.printStackTrace();
77   - } catch (SQLException e) {
78   - logger.error(e.toString());
79   - e.printStackTrace();
80   - }
81   - }
82   -
83   - /**
84   - * 获取连接对象
85   - */
86   - public static Connection getConnection() throws SQLException {
87   - return ds_pooled.getConnection();
88   - }
89   -
90   - /**
91   - * 释放连接池资源
92   - */
93   - public static void clearup() {
94   - if (ds_pooled != null) {
95   - try {
96   - DataSources.destroy(ds_pooled);
97   - } catch (SQLException e) {
98   - logger.error(e.toString());
99   - e.printStackTrace();
100   - }
101   - }
102   - }
103   -
104   - /**
105   - * 资源关闭
106   - *
107   - * @param rs
108   - * @param stmt
109   - * @param conn
110   - */
111   - public static void close(ResultSet rs, Statement stmt, Connection conn) {
112   - if (rs != null) {
113   - try {
114   - rs.close();
115   - } catch (SQLException e) {
116   - logger.error(e.toString());
117   - e.printStackTrace();
118   - }
119   - }
120   -
121   - if (stmt != null) {
122   - try {
123   - stmt.close();
124   - } catch (SQLException e) {
125   - logger.error(e.toString());
126   - e.printStackTrace();
127   - }
128   - }
129   -
130   - if (conn != null) {
131   - try {
132   - conn.close();
133   - } catch (SQLException e) {
134   - logger.error(e.toString());
135   - e.printStackTrace();
136   - }
137   - }
138   - }
139   -
140   - public static DataSource getDataSource(){
141   - return ds_pooled;
142   - }
143   -
144   -
145   - public static void main(String[] args) {
146   - Connection conn = null;
147   - PreparedStatement ps = null;
148   - ResultSet rs = null;
149   -
150   - /*List<StationMatchData> listMD = new ArrayList<>();
151   - String sql = "select * from roadlinestop ORDER BY RoteLine,LineStandardCode,UpStream,LevelId";
152   - try{
153   - conn = DBUtils_station.getConnection();
154   - ps = conn.prepareStatement(sql);
155   - rs = ps.executeQuery();
156   - while(rs.next()){
157   - StationMatchData arr = new StationMatchData();
158   - arr.setRoadLine(rs.getString("RoadLine"));
159   - arr.setLineStandardCode(rs.getString("LineStandardCode"));
160   - arr.setStationName(rs.getString("StationName"));
161   - arr.setStationStandardCode(rs.getString("StationStandardCode"));
162   - arr.setUpStream(Integer.parseInt(rs.getString("UpStream")));
163   - arr.setLevelId(rs.getString("LevelId"));
164   - arr.setStationType(rs.getString("StationType"));
165   -
166   - listMD.add(arr);
167   - }
168   - Map<String, Map<String, List<StationMatchData>>> mapsMD = new HashMap<>();
169   - for (StationMatchData s:listMD) {
170   - String key = s.getRoadLine()+"_"+s.getLineStandardCode();
171   - int dir = s.getUpStream();
172   - if(mapsMD.containsKey(key)){
173   - Map<String, List<StationMatchData>> map = mapsMD.get(key);
174   - if(mapsMD.containsKey(dir)){
175   - List<StationMatchData> lists = map.get(dir);
176   - lists.add(s);
177   - } else {
178   - List<StationMatchData> lists = new ArrayList<>();
179   - lists.add(s);
180   - map.put(dir+"",lists);
181   - }
182   - } else {
183   - Map<String, List<StationMatchData>> map = new HashMap<>();
184   - List<StationMatchData> lists = new ArrayList<>();
185   - lists.add(s);
186   - map.put(dir+"",lists);
187   - mapsMD.put(key,map);
188   - }
189   - }
190   - System.out.println(mapsMD);
191   - }catch(Exception e){
192   - logger.error("", e);
193   - }finally {
194   - DBUtils_station.close(rs, ps, conn);
195   - }*/
196   - }
197   -}
src/main/resources/application-prod.properties renamed to src/main/resources/application-bhs.properties
src/main/resources/application-cloud.properties renamed to src/main/resources/application-ghx.properties
... ... @@ -13,7 +13,7 @@ spring.jpa.show-sql= false
13 13  
14 14 #DATABASE
15 15 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
16   -spring.datasource.url= jdbc:mysql://192.170.100.132/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  16 +spring.datasource.url= jdbc:mysql://192.168.0.227/control?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
17 17 spring.datasource.username= root
18 18 spring.datasource.password= root2jsp
19 19 spring.datasource.type= com.zaxxer.hikari.HikariDataSource
... ... @@ -33,12 +33,16 @@ spring.datasource.hikari.register-mbeans=true
33 33 ## gps client data
34 34 http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all
35 35 ## gateway real data
36   -http.gps.real.url= http://192.170.100.252:8080/transport_server/rtgps/
  36 +http.gps.real.url= http://127.0.0.1:8080/transport_server/rtgps/
37 37 ## gateway send directive
38   -http.send.directive = http://192.170.100.252:8080/transport_server/message/
  38 +http.send.directive= http://127.0.0.1:8080/transport_server/message/
39 39 ## rfid data
40   -http.rfid.url= http://192.170.100.80:9000/rfid
  40 +http.rfid.url= http://10.10.200.82:9000/rfid
41 41 ## wxsb
  42 +#http.report.url.05= http://192.168.168.154:8088/ygjwsystem_j2ee/clbx/clbx_dd.do
  43 +#http.report.url.22= http://192.168.168.154:8088/jgjwsystem_j2ee/clbx/clbx_dd.do
  44 +#http.report.url.26= http://192.168.168.154:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
  45 +#http.report.url.55= http://192.168.168.154:8088/snjwsystem_j2ee/clbx/clbx_dd.do
42 46 http.report.url.05= http://116.228.197.222:8081/ygjwsystem_j2ee/clbx/clbx_dd.do
43 47 http.report.url.22= http://116.247.73.122:9098/jgjwsystem_j2ee/clbx/clbx_dd.do
44 48 http.report.url.26= http://116.236.141.34:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
... ... @@ -55,4 +59,12 @@ cp.ack.url= http://114.80.178.12:8778/prod-api/serverApi/instructionsIssue/confi
55 59 ## admin mail
56 60 admin.mail= 3090342880@qq.com
57 61 ## enabled
58   -enabled.whiteip= true
59 62 \ No newline at end of file
  63 +enabled.whiteip= false
  64 +
  65 +ms.mysql.driver= com.mysql.jdbc.Driver
  66 +ms.mysql.url= jdbc:mysql://192.168.0.227/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false
  67 +ms.mysql.username= root
  68 +ms.mysql.password= root2jsp
  69 +
  70 +server.email.username= pdda_zhmm2014@163.COM
  71 +server.email.password= ZHMM2014_PDDA
60 72 \ No newline at end of file
... ...
src/main/resources/application.properties
1   -spring.profiles.active = prod
  1 +spring.profiles.active = ghx
2 2  
3 3 spring.view.suffix=.html
4 4 server.session-timeout=-1
... ...
src/main/resources/control-jdbc.properties
1 1 station.mysql.driver= com.mysql.jdbc.Driver
2   -station.mysql.url= jdbc:mysql://192.170.100.132/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  2 +station.mysql.url= jdbc:mysql://192.168.0.227/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
3 3 station.mysql.username= root
4 4 station.mysql.password= root2jsp
5 5  
... ...
src/main/resources/datatools/config-prod.properties renamed to src/main/resources/datatools/config-bhs.properties
... ... @@ -5,7 +5,7 @@ datatools.kettle_properties=/datatools/kettle.properties
5 5 # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6 6  
7 7 #数据库ip地址
8   -datatools.kvars_dbip=192.168.168.241
  8 +datatools.kvars_dbip=192.168.168.242
9 9 #数据库用户名
10 10 datatools.kvars_dbuname=root
11 11 #数据库密码
... ...
src/main/resources/datatools/config-cloud.properties renamed to src/main/resources/datatools/config-ghx.properties
... ... @@ -5,7 +5,7 @@ datatools.kettle_properties=/datatools/kettle.properties
5 5 # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6 6  
7 7 #数据库ip地址
8   -datatools.kvars_dbip=192.170.100.132
  8 +datatools.kvars_dbip=192.168.0.227
9 9 #数据库用户名
10 10 datatools.kvars_dbuname=root
11 11 #数据库密码
... ... @@ -83,7 +83,7 @@ datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
83 83 datatools.vehicle_datasyncktr=/datatools/ktrs/vehicleDataSync.ktr
84 84  
85 85 # 车辆库访问url
86   -#datatools.cars_interface=http://180.166.5.82:8076/cars/getCarsInterface
87   -datatools.cars_interface=http://192.170.101.132:8076/cars/getCarsInterface
  86 +datatools.cars_interface=http://180.166.5.82:8076/cars/getCarsInterface
  87 +#datatools.cars_interface=http://192.170.101.132:8076/cars/getCarsInterface
88 88  
89 89 # TODO:
... ...
src/main/resources/dubbo/config-cloud.properties renamed to src/main/resources/dubbo/config-bhs.properties
src/main/resources/dubbo/config-prod.properties renamed to src/main/resources/dubbo/config-ghx.properties
1   -# application名字
2   -spring.dubbo.application.name=bsth_control_v_multi_service
3   -# zookeeper注册中心地址
4   -spring.dubbo.registry=zookeeper://127.0.0.1:2181
5   -# protocol配置
6   -spring.dubbo.protocol.name=dubbo
7   -spring.dubbo.protocol.port=30881
8   -
9   -#----------- dubbo:consumer 性能调优选项 -------------#
10   -# 远程服务调用超时时间,单位毫秒,这里设置30分钟
11   -spring.dubbo.consumer.timeout=1800000
12   -# 远程服务调用重试次数,0表示不需要重试
13   -spring.dubbo.consumer.retries=0
14   -#----------- dubbo:consumer 服务治理选项 -------------#
15   -# 启动不检查提供者是否存在
16   -spring.dubbo.consumer.check=false
  1 +# application名字
  2 +spring.dubbo.application.name=bsth_control_v_multi_service
  3 +# zookeeper注册中心地址
  4 +spring.dubbo.registry=zookeeper://127.0.0.1:2181
  5 +# protocol配置
  6 +spring.dubbo.protocol.name=dubbo
  7 +spring.dubbo.protocol.port=30881
  8 +
  9 +#----------- dubbo:consumer 性能调优选项 -------------#
  10 +# 远程服务调用超时时间,单位毫秒,这里设置30分钟
  11 +spring.dubbo.consumer.timeout=1800000
  12 +# 远程服务调用重试次数,0表示不需要重试
  13 +spring.dubbo.consumer.retries=0
  14 +#----------- dubbo:consumer 服务治理选项 -------------#
  15 +# 启动不检查提供者是否存在
  16 +spring.dubbo.consumer.check=false
... ...
src/main/resources/station-jdbc.properties deleted 100644 → 0
1   -station.mysql.driver= com.mysql.jdbc.Driver
2   -station.mysql.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
3   -station.mysql.username= root
4   -station.mysql.password= root
5   -
6   -#station.mysql.driver= com.mysql.jdbc.Driver
7   -#station.mysql.url= jdbc:mysql://10.10.200.121:3306/station?useUnicode=true&characterEncoding=utf-8
8   -#station.mysql.username= station
9   -#station.mysql.password= station@jsp
10   -
11   -#station.mysql.driver= com.mysql.jdbc.Driver
12   -#station.mysql.url= jdbc:mysql://10.10.200.148:3306/station?useUnicode=true&characterEncoding=utf-8
13   -#station.mysql.username= station
14   -#station.mysql.password= station@jsp
src/main/resources/traffic-jdbc.properties
... ... @@ -4,6 +4,6 @@
4 4 #ms.mysql.password= 123456
5 5  
6 6 ms.mysql.driver= com.mysql.jdbc.Driver
7   -ms.mysql.url= jdbc:mysql://192.170.100.63/ms?useUnicode=true&characterEncoding=utf-8
  7 +ms.mysql.url= jdbc:mysql://192.168.0.227/ms?useUnicode=true&characterEncoding=utf-8
8 8 ms.mysql.username= root
9 9 ms.mysql.password= root2jsp
10 10 \ No newline at end of file
... ...