【修改】增加注释,试卷任务下想同题型判断

This commit is contained in:
YOHO\20373
2025-06-03 16:37:20 +08:00
parent 528440bbde
commit 0a29a9a3a9
22 changed files with 429 additions and 103 deletions

View File

@@ -35,55 +35,55 @@ import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_MONITOR_TI
@RequestMapping("/exam/monitor")
@Validated
public class MonitorController {
@Resource
private MonitorService monitorService;
@Resource
private MonitorService monitorService;
@PostMapping("/create")
@Operation(summary = "创建监控管理")
public CommonResult<String> createMonitor(@Valid @RequestBody MonitorSaveReqVO createReqVO) {
return success(monitorService.createMonitor(createReqVO));
}
@PostMapping("/create")
@Operation(summary = "创建监控管理")
public CommonResult<String> createMonitor(@Valid @RequestBody MonitorSaveReqVO createReqVO) {
return success(monitorService.createMonitor(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新监控管理")
public CommonResult<Boolean> updateMonitor(@Valid @RequestBody MonitorSaveReqVO updateReqVO) {
monitorService.updateMonitor(updateReqVO);
return success(true);
}
@PutMapping("/update")
@Operation(summary = "更新监控管理")
public CommonResult<Boolean> updateMonitor(@Valid @RequestBody MonitorSaveReqVO updateReqVO) {
monitorService.updateMonitor(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除监控管理")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteMonitor(@RequestParam("id") String id) {
monitorService.deleteMonitor(id);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除监控管理")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteMonitor(@RequestParam("id") String id) {
monitorService.deleteMonitor(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得监控管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<MonitorRespVO> getMonitor(@RequestParam("id") String id) {
MonitorDO monitor = monitorService.getMonitor(id);
return success(BeanUtils.toBean(monitor, MonitorRespVO.class));
}
@GetMapping("/get")
@Operation(summary = "获得监控管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<MonitorRespVO> getMonitor(@RequestParam("id") String id) {
MonitorDO monitor = monitorService.getMonitor(id);
return success(BeanUtils.toBean(monitor, MonitorRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得监控管理分页")
public CommonResult<PageResult<MonitorRespVO>> getMonitorPage(@Valid MonitorPageReqVO pageReqVO) {
PageResult<MonitorDO> pageResult = monitorService.getMonitorPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MonitorRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得监控管理分页")
public CommonResult<PageResult<MonitorRespVO>> getMonitorPage(@Valid MonitorPageReqVO pageReqVO) {
PageResult<MonitorDO> pageResult = monitorService.getMonitorPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MonitorRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出监控管理 Excel")
@ApiAccessLog(operateType = EXPORT)
public void exportMonitorExcel(@Valid MonitorPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<MonitorDO> list = monitorService.getMonitorPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "监控管理.xls", "数据", MonitorRespVO.class,
BeanUtils.toBean(list, MonitorRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出监控管理 Excel")
@ApiAccessLog(operateType = EXPORT)
public void exportMonitorExcel(@Valid MonitorPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<MonitorDO> list = monitorService.getMonitorPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "监控管理.xls", "数据", MonitorRespVO.class,
BeanUtils.toBean(list, MonitorRespVO.class));
}
@PostMapping("/stuMonitor")
@Operation(summary = "学生端进入考试返回值")

View File

@@ -85,7 +85,7 @@ public class EducationPaperController
}
/**
* 学生端返回一张试卷
* 学生端根据任务id返回 考试信息
*/
@GetMapping("/stuInfoPaper")
public CommonResult stuInfoPaper(@RequestParam("taskid") String taskid)
@@ -132,8 +132,11 @@ public class EducationPaperController
}
/**
* 抽卷方式调整
* @param educationPaper
* @return
*/
@PostMapping("/update")
public CommonResult update(@RequestBody EducationPaper educationPaper)
{
@@ -197,9 +200,13 @@ public class EducationPaperController
return CommonResult.success(educationPaperService.getPaperByTaskIdByType(requestData.getTaskId(), requestData.getRows()));
}
/**
* 更改试卷任务状态
* @param statusDto
* @return
*/
@PutMapping("/updatePaperStatus") // 更符合RESTful规范
@PutMapping("/updatePaperStatus")
public CommonResult updateTaskStatus(@RequestBody StatusDto statusDto) { // 改为Integer类型
return CommonResult.success(
educationPaperService.changeStatus(statusDto.getPaperId(), statusDto.getStatus())
@@ -207,7 +214,11 @@ public class EducationPaperController
}
/**
* 学生端 返回试卷任务列表
* @param paperPageVo
* @return
*/
@GetMapping("/stulist")
public CommonResult<PageResult<EducationPaperStuDto>> stulist(PaperPageVo paperPageVo)
{

View File

@@ -62,6 +62,11 @@ public class EducationPaperParamController
return CommonResult.success(educationPaperParamService.deleteEducationPaperParamByParamIds(paramIds));
}
/**
* 步骤条 (考场)
* @param taskId
* @return
*/
@GetMapping( "/check-can-enter-step4/{taskId}")
public CommonResult ckeckSession(@PathVariable("taskId") String taskId){
EducationPaperParam educationPaperParam = educationPaperParamService.selectEducationPaperParamByTaskId(taskId);
@@ -74,6 +79,11 @@ public class EducationPaperParamController
}
return CommonResult.success("200");
}
/**
* 步骤条 (考场)
* @param taskId
* @return
*/
@GetMapping( "/check-can-enter-step4NoMsg/{taskId}")
public CommonResult ckeckSessionNoMsg(@PathVariable("taskId") String taskId){
EducationPaperParam educationPaperParam = educationPaperParamService.selectEducationPaperParamByTaskId(taskId);

View File

@@ -131,11 +131,22 @@ public class EducationPaperPersonController
}
/**
* 删除场次学生
* @param reqVO
* @return
*/
@DeleteMapping("/removeSessionStu")
public CommonResult<Integer> removeSessionStu(@RequestBody StudentSessionReqVO reqVO) {
return CommonResult.success(educationPaperPersonService.removeSessionStu(reqVO));
}
/**
* 删除任务学生
* @param deleteRequestVo
* @return
*/
@DeleteMapping("/removeTaskStu")
public CommonResult<Integer> removeTaskStu(@RequestBody DeleteRequestVo deleteRequestVo) {
return CommonResult.success(educationPaperPersonService.removeTaskStu(deleteRequestVo));

View File

@@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.*;
import pc.exam.pp.framework.common.pojo.CommonResult;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperScheme;
import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask;
import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperSchemeMapper;
import pc.exam.pp.module.exam.service.paper.IEducationPaperSchemeService;
import pc.exam.pp.module.exam.service.paper.IEducationPaperService;
import pc.exam.pp.module.exam.service.paper.IEducationPaperTaskService;
@@ -13,6 +14,8 @@ import java.util.List;
import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_TASK_DEL_EXISTS;
import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_TASK_ADD_EXISTS;
import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_SCHEMES_ADD_EXISTS;
/**
* 试卷方案Controller
@@ -30,6 +33,8 @@ public class EducationPaperSchemeController
private IEducationPaperService educationPaperService;
@Autowired
private IEducationPaperTaskService educationPaperTaskService;
@Autowired
private EducationPaperSchemeMapper educationPaperSchemeMapper;
/**
* 查询试卷方案列表
*/
@@ -70,13 +75,23 @@ public class EducationPaperSchemeController
EducationPaperTask educationPaperTask = educationPaperTaskService.selectEducationPaperTaskByTaskId(educationPaperScheme.getTaskId());
String taskType = educationPaperTask.getTaskType();
if ( "0".equals(taskType)||"1".equals(taskType)||"3".equals(taskType)) {
//有卷子列表的 要判断方案下是否有卷子
if ("0".equals(taskType)||"1".equals(taskType)||"3".equals(taskType)) {
List<String> strings = educationPaperService.selectPaperByTaskId(educationPaperScheme.getTaskId());
if (strings!=null&&strings.size()>0){
return CommonResult.error(DEMO03_PAPER_TASK_ADD_EXISTS);
}
}
List<EducationPaperScheme> educationPaperSchemes = educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(educationPaperScheme.getTaskId());
//判断 方案下 是否有同题型
String spName = educationPaperScheme.getSpName();
boolean exists = educationPaperSchemes.stream()
.anyMatch(scheme -> spName.equals(scheme.getSpName()));
if (exists) {
return CommonResult.error(DEMO03_PAPER_SCHEMES_ADD_EXISTS);
}
return CommonResult.success(educationPaperSchemeService.insertEducationPaperScheme(educationPaperScheme));
}

View File

@@ -133,6 +133,11 @@ public class EducationPaperSessionController
return CommonResult.success("修改成功");
}
/**
* 更改状态
* @param statusDto
* @return
*/
@PutMapping("/updateSessionStatus")
public CommonResult updateSessionStatus(@RequestBody StatusDto statusDto) {
return CommonResult.success(

View File

@@ -99,6 +99,9 @@ public class EducationPaperTaskController
{
return CommonResult.success(educationPaperTaskService.deleteEducationPaperTaskByTaskId(taskId));
}
/**
* 批量删除试卷任务
*/
@DeleteMapping("/{taskIds}")
public CommonResult removeIds(@PathVariable String[] taskIds )
{
@@ -152,16 +155,20 @@ public class EducationPaperTaskController
}
/**
* 模板库 复制
* @param tempDto
* @return
*/
@PostMapping("/submitSelection")
public CommonResult submitSelection(@RequestBody TempDto tempDto) {
System.out.println("接收到的任务ID: " + tempDto.getTaskId());
System.out.println("接收到的选项: " + tempDto.getOptions());
System.out.println("接收到的选项: " + tempDto.getOptions());
String taskId = tempDto.getTaskId();
if (taskId == null || taskId.trim().isEmpty()) {
return CommonResult.error(INTERNAL_SERVER_ERROR.getCode(),"缺失模板方案参数Id!");
}
List<String> options = tempDto.getOptions();
List<String> options = tempDto.getOptions();
if (options!=null&&options.size()>0){
educationPaperTaskService.submitSelection(tempDto);
@@ -174,6 +181,11 @@ public class EducationPaperTaskController
return CommonResult.success("复制成功");
}
/**
* 更改 任务状态
* @param statusDto
* @return
*/
@PutMapping("/updateTaskStatus")
public CommonResult<Boolean> updateTaskStatus(@RequestBody StatusDto statusDto) {
return CommonResult.success(
@@ -182,6 +194,11 @@ public class EducationPaperTaskController
}
/**
* 学生端 根据taskid返回 试卷信息
* @param taskId
* @return
*/
@GetMapping(value = "/getPaperBytaskId")
public CommonResult getPaperBytaskId(@RequestParam(value = "taskId") String taskId)
{

View File

@@ -94,9 +94,9 @@ public interface EducationPaperMapper extends BaseMapperX<EducationPaper>
,@Param("tId") Long tId );
String selectTaskIdByPaperId(String paperId);
//查找方案下所有试卷id
List<String> selectPaperByTaskId(String taskId);
//根据试卷id批量设置试卷格式
public int updateEducationByids(@Param("strings")List<String> strings);
List<String> selectPaperRandomByTaskId(String taskId);
@@ -105,25 +105,62 @@ public interface EducationPaperMapper extends BaseMapperX<EducationPaper>
void updatePaperGuByRollup(String taskId);
/**
* 根据试卷任务id查找试卷id集合
* @param taskId
* @return
*/
List<String> selectPaperByTaskIdAndRoll(@Param("taskId")String taskId);
//查找该方案所有的试卷
List<EducationPaper> getPaperByTaskIdByType(String taskId);
/**
* 查找选中方案下已分配的试卷
* @param row
* @return
*/
String getSelectPaperIdBySchemeIds(String row);
/**
* 批量设置试卷抽卷方式(自选)
* @param strings
* @return
*/
int updateEducationByidsThree(@Param("strings")List<String> strings);
/**
* 分局任务id查找任务下的 试卷
* @param taskId
* @return
*/
List<EducationPaper> selectPaperListByTaskId(String taskId);
/**
* 批量插入试卷
* @param educationPapers
*/
void insertEducationPaperList(List<EducationPaper> educationPapers);
/**
* 改变试卷状态
* @param paperId
* @param status
* @return
*/
int changeStatus(@Param("paperId") String paperId
,@Param("status") String status);
/**
* 查找试卷个数
* @return
*/
int selectCountPaperList();
/**
* 查找试卷列表
* @param paperPageVo
* @return
*/
default PageResult<EducationPaper> selectStuEducationPaperList(PaperPageVo paperPageVo) {
return selectPage(paperPageVo, new LambdaQueryWrapperX<EducationPaper>()
.likeIfPresent(EducationPaper::getTaskId, paperPageVo.getTaskId())
@@ -131,7 +168,9 @@ public interface EducationPaperMapper extends BaseMapperX<EducationPaper>
.eq(EducationPaper::getStatus, 0)
);
}
/**
* 根据方案获取试卷下拉
*/
List<PaperIdAndNum> selectPaperIdAndNumByTaskId(String taskId);
}

View File

@@ -65,6 +65,11 @@ public interface EducationPaperParamMapper
*/
public int deleteEducationPaperParamByParamIds(String[] paramIds);
/**
* 根据任务id查找 试卷任务参数对象
* @param taskId
* @return
*/
EducationPaperParam selectEducationPaperParamByTaskId(String taskId);
}

View File

@@ -78,46 +78,125 @@ public interface EducationPaperPersonMapper
public int deleteEducationPaperPersonByTaskIds(String[] taskIds);
/**
* 根据用户id查找用户信息
* @param personId
* @return
*/
PersonRepDto selectUserById(String personId);
/**
* 查找 班级名称
* @param classId
* @return
*/
String selectUserClassName(Long classId);
/**
* 查找试卷人员分配对象列表
* @param examPersonVo
* @return
*/
List<EducationPaperPerson> selectEducationPaperPersonBySessionId(ExamPersonVo examPersonVo);
/**
* 查找试卷人员分配对象列表(分配该场次的人员)
* @param sessionStuPageReqVO
* @return
*/
List<PersonRepDto> selectEducationPaperPersonByNotInSessionId(SessionStuPageReqVO sessionStuPageReqVO);
/**
* 根据班级名称找id
* @param className
* @return
*/
Long selectUserClassIdByName(String className);
/**
* 批量插入试卷人员分配对象
* @param educationPaperPeople
*/
void insertEducationPaperPersonList(List<EducationPaperPerson> educationPaperPeople);
/**
* 删除场次的试卷人员分配对象
* @param reqVO
* @return
*/
int removeSessionStu(StudentSessionReqVO reqVO);
/**
* 批量删除场次
* @param sessionIds
*/
void deleteEducationPaperPersonBySessionkIds(String[] sessionIds);
/**
* 根据试卷任务id和学生id查找卷人员分配对象
* @param taskId
* @param studentId
* @return
*/
EducationPaperPerson selectByTaskIdAndPersonId(@Param("taskId") String taskId, @Param("studentId") String studentId);
/**
* 根据试卷任务id和学生id更新试卷人员分配对象
* @param existing
*/
void updateByTaskIdAndStuId(EducationPaperPerson existing);
/**
* 批量删除 场次分配的学生
* @param deleteRequestVo
* @return
*/
int removeTaskStu(DeleteRequestVo deleteRequestVo);
/**
* 查找试卷人员分配对象列表(没有分配该场次的人员)
* @param sessionStuPageReqVO
* @return
*/
List<PersonRepDto> selectEducationPaperPersonBySessionIdNotIn(SessionStuPageReqVO sessionStuPageReqVO);
/**
* 根据试卷任务id查找该任务下的 学生id
* @param taskId
* @return
*/
List<String> selectStuIdByTaskId(String taskId);
/**
* 根据学生id查找该学生分配的试卷任务列表
* @param loginUserId
* @return
*/
List<String> selectTaskIdByStuid(Long loginUserId);
/**
* 根据场次id返回数量
* @param sessionId
* @return
*/
long selectEducationPaperPersonBySessionIdTotal(String sessionId);
/**
* 根据试卷任务id返回数量
* @param taskId
* @return
*/
long selectEducationPaperPersonByTaskIdTotal(String taskId);
/**
* 查找 不在该场次或没有分配场次学生的个数
* @param sessionStuPageReqVO
* @return
*/
long selectEducationPaperPersonByNotInSessionIdTotal(SessionStuPageReqVO sessionStuPageReqVO);
/**
* 查找分配该场次学生的个数
* @param sessionStuPageReqVO
* @return
*/
long selectEducationPaperPersonBySessionIdNotInTotal(SessionStuPageReqVO sessionStuPageReqVO);
}

View File

@@ -64,16 +64,38 @@ public interface EducationPaperQuMapper
*/
public int deleteEducationPaperQuByPaperIds(String[] paperIds);
/**
* 批量插入
* @param educationPaperQus
*/
void insertEducationPaperQuList(List<EducationPaperQu> educationPaperQus);
/**
* 根据试卷id返回 该试卷下的试题id
* @param paperId
* @return
*/
List<String> selectPaperQuByPaperId(String paperId);
/**
* 根据试卷id返回试卷试题对象集合
* @param paperId
* @return
*/
List<EducationPaperQu> selectPaperQuListByPaperId(String paperId);
/**
* 改变试卷状态
* @param changePaperQuVo
* @return
*/
boolean changePaperQu(ChangePaperQuVo changePaperQuVo);
/**
* 随机抽取一个试题
* @param changePaperQuVo
* @return
*/
String selectRamdomQuId(ChangePaperQuVo changePaperQuVo);

View File

@@ -64,8 +64,17 @@ public interface EducationPaperSchemeMapper
*/
public int deleteEducationPaperSchemeBySchemeIds(String[] schemeIds);
/**
* 根据试卷任务id查询 试卷方案集合
* @param taskid
* @return
*/
List<EducationPaperScheme> selectEducationPaperTaskByTaskId(String taskid);
/**
* 批量插入 试卷方案
* @param educationPaperSchemeList
*/
void insertEducationPaperSchemeList(List<EducationPaperScheme> educationPaperSchemeList);
}

View File

@@ -69,15 +69,20 @@ public interface EducationPaperSessionMapper extends BaseMapperX<EducationPaperS
* @return 结果
*/
public int deleteEducationPaperSessionBySessionIds(String[] sessionIds);
//查找试卷场次对象集合
public List<EducationPaperSession> selectEducationPaperSessionByTaskId(String taskId);
//批量插入试卷场次对象
void insertEducationPaperSessionList(List<EducationPaperSession> educationPaperSessions);
/**
* 改变状态
* @param sessionId
* @param status
* @return
*/
int changeStatus(@Param("sessionId") String sessionId
,@Param("status") String status);
//分页查找
default PageResult<EducationPaperSession> selectEducationPaperSessionList(EducationPaperSessionVo pageReqVO) {
return selectPage(pageReqVO, new LambdaQueryWrapperX<EducationPaperSession>()
.likeIfPresent(EducationPaperSession::getStatus , pageReqVO.getStatus())
@@ -90,7 +95,7 @@ public interface EducationPaperSessionMapper extends BaseMapperX<EducationPaperS
);
}
//获得考试时间
Time getAnswerTime(String taskId);
}

View File

@@ -81,37 +81,69 @@ public interface EducationPaperTaskMapper extends BaseMapperX<EducationPaperTask
* @return 结果
*/
public int deleteEducationPaperTaskByTaskIds(@Param("taskIds") String[] taskIds);
/**
* 获取专业列表
*/
List<String> getSpecialityList();
/**
* 获取题型列表
*/
List<String> getCourseList();
/**
* 获取关键字
*/
List<String> getKeywords();
/**
* 获取知识点
*/
List<ExamPaperKnowledgePoints> getPoints(@Param("id") Long id);
/*
按照方案返回试题数量
*/
Integer getQuCount(@Param("taskSpecialty") String taskSpecialty
,@Param("spName") String spName
,@Param("quLevel")String quLevel
,@Param("pointName") List<String> pointName
,@Param("keyword") List<String> keyword
,@Param("tId") Long tId);
//根据id结合查找 知识点 名称
List<String> selectPointByid(List<String> list);
//根据名称查找 知识点 id
Long getPointIdByName(String name);
/**
* 改变试卷任务状态
*/
boolean changeStatus(@Param("taskId")String taskId,@Param("status") String status);
/**
* 根据试卷任务id返回名称
* @param taskId
* @return
*/
String selectEducationPaperTaskNameByid(String taskId);
/**
* 根据班级id返回对应班级名称
* @param classId
* @return
*/
String selectStuClassNameByClassId(Long classId);
/**
* 根据试卷种类 返回 试卷任务集合
* @param id
* @return
*/
List<EducationPaperTask> selectEducationPaperTaskByTaskType(String id);
/**
* 根据试卷任务id随机抽取 试卷id
* @param taskId
* @return
*/
String selectPaperQuByPaperId(String taskId);
}

View File

@@ -52,14 +52,14 @@ import java.util.List;
* @return 监控管理分页
*/
PageResult<MonitorDO> getMonitorPage(MonitorPageReqVO pageReqVO);
//学生端进入考试返回值
long getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo);
//学生端考试过程传试题
Boolean updateStuMonitor(StuMonitorQuVo stuMonitorQuVo);
//学生端结束考试返回值
void endStuMonitor(StuMonitorPaperEndVo stuMonitorPaperEndVo);
//根据种类获得试卷任务
List<EducationPaperTask> getPaperTaskList(String id);
//改变考生状态
Boolean updateMonitorStatus(StuMonitorStatusVo stuMonitorStatusVo);
}

View File

@@ -7,7 +7,7 @@ import pc.exam.pp.module.exam.dal.dataobject.monitor.MonitorDO;
import pc.exam.pp.module.exam.dal.dataobject.monitor.MonitorTaskDO;
public interface MonitorTaskService {
//获得监控管理分页
PageResult<MonitorTaskDO> getMonitorPage(PaperTaskPageVo pageReqVO);
}

View File

@@ -55,6 +55,8 @@ public class EducationPaperSchemeServiceImpl implements IEducationPaperSchemeSer
@Override
public int insertEducationPaperScheme(EducationPaperScheme educationPaperScheme) {
String uuid = IdUtils.simpleUUID();
educationPaperScheme.setSchemeId(uuid);

View File

@@ -364,7 +364,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService
List<EducationPaperScheme> educationPaperSchemeList= educationPaperSchemeMapper.selectEducationPaperTaskByTaskId(taskid);
List<String> examQuestionIds = new ArrayList<>();
int totalScore = 0;
int totalScore = 0;
for (EducationPaperScheme educationPaperScheme : educationPaperSchemeList) {
try {

View File

@@ -72,34 +72,59 @@ public interface IEducationPaperService
public int addPaperList(Integer num, String taskid, String taskSpecialty);
//查找方案下所有试卷id
List<String> selectPaperByTaskId(String taskId);
//根据试卷id批量设置试卷格式
public int updateEducationByids(List<String> strings);
List<String> selectPaperRandomByTaskId(String taskId);
//根据试卷id批量清空试卷格式
public int updateRandomByids(List<String> strings);
void updatePaperGuByRollup(String taskId);
//查找方案下所有不是此抽卷方式的试卷id
List<String> selectPaperByTaskIdAndRoll(String taskId);
/**
* 根据方案获取已经设置好的试卷
*/
PaperListResponseVo getPaperByTaskIdByType(String taskId, List<String> rows);
public int updateEducationByidsThree(List<String> strings);
/**
* 更改试卷任务状态
* @param paperId
* @param status
* @return
*/
int changeStatus(String paperId, String status);
/**
* 学生端 返回试卷任务列表
* @param paperPageVo
* @return
*/
PageResult<EducationPaperStuDto> selectStuEducationPaperList(PaperPageVo paperPageVo);
/**
* 学生端根据任务id返回 考试信息
* @param taskid
* @return
*/
ExamPaperVo stuInfoPaper(String taskid);
/**
* 下载试卷
* @param paperIds
* @param response
* @throws Exception
*/
void downloadWord(String[] paperIds, HttpServletResponse response) throws Exception;
/**
* 根据方案获取试卷下拉
*/
List<PaperIdAndNum> selectPaperIdAndNumByTaskId(String taskId);
}

View File

@@ -64,7 +64,18 @@ public interface IEducationPaperSessionService
*/
public int deleteEducationPaperSessionBySessionId(String sessionId);
/**
* 更改状态
* @param sessionId
* @param status
* @return
*/
int changeStatus(String sessionId, String status);
/**
* 根据任务id查找 考试时间
* @param taskId
* @return
*/
Time getAnswerTime(String taskId);
}

View File

@@ -67,24 +67,51 @@ public interface IEducationPaperTaskService
* @return 结果
*/
public int deleteEducationPaperTaskByTaskId(String taskId);
/**
* 获取专业列表
*/
List<String> getSpecialityList();
/**
* 获取题型列表
*/
List<String> getCourseList();
/**
* 获取关键字
*/
List<String> getKeywords();
/**
* 获取知识点
*/
List<ExamPaperKnowledgePoints> getPoints(String name);
/*
按照方案返回试题数量
*/
Integer getQuCount(SchemeParam param);
/**
* 模板库 复制
* @param tempDto
*/
void submitSelection(TempDto tempDto);
/**
* 改变试卷任务状态
* @param taskId
* @param status
* @return
*/
boolean changeStatus(String taskId, String status);
/**
* 学生端 根据试卷任务id返回 进入考试信息
* @param taskId
* @return
*/
ExamPaperVo selectPaperQuByPaperId(String taskId);
/**
* 查询试卷任务列表(学生端)
*/
PageResult<EducationPaperTask> selectEducationPaperTaskListByStu(PaperTaskPageVo educationPaperTask);
}

View File

@@ -77,6 +77,7 @@ public interface ErrorCodeConstants {
// ========== 试卷方案 1-001-901-900 ==========
ErrorCode DEMO03_PAPER_TASK_DEL_EXISTS = new ErrorCode(1-001-901-901, "该方案下已有试卷不能删除!");
ErrorCode DEMO03_PAPER_TASK_ADD_EXISTS = new ErrorCode(1-001-901-901, "该方案下已有试卷不能新增!");
ErrorCode DEMO03_PAPER_SCHEMES_ADD_EXISTS = new ErrorCode(1-001-902-902, "该方案下已有相同的题型!");
// ========== 监控管理 1-001-606-000 ==========
ErrorCode DEMO03_MONITOR_TIME_EXISTS = new ErrorCode(1-001-606-001, "该考试不在考场时间范围内!");
ErrorCode DEMO03_MONITOR_SESSION_EXISTS = new ErrorCode(1-001-606-002, "考生状态未在考试中!请联系管理员");