|
@@ -508,7 +508,7 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreDao, Studen
|
|
if (ret != null) {
|
|
if (ret != null) {
|
|
updateAnswer(dto.getStudentScoreId(), ret);
|
|
updateAnswer(dto.getStudentScoreId(), ret);
|
|
}else{
|
|
}else{
|
|
- ocrErr(dto, "ocr失败");
|
|
|
|
|
|
+ ocrErr(dto, "ocr失败,返回null");
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
ocrErr(dto, e.getMessage());
|
|
ocrErr(dto, e.getMessage());
|
|
@@ -587,11 +587,11 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreDao, Studen
|
|
Double ret = aiMarkingDispose(dto, org, req);
|
|
Double ret = aiMarkingDispose(dto, org, req);
|
|
if (ret != null) {
|
|
if (ret != null) {
|
|
updateScore(score.getId(), Calculator.multiply(q.getFullScore(), ret),ret);
|
|
updateScore(score.getId(), Calculator.multiply(q.getFullScore(), ret),ret);
|
|
- if (allSuccess(score.getStudentId())) {
|
|
|
|
- studentService.updateStatus(score.getStudentId(),DataStatus.SUCCESS);
|
|
|
|
- }
|
|
|
|
} else {
|
|
} else {
|
|
- aiScoreErr(dto, "aiScore异常");
|
|
|
|
|
|
+ updateScoreNone(score.getId(), 0.0, 0.0);
|
|
|
|
+ }
|
|
|
|
+ if (allSuccess(score.getStudentId())) {
|
|
|
|
+ studentService.updateStatus(score.getStudentId(),DataStatus.SUCCESS);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
aiScoreErr(dto, e.getMessage());
|
|
aiScoreErr(dto, e.getMessage());
|
|
@@ -649,6 +649,18 @@ public class StudentScoreServiceImpl extends ServiceImpl<StudentScoreDao, Studen
|
|
lw.eq(StudentScoreEntity::getId, id);
|
|
lw.eq(StudentScoreEntity::getId, id);
|
|
this.update(wrapper);
|
|
this.update(wrapper);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void updateScoreNone(Long id, Double aiScore,Double scoreRatio) {
|
|
|
|
+ UpdateWrapper<StudentScoreEntity> wrapper = new UpdateWrapper<>();
|
|
|
|
+ LambdaUpdateWrapper<StudentScoreEntity> lw = wrapper.lambda();
|
|
|
|
+ lw.set(StudentScoreEntity::getScoreStatus, DataStatus.SUCCESS);
|
|
|
|
+ lw.set(StudentScoreEntity::getAiScore, aiScore);
|
|
|
|
+ lw.set(StudentScoreEntity::getScoreRatio, scoreRatio);
|
|
|
|
+ lw.set(StudentScoreEntity::getErrMsg, null);
|
|
|
|
+ lw.set(StudentScoreEntity::getScoreNone, true);
|
|
|
|
+ lw.eq(StudentScoreEntity::getId, id);
|
|
|
|
+ this.update(wrapper);
|
|
|
|
+ }
|
|
|
|
|
|
private void aiScoreErr(AiMarkingDto dto, String err) {
|
|
private void aiScoreErr(AiMarkingDto dto, String err) {
|
|
updateScoreErr(dto.getScoreInfo().getId(), err);
|
|
updateScoreErr(dto.getScoreInfo().getId(), err);
|