增加获取百度token接口;标记删除的阶段计划对应的进路序列和股道视图删除

This commit is contained in:
joylink_zhangsai 2022-07-19 16:40:27 +08:00
parent 2aefb71fed
commit e8a187d4bd
4 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package club.joylink.rtss.controller.voice; package club.joylink.rtss.controller.voice;
import club.joylink.rtss.services.voice.IVoiceTrainingService; import club.joylink.rtss.services.voice.IVoiceTrainingService;
import club.joylink.rtss.services.voice.baidu.TokenHolder;
import club.joylink.rtss.vo.client.PageQueryVO; import club.joylink.rtss.vo.client.PageQueryVO;
import club.joylink.rtss.vo.client.PageVO; import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.VoiceRecognitionResult; import club.joylink.rtss.vo.client.VoiceRecognitionResult;
@ -42,4 +43,11 @@ public class VoiceController {
return iVoiceTrainingService.pagedQueryErrorSet(queryVO); return iVoiceTrainingService.pagedQueryErrorSet(queryVO);
} }
/**
* 获取百度语音识别token
*/
@GetMapping("/token/baidu")
public String getBaiduToken() {
return TokenHolder.getInstance().getToken();
}
} }

View File

@ -57,7 +57,7 @@ public class TokenHolder {
* @param apiKey 网页上申请语音识别应用获取的apiKey * @param apiKey 网页上申请语音识别应用获取的apiKey
* @param secretKey 网页上申请语音识别应用获取的secretKey * @param secretKey 网页上申请语音识别应用获取的secretKey
*/ */
public TokenHolder(String apiKey, String secretKey, String scope) { private TokenHolder(String apiKey, String secretKey, String scope) {
this.apiKey = apiKey; this.apiKey = apiKey;
this.secretKey = secretKey; this.secretKey = secretKey;
this.scope = scope; this.scope = scope;

View File

@ -169,6 +169,8 @@ public class CtcRepository {
stationLineMap.put(station.getCode(), new ArrayList<>()); stationLineMap.put(station.getCode(), new ArrayList<>());
} }
for (CtcStationRunPlanLog plan : getAllRunPlanList()) { for (CtcStationRunPlanLog plan : getAllRunPlanList()) {
if (plan.isDeleted())
continue;
List<RouteSequence.Line> lines = stationLineMap.get(plan.getStation().getCode()); List<RouteSequence.Line> lines = stationLineMap.get(plan.getStation().getCode());
CtcStationRunPlanLog.RunPlanItem arriveRunPlan = plan.getArriveRunPlan(); CtcStationRunPlanLog.RunPlanItem arriveRunPlan = plan.getArriveRunPlan();
if (arriveRunPlan != null) { if (arriveRunPlan != null) {

View File

@ -359,6 +359,13 @@ public class CtcStationRunPlanLog {
departRunPlan.actualAddMinute(minutes); departRunPlan.actualAddMinute(minutes);
} }
/**
* 计划是否被标记删除
*/
public boolean isDeleted() {
return this.status == -1;
}
@Setter @Setter
@Getter @Getter
public static class RunPlanItem { public static class RunPlanItem {