boolean changeStatus(@Param("quId") String quId
,@Param("status") String status);
+ int selectCountQu();
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperQuServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperQuServiceImpl.java
index bbe385e6..b33e53d8 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperQuServiceImpl.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperQuServiceImpl.java
@@ -1,5 +1,6 @@
package pc.exam.pp.module.exam.service.paper;
+import com.alibaba.excel.util.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -187,7 +188,9 @@ public class EducationPaperQuServiceImpl implements IEducationPaperQuService
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
examPaperVo.setEducationPaperParam(educationPaperParam);
examPaperVo.setStuInfoPaper(stuInfoPaper);
-
+ if (StringUtils.isNotBlank(educationPaper.getNum())){
+ examPaperVo.setPaperNum(educationPaper.getNum());
+ }
return examPaperVo;
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
index 62976694..29ad2a8f 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java
@@ -203,7 +203,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
int number=educationPaperMapper.selectCountPaperList();
// 格式化为8位,不足前面补0
- String formattedNumber = String.format("%08d", number);
+ String formattedNumber = String.format("%08d", ++number);
@@ -406,7 +406,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
int number=educationPaperMapper.selectCountPaperList();
// 格式化为8位,不足前面补0
- String formattedNumber = String.format("%08d", number);
+ String formattedNumber = String.format("%08d", ++number);
@@ -495,7 +495,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
String schoolName= examQuestionMapper.selectSchoolnameBytId(loginTenantId);
stuInfoPaper.setSchoolName(schoolName);
stuInfoPaper.setSex(SecurityFrameworkUtils.getLoginUserSEX());
-
+ examPaperVo.setPaperNum(formattedNumber);
examPaperVo.setExamQuestionList(examQuestionList);
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
examPaperVo.setEducationPaperParam(educationPaperParam);
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java
index 9758fb3a..58ad0efe 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java
@@ -130,7 +130,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
educationPaperParam.setParamId(IdUtils.simpleUUID());
educationPaperParam.setTaskId(uuid);
educationPaperParam.setIsExamPassword("1");
- educationPaperParam.setUsb("0");
+ educationPaperParam.setUsb("1");
educationPaperParam.setSaveGrades("0");
educationPaperParam.setDriver("C");
educationPaperParam.setIsNumber("1");
@@ -144,6 +144,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
educationPaperParam.setIsFile("1");
educationPaperParam.setIsNet("1");
educationPaperParam.setIsScreen("1");
+ educationPaperParam.setWarn(">>请仔细核对考试信息,并认真阅读本注意事项确认无误后点【开始考试】按钮进入考试系统。
>>进入考试系统后,系统自动计时,考试结束前5分钟,系统将提示您存盘,请根据系统的提示交卷或存盘。
>>进入考试系统后,须根据系统提示进行操作,任何因为与考试无关的操作造成的成绩错误由考生自行负责。
>>单选试题操作完后系统会自动保存。
>>所有操作类科目的试题,必须在相对应的操作环境中完成操作,并在该环境中直接保存文件,不要更改文件保存路径。
>>Windows和网络操作题,考生按照系统提示完成相应的操作即可。
>>考试时间结束后,系统会自动提交考生答卷到考试服务器。提前完成的考生,选择【交卷】按钮提交试卷,出现【交卷成功】提示后方可离开,不要关闭交卷成功窗口,否则后果自负。
>>如在考试过程中有任何疑问请举手与监考老师联系。
");
educationPaperParam.setIsContent("1");
if ("1".equals(educationPaperTask.getTaskType())){
educationPaperParam.setIsRepeat("1");
@@ -479,7 +480,9 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
examPaperVo.setPaperId(paperId);
examPaperVo.setEducationPaperParam(educationPaperParam);
examPaperVo.setStuInfoPaper(stuInfoPaper);
-
+ if (StringUtils.isNotBlank(educationPaper.getNum())){
+ examPaperVo.setPaperNum(educationPaper.getNum());
+ }
return examPaperVo;
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/ExamQuestionServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/ExamQuestionServiceImpl.java
index 6e3d7c88..79619c1a 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/ExamQuestionServiceImpl.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/ExamQuestionServiceImpl.java
@@ -147,7 +147,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
if (fileUploads!=null&&fileUploads.size()>0){
fileUploads.replaceAll(fileUpload -> {
// 设置文件名(如果文件名为空)
- if (!StringUtils.isNotBlank(fileUpload.getFileName())) {
+ if (StringUtils.isBlank(fileUpload.getFileName())) {
switch (fileUpload.getFileType()) {
case "0":
fileUpload.setFileName("素材");
@@ -163,9 +163,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
break;
}
}
- if (StringUtils.isNotBlank(fileUpload.getFileName())) {
- fileUpload.setFileName(null);
- }
+
// 设置 fileId 和 quId
fileUpload.setFileId(IdUtils.simpleUUID());
fileUpload.setQuId(uuid);
@@ -190,6 +188,13 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
examQuestionKeywordMapper.insertExamQuestionKeywordList(examQuestionKeywords);
}
// return examQuestionMapper.insert(examQuestion);
+ Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
+ int count= examQuestionMapper.selectCountQu();
+
+ // 格式化为8位,不足前面补0
+ String formattedNumber = String.format("%08d", ++count);
+ String quNum =loginTenantId +"-"+formattedNumber;
+ examQuestion.setQuNum(quNum);
return examQuestionMapper.insertExamQuestion(examQuestion);
}
@@ -233,7 +238,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
//赋值
fileUploads.replaceAll(fileUpload -> {
// 设置文件名(如果文件名为空)
- if (!StringUtils.isNotBlank(fileUpload.getFileName())) {
+ if (StringUtils.isBlank(fileUpload.getFileName())) {
switch (fileUpload.getFileType()) {
case "0":
fileUpload.setFileName("素材");
@@ -249,9 +254,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
break;
}
}
- if (StringUtils.isNotBlank(fileUpload.getFileName())) {
- fileUpload.setFileName(null);
- }
+
// 设置 fileId 和 quId
fileUpload.setFileId(IdUtils.simpleUUID());
fileUpload.setQuId(examQuestion.getQuId());
@@ -693,6 +696,15 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
if ("选择题".equals(importUser.getSubjectName())){
String quId = IdUtils.simpleUUID();
ExamQuestion examQuestion = new ExamQuestion();
+
+ Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
+ int count= examQuestionMapper.selectCountQu();
+
+ // 格式化为8位,不足前面补0
+ String formattedNumber = String.format("%08d", ++count);
+ String quNum =loginTenantId +"-"+formattedNumber;
+ examQuestion.setQuNum(quNum);
+
examQuestion.setChapteridDictText(importUser.getChapteridDictText());
examQuestion.setSpecialtyName(importUser.getSpecialtyName());
examQuestion.setCourseName(importUser.getCourseName());
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/ExamQuestionMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/ExamQuestionMapper.xml
index e2c7f57a..e00ad814 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/ExamQuestionMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/ExamQuestionMapper.xml
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select qu_id, qu_bank_id, qu_bank_name, chapterId_dict_text,subject_name, qu_level,
+ select qu_id, qu_bank_id, qu_num,qu_bank_name, chapterId_dict_text,subject_name, qu_level,
content, content_text, analysis, point_names, keywords, manual, create_time, creator, update_time, updater, deleted ,status,audit ,course_name, specialty_name from exam_question
@@ -128,6 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -135,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qu_id,
qu_bank_id,
+ qu_num,
qu_bank_name,
chapterId_dict_text,
subject_name,
@@ -159,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{quId},
#{quBankId},
+ #{quNum},
#{quBankName},
#{chapteridDictText},
#{subjectName},
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/EndStuMonitorUtils.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/EndStuMonitorUtils.java
index 00c6ca52..8d25a11e 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/EndStuMonitorUtils.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/utils/EndStuMonitorUtils.java
@@ -146,13 +146,14 @@ public class EndStuMonitorUtils {
}
- //练习下的任务 结束改为 代考 其他为结束
- if ("0".equals(educationPaperTask.getTaskType())){
- info.setExamStatus("0");
- stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(info));
- }else {
+ //考试下的任务 结束改为 结束 其他为待考
+ if ("1".equals(educationPaperTask.getTaskType())){
info.setExamStatus("2");
redisTemplate.delete(key);
+
+ }else {
+ info.setExamStatus("0");
+ stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(info));
}
monitorMapper.updateById(info);