Selaa lähdekoodia

3.4.5 20250530 bug修复

xiaofei 3 viikkoa sitten
vanhempi
commit
ef596ed35b

+ 2 - 2
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkQuestionServiceImpl.java

@@ -618,10 +618,10 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
         for (Long questionId : questionPictureConfigParams.getQuestionIds()) {
             MarkQuestion markQuestion = this.getById(questionId);
             boolean clearOcrResult = false;
-            if (!markQuestion.getObjective() && markQuestion.getQuestionType() != 4) {
+            if (!MarkPaperAiMark.NONE.equals(markQuestion.getAiMark()) && !markQuestion.getObjective() && markQuestion.getQuestionType() != 4) {
                 // 评卷区是否变化
                 List<PictureConfig> picList = JSON.parseArray(markQuestion.getPicList(), PictureConfig.class);
-                clearOcrResult = !CollectionUtils.isEqualCollection(pictureConfigs, picList);
+                clearOcrResult =CollectionUtils.isEmpty(picList) || !CollectionUtils.isEqualCollection(pictureConfigs, picList);
             }
 
             UpdateWrapper<MarkQuestion> updateWrapper = new UpdateWrapper<>();

+ 4 - 4
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -314,7 +314,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
 
         MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
         List<MarkAiScoreDto> markAiScoreDtoList = this.findScoreByAiMark(examId, paperNumber);
-        if(CollectionUtils.isNotEmpty(markAiScoreDtoList)){
+        if (CollectionUtils.isNotEmpty(markAiScoreDtoList)) {
             throw ExceptionResultEnum.ERROR.exception("有AI智能评卷待复核任务未完成,请在成绩检查里复核完成后导出成绩");
         }
 
@@ -1421,7 +1421,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             }
         } else {
             List<MarkAiScoreDto> markAiScoreDtoList = this.findScoreByAiMark(query.getExamId(), query.getPaperNumber());
-            if(CollectionUtils.isNotEmpty(markAiScoreDtoList)){
+            if (CollectionUtils.isNotEmpty(markAiScoreDtoList)) {
                 throw ExceptionResultEnum.ERROR.exception("有AI智能评卷待复核任务未完成,请在成绩检查里复核完成后导出成绩");
             }
 
@@ -1527,7 +1527,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             log.debug("导出Excel开始...");
             ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
             writer.writeDataArrays("成绩单", null, columnNames, columnValues.listIterator());
-            FileOutputStream fileOut = new FileOutputStream(downloadFilePath + File.separator + new String((basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX).getBytes(), StandardCharsets.UTF_8));
+            FileOutputStream fileOut = new FileOutputStream(downloadFilePath + File.separator + basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX);
             writer.output(fileOut);
             fileOut.flush();
             fileOut.close();
@@ -1539,7 +1539,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 for (Map.Entry<Object, List<CellValue[]>> entry : entrySet) {
                     writer = ExcelWriter.create(ExcelType.XLSX);
                     writer.writeDataArrays("成绩单", null, columnNames, entry.getValue().listIterator());
-                    FileOutputStream classFileOut = new FileOutputStream(downloadFilePath + File.separator + new String((basicCourse.getName() + "-" + entry.getKey() + "成绩单" + SystemConstant.EXCEL_PREFIX).getBytes(), StandardCharsets.UTF_8));
+                    FileOutputStream classFileOut = new FileOutputStream(downloadFilePath + File.separator + basicCourse.getName() + "-" + entry.getKey() + "成绩单" + SystemConstant.EXCEL_PREFIX);
                     writer.output(classFileOut);
                     classFileOut.flush();
                     classFileOut.close();