|
@@ -135,7 +135,7 @@ public class MarkServiceImpl implements MarkService {
|
|
@Resource
|
|
@Resource
|
|
private OcrApiClient ocrApiClient;
|
|
private OcrApiClient ocrApiClient;
|
|
@Resource
|
|
@Resource
|
|
- private SysConfigService sysConfigService;
|
|
|
|
|
|
+ private CommonCacheService commonCacheService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 释放某个评卷员的考生
|
|
* 释放某个评卷员的考生
|
|
@@ -1608,6 +1608,13 @@ public class MarkServiceImpl implements MarkService {
|
|
if (aiUser != null) {
|
|
if (aiUser != null) {
|
|
BasicCourse basicCourse = basicCourseMapper.selectByExamIdAndPaperNumber(examId, paperNumber);
|
|
BasicCourse basicCourse = basicCourseMapper.selectByExamIdAndPaperNumber(examId, paperNumber);
|
|
MarkAiQuestionParam markAiQuestionParam = markAiQuestionParamService.getByExamIdAndPaperNumberAndQuestionId(examId, paperNumber, questionId);
|
|
MarkAiQuestionParam markAiQuestionParam = markAiQuestionParamService.getByExamIdAndPaperNumberAndQuestionId(examId, paperNumber, questionId);
|
|
|
|
+ if (markAiQuestionParam == null) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ List<StandardAnswer> standardAnswerList = buildStandardAnswer(markAiQuestionParam);
|
|
|
|
+ if (CollectionUtils.isEmpty(standardAnswerList)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
List<MarkTask> markTasks = null;
|
|
List<MarkTask> markTasks = null;
|
|
int pageNumber = 1;
|
|
int pageNumber = 1;
|
|
do {
|
|
do {
|
|
@@ -1634,9 +1641,9 @@ public class MarkServiceImpl implements MarkService {
|
|
request.setIntervalScore(markAiQuestionParam.getMinScore());
|
|
request.setIntervalScore(markAiQuestionParam.getMinScore());
|
|
request.setQuestionBody(markAiQuestionParam.getMainTitle());
|
|
request.setQuestionBody(markAiQuestionParam.getMainTitle());
|
|
request.setStudentAnswer(studentQuestionAnswer);
|
|
request.setStudentAnswer(studentQuestionAnswer);
|
|
- request.setStandardAnswer(buildStandardAnswer(markAiQuestionParam));
|
|
|
|
|
|
+ request.setStandardAnswer(standardAnswerList);
|
|
String aiUrl = null;
|
|
String aiUrl = null;
|
|
- SysConfig sysConfig = sysConfigService.getByKey(SystemConstant.AI_MARK_SET);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(basicSchool.getId(), SystemConstant.AI_MARK_SET);
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
JSONObject object = JSON.parseObject(sysConfig.getConfigValue(), JSONObject.class);
|
|
JSONObject object = JSON.parseObject(sysConfig.getConfigValue(), JSONObject.class);
|
|
if (object.containsKey("url")) {
|
|
if (object.containsKey("url")) {
|
|
@@ -1848,7 +1855,7 @@ public class MarkServiceImpl implements MarkService {
|
|
}
|
|
}
|
|
|
|
|
|
String ocrUrl = null;
|
|
String ocrUrl = null;
|
|
- SysConfig sysConfig = sysConfigService.getByKey(SystemConstant.AI_MARK_SET);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.AI_MARK_SET);
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
if (sysConfig != null && StringUtils.isNotBlank(sysConfig.getConfigValue())) {
|
|
JSONObject object = JSON.parseObject(sysConfig.getConfigValue(), JSONObject.class);
|
|
JSONObject object = JSON.parseObject(sysConfig.getConfigValue(), JSONObject.class);
|
|
if (object.containsKey("ocrUrl")) {
|
|
if (object.containsKey("ocrUrl")) {
|