【人员匹配索引修改】

This commit is contained in:
weizhihong 2023-04-11 14:50:22 +08:00
parent dc461b9fce
commit ca6870ae17
4 changed files with 6 additions and 6 deletions

View File

@ -76,7 +76,7 @@ public class OperateParseServiceImpl implements VoiceTransactionalService {
if (memberRule.getIndex() == null) {
simulationMemberList = memberRule.getParseRule().matchMember(simulation, null);
} else if (memberRule.getIndex() < paramExtractResults.size()) {
simulationMemberList = memberRule.getParseRule().matchMember(simulation, paramExtractResults.get(memberRule.getIndex()));
simulationMemberList = memberRule.getParseRule().matchMember(simulation, paramExtractResultMap.get(memberRule.getIndex()));
} else {
return;
}

View File

@ -57,7 +57,7 @@ public class ReplyParseServiceImpl implements VoiceTransactionalService {
if (memberRule.getIndex() == null) {
simulationMemberList = memberRule.getParseRule().matchMember(simulation, null);
} else if (memberRule.getIndex() < paramExtractResults.size()) {
simulationMemberList = memberRule.getParseRule().matchMember(simulation, paramExtractResults.get(memberRule.getIndex()));
simulationMemberList = memberRule.getParseRule().matchMember(simulation, paramExtractResults.get(memberRule.getIndex() - 1));
} else {
return;
}

View File

@ -8,7 +8,7 @@ import lombok.Data;
@Data
public class MemberRule {
/**
* 对应group位置
* 对应{@link VoiceDiscriminateResult.paramExtractResultList}位置, 索引从1开始
*/
private Integer index;

View File

@ -53,11 +53,11 @@ public class VoiceDiscriminateTest {
String token = iAuthenticateService.loginWithPwd(loginInfo);
LoginUserInfoVO loginUserInfoVO = this.iAuthenticateService.getLoginUserInfoByToken(token);
orgProjectService.signInOrg(124L, loginUserInfoVO);
String simulationId = simulationService.createSimulation(10625L, loginUserInfoVO);
String simulationId = simulationService.createSimulation(10645L, loginUserInfoVO);
Simulation simulation = simulationManager.getById(simulationId);
voiceDiscriminateService.doAnalysis((club.joylink.rtss.simulation.cbtc.Simulation) simulation, "太白南路站办理S0506-S0704进路");
voiceDiscriminateService.doAnalysis((club.joylink.rtss.simulation.cbtc.Simulation) simulation, "车站二站办理X0202-X0103_1进路");
Route r = ((club.joylink.rtss.simulation.cbtc.Simulation) simulation).getRepository().getRouteList()
.stream().filter(route -> Objects.equals("S0506-S0704", route.getName()))
.stream().filter(route -> Objects.equals("X0202-X0103_1", route.getName()))
.findFirst().orElse(null);
assert r != null;
boolean checkLock = true;