Commit ef222eec5dc3ff863cf2693ec42caf89d58d2ca6

Authored by 王通
1 parent 1895047f

1.浦东公交提供经过闵行区的线路相关数据给闵行交通委

src/main/java/com/bsth/server_rs/dks/BxRestService.java
... ... @@ -56,7 +56,7 @@ public class BxRestService {
56 56 }
57 57 for (Line line : LineBufferData.findAll()) {
58 58 String lineCode = line.getLineCode();
59   - if (limitLines.indexOf(String.format("%s,", lineCode)) > -1) {
  59 + if (limitLines.indexOf(String.format(",%s,", lineCode)) > -1) {
60 60 Map<String, Object> lineMap = new HashMap<>();
61 61 Collection<LD_SectionRoute> sectionRoutes = ldSectionBufferData.findByLineCode(lineCode).get(String.format("%s_0", lineCode));
62 62 StringBuilder sb = new StringBuilder();
... ... @@ -137,7 +137,7 @@ public class BxRestService {
137 137 String limitLines = systemParamService.getValue(SystemParamKeys.LIMIT_LINES);
138 138 for (Map.Entry<String, String> entry : device2line.entrySet()) {
139 139 String deviceId = entry.getKey(), lineCode = entry.getValue();
140   - if (limitLines.indexOf(String.format("%s,", lineCode)) > -1) {
  140 + if (limitLines.indexOf(String.format(",%s,", lineCode)) > -1) {
141 141 sb.append(deviceId).append(",");
142 142 }
143 143 }
... ... @@ -178,7 +178,7 @@ public class BxRestService {
178 178 StringBuilder sb = new StringBuilder();
179 179 for (Line line : LineBufferData.findAll()) {
180 180 String lineCode = line.getLineCode();
181   - if (limitLines.indexOf(String.format("%s,", lineCode)) > -1) {
  181 + if (limitLines.indexOf(String.format(",%s,", lineCode)) > -1) {
182 182 sb.append(line.getCarPark()).append(",");
183 183 }
184 184 }
... ... @@ -211,7 +211,7 @@ public class BxRestService {
211 211 }
212 212 for (GpsEntity gps : GpsRealDataBuffer.all()) {
213 213 String lineCode = gps.getLineId(), deviceId = gps.getDeviceId();
214   - if (limitLines.indexOf(String.format("%s,", lineCode)) > -1) {
  214 + if (limitLines.indexOf(String.format(",%s,", lineCode)) > -1) {
215 215 Line line = LineBufferData.findOne(lineCode);
216 216 Car car = CarBufferData.findByDevice(deviceId);
217 217 if (car == null) {
... ...