Commit 6e0df3f6637724067c15eb76be815daed0476711
1 parent
d21467d2
1.百度地图key替换
2.区间子线路+线路文件、报站文件生成的完善,以及线调的处理变化 3.js打包兼容es6
Showing
1 changed file
with
3 additions
and
5 deletions
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| ... | ... | @@ -1128,8 +1128,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 1128 | 1128 | |
| 1129 | 1129 | // 文本转语音并进行分割 |
| 1130 | 1130 | // 音频存放及压缩文件路径 |
| 1131 | - String linePath = String.format(linePathPattern, lineId), voicePath = String.format("%s%s.zip", linePath, lineId); | |
| 1132 | - // 先清理历史生成的文件 | |
| 1131 | + String linePath = String.format(linePathPattern, lineId); | |
| 1132 | + // 先清理历史生成的文件 | |
| 1133 | 1133 | cleanHistoryAudio(new File(linePath)); |
| 1134 | 1134 | for (String language : languages) { |
| 1135 | 1135 | try { |
| ... | ... | @@ -1159,7 +1159,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 1159 | 1159 | } |
| 1160 | 1160 | merge(lineId, "0", seq, seqs, languages); |
| 1161 | 1161 | } |
| 1162 | - //zipAudio(String.format("%s%s/", linePath, "0"), voicePath); | |
| 1163 | 1162 | zipAudio(linePath, lineId, "0"); |
| 1164 | 1163 | |
| 1165 | 1164 | // 线路区间 |
| ... | ... | @@ -1204,7 +1203,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 1204 | 1203 | merge(lineId, subLineId, seq, map1, languages); |
| 1205 | 1204 | } |
| 1206 | 1205 | |
| 1207 | - //zipAudio(String.format("%s%s/", linePath, subLineId), String.format("%s%s-%s.zip", linePath, lineId, subLineId)); | |
| 1208 | 1206 | zipAudio(linePath, lineId, subLineId); |
| 1209 | 1207 | } |
| 1210 | 1208 | } |
| ... | ... | @@ -1231,7 +1229,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 1231 | 1229 | private void zipAudio(String linePath, String lineId, String subLineId) throws Exception { |
| 1232 | 1230 | String s = "0".equals(subLineId) ? "" : String.format("-%s", subLineId); |
| 1233 | 1231 | String subLinePath = String.format("%s%s/", linePath, subLineId), voicePath = String.format("%s%s%s.zip", linePath, lineId, s); |
| 1234 | - String pack = String.format("%s%s\\", lineId, s); | |
| 1232 | + String pack = String.format("%s%s/", lineId, s); | |
| 1235 | 1233 | File file = new File(subLinePath); |
| 1236 | 1234 | ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(voicePath)); |
| 1237 | 1235 | ZipEntry zipEntry = new ZipEntry(pack); | ... | ... |