|
|
@ -92,13 +92,15 @@ public class IntelligenceService implements IIntelligenceService { |
|
|
|
} |
|
|
|
} |
|
|
|
log.info("智能测评结果:{}", builder.toString()); |
|
|
|
if (StrUtil.isEmpty(builder.toString()) || !(builder.toString().endsWith("1") || builder.toString().endsWith("0")) ) { |
|
|
|
String current = "[1]"; |
|
|
|
String error = "[0]"; |
|
|
|
if (StrUtil.isEmpty(builder.toString()) || !(current.equals(builder.toString()) || error.equals(builder.toString()))) { |
|
|
|
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
int score = current.equals(builder.toString()) ? 1 : 0; |
|
|
|
HtQuestionOptionExample optionExample = new HtQuestionOptionExample(); |
|
|
|
optionExample.createCriteria().andQuestionIdEqualTo(param.getQuestionId()).andScoreEqualTo(new BigDecimal(builder.toString().substring(builder.length() - 2))); |
|
|
|
optionExample.createCriteria().andQuestionIdEqualTo(param.getQuestionId()).andScoreEqualTo(new BigDecimal(score)); |
|
|
|
List<HtQuestionOption> options = htQuestionOptionMapper.selectByExample(optionExample); |
|
|
|
if (CollectionUtil.isEmpty(options)) { |
|
|
|
result.setResult(Constant.Intelligence.RESULT_FAIL); |
|
|
|