Prechádzať zdrojové kódy

完善开始考试和交卷模拟器类型检查。

tom 1 mesiac pred
rodič
commit
04e48456e6

+ 9 - 1
ruoyi-sim/src/main/java/com/ruoyi/sim/service/impl/RealExamService.java

@@ -426,7 +426,7 @@ public class RealExamService {
         Sim sim = simService.selectSimBySimId(re.getSimId());
         // Check:检查模拟器类型
         final String targetSimType = re.getSimType();
-        if (false) {
+        {
             AjaxResult ar = commCheckService.checkOneSimType(seat, true, targetSimType);
             if (ar.isError()) {
                 return ar;
@@ -609,6 +609,14 @@ public class RealExamService {
                 return ar;
             }
         }
+        // Check:检查模拟器类型
+        final String targetSimType = re.getSimType();
+        {
+            AjaxResult ar = commCheckService.checkOneSimType(seatStart, true, targetSimType);
+            if (ar.isError()) {
+                return ar;
+            }
+        }
         // Check:检查是否是出题值使用的模拟器。防止换机器交卷。
         re = selectRealExamByExamId(examId);
         if (!Objects.equals(re.getSimId(), seatNow.getCurrentSimId())) {