【新增】mysql、浏览器、win文件判分,试卷任务学生端接口,监控管理后端接口
This commit is contained in:
@@ -99,7 +99,7 @@ public void exportMonitorExcel(@Valid MonitorPageReqVO pageReqVO, HttpServletRes
|
|||||||
@PostMapping("/stuMonitorQu")
|
@PostMapping("/stuMonitorQu")
|
||||||
@Operation(summary = "学生端考试过程传试题")
|
@Operation(summary = "学生端考试过程传试题")
|
||||||
public CommonResult<String> updateStuMonitor(@Valid @RequestBody StuMonitorQuVo stuMonitorQuVo) {
|
public CommonResult<String> updateStuMonitor(@Valid @RequestBody StuMonitorQuVo stuMonitorQuVo) {
|
||||||
Boolean stuMonitor= monitorService.updateStuMonitor(stuMonitorQuVo);
|
Boolean stuMonitor = monitorService.updateStuMonitor(stuMonitorQuVo);
|
||||||
if (!stuMonitor)
|
if (!stuMonitor)
|
||||||
{
|
{
|
||||||
return error(DEMO03_MONITOR_SESSION_EXISTS);
|
return error(DEMO03_MONITOR_SESSION_EXISTS);
|
||||||
|
|||||||
@@ -12,13 +12,5 @@ public class StuMonitorQuVo {
|
|||||||
private String stuId;
|
private String stuId;
|
||||||
private String paperId;
|
private String paperId;
|
||||||
private String taskId;
|
private String taskId;
|
||||||
private List<EducationPaperSchemeMap> paperSchemeMaps; // 使用自定义类
|
private Map<String, String> questionResultMap;
|
||||||
|
|
||||||
private String score;
|
|
||||||
@Data
|
|
||||||
public static class EducationPaperSchemeMap {
|
|
||||||
private EducationPaperScheme educationPaperScheme;
|
|
||||||
private Map<String, Boolean> questionResultMap;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package pc.exam.pp.module.exam.controller.admin.paper;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.java.Log;
|
import lombok.extern.java.Log;
|
||||||
|
import org.checkerframework.checker.units.qual.A;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -15,7 +16,9 @@ import pc.exam.pp.module.exam.controller.admin.paper.dto.StatusDto;
|
|||||||
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
|
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
|
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
|
||||||
|
import pc.exam.pp.module.exam.service.paper.IEducationPaperPersonService;
|
||||||
import pc.exam.pp.module.exam.service.paper.IEducationPaperService;
|
import pc.exam.pp.module.exam.service.paper.IEducationPaperService;
|
||||||
|
import pc.exam.pp.module.exam.service.paper.IEducationPaperTaskService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -35,6 +38,12 @@ public class EducationPaperController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IEducationPaperService educationPaperService;
|
private IEducationPaperService educationPaperService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEducationPaperPersonService educationPaperPersonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEducationPaperTaskService educationPaperTaskService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询试卷列表
|
* 查询试卷列表
|
||||||
*/
|
*/
|
||||||
@@ -75,6 +84,26 @@ public class EducationPaperController
|
|||||||
return CommonResult.success(educationPaperService.addPaperList(num,taskid,taskSpecialty));
|
return CommonResult.success(educationPaperService.addPaperList(num,taskid,taskSpecialty));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生端返回一张试卷
|
||||||
|
*/
|
||||||
|
@GetMapping("/stuInfoPaper")
|
||||||
|
public CommonResult stuInfoPaper(@RequestParam("taskid") String taskid)
|
||||||
|
{
|
||||||
|
List<String> stuIds=educationPaperPersonService.selectStuIdByTaskId(taskid);
|
||||||
|
Long loginUserId = getLoginUserId();
|
||||||
|
// 判断试卷任务是否包含此学生
|
||||||
|
if (stuIds.contains(String.valueOf(loginUserId))) {
|
||||||
|
return CommonResult.success(educationPaperService.stuInfoPaper(taskid));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return CommonResult.error(100_200_300,"您未分配此试卷任务,请联系老师!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改试卷
|
* 修改试卷
|
||||||
*/
|
*/
|
||||||
@@ -102,12 +131,23 @@ public class EducationPaperController
|
|||||||
return CommonResult.success(educationPaperService.selectPaperByTaskId(taskId));
|
return CommonResult.success(educationPaperService.selectPaperByTaskId(taskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public CommonResult update(@RequestBody EducationPaper educationPaper)
|
public CommonResult update(@RequestBody EducationPaper educationPaper)
|
||||||
{
|
{
|
||||||
//根据方案id,查找所属试卷 ,把随机的清空掉
|
//根据方案id,查找所属试卷 ,把随机的清空掉
|
||||||
String taskId = educationPaper.getTaskId();
|
String taskId = educationPaper.getTaskId();
|
||||||
String rollUp = educationPaper.getRollUp();
|
String rollUp = educationPaper.getRollUp();
|
||||||
|
EducationPaperTask educationPaperTask = educationPaperTaskService.selectEducationPaperTaskByTaskId(taskId);
|
||||||
|
|
||||||
|
if ("3".equals(rollUp)){
|
||||||
|
educationPaperTask.setIsOne("0");
|
||||||
|
}else {
|
||||||
|
educationPaperTask.setIsOne("1");
|
||||||
|
}
|
||||||
|
educationPaperTaskService.updateEducationPaperTask(educationPaperTask);
|
||||||
if ("0".equals(rollUp)||"1".equals(rollUp )){
|
if ("0".equals(rollUp)||"1".equals(rollUp )){
|
||||||
//先清空 改试卷 的抽卷方式
|
//先清空 改试卷 的抽卷方式
|
||||||
String paperId = educationPaper.getPaperId();
|
String paperId = educationPaper.getPaperId();
|
||||||
@@ -158,6 +198,7 @@ public class EducationPaperController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PutMapping("/updatePaperStatus") // 更符合RESTful规范
|
@PutMapping("/updatePaperStatus") // 更符合RESTful规范
|
||||||
public CommonResult updateTaskStatus(@RequestBody StatusDto statusDto) { // 改为Integer类型
|
public CommonResult updateTaskStatus(@RequestBody StatusDto statusDto) { // 改为Integer类型
|
||||||
return CommonResult.success(
|
return CommonResult.success(
|
||||||
|
|||||||
@@ -90,5 +90,6 @@ public class EducationPaperQuController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ public class EducationPaperTaskController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/getPaperBytaskId")
|
||||||
|
public CommonResult getPaperBytaskId(@RequestParam(value = "taskId") String taskId)
|
||||||
|
{
|
||||||
|
return CommonResult.success(educationPaperTaskService.selectPaperQuByPaperId(taskId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class EducationPaperStuDto {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
EducationPaperParam educationPaperParam;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class EducationPaperQu
|
|||||||
|
|
||||||
/** 试题版本 */
|
/** 试题版本 */
|
||||||
// @Excel(name = "试题版本")
|
// @Excel(name = "试题版本")
|
||||||
private String quVersion;
|
private String sort;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,5 +54,7 @@ public class EducationPaperTask extends TenantBaseDO
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String count;
|
private String count;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
EducationPaperParam educationPaperParam;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,4 +110,7 @@ public interface EducationPaperTaskMapper extends BaseMapperX<EducationPaperTask
|
|||||||
String selectStuClassNameByClassId(Long classId);
|
String selectStuClassNameByClassId(Long classId);
|
||||||
|
|
||||||
List<EducationPaperTask> selectEducationPaperTaskByTaskType(String id);
|
List<EducationPaperTask> selectEducationPaperTaskByTaskType(String id);
|
||||||
|
|
||||||
|
String selectPaperQuByPaperId(String taskId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
@@ -105,7 +107,10 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
@Override
|
@Override
|
||||||
public Boolean getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) {
|
public Boolean getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) {
|
||||||
String key = "userCache:"+stuMonitorPaperVo.getTaskId()+":" + stuMonitorPaperVo.getStuId();
|
String key = "userCache:"+stuMonitorPaperVo.getTaskId()+":" + stuMonitorPaperVo.getStuId();
|
||||||
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
// MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
||||||
|
MonitorDO info=new MonitorDO();
|
||||||
|
String uuid = IdUtils.simpleUUID();
|
||||||
|
info.setMonitorId(uuid);
|
||||||
if (StringUtils.isNotBlank(stuMonitorPaperVo.getPaperId())){
|
if (StringUtils.isNotBlank(stuMonitorPaperVo.getPaperId())){
|
||||||
EducationPaper educationPaper = educationPaperMapper.selectEducationPaperByPaperId(stuMonitorPaperVo.getPaperId());
|
EducationPaper educationPaper = educationPaperMapper.selectEducationPaperByPaperId(stuMonitorPaperVo.getPaperId());
|
||||||
String counts = educationPaper.getCounts();
|
String counts = educationPaper.getCounts();
|
||||||
@@ -181,34 +186,18 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
@Override
|
@Override
|
||||||
public Boolean updateStuMonitor(StuMonitorQuVo stuMonitorQuVo) {
|
public Boolean updateStuMonitor(StuMonitorQuVo stuMonitorQuVo) {
|
||||||
String key = "userCache:"+stuMonitorQuVo.getTaskId()+":" + stuMonitorQuVo.getStuId();
|
String key = "userCache:"+stuMonitorQuVo.getTaskId()+":" + stuMonitorQuVo.getStuId();
|
||||||
|
String keychoice = "keychoice:"+stuMonitorQuVo.getTaskId()+":" + stuMonitorQuVo.getStuId();
|
||||||
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
if (!("1".equals(info.getExamStatus()))){
|
if (!("1".equals(info.getExamStatus()))){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
AtomicInteger totalScore = new AtomicInteger(); // 用于累加总分
|
stringRedisTemplate.opsForValue().set(keychoice, JsonUtils.toJsonString(stuMonitorQuVo));
|
||||||
// 记录答题结果
|
|
||||||
List<StuMonitorQuVo.EducationPaperSchemeMap> paperSchemeMaps = stuMonitorQuVo.getPaperSchemeMaps();
|
|
||||||
for (StuMonitorQuVo.EducationPaperSchemeMap paperSchemeMap : paperSchemeMaps) {
|
|
||||||
EducationPaperScheme educationPaperScheme = paperSchemeMap.getEducationPaperScheme();
|
|
||||||
Map<String, Boolean> questionResultMap = paperSchemeMap.getQuestionResultMap();
|
|
||||||
questionResultMap.forEach((quId, value) -> {
|
|
||||||
if (value) {
|
|
||||||
System.out.println("QuestionId: " + quId + ", boolean: " + value);
|
|
||||||
String quScores = educationPaperScheme.getQuScores();
|
|
||||||
int score = Integer.parseInt(quScores); // 转换为 int 类型的分数
|
|
||||||
totalScore.addAndGet(score); // 累加到总分
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新成绩(这里假设一题10分)
|
|
||||||
|
|
||||||
info.setScore(String.valueOf(totalScore));
|
|
||||||
|
|
||||||
// 更新缓存
|
// 更新缓存
|
||||||
redisTemplate.opsForValue().set(key, info);
|
// redisTemplate.opsForValue().set(key, info);
|
||||||
// monitorMapper.updateById(info);
|
// monitorMapper.updateById(info);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -218,6 +207,22 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
@Override
|
@Override
|
||||||
public void endStuMonitor(StuMonitorPaperEndVo stuMonitorPaperEndVo) {
|
public void endStuMonitor(StuMonitorPaperEndVo stuMonitorPaperEndVo) {
|
||||||
String key = "userCache:" + stuMonitorPaperEndVo.getTaskId()+":" +stuMonitorPaperEndVo.getStuId();
|
String key = "userCache:" + stuMonitorPaperEndVo.getTaskId()+":" +stuMonitorPaperEndVo.getStuId();
|
||||||
|
String keychoice = "keychoice:"+stuMonitorPaperEndVo.getTaskId()+":" + stuMonitorPaperEndVo.getStuId();
|
||||||
|
StuMonitorQuVo stuMonitorQuVo = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(keychoice),StuMonitorQuVo.class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
String fileName = "StuMonitorQu.txt";
|
||||||
|
FileWriter writer = new FileWriter(fileName);
|
||||||
|
writer.write(JsonUtils.toJsonString(stuMonitorQuVo));
|
||||||
|
writer.close();
|
||||||
|
//上传至
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println(e);
|
||||||
|
}
|
||||||
|
|
||||||
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
|
||||||
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(stuMonitorPaperEndVo.getTaskId());
|
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(stuMonitorPaperEndVo.getTaskId());
|
||||||
EducationPaperTask educationPaperTask = educationPaperTaskMapper.selectEducationPaperTaskByTaskId(stuMonitorPaperEndVo.getTaskId());
|
EducationPaperTask educationPaperTask = educationPaperTaskMapper.selectEducationPaperTaskByTaskId(stuMonitorPaperEndVo.getTaskId());
|
||||||
@@ -225,10 +230,14 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
info.setScore(stuMonitorPaperEndVo.getScore());
|
info.setScore(stuMonitorPaperEndVo.getScore());
|
||||||
}else {
|
}else {
|
||||||
MonitorDO monitorDO = monitorMapper.selectById(info.getMonitorId());
|
MonitorDO monitorDO = monitorMapper.selectById(info.getMonitorId());
|
||||||
if (Integer.parseInt(monitorDO.getScore()) <Integer.parseInt(stuMonitorPaperEndVo.getScore())){
|
info.setScore(stuMonitorPaperEndVo.getScore());
|
||||||
info.setScore(stuMonitorPaperEndVo.getScore());
|
if (StringUtils.isNotBlank(monitorDO.getScore())) {
|
||||||
|
if (Integer.parseInt(monitorDO.getScore()) <Integer.parseInt(stuMonitorPaperEndVo.getScore())){
|
||||||
|
info.setScore(stuMonitorPaperEndVo.getScore());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//练习下的任务 结束改为 代考
|
//练习下的任务 结束改为 代考
|
||||||
if ("0".equals(educationPaperTask.getStatus())){
|
if ("0".equals(educationPaperTask.getStatus())){
|
||||||
@@ -236,7 +245,9 @@ public class MonitorServiceImpl implements MonitorService {
|
|||||||
}else {
|
}else {
|
||||||
info.setExamStatus("2");
|
info.setExamStatus("2");
|
||||||
}
|
}
|
||||||
|
//todo 这些都写成方法
|
||||||
redisTemplate.delete(key);
|
redisTemplate.delete(key);
|
||||||
|
redisTemplate.delete(keychoice);
|
||||||
monitorMapper.updateById(info);
|
monitorMapper.updateById(info);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,6 +264,11 @@ public class EducationPaperPersonServiceImpl implements IEducationPaperPersonSer
|
|||||||
return educationPaperPersonMapper.removeTaskStu(deleteRequestVo);
|
return educationPaperPersonMapper.removeTaskStu(deleteRequestVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> selectStuIdByTaskId(String taskid) {
|
||||||
|
return educationPaperPersonMapper.selectStuIdByTaskId(taskid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询试卷人员分配列表
|
* 查询试卷人员分配列表
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ import pc.exam.pp.framework.common.pojo.PageResult;
|
|||||||
import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
|
import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
|
||||||
import pc.exam.pp.framework.tenant.core.context.TenantContextHolder;
|
import pc.exam.pp.framework.tenant.core.context.TenantContextHolder;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
|
||||||
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.*;
|
import pc.exam.pp.module.exam.dal.dataobject.*;
|
||||||
import pc.exam.pp.module.exam.dal.mysql.paper.*;
|
import pc.exam.pp.module.exam.dal.mysql.paper.*;
|
||||||
|
import pc.exam.pp.module.exam.dal.mysql.question.ExamQuestionMapper;
|
||||||
|
import pc.exam.pp.module.exam.dal.mysql.question.SysFileMapper;
|
||||||
import pc.exam.pp.module.exam.utils.uuid.IdUtils;
|
import pc.exam.pp.module.exam.utils.uuid.IdUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -40,6 +43,11 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EducationPaperPersonMapper educationPaperPersonMapper;
|
private EducationPaperPersonMapper educationPaperPersonMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ExamQuestionMapper examQuestionMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysFileMapper sysFileMapper;
|
||||||
/**
|
/**
|
||||||
* 查询试卷
|
* 查询试卷
|
||||||
*
|
*
|
||||||
@@ -172,10 +180,12 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
|||||||
//构建试卷试题对象
|
//构建试卷试题对象
|
||||||
List<EducationPaperQu> educationPaperQus=new ArrayList<>();
|
List<EducationPaperQu> educationPaperQus=new ArrayList<>();
|
||||||
if (examQuestionIds!=null&& examQuestionIds.size()>0){
|
if (examQuestionIds!=null&& examQuestionIds.size()>0){
|
||||||
|
int sort = 1; // 从1开始
|
||||||
for (String examQuestionId : examQuestionIds) {
|
for (String examQuestionId : examQuestionIds) {
|
||||||
EducationPaperQu educationPaperQu=new EducationPaperQu();
|
EducationPaperQu educationPaperQu=new EducationPaperQu();
|
||||||
educationPaperQu.setPaperId(uuid);
|
educationPaperQu.setPaperId(uuid);
|
||||||
educationPaperQu.setQuId(examQuestionId);
|
educationPaperQu.setQuId(examQuestionId);
|
||||||
|
educationPaperQu.setSort(String.valueOf(sort++));
|
||||||
educationPaperQus.add(educationPaperQu);
|
educationPaperQus.add(educationPaperQu);
|
||||||
}
|
}
|
||||||
educationPaperQuMapper.insertEducationPaperQuList(educationPaperQus);
|
educationPaperQuMapper.insertEducationPaperQuList(educationPaperQus);
|
||||||
@@ -275,14 +285,14 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
|||||||
for (EducationPaper educationPaper : list) {
|
for (EducationPaper educationPaper : list) {
|
||||||
EducationPaperStuDto educationPaperStuDto=new EducationPaperStuDto();
|
EducationPaperStuDto educationPaperStuDto=new EducationPaperStuDto();
|
||||||
|
|
||||||
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(educationPaper.getTaskId());
|
// EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(educationPaper.getTaskId());
|
||||||
educationPaperStuDto.setPaperId(educationPaper.getPaperId());
|
educationPaperStuDto.setPaperId(educationPaper.getPaperId());
|
||||||
educationPaperStuDto.setNum(educationPaper.getNum());
|
educationPaperStuDto.setNum(educationPaper.getNum());
|
||||||
educationPaperStuDto.setTaskId(educationPaper.getTaskId());
|
educationPaperStuDto.setTaskId(educationPaper.getTaskId());
|
||||||
educationPaperStuDto.setCounts(educationPaper.getCounts());
|
educationPaperStuDto.setCounts(educationPaper.getCounts());
|
||||||
educationPaperStuDto.setRollUp(educationPaper.getRollUp());
|
educationPaperStuDto.setRollUp(educationPaper.getRollUp());
|
||||||
educationPaperStuDto.setIsAb(educationPaper.getIsAb());
|
educationPaperStuDto.setIsAb(educationPaper.getIsAb());
|
||||||
educationPaperStuDto.setEducationPaperParam(educationPaperParam);
|
// educationPaperStuDto.setEducationPaperParam(educationPaperParam);
|
||||||
educationPaperStuDtos.add(educationPaperStuDto);
|
educationPaperStuDtos.add(educationPaperStuDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -300,6 +310,96 @@ public class EducationPaperServiceImpl implements IEducationPaperService
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExamPaperVo stuInfoPaper(String taskid) {
|
||||||
|
|
||||||
|
|
||||||
|
EducationPaperTask educationPaperTask = educationPaperTaskMapper.selectEducationPaperTaskByTaskId(taskid);
|
||||||
|
String taskSpecialty = educationPaperTask.getTaskSpecialty();
|
||||||
|
|
||||||
|
//根据试卷任务id查找方案集合
|
||||||
|
List<EducationPaperScheme> educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskid);
|
||||||
|
List<String> examQuestionIds = new ArrayList<>();
|
||||||
|
for (EducationPaperScheme educationPaperScheme : educationPaperSchemeList) {
|
||||||
|
//获取试卷方案对象
|
||||||
|
String pointNames = educationPaperScheme.getPointNames();
|
||||||
|
//知识点id
|
||||||
|
List<String> pointList ;
|
||||||
|
//知识点名称
|
||||||
|
List<String> pointName =new ArrayList<>();
|
||||||
|
if (pointNames!=null){
|
||||||
|
pointList = Arrays.asList(pointNames.split(","));
|
||||||
|
if (pointList!=null){
|
||||||
|
pointName= educationPaperTaskMapper.selectPointByid(pointList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String keywords = educationPaperScheme.getKeywords();
|
||||||
|
List<String> keywordList =new ArrayList<>();
|
||||||
|
if (keywords != null && !keywords.trim().isEmpty()) {
|
||||||
|
keywordList = Arrays.asList(keywords.split(","));
|
||||||
|
}
|
||||||
|
if ("3".equals(educationPaperScheme.getQuLevel())){
|
||||||
|
educationPaperScheme.setQuLevel("");
|
||||||
|
}
|
||||||
|
//根据方案,去查找 试题表,返回试题id
|
||||||
|
Long requiredTenantId = TenantContextHolder.getRequiredTenantId();
|
||||||
|
|
||||||
|
List<String> quId = educationPaperMapper.selectQuByPaperScheme(pointName,keywordList,educationPaperScheme,taskSpecialty,requiredTenantId);
|
||||||
|
//把第i张卷子方案的试题全加一起
|
||||||
|
examQuestionIds.addAll(quId);
|
||||||
|
|
||||||
|
}
|
||||||
|
int number=educationPaperMapper.selectCountPaperList();
|
||||||
|
|
||||||
|
// 格式化为8位,不足前面补0
|
||||||
|
String formattedNumber = String.format("%08d", number);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//构建试卷
|
||||||
|
EducationPaper educationPaper =new EducationPaper();
|
||||||
|
String uuid = IdUtils.simpleUUID();
|
||||||
|
educationPaper.setPaperId(uuid);
|
||||||
|
educationPaper.setTaskId(taskid);
|
||||||
|
educationPaper.setNum(formattedNumber);
|
||||||
|
educationPaper.setTenantId(TenantContextHolder.getRequiredTenantId());
|
||||||
|
educationPaperMapper.insertEducationPaper(educationPaper);
|
||||||
|
|
||||||
|
System.out.println(examQuestionIds+"examQuestionIdsexamQuestionIds");
|
||||||
|
|
||||||
|
//构建试卷试题对象
|
||||||
|
List<EducationPaperQu> educationPaperQus=new ArrayList<>();
|
||||||
|
if (examQuestionIds!=null&& examQuestionIds.size()>0){
|
||||||
|
for (String examQuestionId : examQuestionIds) {
|
||||||
|
EducationPaperQu educationPaperQu=new EducationPaperQu();
|
||||||
|
educationPaperQu.setPaperId(uuid);
|
||||||
|
educationPaperQu.setQuId(examQuestionId);
|
||||||
|
educationPaperQus.add(educationPaperQu);
|
||||||
|
}
|
||||||
|
educationPaperQuMapper.insertEducationPaperQuList(educationPaperQus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<String> quIds =educationPaperQuMapper.selectPaperQuByPaperId(uuid);
|
||||||
|
List<ExamQuestion> examQuestionList=examQuestionMapper.selectExamQuestionListByQuIds(quIds);
|
||||||
|
|
||||||
|
if (examQuestionList!=null&&examQuestionList.size()>0){
|
||||||
|
for (ExamQuestion examQuestion : examQuestionList) {
|
||||||
|
//查找原始和素材试题文件
|
||||||
|
List<SysFileUpload> sysFileUploads =sysFileMapper.selectSysFileByQuidIN(examQuestion.getQuId());
|
||||||
|
examQuestion.setFileUploads(sysFileUploads);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
ExamPaperVo examPaperVo=new ExamPaperVo();
|
||||||
|
examPaperVo.setExamQuestionList(examQuestionList);
|
||||||
|
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
||||||
|
|
||||||
|
return examPaperVo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package pc.exam.pp.module.exam.service.paper;
|
package pc.exam.pp.module.exam.service.paper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -9,9 +10,12 @@ import pc.exam.pp.framework.tenant.core.aop.TenantIgnore;
|
|||||||
import pc.exam.pp.framework.tenant.core.context.TenantContextHolder;
|
import pc.exam.pp.framework.tenant.core.context.TenantContextHolder;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.SchemeParam;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.SchemeParam;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.TempDto;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.TempDto;
|
||||||
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo;
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.*;
|
import pc.exam.pp.module.exam.dal.dataobject.*;
|
||||||
import pc.exam.pp.module.exam.dal.mysql.paper.*;
|
import pc.exam.pp.module.exam.dal.mysql.paper.*;
|
||||||
|
import pc.exam.pp.module.exam.dal.mysql.question.ExamQuestionMapper;
|
||||||
|
import pc.exam.pp.module.exam.dal.mysql.question.SysFileMapper;
|
||||||
import pc.exam.pp.module.exam.utils.date.DateUtils;
|
import pc.exam.pp.module.exam.utils.date.DateUtils;
|
||||||
import pc.exam.pp.module.exam.utils.uuid.IdUtils;
|
import pc.exam.pp.module.exam.utils.uuid.IdUtils;
|
||||||
|
|
||||||
@@ -46,7 +50,13 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EducationPaperTaskMapper educationPaperTaskMapper;
|
private EducationPaperTaskMapper educationPaperTaskMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysFileMapper sysFileMapper;
|
||||||
|
//@Autowired
|
||||||
|
//private ExamQuestionMapper
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ExamQuestionMapper examQuestionMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询试卷任务
|
* 查询试卷任务
|
||||||
@@ -86,6 +96,9 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
}
|
}
|
||||||
paperTask.setCount(String.valueOf(count));
|
paperTask.setCount(String.valueOf(count));
|
||||||
|
|
||||||
|
|
||||||
|
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(paperTask.getTaskId());
|
||||||
|
paperTask.setEducationPaperParam(educationPaperParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +142,11 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
educationPaperParam.setIsAnswer("0");
|
educationPaperParam.setIsAnswer("0");
|
||||||
educationPaperParam.setIsLook("0");
|
educationPaperParam.setIsLook("0");
|
||||||
}
|
}
|
||||||
|
if ("0".equals(educationPaperTask.getTaskType())||"1".equals(educationPaperTask.getTaskType())||"3".equals(educationPaperTask.getTaskType())){
|
||||||
|
educationPaperTask.setIsOne("0");
|
||||||
|
}else{
|
||||||
|
educationPaperTask.setIsOne("1");
|
||||||
|
}
|
||||||
|
|
||||||
educationPaperParamMapper.insertEducationPaperParam(educationPaperParam);
|
educationPaperParamMapper.insertEducationPaperParam(educationPaperParam);
|
||||||
|
|
||||||
@@ -362,4 +379,30 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
|||||||
public boolean changeStatus(String taskId, String status) {
|
public boolean changeStatus(String taskId, String status) {
|
||||||
return educationPaperTaskMapper.changeStatus(taskId,status);
|
return educationPaperTaskMapper.changeStatus(taskId,status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExamPaperVo selectPaperQuByPaperId(String taskId) {
|
||||||
|
String paperId= educationPaperTaskMapper.selectPaperQuByPaperId(taskId);
|
||||||
|
|
||||||
|
List<ExamQuestion> examQuestionList=new ArrayList<>();
|
||||||
|
List<EducationPaperScheme> educationPaperSchemeList=new ArrayList<>();
|
||||||
|
if (StringUtils.isNotBlank(paperId)){
|
||||||
|
List<String> quIds =educationPaperQuMapper.selectPaperQuByPaperId(paperId);
|
||||||
|
examQuestionList=examQuestionMapper.selectExamQuestionListByQuIds(quIds);
|
||||||
|
if (examQuestionList!=null&&examQuestionList.size()>0){
|
||||||
|
for (ExamQuestion examQuestion : examQuestionList) {
|
||||||
|
//查找原始和素材试题文件
|
||||||
|
List<SysFileUpload> sysFileUploads =sysFileMapper.selectSysFileByQuidIN(examQuestion.getQuId());
|
||||||
|
examQuestion.setFileUploads(sysFileUploads);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskId);
|
||||||
|
}
|
||||||
|
ExamPaperVo examPaperVo=new ExamPaperVo();
|
||||||
|
examPaperVo.setExamQuestionList(examQuestionList);
|
||||||
|
examPaperVo.setEducationPaperSchemeList(educationPaperSchemeList);
|
||||||
|
|
||||||
|
return examPaperVo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ public interface IEducationPaperPersonService
|
|||||||
|
|
||||||
int removeTaskStu(DeleteRequestVo deleteRequestVo);
|
int removeTaskStu(DeleteRequestVo deleteRequestVo);
|
||||||
|
|
||||||
|
List<String> selectStuIdByTaskId(String taskid);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// PageResult<PersonRepDto> selectExamStuList(StudentPageReqVO examStu);
|
// PageResult<PersonRepDto> selectExamStuList(StudentPageReqVO examStu);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package pc.exam.pp.module.exam.service.paper;
|
|||||||
|
|
||||||
import pc.exam.pp.framework.common.pojo.PageResult;
|
import pc.exam.pp.framework.common.pojo.PageResult;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.EducationPaperStuDto;
|
||||||
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperPageVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.PaperListResponseVo;
|
import pc.exam.pp.module.exam.dal.dataobject.PaperListResponseVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
|
import pc.exam.pp.module.exam.dal.dataobject.EducationPaper;
|
||||||
@@ -90,5 +91,6 @@ public interface IEducationPaperService
|
|||||||
|
|
||||||
PageResult<EducationPaperStuDto> selectStuEducationPaperList(PaperPageVo paperPageVo);
|
PageResult<EducationPaperStuDto> selectStuEducationPaperList(PaperPageVo paperPageVo);
|
||||||
|
|
||||||
|
ExamPaperVo stuInfoPaper(String taskid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package pc.exam.pp.module.exam.service.paper;
|
|||||||
import pc.exam.pp.framework.common.pojo.PageResult;
|
import pc.exam.pp.framework.common.pojo.PageResult;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.SchemeParam;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.SchemeParam;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.dto.TempDto;
|
import pc.exam.pp.module.exam.controller.admin.paper.dto.TempDto;
|
||||||
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPaperVo;
|
||||||
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo;
|
import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamPaperKnowledgePoints;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamPaperKnowledgePoints;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
|
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
|
||||||
@@ -82,5 +83,6 @@ public interface IEducationPaperTaskService
|
|||||||
|
|
||||||
boolean changeStatus(String taskId, String status);
|
boolean changeStatus(String taskId, String status);
|
||||||
|
|
||||||
|
ExamPaperVo selectPaperQuByPaperId(String taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
<resultMap type="EducationPaperQu" id="EducationPaperQuResult">
|
<resultMap type="EducationPaperQu" id="EducationPaperQuResult">
|
||||||
<result property="paperId" column="paper_id" />
|
<result property="paperId" column="paper_id" />
|
||||||
<result property="quId" column="qu_id" />
|
<result property="quId" column="qu_id" />
|
||||||
<result property="quVersion" column="qu_version" />
|
<result property="sort" column="sort" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEducationPaperQuVo">
|
<sql id="selectEducationPaperQuVo">
|
||||||
select paper_id, qu_id, qu_version from education_paper_qu
|
select paper_id, qu_id, sort from education_paper_qu
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectEducationPaperQuList" parameterType="EducationPaperQu" resultMap="EducationPaperQuResult">
|
<select id="selectEducationPaperQuList" parameterType="EducationPaperQu" resultMap="EducationPaperQuResult">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="paperId != null and paperId != ''"> and paper_id = #{paperId}</if>
|
<if test="paperId != null and paperId != ''"> and paper_id = #{paperId}</if>
|
||||||
<if test="quId != null and quId != ''"> and qu_id = #{quId}</if>
|
<if test="quId != null and quId != ''"> and qu_id = #{quId}</if>
|
||||||
<if test="quVersion != null and quVersion != ''"> and qu_version = #{quVersion}</if>
|
<if test="sort != null and sort != ''"> and qu_version = #{quVersion}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
where paper_id = #{paperId}
|
where paper_id = #{paperId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPaperQuByPaperId" resultType="java.lang.String">
|
<select id="selectPaperQuByPaperId" resultType="java.lang.String">
|
||||||
select qu_id from education_paper_qu where paper_id =#{paperId}
|
select qu_id from education_paper_qu where paper_id =#{paperId} order by sort asc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPaperQuListByPaperId" resultMap="EducationPaperQuResult">
|
<select id="selectPaperQuListByPaperId" resultMap="EducationPaperQuResult">
|
||||||
<include refid="selectEducationPaperQuVo"/>
|
<include refid="selectEducationPaperQuVo"/>
|
||||||
@@ -41,12 +41,12 @@
|
|||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="paperId != null">paper_id,</if>
|
<if test="paperId != null">paper_id,</if>
|
||||||
<if test="quId != null">qu_id,</if>
|
<if test="quId != null">qu_id,</if>
|
||||||
<if test="quVersion != null">qu_version,</if>
|
<if test="sort != null">sort,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="paperId != null">#{paperId},</if>
|
<if test="paperId != null">#{paperId},</if>
|
||||||
<if test="quId != null">#{quId},</if>
|
<if test="quId != null">#{quId},</if>
|
||||||
<if test="quVersion != null">#{quVersion},</if>
|
<if test="sort != null">#{sort},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertEducationPaperQuList">
|
<insert id="insertEducationPaperQuList">
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<result property="taskName" column="task_name" />
|
<result property="taskName" column="task_name" />
|
||||||
<result property="taskSpecialty" column="task_specialty" />
|
<result property="taskSpecialty" column="task_specialty" />
|
||||||
<result property="taskType" column="task_type" />
|
<result property="taskType" column="task_type" />
|
||||||
|
<result property="isOne" column="is_one" />
|
||||||
<result property="isTemplate" column="is_template" />
|
<result property="isTemplate" column="is_template" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
<result property="treeNum" column="tree_num" />
|
<result property="treeNum" column="tree_num" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectEducationPaperTaskVo">
|
<sql id="selectEducationPaperTaskVo">
|
||||||
select task_id, task_name, task_specialty, task_type, is_template, status, create_time, update_time, creator, updater, deleted,tenant_id from education_paper_task
|
select task_id, task_name, task_specialty, task_type,is_one, is_template, status, create_time, update_time, creator, updater, deleted,tenant_id from education_paper_task
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@@ -119,6 +120,15 @@
|
|||||||
where task_type = #{id}
|
where task_type = #{id}
|
||||||
and deleted='0'
|
and deleted='0'
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPaperQuByPaperId" resultType="java.lang.String">
|
||||||
|
SELECT paper_id
|
||||||
|
FROM education_paper
|
||||||
|
WHERE task_id =#{taskId}
|
||||||
|
and roll_up is not NULL
|
||||||
|
and deleted ='0'
|
||||||
|
ORDER BY RAND()
|
||||||
|
LIMIT 1;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertEducationPaperTask" parameterType="EducationPaperTask">
|
<insert id="insertEducationPaperTask" parameterType="EducationPaperTask">
|
||||||
@@ -160,6 +170,7 @@
|
|||||||
<if test="taskName != null">task_name = #{taskName},</if>
|
<if test="taskName != null">task_name = #{taskName},</if>
|
||||||
<if test="taskSpecialty != null">task_specialty = #{taskSpecialty},</if>
|
<if test="taskSpecialty != null">task_specialty = #{taskSpecialty},</if>
|
||||||
<if test="taskType != null">task_type = #{taskType},</if>
|
<if test="taskType != null">task_type = #{taskType},</if>
|
||||||
|
<if test="isOne != null">is_one = #{isOne},</if>
|
||||||
<if test="isTemplate != null">is_template = #{isTemplate},</if>
|
<if test="isTemplate != null">is_template = #{isTemplate},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ public class BrowserComtroller {
|
|||||||
* 浏览器判分
|
* 浏览器判分
|
||||||
* @return 得分
|
* @return 得分
|
||||||
*/
|
*/
|
||||||
@PostMapping("/run_judgement")
|
// @PostMapping("/run_judgement")
|
||||||
public CommonResult run_C_code() throws IOException {
|
// public CommonResult run_C_code() throws IOException {
|
||||||
return CommonResult.success(browserServerice.Judgement());
|
// return CommonResult.success(browserServerice.Judgement());
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ public class MysqlController {
|
|||||||
* Mysql判分
|
* Mysql判分
|
||||||
* @return 得分
|
* @return 得分
|
||||||
*/
|
*/
|
||||||
@PostMapping("/run_judgement")
|
// @PostMapping("/run_judgement")
|
||||||
public CommonResult run_C_code() throws SQLException, IOException {
|
// public CommonResult run_C_code() throws SQLException, IOException {
|
||||||
return CommonResult.success(mysqlServerice.Judgement());
|
// return CommonResult.success(mysqlServerice.Judgement( ));
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ public class WindowsFileController {
|
|||||||
* 文件操作题判分
|
* 文件操作题判分
|
||||||
* @return 判分
|
* @return 判分
|
||||||
*/
|
*/
|
||||||
@PostMapping("/run_judgement")
|
// @PostMapping("/run_judgement")
|
||||||
public CommonResult run_file_point() throws IOException {
|
// public CommonResult run_file_point() throws IOException {
|
||||||
//"权值得分比重"
|
// //"权值得分比重"
|
||||||
return CommonResult.success(fileServerice.run_file_point());
|
// return CommonResult.success(fileServerice.run_file_point());
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.browser;
|
package pc.exam.pp.module.judgement.controller.service.browser;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
||||||
import pc.exam.pp.module.judgement.controller.utils.brower.BookmarkChecker;
|
import pc.exam.pp.module.judgement.controller.utils.brower.BookmarkChecker;
|
||||||
import pc.exam.pp.module.judgement.controller.utils.brower.BookmarkDeleter;
|
import pc.exam.pp.module.judgement.controller.utils.brower.BookmarkDeleter;
|
||||||
import pc.exam.pp.module.exam.utils.file.GetDifferencesBetweenFolders;
|
import pc.exam.pp.module.exam.utils.file.GetDifferencesBetweenFolders;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@@ -16,13 +18,13 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BrowserServericeImpl implements IBrowserServerice {
|
public class BrowserServericeImpl implements IBrowserServerice {
|
||||||
static String answerLogPath = "answerLogBrower.txt"; // 文件路径
|
static String answerLogPath ; // 文件路径
|
||||||
//考生试题文件夹
|
//考生试题文件夹
|
||||||
static final String BASE_DIR = "D:/exam/4/";
|
// static final String BASE_DIR = "D:/exam/4/";
|
||||||
//谷歌浏览器
|
//谷歌浏览器
|
||||||
String chromeBookmarkPath = System.getenv("LOCALAPPDATA") + "\\Google\\Chrome\\User Data\\Default\\Bookmarks";
|
String chromeBookmarkPath = System.getenv("LOCALAPPDATA") + "\\Google\\Chrome\\User Data\\Default\\Bookmarks";
|
||||||
@Override
|
@Override
|
||||||
public String Judgement() throws IOException {
|
public double Judgement(double score, File file, ExamQuestion question) throws IOException {
|
||||||
//根据题目,查找考点
|
//根据题目,查找考点
|
||||||
|
|
||||||
//得到该试题的得分点
|
//得到该试题的得分点
|
||||||
@@ -30,9 +32,9 @@ public class BrowserServericeImpl implements IBrowserServerice {
|
|||||||
// 添加到文件夹 1
|
// 添加到文件夹 1
|
||||||
// 添加到收藏夹 2
|
// 添加到收藏夹 2
|
||||||
List<ExamQuestionAnswer> answerList=new ArrayList<>();
|
List<ExamQuestionAnswer> answerList=new ArrayList<>();
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","1", "文件名1", "1", "1"));
|
answerList.add(new ExamQuestionAnswer("","","","","1", "人民大学", "1", "1"));
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","1", "文件名2", "1", "2"));
|
answerList.add(new ExamQuestionAnswer("","","","","1", "校情", "1", "2"));
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","2", "百度一下,你就知道", "1", "3"));
|
answerList.add(new ExamQuestionAnswer("","","","","1", "机构", "1", "3"));
|
||||||
//判断如果类型为1,为添加到文件夹的html,后缀加 .html
|
//判断如果类型为1,为添加到文件夹的html,后缀加 .html
|
||||||
for (ExamQuestionAnswer answer : answerList) {
|
for (ExamQuestionAnswer answer : answerList) {
|
||||||
if ("1".equals(answer.getContent())) {
|
if ("1".equals(answer.getContent())) {
|
||||||
@@ -49,10 +51,10 @@ public class BrowserServericeImpl implements IBrowserServerice {
|
|||||||
// 2:收藏夹--去浏览器去找 根据值 文件名 查找
|
// 2:收藏夹--去浏览器去找 根据值 文件名 查找
|
||||||
// 找到后 —————— +权值 ,根据文件名删除
|
// 找到后 —————— +权值 ,根据文件名删除
|
||||||
|
|
||||||
|
answerLogPath = file.getParent() + File.separator + "log.txt";
|
||||||
|
|
||||||
//根据路径,得到考生答题文件集合
|
//根据路径,得到考生答题文件集合
|
||||||
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(Paths.get(BASE_DIR));
|
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(file.toPath());
|
||||||
|
|
||||||
|
|
||||||
// 输出学生提交的内容
|
// 输出学生提交的内容
|
||||||
@@ -87,9 +89,10 @@ public class BrowserServericeImpl implements IBrowserServerice {
|
|||||||
.sum();
|
.sum();
|
||||||
// 计算最终得分比例(保留两位小数)
|
// 计算最终得分比例(保留两位小数)
|
||||||
double scoreRatio = totalScore == 0 ? 0 : (double) studentScore / totalScore;
|
double scoreRatio = totalScore == 0 ? 0 : (double) studentScore / totalScore;
|
||||||
String formattedScoreRatio = String.format("%.2f", scoreRatio);
|
|
||||||
|
|
||||||
return formattedScoreRatio;
|
double roundedScoreRatio = Math.round(scoreRatio * 100.0) / 100.0; // 四舍五入到2位小数
|
||||||
|
|
||||||
|
return roundedScoreRatio*score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.browser;
|
package pc.exam.pp.module.judgement.controller.service.browser;
|
||||||
|
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public interface IBrowserServerice {
|
public interface IBrowserServerice {
|
||||||
String Judgement() throws IOException;
|
double Judgement(double score, File file, ExamQuestion question) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.file;
|
package pc.exam.pp.module.judgement.controller.service.file;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
||||||
import pc.exam.pp.module.exam.utils.file.GetDifferencesBetweenFolders;
|
import pc.exam.pp.module.exam.utils.file.GetDifferencesBetweenFolders;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@@ -12,17 +14,15 @@ import java.util.ArrayList;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class FileServericeImpl implements IFileServerice {
|
public class FileServericeImpl implements IFileServerice {
|
||||||
static final String BASE_DIR = "D:/exam/3/";
|
static final String BASE_DIR = "D:/exam/3/";
|
||||||
static String answerLogPath = "answerLogFile.txt"; // 文件路径
|
static String answerLogPath ; // 文件路径
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String run_file_point() throws IOException {
|
public double run_file_point(double score,File file, ExamQuestion question) throws IOException {
|
||||||
//todo 得到学生的考题答案
|
//todo 得到学生的考题答案
|
||||||
List<ExamQuestionAnswer> answerList=new ArrayList<>();
|
List<ExamQuestionAnswer> answerList=new ArrayList<>();
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","HGACYL\\RLQM.MEM", "考察删除", "1", "1"));
|
answerList.add(new ExamQuestionAnswer("","","","","HGACYL\\RLQM.MEM", "考察删除", "1", "1"));
|
||||||
@@ -30,10 +30,16 @@ public class FileServericeImpl implements IFileServerice {
|
|||||||
answerList.add(new ExamQuestionAnswer("","","","","AHEWL\\KMENS", "考察名称", "1", "3"));
|
answerList.add(new ExamQuestionAnswer("","","","","AHEWL\\KMENS", "考察名称", "1", "3"));
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","EDZK\\RONGHE.COM", "考察名称", "1", "4"));
|
answerList.add(new ExamQuestionAnswer("","","","","EDZK\\RONGHE.COM", "考察名称", "1", "4"));
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","HGACYL\\PLAY.MEM", "考察名称", "1", "5"));
|
answerList.add(new ExamQuestionAnswer("","","","","HGACYL\\PLAY.MEM", "考察名称", "1", "5"));
|
||||||
|
|
||||||
answerList.add(new ExamQuestionAnswer("","","","","WUE\\PB6.txt", "考察名称", "1", "6"));
|
answerList.add(new ExamQuestionAnswer("","","","","WUE\\PB6.txt", "考察名称", "1", "6"));
|
||||||
String stuPath = BASE_DIR + "stu";
|
|
||||||
|
|
||||||
|
File stuPath = file;
|
||||||
|
|
||||||
|
// 设置日志文件路径为file所在目录下的answerLogFile.txt
|
||||||
|
answerLogPath = file.getParent() + File.separator + "log.txt";
|
||||||
// 获取 stu 文件夹的内容
|
// 获取 stu 文件夹的内容
|
||||||
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(Paths.get( stuPath));
|
Map<String, String> stuFiles = GetDifferencesBetweenFolders.listFilesAndFoldersWithAttributes(stuPath.toPath());
|
||||||
|
|
||||||
// 输出学生提交的内容
|
// 输出学生提交的内容
|
||||||
appendToFile(answerLogPath,"=== 学生提交内容(stu 目录) ===");
|
appendToFile(answerLogPath,"=== 学生提交内容(stu 目录) ===");
|
||||||
@@ -52,9 +58,9 @@ public class FileServericeImpl implements IFileServerice {
|
|||||||
.sum();
|
.sum();
|
||||||
// 计算最终得分比例(保留两位小数)
|
// 计算最终得分比例(保留两位小数)
|
||||||
double scoreRatio = totalScore == 0 ? 0 : (double) studentScore / totalScore;
|
double scoreRatio = totalScore == 0 ? 0 : (double) studentScore / totalScore;
|
||||||
String formattedScoreRatio = String.format("%.2f", scoreRatio);
|
double roundedScoreRatio = Math.round(scoreRatio * 100.0) / 100.0; // 四舍五入到2位小数
|
||||||
|
|
||||||
return formattedScoreRatio;
|
return roundedScoreRatio*score;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.file;
|
package pc.exam.pp.module.judgement.controller.service.file;
|
||||||
|
|
||||||
|
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -11,7 +13,7 @@ public interface IFileServerice {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
String run_file_point() throws IOException;
|
double run_file_point(double score,File file, ExamQuestion question) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.mysql;
|
package pc.exam.pp.module.judgement.controller.service.mysql;
|
||||||
|
|
||||||
|
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -9,7 +10,7 @@ import java.util.List;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
public interface IMysqlServerice {
|
public interface IMysqlServerice {
|
||||||
AtomicInteger Judgement() throws IOException, SQLException;
|
double Judgement(double sorce, ExamQuestion examQuestion) throws IOException, SQLException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package pc.exam.pp.module.judgement.controller.service.mysql;
|
package pc.exam.pp.module.judgement.controller.service.mysql;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestion;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionAnswer;
|
||||||
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionKeyword;
|
import pc.exam.pp.module.exam.dal.dataobject.ExamQuestionKeyword;
|
||||||
import pc.exam.pp.module.judgement.controller.utils.Mysql.MySQLExporterUtil;
|
import pc.exam.pp.module.judgement.controller.utils.Mysql.MySQLExporterUtil;
|
||||||
@@ -28,7 +29,7 @@ public class MysqlServericeImpl implements IMysqlServerice {
|
|||||||
static String databaseName;
|
static String databaseName;
|
||||||
static String answerLogPath = "answerLogMysql.txt"; // 文件路径
|
static String answerLogPath = "answerLogMysql.txt"; // 文件路径
|
||||||
@Override
|
@Override
|
||||||
public AtomicInteger Judgement() throws IOException, SQLException {
|
public double Judgement(double score, ExamQuestion examQuestion) throws IOException, SQLException {
|
||||||
|
|
||||||
|
|
||||||
AtomicInteger totalScoreAnswer= new AtomicInteger();
|
AtomicInteger totalScoreAnswer= new AtomicInteger();
|
||||||
@@ -796,10 +797,20 @@ public class MysqlServericeImpl implements IMysqlServerice {
|
|||||||
System.out.println("文件不存在: " + fileback);
|
System.out.println("文件不存在: " + fileback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String totalscore = "44";
|
||||||
|
double Score = score * (totalScoreAnswer.get() / Double.parseDouble(totalscore));
|
||||||
|
|
||||||
|
|
||||||
|
return Score;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return totalScoreAnswer;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将指定内容追加写入到指定文件中。
|
* 将指定内容追加写入到指定文件中。
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import pc.exam.pp.module.exam.service.question.IExamQuestionService;
|
|||||||
import pc.exam.pp.module.exam.service.stu_paper_file.StuPaperFileService;
|
import pc.exam.pp.module.exam.service.stu_paper_file.StuPaperFileService;
|
||||||
import pc.exam.pp.module.infra.dal.dataobject.config.ConfigDO;
|
import pc.exam.pp.module.infra.dal.dataobject.config.ConfigDO;
|
||||||
import pc.exam.pp.module.infra.service.config.ConfigService;
|
import pc.exam.pp.module.infra.service.config.ConfigService;
|
||||||
|
import pc.exam.pp.module.judgement.controller.service.browser.IBrowserServerice;
|
||||||
|
import pc.exam.pp.module.judgement.controller.service.file.IFileServerice;
|
||||||
|
import pc.exam.pp.module.judgement.controller.service.mysql.IMysqlServerice;
|
||||||
import pc.exam.pp.module.judgement.service.c_programming.JudgementService;
|
import pc.exam.pp.module.judgement.service.c_programming.JudgementService;
|
||||||
import pc.exam.pp.module.judgement.service.wps_word.JudgementWpsWordService;
|
import pc.exam.pp.module.judgement.service.wps_word.JudgementWpsWordService;
|
||||||
|
|
||||||
@@ -35,7 +38,12 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
JudgementService judgementService;
|
JudgementService judgementService;
|
||||||
@Resource
|
@Resource
|
||||||
JudgementWpsWordService judgementWpsWordService;
|
JudgementWpsWordService judgementWpsWordService;
|
||||||
|
@Resource
|
||||||
|
IMysqlServerice mysqlServerice;
|
||||||
|
@Resource
|
||||||
|
IFileServerice fileServerice;
|
||||||
|
@Resource
|
||||||
|
IBrowserServerice browserServerice;
|
||||||
@Override
|
@Override
|
||||||
public String downloadStudentFile(String fileUrl, String filePath) {
|
public String downloadStudentFile(String fileUrl, String filePath) {
|
||||||
try {
|
try {
|
||||||
@@ -187,7 +195,30 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
|||||||
score += wps_word_score;
|
score += wps_word_score;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// D:\1d70c404e6d42d144d0028496e893565dd2dec447f7e9b1db66466f00472424d\160\cb3cc9089b104a1e9e92deb330d0cfe8\d9f988d5ae6d435ba12d4d979d044219\stu
|
||||||
|
//windows文件处理
|
||||||
|
if (file_one.getName().equals("stu")) {
|
||||||
|
File win_file = new File(file_one.getPath());
|
||||||
|
double win_file_score = fileServerice.run_file_point(20.0,win_file, examQuestion);
|
||||||
|
score += win_file_score;
|
||||||
|
|
||||||
|
}
|
||||||
|
System.out.println(file_one);
|
||||||
|
//浏览器操作
|
||||||
|
// if ("浏览器网络题".equals(examQuestion.getCourseName()+examQuestion.getSubjectName())){
|
||||||
|
if (file_one.getName().equals("edge")) {
|
||||||
|
File edge_file = new File(file_one.getPath());
|
||||||
|
|
||||||
|
double browse_score= browserServerice.Judgement(20.0,edge_file,examQuestion);
|
||||||
|
score += browse_score;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ExamQuestion mysql=new ExamQuestion();
|
||||||
|
double judgement = mysqlServerice.Judgement(20, mysql);
|
||||||
|
score+=judgement;
|
||||||
|
|
||||||
}
|
}
|
||||||
return CommonResult.success(score);
|
return CommonResult.success(score);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user