Commit 0120b0e56ae779aa7f11708d13c6fb4eb88773e1
1 parent
7960e395
修复获取站点名称异常问题
Showing
1 changed file
with
4 additions
and
2 deletions
src/main/java/com/bsth/service/forecast/SampleServiceImpl.java
| ... | ... | @@ -37,10 +37,12 @@ public class SampleServiceImpl extends BaseServiceImpl<Sample, Long> implements |
| 37 | 37 | //转换站点名称 |
| 38 | 38 | Iterator<Sample> iterator = rs.iterator(); |
| 39 | 39 | Sample s; |
| 40 | + String prefix; | |
| 40 | 41 | while(iterator.hasNext()){ |
| 41 | 42 | s = iterator.next(); |
| 42 | - s.setsName(BasicData.stationCode2NameMap.get(s.getsStation())); | |
| 43 | - s.seteName(BasicData.stationCode2NameMap.get(s.geteStation())); | |
| 43 | + prefix = s.getLineCode() + "_" + s.getUpdown() + "_"; | |
| 44 | + s.setsName(BasicData.getStationNameByCode(s.getsStation(), prefix)); | |
| 45 | + s.seteName(BasicData.getStationNameByCode(s.geteStation(), prefix)); | |
| 44 | 46 | |
| 45 | 47 | rsList.add(s); |
| 46 | 48 | } | ... | ... |