【修改】判分层级、监控管理进入考试redis、返回试卷增加试卷id
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
=== 学生提交内容(stu 目录) ===
|
|
||||||
-> 文件夹
|
|
||||||
AHEWL -> 文件夹
|
|
||||||
AHEWL\KMENS -> 文件夹
|
|
||||||
AHEWL\MENS.EXE -> 大小: 17B, 隐藏: false, 可读: true, 可写: true
|
|
||||||
BNPA -> 文件夹
|
|
||||||
BNPA\RONGHE.COM -> 大小: 17B, 隐藏: false, 可读: true, 可写: true
|
|
||||||
EDZK -> 文件夹
|
|
||||||
EDZK\RONGHE.COM -> 大小: 17B, 隐藏: false, 可读: true, 可写: true
|
|
||||||
HGACYL -> 文件夹
|
|
||||||
HGACYL\PLAY.MEM -> 大小: 17B, 隐藏: false, 可读: true, 可写: true
|
|
||||||
TING -> 文件夹
|
|
||||||
TING\XYU -> 文件夹
|
|
||||||
WUE -> 文件夹
|
|
||||||
WUE\PB6.txt -> 大小: 17B, 隐藏: false, 可读: true, 可写: false
|
|
||||||
XEPO -> 文件夹
|
|
||||||
=== 学生提交内容得分点 ===
|
|
||||||
HGACYL\RLQM.MEM -> 考察删除 -> 得分权值:1-> 是否得分:true
|
|
||||||
TING\XYU\AUTOE.BAT -> 考察删除 -> 得分权值:1-> 是否得分:true
|
|
||||||
AHEWL\KMENS -> 考察名称 -> 得分权值:1-> 是否得分:true
|
|
||||||
EDZK\RONGHE.COM -> 考察名称 -> 得分权值:1-> 是否得分:true
|
|
||||||
HGACYL\PLAY.MEM -> 考察名称 -> 得分权值:1-> 是否得分:true
|
|
||||||
WUE\PB6.txt -> 考察名称 -> 得分权值:1-> 是否得分:true
|
|
@@ -1,308 +0,0 @@
|
|||||||
==================插入语句==================
|
|
||||||
表名:t_team
|
|
||||||
✅新增语句得分: 4
|
|
||||||
==================更新语句==================
|
|
||||||
✅修改语句得分: 3
|
|
||||||
==================视图语句==================
|
|
||||||
执行视图 v_education_aad91eecf6954d24a249f86bd2271b17 的查询结果:
|
|
||||||
列名:
|
|
||||||
themeName
|
|
||||||
description
|
|
||||||
teamName
|
|
||||||
earnedScore
|
|
||||||
未来实验室
|
|
||||||
关闭核反应堆
|
|
||||||
穿梭队
|
|
||||||
325
|
|
||||||
未来实验室
|
|
||||||
破解AI主机的密码
|
|
||||||
穿梭队
|
|
||||||
225
|
|
||||||
未来实验室
|
|
||||||
修复电力系统
|
|
||||||
穿梭队
|
|
||||||
165
|
|
||||||
古墓谜影
|
|
||||||
打开青铜棺椁的暗锁
|
|
||||||
探险队
|
|
||||||
325
|
|
||||||
古墓谜影
|
|
||||||
破解八卦阵机关
|
|
||||||
探险队
|
|
||||||
210
|
|
||||||
古墓谜影
|
|
||||||
寻找古墓入口的玉佩
|
|
||||||
探险队
|
|
||||||
110
|
|
||||||
民国悬案
|
|
||||||
解开保险箱的摩斯密码
|
|
||||||
侦探队
|
|
||||||
310
|
|
||||||
民国悬案
|
|
||||||
调查凶案现场的日记本
|
|
||||||
侦探队
|
|
||||||
225
|
|
||||||
执行视图 v_education_2_742b43462b1e45d797daa825ed1bb490 的查询结果:
|
|
||||||
列名:
|
|
||||||
themeName
|
|
||||||
description
|
|
||||||
teamName
|
|
||||||
earnedScore
|
|
||||||
未来实验室
|
|
||||||
关闭核反应堆
|
|
||||||
穿梭队
|
|
||||||
325
|
|
||||||
未来实验室
|
|
||||||
破解AI主机的密码
|
|
||||||
穿梭队
|
|
||||||
225
|
|
||||||
未来实验室
|
|
||||||
修复电力系统
|
|
||||||
穿梭队
|
|
||||||
165
|
|
||||||
古墓谜影
|
|
||||||
打开青铜棺椁的暗锁
|
|
||||||
探险队
|
|
||||||
325
|
|
||||||
古墓谜影
|
|
||||||
破解八卦阵机关
|
|
||||||
探险队
|
|
||||||
210
|
|
||||||
古墓谜影
|
|
||||||
寻找古墓入口的玉佩
|
|
||||||
探险队
|
|
||||||
110
|
|
||||||
民国悬案
|
|
||||||
解开保险箱的摩斯密码
|
|
||||||
侦探队
|
|
||||||
310
|
|
||||||
民国悬案
|
|
||||||
调查凶案现场的日记本
|
|
||||||
侦探队
|
|
||||||
225
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅等价视图语句得分为: 6
|
|
||||||
==================删除语句==================
|
|
||||||
提取出的表名: t_room
|
|
||||||
提取出的条件: roomId = 5
|
|
||||||
验证 SQL: SELECT COUNT(*) FROM t_room WHERE roomId = 5
|
|
||||||
验证通过:符合 DELETE 条件的记录已删除。
|
|
||||||
✅删除正确最终得分: 3
|
|
||||||
==================查找语句==================
|
|
||||||
执行考生答案的查询结果:
|
|
||||||
列名:
|
|
||||||
超时任务描述
|
|
||||||
实际得分
|
|
||||||
基础分
|
|
||||||
破解AI主机的密码
|
|
||||||
225
|
|
||||||
250
|
|
||||||
关闭核反应堆
|
|
||||||
325
|
|
||||||
350
|
|
||||||
指认真凶
|
|
||||||
0
|
|
||||||
400
|
|
||||||
执行正确答案的查询结果:
|
|
||||||
列名:
|
|
||||||
实际得分
|
|
||||||
超时任务描述
|
|
||||||
基础分
|
|
||||||
225
|
|
||||||
破解AI主机的密码
|
|
||||||
250
|
|
||||||
325
|
|
||||||
关闭核反应堆
|
|
||||||
350
|
|
||||||
0
|
|
||||||
指认真凶
|
|
||||||
400
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅当前查询SQL得分为:3
|
|
||||||
执行考生答案的查询结果:
|
|
||||||
列名:
|
|
||||||
任务描述
|
|
||||||
队伍名称
|
|
||||||
指认真凶
|
|
||||||
侦探队
|
|
||||||
执行正确答案的查询结果:
|
|
||||||
列名:
|
|
||||||
任务描述
|
|
||||||
队伍名称
|
|
||||||
指认真凶
|
|
||||||
侦探队
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅当前查询SQL得分为:3
|
|
||||||
==================触发器语句==================
|
|
||||||
考生答案与标准答案语句内容一致(忽略格式)
|
|
||||||
✅触发器得分点8
|
|
||||||
==================储存过程==================
|
|
||||||
测试语句:CALL pro_getMaxScore('古墓');
|
|
||||||
测试语句:CALL pro_getMaxScore('古墓');
|
|
||||||
执行 SQL 语句时发生错误: PROCEDURE pro_getMaxScore already exists
|
|
||||||
==== 标准答案 ====
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
==== 考生答案 ====
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
两个结果集内容一致(不考虑顺序)!
|
|
||||||
考生答案与标准答案语句结果为:true
|
|
||||||
✅存储过程得分9
|
|
||||||
==================插入语句==================
|
|
||||||
表名:t_team
|
|
||||||
✅新增语句得分: 4
|
|
||||||
==================更新语句==================
|
|
||||||
✅修改语句得分: 3
|
|
||||||
==================视图语句==================
|
|
||||||
执行视图 v_education_61a0be43eafd4ddeb267eab989db482d 的查询结果:
|
|
||||||
列名:
|
|
||||||
themeName
|
|
||||||
description
|
|
||||||
teamName
|
|
||||||
earnedScore
|
|
||||||
未来实验室
|
|
||||||
关闭核反应堆
|
|
||||||
穿梭队
|
|
||||||
325
|
|
||||||
未来实验室
|
|
||||||
破解AI主机的密码
|
|
||||||
穿梭队
|
|
||||||
225
|
|
||||||
未来实验室
|
|
||||||
修复电力系统
|
|
||||||
穿梭队
|
|
||||||
165
|
|
||||||
古墓谜影
|
|
||||||
打开青铜棺椁的暗锁
|
|
||||||
探险队
|
|
||||||
325
|
|
||||||
古墓谜影
|
|
||||||
破解八卦阵机关
|
|
||||||
探险队
|
|
||||||
210
|
|
||||||
古墓谜影
|
|
||||||
寻找古墓入口的玉佩
|
|
||||||
探险队
|
|
||||||
110
|
|
||||||
民国悬案
|
|
||||||
解开保险箱的摩斯密码
|
|
||||||
侦探队
|
|
||||||
310
|
|
||||||
民国悬案
|
|
||||||
调查凶案现场的日记本
|
|
||||||
侦探队
|
|
||||||
225
|
|
||||||
执行视图 v_education_2_13a7c1a8c1d540a4ab247934fbd5b46d 的查询结果:
|
|
||||||
列名:
|
|
||||||
themeName
|
|
||||||
description
|
|
||||||
teamName
|
|
||||||
earnedScore
|
|
||||||
未来实验室
|
|
||||||
关闭核反应堆
|
|
||||||
穿梭队
|
|
||||||
325
|
|
||||||
未来实验室
|
|
||||||
破解AI主机的密码
|
|
||||||
穿梭队
|
|
||||||
225
|
|
||||||
未来实验室
|
|
||||||
修复电力系统
|
|
||||||
穿梭队
|
|
||||||
165
|
|
||||||
古墓谜影
|
|
||||||
打开青铜棺椁的暗锁
|
|
||||||
探险队
|
|
||||||
325
|
|
||||||
古墓谜影
|
|
||||||
破解八卦阵机关
|
|
||||||
探险队
|
|
||||||
210
|
|
||||||
古墓谜影
|
|
||||||
寻找古墓入口的玉佩
|
|
||||||
探险队
|
|
||||||
110
|
|
||||||
民国悬案
|
|
||||||
解开保险箱的摩斯密码
|
|
||||||
侦探队
|
|
||||||
310
|
|
||||||
民国悬案
|
|
||||||
调查凶案现场的日记本
|
|
||||||
侦探队
|
|
||||||
225
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅等价视图语句得分为: 6
|
|
||||||
==================删除语句==================
|
|
||||||
提取出的表名: t_room
|
|
||||||
提取出的条件: roomId = 5
|
|
||||||
验证 SQL: SELECT COUNT(*) FROM t_room WHERE roomId = 5
|
|
||||||
验证通过:符合 DELETE 条件的记录已删除。
|
|
||||||
✅删除正确最终得分: 3
|
|
||||||
==================查找语句==================
|
|
||||||
执行考生答案的查询结果:
|
|
||||||
列名:
|
|
||||||
超时任务描述
|
|
||||||
实际得分
|
|
||||||
基础分
|
|
||||||
破解AI主机的密码
|
|
||||||
225
|
|
||||||
250
|
|
||||||
关闭核反应堆
|
|
||||||
325
|
|
||||||
350
|
|
||||||
指认真凶
|
|
||||||
0
|
|
||||||
400
|
|
||||||
执行正确答案的查询结果:
|
|
||||||
列名:
|
|
||||||
实际得分
|
|
||||||
超时任务描述
|
|
||||||
基础分
|
|
||||||
225
|
|
||||||
破解AI主机的密码
|
|
||||||
250
|
|
||||||
325
|
|
||||||
关闭核反应堆
|
|
||||||
350
|
|
||||||
0
|
|
||||||
指认真凶
|
|
||||||
400
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅当前查询SQL得分为:3
|
|
||||||
执行考生答案的查询结果:
|
|
||||||
列名:
|
|
||||||
任务描述
|
|
||||||
队伍名称
|
|
||||||
指认真凶
|
|
||||||
侦探队
|
|
||||||
执行正确答案的查询结果:
|
|
||||||
列名:
|
|
||||||
任务描述
|
|
||||||
队伍名称
|
|
||||||
指认真凶
|
|
||||||
侦探队
|
|
||||||
|
|
||||||
是否结果等价: true
|
|
||||||
✅当前查询SQL得分为:3
|
|
||||||
==================触发器语句==================
|
|
||||||
考生答案与标准答案语句内容一致(忽略格式)
|
|
||||||
✅触发器得分点8
|
|
||||||
==================储存过程==================
|
|
||||||
测试语句:CALL pro_getMaxScore('古墓');
|
|
||||||
测试语句:CALL pro_getMaxScore('古墓');
|
|
||||||
执行 SQL 语句时发生错误: PROCEDURE pro_getMaxScore already exists
|
|
||||||
==== 标准答案 ====
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
==== 考生答案 ====
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
{队伍名称=探险队, 房间名称=古墓谜影, 总用时=51, 总得分=645}
|
|
||||||
两个结果集内容一致(不考虑顺序)!
|
|
||||||
考生答案与标准答案语句结果为:true
|
|
||||||
✅存储过程得分9
|
|
@@ -1,14 +1,15 @@
|
|||||||
package pc.exam.pp.module.exam.controller.admin.paper.vo;
|
package pc.exam.pp.module.exam.controller.admin.paper.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperScheme;
|
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperScheme;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@Data
|
||||||
public class ExamPaperVo {
|
public class ExamPaperVo {
|
||||||
List<ExamQuestion> questionList;
|
List<ExamQuestion> questionList;
|
||||||
List<EducationPaperScheme> educationPaperSchemeList;
|
List<EducationPaperScheme> educationPaperSchemeList;
|
||||||
|
String paperId;
|
||||||
public ExamPaperVo() {
|
public ExamPaperVo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -289,23 +289,26 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
|
|
||||||
|
|
||||||
if (info==null){
|
if (info==null){
|
||||||
|
MonitorDO monitorDO1=new MonitorDO();
|
||||||
PersonRepDto personRepDto = educationPaperPersonMapper.selectUserById(stuId);
|
PersonRepDto personRepDto = educationPaperPersonMapper.selectUserById(stuId);
|
||||||
String name= educationPaperTaskMapper.selectEducationPaperTaskNameByid(taskId);
|
String name= educationPaperTaskMapper.selectEducationPaperTaskNameByid(taskId);
|
||||||
EducationPaperTask educationPaperTask = educationPaperTaskMapper.selectEducationPaperTaskByTaskId(taskId);
|
EducationPaperTask educationPaperTask = educationPaperTaskMapper.selectEducationPaperTaskByTaskId(taskId);
|
||||||
info.setScore("0");
|
monitorDO1.setScore("0");
|
||||||
info.setTaskId(taskId);
|
monitorDO1.setTaskId(taskId);
|
||||||
info.setTaskType(educationPaperTask.getTaskType());
|
monitorDO1.setTaskType(educationPaperTask.getTaskType());
|
||||||
info.setExamStatus(status);
|
monitorDO1.setExamStatus(status);
|
||||||
info.setPaperNum("");
|
monitorDO1.setPaperNum("");
|
||||||
info.setStuId(stuId);
|
monitorDO1.setStuId(stuId);
|
||||||
info.setUsername(personRepDto.getUsername());
|
monitorDO1.setUsername(personRepDto.getUsername());
|
||||||
info.setNickname(personRepDto.getNickname());
|
monitorDO1.setNickname(personRepDto.getNickname());
|
||||||
|
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(monitorDO1));
|
||||||
}else {
|
}else {
|
||||||
info.setExamStatus(status);
|
info.setExamStatus(status);
|
||||||
|
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(info));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(info));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,10 +321,19 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
String taskId = monitorDO.getTaskId();
|
String taskId = monitorDO.getTaskId();
|
||||||
String stuId = monitorDO.getStuId();
|
String stuId = monitorDO.getStuId();
|
||||||
String key = "userCache:" + taskId+":" +stuId;
|
String key = "userCache:" + taskId+":" +stuId;
|
||||||
|
|
||||||
|
if ("0".equals(monitorDO.getTaskType())){
|
||||||
|
monitorDO.setExamStatus("0");
|
||||||
|
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJsonString(monitorDO));
|
||||||
|
|
||||||
|
}else {
|
||||||
monitorDO.setExamStatus(status);
|
monitorDO.setExamStatus(status);
|
||||||
|
redisTemplate.delete(key);
|
||||||
|
}
|
||||||
|
|
||||||
monitorMapper.updateById(monitorDO);
|
monitorMapper.updateById(monitorDO);
|
||||||
|
|
||||||
redisTemplate.delete(key);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -124,6 +124,7 @@ public class EducationPaperQuServiceImpl implements IEducationPaperQuService
|
|||||||
|
|
||||||
List<EducationPaperScheme> educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskid);
|
List<EducationPaperScheme> educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskid);
|
||||||
ExamPaperVo examPaperVo=new ExamPaperVo();
|
ExamPaperVo examPaperVo=new ExamPaperVo();
|
||||||
|
examPaperVo.setPaperId(paperId);
|
||||||
examPaperVo.setExamQuestionList(examQuestionList);
|
examPaperVo.setExamQuestionList(examQuestionList);
|
||||||
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
||||||
return examPaperVo;
|
return examPaperVo;
|
||||||
|
@@ -394,7 +394,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
|||||||
ExamPaperVo examPaperVo=new ExamPaperVo();
|
ExamPaperVo examPaperVo=new ExamPaperVo();
|
||||||
examPaperVo.setExamQuestionList(examQuestionList);
|
examPaperVo.setExamQuestionList(examQuestionList);
|
||||||
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
||||||
|
examPaperVo.setPaperId(uuid);
|
||||||
return examPaperVo;
|
return examPaperVo;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -232,12 +232,12 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
//题型
|
//题型
|
||||||
String spName = param.getSpName();
|
String spName = param.getSpName();
|
||||||
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
||||||
System.out.println(requiredTenantId+"requiredTenantIdrequiredTenantId");
|
// System.out.println(requiredTenantId+"requiredTenantIdrequiredTenantId");
|
||||||
System.out.println(taskSpecialty+"taskSpecialty");
|
// System.out.println(taskSpecialty+"taskSpecialty");
|
||||||
System.out.println(pointNames+"pointNames");
|
// System.out.println(pointNames+"pointNames");
|
||||||
System.out.println(keywords+"keywords");
|
// System.out.println(keywords+"keywords");
|
||||||
System.out.println(quLevel+"quLevel");
|
// System.out.println(quLevel+"quLevel");
|
||||||
System.out.println(spName+"spName");
|
// System.out.println(spName+"spName");
|
||||||
return educationPaperTaskMapper.getQuCount(taskSpecialty, spName, quLevel, pointNames, keywords,requiredTenantId);
|
return educationPaperTaskMapper.getQuCount(taskSpecialty, spName, quLevel, pointNames, keywords,requiredTenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,11 +320,15 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
if (options.contains("4") && !(options.contains("2"))) {
|
if (options.contains("4") && !(options.contains("2"))) {
|
||||||
//复制考场设置
|
//复制考场设置
|
||||||
List<EducationPaperSession> educationPaperSessions = educationPaperSessionMapper.selectEducationPaperSessionByTaskId(taskId);
|
List<EducationPaperSession> educationPaperSessions = educationPaperSessionMapper.selectEducationPaperSessionByTaskId(taskId);
|
||||||
|
|
||||||
|
if (educationPaperSessions!=null&&educationPaperSessions.size()>0){
|
||||||
educationPaperSessions.forEach(session -> session.setSessionId(IdUtils.simpleUUID()));
|
educationPaperSessions.forEach(session -> session.setSessionId(IdUtils.simpleUUID()));
|
||||||
educationPaperSessions.forEach(session -> session.setPaperId(null));
|
educationPaperSessions.forEach(session -> session.setPaperId(null));
|
||||||
educationPaperSessions.forEach(session -> session.setTaskId(newtaskId));
|
educationPaperSessions.forEach(session -> session.setTaskId(newtaskId));
|
||||||
//批量插入
|
//批量插入
|
||||||
educationPaperSessionMapper.insertEducationPaperSessionList(educationPaperSessions);
|
educationPaperSessionMapper.insertEducationPaperSessionList(educationPaperSessions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (options.contains("4") && options.contains("2")) {
|
if (options.contains("4") && options.contains("2")) {
|
||||||
@@ -335,6 +339,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
|
|
||||||
// 2. 复制所有试卷,建立新旧ID映射
|
// 2. 复制所有试卷,建立新旧ID映射
|
||||||
Map<String, String> paperIdMapping = new HashMap<>();
|
Map<String, String> paperIdMapping = new HashMap<>();
|
||||||
|
if (educationPapers!=null&&educationPapers.size()>0){
|
||||||
for (EducationPaper paper : educationPapers) {
|
for (EducationPaper paper : educationPapers) {
|
||||||
String newPaperId = IdUtils.simpleUUID();
|
String newPaperId = IdUtils.simpleUUID();
|
||||||
paperIdMapping.put(paper.getPaperId(), newPaperId);
|
paperIdMapping.put(paper.getPaperId(), newPaperId);
|
||||||
@@ -350,7 +355,8 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (educationPaperSessions!=null&&educationPaperSessions.size()>0){
|
||||||
// 3. 处理考场分配
|
// 3. 处理考场分配
|
||||||
for (EducationPaperSession session : educationPaperSessions) {
|
for (EducationPaperSession session : educationPaperSessions) {
|
||||||
session.setSessionId(IdUtils.simpleUUID());
|
session.setSessionId(IdUtils.simpleUUID());
|
||||||
@@ -365,7 +371,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
|
|
||||||
// 4. 批量插入考场
|
// 4. 批量插入考场
|
||||||
educationPaperSessionMapper.insertEducationPaperSessionList(educationPaperSessions);
|
educationPaperSessionMapper.insertEducationPaperSessionList(educationPaperSessions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.contains("5")) {
|
if (options.contains("5")) {
|
||||||
@@ -402,7 +408,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
ExamPaperVo examPaperVo=new ExamPaperVo();
|
ExamPaperVo examPaperVo=new ExamPaperVo();
|
||||||
examPaperVo.setExamQuestionList(examQuestionList);
|
examPaperVo.setExamQuestionList(examQuestionList);
|
||||||
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
||||||
|
examPaperVo.setPaperId(paperId);
|
||||||
return examPaperVo;
|
return examPaperVo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -56,6 +56,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
List<ExamQuestionKeyword> examQuestionKeywords = examQuestionKeywordMapper.selectExamQuestionKeywordByQuId(quId);
|
List<ExamQuestionKeyword> examQuestionKeywords = examQuestionKeywordMapper.selectExamQuestionKeywordByQuId(quId);
|
||||||
|
|
||||||
ExamQuestion examQuestion = examQuestionMapper.selectExamQuestionByQuId(quId);
|
ExamQuestion examQuestion = examQuestionMapper.selectExamQuestionByQuId(quId);
|
||||||
|
if (examQuestion!=null){
|
||||||
if (examQuestionAnswers!=null&&examQuestionAnswers.size()>0){
|
if (examQuestionAnswers!=null&&examQuestionAnswers.size()>0){
|
||||||
examQuestion.setAnswerList(examQuestionAnswers);
|
examQuestion.setAnswerList(examQuestionAnswers);
|
||||||
}
|
}
|
||||||
@@ -68,6 +69,8 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
if (examQuestionKeywords!=null&&examQuestionKeywords.size()>0){
|
if (examQuestionKeywords!=null&&examQuestionKeywords.size()>0){
|
||||||
examQuestion.setQuestionKeywords(examQuestionKeywords);
|
examQuestion.setQuestionKeywords(examQuestionKeywords);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return examQuestion;
|
return examQuestion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -109,10 +109,10 @@ public class BrowserServericeImpl implements IBrowserServerice {
|
|||||||
if (isCorrect) {
|
if (isCorrect) {
|
||||||
totalScore += currentScore;
|
totalScore += currentScore;
|
||||||
|
|
||||||
appendToFile(answerLogPath,"考点"+answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect);
|
appendToFile(answerLogPath,"考点"+answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect+"✅");
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
appendToFile(answerLogPath,"考点"+answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect);
|
appendToFile(answerLogPath,"考点"+answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect+"❌");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,7 @@ public class FileServericeImpl implements IFileServerice {
|
|||||||
|
|
||||||
// 设置日志文件路径为file所在目录下的answerLogFile.txt
|
// 设置日志文件路径为file所在目录下的answerLogFile.txt
|
||||||
answerLogPath = file.getParent() + File.separator + "log.txt";
|
answerLogPath = file.getParent() + File.separator + "log.txt";
|
||||||
|
System.out.println(answerLogPath);
|
||||||
// 获取 stu 文件夹的内容
|
// 获取 stu 文件夹的内容
|
||||||
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(stuPath.toPath());
|
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(stuPath.toPath());
|
||||||
|
|
||||||
@@ -90,9 +91,9 @@ public class FileServericeImpl implements IFileServerice {
|
|||||||
// 如果正确,则累加总分
|
// 如果正确,则累加总分
|
||||||
if (isCorrect) {
|
if (isCorrect) {
|
||||||
totalScore += currentScore;
|
totalScore += currentScore;
|
||||||
appendToFile(answerLogPath,answer.getContent() + " -> " + answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect);
|
appendToFile(answerLogPath,answer.getContent() + " -> " + answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect+"✅");
|
||||||
}else {
|
}else {
|
||||||
appendToFile(answerLogPath,answer.getContent() + " -> " + answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect);
|
appendToFile(answerLogPath,answer.getContent() + " -> " + answer.getContentIn() + " -> 得分权值:" + answer.getScoreRate()+"-> 是否得分:"+isCorrect+"❌");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,9 +13,9 @@ public class testServiceImpl implements testservice {
|
|||||||
public boolean test() {
|
public boolean test() {
|
||||||
|
|
||||||
|
|
||||||
String s = endStuMonitorUtils.endStuMonitor("160", "78f7496a68ae48e0bfb0c288549485d8");
|
String s = endStuMonitorUtils.endStuMonitor("160", "2bf4510550e34d85a852394cea61b455");
|
||||||
|
|
||||||
endStuMonitorUtils.endStuMonitor("160","78f7496a68ae48e0bfb0c288549485d8",20.0);
|
endStuMonitorUtils.endStuMonitor("160","2bf4510550e34d85a852394cea61b455",20.0);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -204,7 +204,7 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
String stu_files = null;
|
String stu_files = null;
|
||||||
// 5.1、 只查询文件夹 (学号-试卷ID-试题ID-具体内容)
|
// 5.1、 只查询文件夹 (学号-试卷ID-试题ID-具体内容)
|
||||||
if (files == null) return CommonResult.error(100032, "1、试题文件上传,目录不正确!");
|
if (files == null) return CommonResult.error(100032, "1、试题文件上传,目录不正确!");
|
||||||
if (files.length > 1) return CommonResult.error(100033, "2、试题文件上传,目录不正确!");
|
// if (files.length > 1) return CommonResult.error(100033, "2、试题文件上传,目录不正确!");
|
||||||
if (!files[0].isDirectory()) return CommonResult.error(100034, "3、试题文件上传,目录不正确!");
|
if (!files[0].isDirectory()) return CommonResult.error(100034, "3、试题文件上传,目录不正确!");
|
||||||
// 判断学号是否正确
|
// 判断学号是否正确
|
||||||
if (!files[0].getName().equals(stuId.toString())) return CommonResult.error(100035, "文件与学号匹配异常");
|
if (!files[0].getName().equals(stuId.toString())) return CommonResult.error(100035, "文件与学号匹配异常");
|
||||||
@@ -227,9 +227,11 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
File cs_files = new File(file.getPath());
|
File cs_files = new File(file.getPath());
|
||||||
// 所有试题文件夹
|
// 所有试题文件夹
|
||||||
File[] cs_file_list = cs_files.listFiles();
|
File[] cs_file_list = cs_files.listFiles();
|
||||||
|
if (cs_file_list!=null){
|
||||||
for (File one_file : cs_file_list) {
|
for (File one_file : cs_file_list) {
|
||||||
// 6、根据试题ID查询试题详情
|
// 6、根据试题ID查询试题详情
|
||||||
String qu_id = one_file.getName();
|
// String qu_id = file.getName();
|
||||||
|
String qu_id = file.getName();
|
||||||
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuId(qu_id);
|
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuId(qu_id);
|
||||||
if (examQuestion != null) {
|
if (examQuestion != null) {
|
||||||
// 7、进行对应得判分
|
// 7、进行对应得判分
|
||||||
@@ -238,42 +240,46 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
File[] qu_file_list = qu_file.listFiles();
|
File[] qu_file_list = qu_file.listFiles();
|
||||||
if (qu_file_list == null) continue;
|
if (qu_file_list == null) continue;
|
||||||
// --- 7.2、通过文件名称进行判分
|
// --- 7.2、通过文件名称进行判分
|
||||||
for (File file_one : qu_file_list) {
|
// for (File file_one : qu_file_list) {
|
||||||
// 判断名称 类似于 C语言程序设计。 课程+题型
|
// 判断名称 类似于 C语言程序设计。 课程+题型
|
||||||
if (file_one.getName().split("\\.")[0].equals(examQuestion.getCourseName()+examQuestion.getSubjectName())) {
|
if (one_file.getName().split("\\.")[0].equals(examQuestion.getCourseName()+examQuestion.getSubjectName())) {
|
||||||
double c_score = judgementService.ProgrammingC(15.0, one_file.getPath(), file_one.getName(), examQuestion);
|
double c_score = judgementService.ProgrammingC(15.0, one_file.getPath(), one_file.getName(), examQuestion);
|
||||||
score += c_score;
|
score += c_score;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// wps 类型存在多级文文件夹,需要个性化设置
|
// wps 类型存在多级文文件夹,需要个性化设置
|
||||||
if (file_one.getName().split("\\.")[0].equals("文档")) {
|
if (one_file.getName().split("\\.")[0].equals("文档")) {
|
||||||
double wps_word_score = judgementWpsWordService.judgementWpsWord(15.0, one_file.getPath(), file_one.getPath(), examQuestion);
|
double wps_word_score = judgementWpsWordService.judgementWpsWord(15.0, one_file.getPath(), one_file.getPath(), examQuestion);
|
||||||
score += wps_word_score;
|
score += wps_word_score;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// D:\1d70c404e6d42d144d0028496e893565dd2dec447f7e9b1db66466f00472424d\160\cb3cc9089b104a1e9e92deb330d0cfe8\d9f988d5ae6d435ba12d4d979d044219\stu
|
// D:\1d70c404e6d42d144d0028496e893565dd2dec447f7e9b1db66466f00472424d\160\cb3cc9089b104a1e9e92deb330d0cfe8\d9f988d5ae6d435ba12d4d979d044219\stu
|
||||||
//windows文件处理
|
//windows文件处理
|
||||||
if (file_one.getName().equals("stu")) {
|
if (one_file.getName().equals("stu")) {
|
||||||
File win_file = new File(file_one.getPath());
|
File win_file = new File(one_file.getPath());
|
||||||
double win_file_score = fileServerice.run_file_point(20.0,win_file, examQuestion);
|
double win_file_score = fileServerice.run_file_point(20.0,win_file, examQuestion);
|
||||||
score += win_file_score;
|
score += win_file_score;
|
||||||
}
|
}
|
||||||
System.out.println(file_one);
|
System.out.println(one_file);
|
||||||
//浏览器操作
|
//浏览器操作
|
||||||
// if ("浏览器网络题".equals(examQuestion.getCourseName()+examQuestion.getSubjectName())){
|
// if ("浏览器网络题".equals(examQuestion.getCourseName()+examQuestion.getSubjectName())){
|
||||||
if (file_one.getName().equals("edge")) {
|
if (one_file.getName().equals("edge")) {
|
||||||
File edge_file = new File(file_one.getPath());
|
System.out.println(one_file);
|
||||||
|
File edge_file = new File(one_file.getPath());
|
||||||
double browse_score= browserServerice.Judgement(20.0,edge_file,examQuestion);
|
double browse_score= browserServerice.Judgement(20.0,edge_file,examQuestion);
|
||||||
score += browse_score;
|
score += browse_score;
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
ExamQuestion mysql=new ExamQuestion();
|
|
||||||
double judgement = mysqlServerice.Judgement(20, mysql);
|
|
||||||
score+=judgement;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
ExamQuestion mysql=new ExamQuestion();
|
||||||
|
double judgement = mysqlServerice.Judgement(20, mysql);
|
||||||
|
score+=judgement;
|
||||||
// 8、将解压之后得问及那继续重新压缩并上传到服务器,并删除文件和文件夹
|
// 8、将解压之后得问及那继续重新压缩并上传到服务器,并删除文件和文件夹
|
||||||
String zipPath = FolderZipper.zipFolder(files[0].getPath());
|
String zipPath = FolderZipper.zipFolder(files[0].getPath());
|
||||||
// 9、上传文件
|
// 9、上传文件
|
||||||
|
Reference in New Issue
Block a user