Эх сурвалжийг харах

3.4.5 update-20250422,bug修改

xiaofei 2 сар өмнө
parent
commit
37d9eea27f

+ 6 - 6
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/MarkAiQuestionParamController.java

@@ -100,9 +100,9 @@ public class MarkAiQuestionParamController {
             }
             switch (markAiQuestionParam.getMode()) {
                 case POINT://按得分点
-                    if (CollectionUtils.isEmpty(markAiQuestionParam.getPointList())) {
-                        throw ExceptionResultEnum.ERROR.exception("得分点信息为空");
-                    }
+//                    if (CollectionUtils.isEmpty(markAiQuestionParam.getPointList())) {
+//                        throw ExceptionResultEnum.ERROR.exception("得分点信息为空");
+//                    }
                     // 最小分校验
                     if (markAiQuestionParam.getMinScore() == 0) {
                         throw ExceptionResultEnum.ERROR.exception("最小分必须大于0");
@@ -153,9 +153,9 @@ public class MarkAiQuestionParamController {
                     }
                     break;
                 case LEVEL://按档次
-                    if (CollectionUtils.isEmpty(markAiQuestionParam.getLevelList())) {
-                        throw ExceptionResultEnum.ERROR.exception("档次信息为空");
-                    }
+//                    if (CollectionUtils.isEmpty(markAiQuestionParam.getLevelList())) {
+//                        throw ExceptionResultEnum.ERROR.exception("档次信息为空");
+//                    }
                     // 最小分校验
                     if (markAiQuestionParam.getMinScore() == 0) {
                         throw ExceptionResultEnum.ERROR.exception("最小分必须大于0");

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

@@ -773,7 +773,8 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
         }
 
         MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
-        if (markAiQuestionParamService.existMarkAiQuestionPointOrLevel(examId, paperNumber, questionId)) {
+        boolean pointOrLevel = markAiQuestionParamService.existMarkAiQuestionPointOrLevel(examId, paperNumber, questionId);
+        if (pointOrLevel) {
             if (oldDoubleRate == 0 && doubleRate > 0 && MarkPaperAiMark.AI_ONLY.equals(markPaper.getAiMark())) {
                 throw ExceptionResultEnum.ERROR.exception("仅AI评卷模式,不允许单评改双评");
             }
@@ -790,7 +791,7 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
         updateWrapper.lambda().set(MarkQuestion::getDoubleRate, doubleRate)
                 .set(MarkQuestion::getArbitrateThreshold, doubleRate > 0 ? doubleMarkParam.getArbitrateThreshold() : null)
                 .set(MarkQuestion::getScorePolicy, doubleRate > 0 ? doubleMarkParam.getScorePolicy() : null)
-                .set(MarkQuestion::getAiMark, markPaper.getAiMark())
+                .set(MarkQuestion::getAiMark, pointOrLevel ? markPaper.getAiMark() : MarkPaperAiMark.NONE)
                 .eq(MarkQuestion::getId, doubleMarkParam.getQuestionId());
         this.update(updateWrapper);