sysFileUploads =sysFileMapper.selectSysFileByQuidIN(examQuestion.getQuId());
examQuestion.setFileUploads(sysFileUploads);
}
-
}
-
+ }
//设置进入试卷 考生考试信息确认参数
String nickname = SecurityFrameworkUtils.getLoginUserNickname();
@@ -448,8 +479,11 @@ public class EducationPaperServiceImpl implements IEducationPaperService
StuInfoPaper stuInfoPaper=new StuInfoPaper();
stuInfoPaper.setQueNum(String.valueOf(educationPaperQus.size()));
stuInfoPaper.setNickName(nickname);
-
+ ExamPaperVo examPaperVo=new ExamPaperVo();
if (educationPaperPerson!=null){
+ String sessionId = educationPaperPerson.getSessionId();
+ EducationPaperSession educationPaperSession = educationPaperSessionMapper.selectEducationPaperSessionBySessionId(sessionId);
+ examPaperVo.setEducationPaperSession(educationPaperSession);
stuInfoPaper.setBatch(educationPaperPerson.getBatch());
}
stuInfoPaper.setAnswerTime(educationPaperParam.getExamTime());
@@ -461,13 +495,13 @@ public class EducationPaperServiceImpl implements IEducationPaperService
String schoolName= examQuestionMapper.selectSchoolnameBytId(loginTenantId);
stuInfoPaper.setSchoolName(schoolName);
stuInfoPaper.setSex(SecurityFrameworkUtils.getLoginUserSEX());
- ExamPaperVo examPaperVo=new ExamPaperVo();
- examPaperVo.setExamQuestionList(examQuestionList);
- examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
- examPaperVo.setEducationPaperParam(educationPaperParam);
- examPaperVo.setPaperId(uuid);
+
+ examPaperVo.setExamQuestionList(examQuestionList);
+ examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
+ examPaperVo.setEducationPaperParam(educationPaperParam);
+ examPaperVo.setPaperId(uuid);
examPaperVo.setStuInfoPaper(stuInfoPaper);
- return examPaperVo;
+ return examPaperVo;
}
@@ -553,22 +587,33 @@ public class EducationPaperServiceImpl implements IEducationPaperService
int columnCount = paperWordList.size();
//写入表格
- XWPFTable table = word.createTable(3, 2 + columnCount);
+ XWPFTable table = word.createTable(3, 3 + columnCount);
table.getRow(0).getCell(0).setText("总 分");
- table.getRow(0).getCell(1).setText("题号");
+ table.getRow(0).getCell(2).setText("题号");
for (int i = 0; i < columnCount; i++) {
- table.getRow(0).getCell(2 + i).setText(paperWordList.get(i).getUpperNum());
+ table.getRow(0).getCell(3 + i).setText(paperWordList.get(i).getUpperNum());
}
table.getRow(1).getCell(0).setText("登分人");
- table.getRow(1).getCell(1).setText("题分");
+ table.getRow(1).getCell(2).setText("题分");
for (int i = 0; i < columnCount; i++) {
- table.getRow(1).getCell(2 + i).setText(String.valueOf(paperWordList.get(i).getTotalScore()));
+ table.getRow(1).getCell(3 + i).setText(String.valueOf(paperWordList.get(i).getTotalScore()));
}
table.getRow(2).getCell(0).setText("复查人");
- table.getRow(2).getCell(1).setText("得分");
+ table.getRow(2).getCell(2).setText("得分");
for (int i = 0; i < columnCount; i++) {
- table.getRow(2).getCell(2 + i).setText("");
+ table.getRow(2).getCell(3 + i).setText("");
}
+ // 设置第二列(索引为1)的固定宽度
+ for (int rowIndex = 0; rowIndex < 3; rowIndex++) {
+ XWPFTableCell cell = table.getRow(rowIndex).getCell(1);
+ cell.setText(""); // 保持为空白,手动填写名字
+ CTTc ctTc = cell.getCTTc();
+ CTTcPr tcPr = ctTc.isSetTcPr() ? ctTc.getTcPr() : ctTc.addNewTcPr();
+ CTTblWidth width = tcPr.isSetTcW() ? tcPr.getTcW() : tcPr.addNewTcW();
+ width.setType(STTblWidth.DXA);
+ width.setW(BigInteger.valueOf(900));
+ }
+
//写入试卷内容
for (PaperWordDto item : paperWordList) {
String typeName = item.getType(); // 题型名,如 “单选题”、“多选题”等
@@ -592,11 +637,11 @@ public class EducationPaperServiceImpl implements IEducationPaperService
for (PaperQueWordDto paperQueWordDto : que) {
XWPFParagraph queParagraph = word.createParagraph();
XWPFRun queRun = queParagraph.createRun();
- String rawContent = paperQueWordDto.getContent();
- String plainText = rawContent.replaceAll("<[^>]*>", "");
- String content = index + "、" + plainText;
- queRun.setText(content);
+ String rawContent = paperQueWordDto.getContent();
+ String prefix = index + "、";
+ // 使用封装方法
+ insertHtmlContentIntoRun(queRun, rawContent, prefix);
queRun.setFontSize(11);
queParagraph.setSpacingAfter(100);
@@ -608,11 +653,17 @@ public class EducationPaperServiceImpl implements IEducationPaperService
for (ExamQuestionAnswer examQuestionAnswer : answerList) {
XWPFParagraph optionParagraph = word.createParagraph();
XWPFRun optionRun = optionParagraph.createRun();
- String optionContent = option + ". " + examQuestionAnswer.getContent();
- optionRun.setText(optionContent);
+
+ String optionPrefix = option + ". ";
+ String rawOptionContent = examQuestionAnswer.getContent();
+
+ // 使用封装方法
+ insertHtmlContentIntoRun(optionRun, rawOptionContent, optionPrefix);
+
optionRun.setFontSize(10);
optionParagraph.setSpacingAfter(50);
+
if ("0".equals(examQuestionAnswer.getIsRight())) {
correctOptions.append(option);
}
@@ -623,8 +674,6 @@ public class EducationPaperServiceImpl implements IEducationPaperService
answerMap
.computeIfAbsent(typeName, k -> new StringBuilder())
.append(index).append("、").append(correctOptions).append("\n");
-
-
}
index++;
}
@@ -700,6 +749,49 @@ public class EducationPaperServiceImpl implements IEducationPaperService
return educationPaperMapper.selectPaperIdAndNumByTaskId(taskId);
}
+ public void insertHtmlContentIntoRun(XWPFRun run, String htmlContent, String prefix) {
+ try {
+ if (prefix != null) {
+ run.setText(prefix);
+ }
+
+ Document doc = Jsoup.parse(htmlContent);
+ Element body = doc.body();
+
+ processNode(body, run);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void processNode(Node node, XWPFRun run) {
+ for (Node child : node.childNodes()) {
+ if (child instanceof TextNode) {
+ String text = ((TextNode) child).text();
+ run.setText(text);
+ } else if (child instanceof Element) {
+ Element el = (Element) child;
+
+ if (el.tagName().equalsIgnoreCase("img")) {
+ String imgUrl = el.attr("src");
+ try (InputStream imgStream = new URL(imgUrl).openStream()) {
+ run.addPicture(
+ imgStream,
+ XWPFDocument.PICTURE_TYPE_JPEG,
+ "image.jpg",
+ Units.toEMU(100), // 宽度
+ Units.toEMU(60) // 高度
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ // 继续递归处理内部元素,如 、 等
+ processNode(el, run);
+ }
+ }
+ }
+ }
}
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 5b269545..b4525c9c 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
@@ -27,6 +27,7 @@ import java.sql.Time;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
+import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -417,21 +418,33 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(taskId);
String paperId= educationPaperTaskMapper.selectPaperQuByPaperId(taskId);
+ if (StringUtils.isBlank(paperId)){
+ return null;
+ }
List examQuestionList=new ArrayList<>();
List educationPaperSchemeList=new ArrayList<>();
List quIds=new ArrayList<>();
if (StringUtils.isNotBlank(paperId)){
- quIds =educationPaperQuMapper.selectPaperQuByPaperId(paperId);
- examQuestionList=examQuestionMapper.selectExamQuestionListByQuIds(quIds);
- if (examQuestionList!=null&&examQuestionList.size()>0){
- for (ExamQuestion examQuestion : examQuestionList) {
- //查找原始和素材试题文件
- List sysFileUploads =sysFileMapper.selectSysFileByQuidIN(examQuestion.getQuId());
- examQuestion.setFileUploads(sysFileUploads);
- }
+ quIds =educationPaperQuMapper.selectPaperQuByPaperId(paperId);
+ if (quIds!=null&&quIds.size()>0){
+ examQuestionList =examQuestionMapper.selectExamQuestionListByQuIds(quIds);
+ if (examQuestionList!=null&&examQuestionList.size()>0){
+ // 根据 quIds 顺序重新排序 examQuestionList
+ Map questionMap = examQuestionList.stream()
+ .collect(Collectors.toMap(ExamQuestion::getQuId, Function.identity()));
+ examQuestionList = quIds.stream()
+ .map(questionMap::get)
+ .filter(Objects::nonNull)
+ .collect(Collectors.toList());
+ for (ExamQuestion examQuestion : examQuestionList) {
+ //查找原始和素材试题文件
+ List sysFileUploads =sysFileMapper.selectSysFileByQuidIN(examQuestion.getQuId());
+ examQuestion.setFileUploads(sysFileUploads);
+ }
+ }
}
- educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskId);
+ educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskId);
}
String nickname = SecurityFrameworkUtils.getLoginUserNickname();
@@ -448,7 +461,11 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
stuInfoPaper.setTaskName(educationPaperTask.getTaskName());
EducationPaperPerson educationPaperPerson = educationPaperPersonMapper.selectByTaskIdAndPersonId(taskId, String.valueOf(userId));
+ ExamPaperVo examPaperVo=new ExamPaperVo();
if (educationPaperPerson!=null){
+ String sessionId = educationPaperPerson.getSessionId();
+ EducationPaperSession educationPaperSession = educationPaperSessionMapper.selectEducationPaperSessionBySessionId(sessionId);
+ examPaperVo.setEducationPaperSession(educationPaperSession);
stuInfoPaper.setBatch(educationPaperPerson.getBatch());
}
Long loginTenantId = SecurityFrameworkUtils.getLoginTenantId();
@@ -457,7 +474,6 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
stuInfoPaper.setSfz(SecurityFrameworkUtils.getLoginUserSFZ());
stuInfoPaper.setSchoolName(schoolName);
stuInfoPaper.setSex(SecurityFrameworkUtils.getLoginUserSEX());
- ExamPaperVo examPaperVo=new ExamPaperVo();
examPaperVo.setExamQuestionList(examQuestionList);
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
examPaperVo.setPaperId(paperId);
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperQuService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperQuService.java
index 4815fb92..caf652cc 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperQuService.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperQuService.java
@@ -1,5 +1,6 @@
package pc.exam.pp.module.exam.service.paper;
+import pc.exam.pp.module.exam.controller.admin.paper.vo.ChangePaperQuVo;
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperQu;
@@ -63,5 +64,11 @@ public interface IEducationPaperQuService
ExamPaperVo selectPaperQuListByPaperId(String paperId);
+ boolean changePaperQu(ChangePaperQuVo changePaperQuVo);
+
+ boolean changePaperQuRandom(ChangePaperQuVo changePaperQuVo);
+
+ ExamPaperVo selectPaperQuListByPaperIdCenter(String paperId);
+
}
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 b02dfc69..6e3d7c88 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
@@ -6,6 +6,7 @@ import com.alibaba.excel.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.annotations.VisibleForTesting;
import jakarta.validation.ConstraintViolationException;
+import org.apache.commons.collections4.CollectionUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -22,6 +23,7 @@ import pc.exam.pp.module.exam.controller.admin.questionexamine.vo.QuestionExamin
import pc.exam.pp.module.exam.controller.admin.rabbitmq.vo.RabbitMQSendInfoVO;
import pc.exam.pp.module.exam.dal.dataobject.*;
import pc.exam.pp.module.exam.dal.dataobject.specialty.ExamSpecialty;
+import pc.exam.pp.module.exam.dal.mysql.mysqlkeyword.MysqlKeywordMapper;
import pc.exam.pp.module.exam.dal.mysql.question.*;
import pc.exam.pp.module.exam.dal.mysql.questionexamine.QuestionExamineMapper;
import pc.exam.pp.module.exam.dal.mysql.specialty.ExamSpecialtyMapper;
@@ -63,6 +65,8 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
private ExamSpecialtyMapper examSpecialtyMapper;
@Autowired
private RabbitmqUtils rabbitMqService;
+ @Autowired
+ private MysqlKeywordMapper mysqlKeywordMapper;
/**
* 查询试题(hyc)
*
@@ -722,7 +726,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
ExamQuestionAnswer examQuestionAnswer = new ExamQuestionAnswer();
examQuestionAnswer.setAnswerId(IdUtils.simpleUUID());
examQuestionAnswer.setQuId(quId);
- examQuestionAnswer.setSort(String.valueOf(i++));
+ examQuestionAnswer.setSort(i++);
// 判断是否为正确答案,忽略大小写和空格
if (option.equalsIgnoreCase(importUser.getAnswer().trim())) {
examQuestionAnswer.setIsRight("1"); // 正确
@@ -781,7 +785,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
ExamQuestionAnswer examQuestionAnswer = new ExamQuestionAnswer();
examQuestionAnswer.setAnswerId(IdUtils.simpleUUID());
examQuestionAnswer.setQuId(quId);
- examQuestionAnswer.setSort(String.valueOf(i++));
+ examQuestionAnswer.setSort(i++);
// 判断是否为正确答案,忽略大小写和空格
if (option.equalsIgnoreCase(importUser.getAnswer().trim())) {
examQuestionAnswer.setIsRight("1"); // 正确
@@ -808,6 +812,40 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
return respVO;
}
+ @Override
+ public boolean changeStatus(String quId, String status) {
+ return examQuestionMapper.changeStatus(quId,status);
+ }
+
+ @Override
+ public PageResult selectExamQuestionListAnswer(QuestionVo questionVo) {
+ PageResult examQuestionPageResult = examQuestionMapper.selectExamQuestionList(questionVo);
+ List list = examQuestionPageResult.getList();
+ if (list != null && !list.isEmpty()) {
+ for (ExamQuestion examQuestion : list) {
+ String quId = examQuestion.getQuId();
+ List examQuestionAnswers = examQuestionAnswerMapper.selectExamQuestionAnswerByQuId(quId);
+ examQuestion.setAnswerList(examQuestionAnswers);
+ }
+ }
+ return examQuestionPageResult;
+ }
+
+ @Override
+ public List getPointById(String quId) {
+ List examQuestionAnswers = examQuestionAnswerMapper.selectExamQuestionAnswerByQuId(quId);
+ if (!CollectionUtils.isEmpty(examQuestionAnswers)) {
+ for (ExamQuestionAnswer examQuestionAnswer : examQuestionAnswers) {
+ String answerId = examQuestionAnswer.getAnswerId();
+ List newKeywordList = mysqlKeywordMapper.selectList(
+ new QueryWrapper().eq("answer_id", answerId)
+ );
+ examQuestionAnswer.setExamMysqlKeywordList(newKeywordList);
+ }
+ }
+ return examQuestionAnswers;
+ }
+
private void validateChoice(String a, String b, String c, String d, String answer) {
// A 和 B 必须存在
if (StringUtils.isBlank(a) || StringUtils.isBlank(b)) {
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/IExamQuestionService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/IExamQuestionService.java
index 7e12df36..ccfc82fb 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/IExamQuestionService.java
+++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/question/IExamQuestionService.java
@@ -11,6 +11,7 @@ import pc.exam.pp.module.exam.controller.admin.questionexamine.vo.QuestionExamin
import pc.exam.pp.module.exam.controller.admin.rabbitmq.vo.RabbitMQSendInfoVO;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
+import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
import java.util.List;
@@ -103,4 +104,9 @@ public interface IExamQuestionService
QueImportRespVO importUserList(List list, Boolean updateSupport);
+ boolean changeStatus(String quId, String status);
+
+ PageResult selectExamQuestionListAnswer(QuestionVo questionVo);
+
+ List getPointById(String quId);
}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
index 18d98098..a60be133 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml
@@ -70,8 +70,8 @@
specialty_name = #{taskSpecialty}
AND subject_name = #{educationPaperScheme.spName}
AND tenant_id =#{tId}
- and audit = 0
- and status = 0
+ and audit = '0'
+ and status = '0'
and deleted ='0'
AND qu_level = #{educationPaperScheme.quLevel}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperPersonMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperPersonMapper.xml
index 5fbebec9..c4e490b7 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperPersonMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperPersonMapper.xml
@@ -101,7 +101,7 @@
AND s.class_id = #{classId}
ORDER BY s.id DESC
-
+ LIMIT #{pageSize} OFFSET #{offset}
+
@@ -66,6 +71,12 @@
where paper_id = #{paperId}
+
+ update education_paper_qu
+ set qu_id = #{newQuId}
+ where paper_id = #{paperId} and qu_id = #{oldQuId}
+
+
delete from education_paper_qu where paper_id = #{paperId}
diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml
index 7ac426ce..ad8c513f 100644
--- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml
+++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml
@@ -90,8 +90,8 @@
WHERE specialty_name = #{taskSpecialty}
AND subject_name = #{spName}
AND tenant_id =#{tId}
- and audit = 0
- and status = 0
+ and audit = '0'
+ and status = '0'
AND qu_level = #{quLevel}
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 43049b41..e2c7f57a 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
@@ -283,6 +283,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+ UPDATE exam_question
+ set status =#{status}
+ where qu_id =#{quId}
+
\ No newline at end of file
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/getpoints/GetPointsController.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/getpoints/GetPointsController.java
index 621a42af..3a5d8060 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/getpoints/GetPointsController.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/getpoints/GetPointsController.java
@@ -3,6 +3,7 @@ package pc.exam.pp.module.judgement.controller.admin.getpoints;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pc.exam.pp.framework.common.pojo.CommonResult;
+import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
import pc.exam.pp.module.judgement.controller.admin.getpoints.vo.Points;
import pc.exam.pp.module.judgement.controller.admin.getpoints.vo.PointsVo;
@@ -23,6 +24,7 @@ public class GetPointsController {
* @return 得分
*/
@PostMapping("/get_filePoint")
+ @TenantIgnore
public CommonResult get_file_point(@RequestBody PointsVo pointsVo) throws IOException {
return CommonResult.success(examGetPointsService.get_file_point(pointsVo));
}
@@ -31,6 +33,7 @@ public class GetPointsController {
* @return 得分
*/
@PostMapping("/get_mysql_point")
+ @TenantIgnore
public CommonResult get_mysql_point(@RequestBody PointsVo pointsVo) throws IOException {
return CommonResult.success(examGetPointsService.get_mysql_point(pointsVo));
}
@@ -47,11 +50,13 @@ public class GetPointsController {
* @return 得分
*/
@PostMapping("/update_mysql_point")
+ @TenantIgnore
public CommonResult update_mysql_point(@RequestBody Points points) {
return CommonResult.success(examGetPointsService.update_mysql_point(points));
}
@GetMapping("/get_Point_id/{quId}")
+ @TenantIgnore
public CommonResult getPointById(@PathVariable("quId") String quId) {
return CommonResult.success(examGetPointsService.getPointById(quId));
}
@@ -60,6 +65,7 @@ public class GetPointsController {
* @return 得分
*/
@PostMapping("/set_browser_point")
+ @TenantIgnore
//todo 老师自己设置,不读文件
public CommonResult get_browser_point(@RequestBody Points points) {
return CommonResult.success(examGetPointsService.get_browser_point(points));
diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/service/getpoints/ExamGetPointsServiceImpl.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/service/getpoints/ExamGetPointsServiceImpl.java
index c6caf4a7..40016d2c 100644
--- a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/service/getpoints/ExamGetPointsServiceImpl.java
+++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/service/getpoints/ExamGetPointsServiceImpl.java
@@ -78,7 +78,7 @@ public class ExamGetPointsServiceImpl implements ExamGetPointsService{
answer.setContent(key); // 设置文件路径
answer.setScoreRate("1");
//这里设置answer的排序,按照循环次数来
- answer.setSort(String.valueOf(sortCounter.getAndIncrement())); // 按顺序设置排序值
+ answer.setSort(sortCounter.getAndIncrement()); // 按顺序设置排序值
if (value.startsWith("仅存在于 "+stuFilePath)) {
answer.setContentIn("考察删除");
} else if (value.startsWith("仅存在于 "+answerFilePath)) {
@@ -89,7 +89,7 @@ public class ExamGetPointsServiceImpl implements ExamGetPointsService{
}
return answer;
})
- .sorted(Comparator.comparingInt(answer -> Integer.parseInt(answer.getSort()))) // 按 sort 排序
+ .sorted(Comparator.comparingInt(answer -> answer.getSort())) // 按 sort 排序
.collect(Collectors.toList());
answerList.addAll(formattedDifferences);
zip_file_sth.delete();
@@ -188,7 +188,7 @@ public class ExamGetPointsServiceImpl implements ExamGetPointsService{
//设置sort
AtomicInteger sortCounter = new AtomicInteger(1);
points.getQuestionAnswerList().forEach(answer -> {
- answer.setSort(String.valueOf(sortCounter.getAndIncrement()));
+ answer.setSort(sortCounter.getAndIncrement());
});
List questionAnswerList = points.getQuestionAnswerList();
for (ExamQuestionAnswer examQuestionAnswer : questionAnswerList) {
@@ -267,7 +267,7 @@ public class ExamGetPointsServiceImpl implements ExamGetPointsService{
String answerId = IdUtils.simpleUUID();
answer.setAnswerId(answerId);
answer.setQuId(quId); // 以防前端未传
- answer.setSort(String.valueOf(counter.getAndIncrement())); // 设置排序字段(String 类型)
+ answer.setSort(counter.getAndIncrement()); // 设置排序字段(String 类型)
List keywordList = answer.getExamMysqlKeywordList();
if (!CollectionUtils.isEmpty(keywordList)) {
for (ExamMysqlKeyword keyword : keywordList) {
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 0491e66f..00c6ca52 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
@@ -15,6 +15,7 @@ import pc.exam.pp.module.exam.dal.dataobject.student.StuPaperFileDO;
import pc.exam.pp.module.exam.dal.mysql.monitor.MonitorMapper;
import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperMapper;
import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperParamMapper;
+import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperSessionMapper;
import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperTaskMapper;
import pc.exam.pp.module.exam.dal.mysql.student.StuPaperFileMapper;
import pc.exam.pp.module.exam.utils.uuid.IdUtils;