From dfd0cd9eb517540047ca29496b345e3688fbf808 Mon Sep 17 00:00:00 2001 From: "YOHO\\20373" <2037305722@qq.com> Date: Fri, 25 Apr 2025 15:51:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E8=AF=95?= =?UTF-8?q?=E5=8D=B7=E4=BB=BB=E5=8A=A1=E5=AE=8C=E6=95=B4=E7=89=88=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paper/EducationPaperParamController.java | 28 ++- .../paper/EducationPaperPersonController.java | 102 ++++++++--- .../EducationPaperSessionController.java | 7 +- .../paper/EducationPaperTaskController.java | 5 +- .../admin/paper/dto/PersonRepDto.java | 116 ++++++++++++ .../admin/paper/vo/DeleteRequestVo.java | 11 ++ .../admin/paper/vo/ExamPersonVo.java | 21 +++ .../admin/paper/vo/SessionStuPageReqVO.java | 53 ++++++ .../admin/paper/vo/StudentSessionReqVO.java | 13 ++ .../exam/dal/dataobject/EducationPaper.java | 2 + .../dal/dataobject/EducationPaperParam.java | 2 + .../dal/dataobject/EducationPaperPerson.java | 2 + ...nts.java => ExamPaperKnowledgePoints.java} | 2 +- .../dal/dataobject/ExamQuestionAnswer.java | 6 + .../paper/EducationPaperPersonMapper.java | 46 ++++- .../mysql/paper/EducationPaperTaskMapper.java | 5 +- .../EducationPaperPersonServiceImpl.java | 171 +++++++++++++++++- .../paper/EducationPaperServiceImpl.java | 1 + .../EducationPaperSessionServiceImpl.java | 6 +- .../paper/EducationPaperTaskServiceImpl.java | 3 +- .../paper/IEducationPaperPersonService.java | 23 ++- .../paper/IEducationPaperTaskService.java | 4 +- .../mapper/exam/EducationPaperMapper.xml | 9 +- .../mapper/exam/EducationPaperParamMapper.xml | 8 +- .../exam/EducationPaperPersonMapper.xml | 124 ++++++++++++- .../mapper/exam/EducationPaperTaskMapper.xml | 9 +- .../infra/enums/ErrorCodeConstants.java | 5 + .../exam-module-judgement-biz/pom.xml | 6 + .../src/main/resources/application.yaml | 1 - 29 files changed, 731 insertions(+), 60 deletions(-) create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PersonRepDto.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/DeleteRequestVo.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/ExamPersonVo.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/SessionStuPageReqVO.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/StudentSessionReqVO.java rename exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/{ExamKnowledgePoints.java => ExamPaperKnowledgePoints.java} (97%) diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperParamController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperParamController.java index 057da9a6..2b3bbd96 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperParamController.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperParamController.java @@ -1,12 +1,13 @@ package pc.exam.pp.module.exam.controller.admin.paper; +import org.checkerframework.checker.units.qual.C; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import pc.exam.pp.framework.common.pojo.CommonResult; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperParam; import pc.exam.pp.module.exam.service.paper.IEducationPaperParamService; - +import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_SESSION_EXISTS; /** * 通用参数Controller * @@ -60,5 +61,30 @@ public class EducationPaperParamController { return CommonResult.success(educationPaperParamService.deleteEducationPaperParamByParamIds(paramIds)); } + + @GetMapping( "/check-can-enter-step4/{taskId}") + public CommonResult ckeckSession(@PathVariable("taskId") String taskId){ + EducationPaperParam educationPaperParam = educationPaperParamService.selectEducationPaperParamByTaskId(taskId); + if (educationPaperParam==null){ + return CommonResult.error(DEMO03_PAPER_SESSION_EXISTS); + } + String isSession = educationPaperParam.getIsSession(); + if ("1".equals(isSession)){ + return CommonResult.error(DEMO03_PAPER_SESSION_EXISTS); + } + return CommonResult.success("200"); + } + @GetMapping( "/check-can-enter-step4NoMsg/{taskId}") + public CommonResult ckeckSessionNoMsg(@PathVariable("taskId") String taskId){ + EducationPaperParam educationPaperParam = educationPaperParamService.selectEducationPaperParamByTaskId(taskId); + if (educationPaperParam==null){ + return CommonResult.success("1_001_401_001"); + } + String isSession = educationPaperParam.getIsSession(); + if ("1".equals(isSession)){ + return CommonResult.success("1_001_401_001"); + } + return CommonResult.success("200"); + } } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperPersonController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperPersonController.java index ee4ea024..12709482 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperPersonController.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperPersonController.java @@ -1,15 +1,22 @@ package pc.exam.pp.module.exam.controller.admin.paper; -import jakarta.servlet.http.HttpServletResponse; -import lombok.extern.java.Log; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import pc.exam.pp.framework.common.pojo.CommonResult; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.common.util.object.BeanUtils; +import pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto; +import pc.exam.pp.module.exam.controller.admin.paper.vo.DeleteRequestVo; +import pc.exam.pp.module.exam.controller.admin.paper.vo.ExamPersonVo; +import pc.exam.pp.module.exam.controller.admin.paper.vo.SessionStuPageReqVO; +import pc.exam.pp.module.exam.controller.admin.paper.vo.StudentSessionReqVO; +import pc.exam.pp.module.exam.dal.dataobject.EducationPaperParam; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperPerson; +import pc.exam.pp.module.exam.service.paper.IEducationPaperParamService; import pc.exam.pp.module.exam.service.paper.IEducationPaperPersonService; -import java.util.ArrayList; +import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_SESSION_EXISTS; +import static pc.exam.pp.module.infra.enums.ErrorCodeConstants.DEMO03_PAPER_STUDENT_EXISTS; import java.util.List; /** @@ -26,6 +33,8 @@ public class EducationPaperPersonController private IEducationPaperPersonService educationPaperPersonService; // @Autowired // private IExamStuService examStuService; + @Autowired + private IEducationPaperParamService educationPaperParamService; /** * 查询试卷人员分配列表 */ @@ -47,14 +56,7 @@ public class EducationPaperPersonController // util.exportExcel(response, list, "试卷人员分配数据"); // } - /** - * 获取试卷人员分配详细信息 - */ - @GetMapping(value = "/{taskId}") - public CommonResult getInfo(@PathVariable("taskId") String taskId) - { - return CommonResult.success(educationPaperPersonService.selectEducationPaperPersonByTaskId(taskId)); - } + /** * 新增试卷人员分配 @@ -83,24 +85,64 @@ public class EducationPaperPersonController return CommonResult.success(educationPaperPersonService.deleteEducationPaperPersonByTaskIds(taskIds)); } -// @GetMapping("/getList") -// public CommonResult list(ExamStu examStu) { -// List list = examStuService.selectExamStuList(examStu, String.valueOf(getDeptId()), String.valueOf(getUserId())); -// -// List sessionDtos=new ArrayList<>(); -// if (list!=null&&list.size()>0){ -// for (ExamStu stu : list) { -// SessionDto sessionDto=new SessionDto(); -// sessionDto.setStuClass(); -// sessionDto. -// -// } -// -// -// } -// -// return success(); -// } + + /** + * 根据试卷任务获取人员分配列表 + */ + @GetMapping(value = "/{taskId}") + public CommonResult> getInfo(ExamPersonVo examPersonVo) + { + PageResult list = educationPaperPersonService.selectEducationPaperPersonByTaskId(examPersonVo.getTaskId()); + return CommonResult.success(BeanUtils.toBean(list, PersonRepDto.class)); + } + /** + * 根据试卷场次获取人员分配列表 + */ + @GetMapping(value = "/getSessionStu") + public CommonResult> getSessionStu(ExamPersonVo examPersonVo) { + PageResult list = educationPaperPersonService.selectEducationPaperPersonBySessionId(examPersonVo.getSessionId()); + + return CommonResult.success(BeanUtils.toBean(list, PersonRepDto.class)); + } + + /** + * 根据场次id,学生信息等多个查询条件 获取人员分配列表(获取没有分配场次的人员) + */ + @GetMapping(value = "/getSessionStuBySearch") + public CommonResult> getSessionStuBySearch(SessionStuPageReqVO sessionStuPageReqVO) { + PageResult list = educationPaperPersonService.selectEducationPaperPersonBySearch(sessionStuPageReqVO); + + return CommonResult.success(BeanUtils.toBean(list, PersonRepDto.class)); + } + + + /** + * 给任务场次分配学生 + * + * @param reqVO 包含学生id,场次id,试卷任务id + * @return + */ + @RequestMapping("/setSessionStu") + public CommonResult handleStudentSelection(@RequestBody StudentSessionReqVO reqVO) { + if (reqVO.getStudentIds()!=null&&reqVO.getStudentIds().size()>0){ + return CommonResult.success(educationPaperPersonService.setStuAndSession(reqVO)); + }else { + return CommonResult.error(DEMO03_PAPER_STUDENT_EXISTS); + } + + } + + @DeleteMapping("/removeSessionStu") + public CommonResult removeSessionStu(@RequestBody StudentSessionReqVO reqVO) { + return CommonResult.success(educationPaperPersonService.removeSessionStu(reqVO)); + + } + @DeleteMapping("/removeTaskStu") + public CommonResult removeTaskStu(@RequestBody DeleteRequestVo deleteRequestVo) { + return CommonResult.success(educationPaperPersonService.removeTaskStu(deleteRequestVo)); + + } + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperSessionController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperSessionController.java index e0b051f2..bfe77ba4 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperSessionController.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperSessionController.java @@ -130,11 +130,14 @@ public class EducationPaperSessionController return CommonResult.success("修改成功"); } - @PutMapping("/updateSessionStatus") // 更符合RESTful规范 - public CommonResult updateSessionStatus(@RequestBody StatusDto statusDto) { // 改为Integer类型 + @PutMapping("/updateSessionStatus") + public CommonResult updateSessionStatus(@RequestBody StatusDto statusDto) { return CommonResult.success( educationPaperSessionService.changeStatus(statusDto.getSessionId(), statusDto.getStatus()) ); } + + + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperTaskController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperTaskController.java index fa5961ca..97bb97e8 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperTaskController.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/EducationPaperTaskController.java @@ -123,7 +123,7 @@ public class EducationPaperTaskController /** * 获取知识点 */ - @GetMapping("/getPoints") + @GetMapping("/getPoints") public CommonResult getPoints (@RequestParam(value = "name") String name) { return CommonResult.success(educationPaperTaskService.getPoints(name)); @@ -171,4 +171,7 @@ public class EducationPaperTaskController ); } + + + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PersonRepDto.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PersonRepDto.java new file mode 100644 index 00000000..d7f74f8d --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/dto/PersonRepDto.java @@ -0,0 +1,116 @@ +package pc.exam.pp.module.exam.controller.admin.paper.dto; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; +import lombok.Data; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import pc.exam.pp.framework.common.enums.CommonStatusEnum; +import pc.exam.pp.module.system.enums.common.SexEnum; + +import java.time.LocalDateTime; +import java.util.Set; + +@Data +public class PersonRepDto { + + /** + * 用户ID + */ + @TableId + private Long id; + /** + * 用户账号 + */ + private String username; + /** + * 加密后的密码 + * + * 因为目前使用 {@link BCryptPasswordEncoder} 加密器,所以无需自己处理 salt 盐 + */ + private String password; + /** + * 用户昵称 + */ + private String nickname; + /** + * 备注 + */ + private String remark; + /** + * 部门 ID + */ + private Long deptId; + /** + * 班级 ID + */ + private Long classId; + + @TableField + private String className; + /** + * 岗位编号数组 + */ + @TableField(typeHandler = JacksonTypeHandler.class) + private Set postIds; + + /** + * 班级编号数组 + */ + @TableField(typeHandler = JacksonTypeHandler.class) + private Set classIds; + + /** + * 专业编号数组 + */ + @TableField(typeHandler = JacksonTypeHandler.class) + private Set specialtyIds; + + /** + * 用户类型 + */ + private String userType; + + /** + * 用户邮箱 + */ + private String email; + /** + * 手机号码 + */ + private String mobile; + /** + * 用户性别 + * + * 枚举类 {@link SexEnum} + */ + private Integer sex; + /** + * 用户头像 + */ + private String avatar; + /** + * 帐号状态 + * + * 枚举 {@link CommonStatusEnum} + */ + private Integer status; + /** + * 最后登录IP + */ + private String loginIp; + /** + * 最后登录时间 + */ + private LocalDateTime loginDate; + + /** 主键ID */ + private String sessionId; + + + /** 批次 */ + private String batch; + + private LocalDateTime createTime; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/DeleteRequestVo.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/DeleteRequestVo.java new file mode 100644 index 00000000..f30caa88 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/DeleteRequestVo.java @@ -0,0 +1,11 @@ +package pc.exam.pp.module.exam.controller.admin.paper.vo; + +import lombok.Data; + +import java.util.List; +@Data +public class DeleteRequestVo { + + private List studentIds; + private String taskId; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/ExamPersonVo.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/ExamPersonVo.java new file mode 100644 index 00000000..d6c9f56e --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/ExamPersonVo.java @@ -0,0 +1,21 @@ +package pc.exam.pp.module.exam.controller.admin.paper.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import pc.exam.pp.framework.common.pojo.PageParam; +@Schema(description = "试卷人员vo") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ExamPersonVo extends PageParam { + /* + 试卷任务Id + */ + private String taskId; + /* + 场次Id + */ + private String sessionId; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/SessionStuPageReqVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/SessionStuPageReqVO.java new file mode 100644 index 00000000..f4913bd8 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/SessionStuPageReqVO.java @@ -0,0 +1,53 @@ +package pc.exam.pp.module.exam.controller.admin.paper.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; +import pc.exam.pp.framework.common.pojo.PageParam; + +import java.time.LocalDateTime; + +import static pc.exam.pp.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +@Schema(description = "场次学生分页 Request VO") +@Data +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SessionStuPageReqVO extends PageParam { + + @Schema(description = "用户账号,模糊匹配", example = "exam") + private String username; + + + + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") + private Integer status; + + + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime startTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime endTime; + + + + @Schema(description = "类型") + private String userType; + + + private String className; + + private Long classId; + + private String sessionId; + + private String taskId; + + + +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/StudentSessionReqVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/StudentSessionReqVO.java new file mode 100644 index 00000000..235b53b9 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/paper/vo/StudentSessionReqVO.java @@ -0,0 +1,13 @@ +package pc.exam.pp.module.exam.controller.admin.paper.vo; + +import lombok.Data; + +import java.util.List; + +@Data +public class StudentSessionReqVO { + private List studentIds; + private String sessionId; + private String taskId; + private String batch; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaper.java index 147a1d85..3055486a 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaper.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaper.java @@ -1,5 +1,6 @@ package pc.exam.pp.module.exam.dal.dataobject; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -23,6 +24,7 @@ public class EducationPaper extends TenantBaseDO private static final long serialVersionUID = 1L; /** 主键ID */ + @TableId private String paperId; /** 试卷任务ID */ diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperParam.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperParam.java index 29d2e062..7a8b2862 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperParam.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperParam.java @@ -69,4 +69,6 @@ public class EducationPaperParam private String isConnect; + + private String isSession; } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperPerson.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperPerson.java index ff3e1235..405f28dc 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperPerson.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/EducationPaperPerson.java @@ -33,4 +33,6 @@ public class EducationPaperPerson //@Excel(name = "场次") private String sessionId; + + private String batch; } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamPaperKnowledgePoints.java similarity index 97% rename from exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java rename to exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamPaperKnowledgePoints.java index 47709c51..b8fc813f 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamPaperKnowledgePoints.java @@ -10,7 +10,7 @@ import pc.exam.pp.module.exam.controller.admin.paper.vo.TreeEntity; * @author pengchen * @date 2025-03-24 */ -public class ExamKnowledgePoints extends TreeEntity +public class ExamPaperKnowledgePoints extends TreeEntity { private static final long serialVersionUID = 1L; diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamQuestionAnswer.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamQuestionAnswer.java index 5653c53c..ac7c5e88 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamQuestionAnswer.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamQuestionAnswer.java @@ -3,8 +3,11 @@ package pc.exam.pp.module.exam.dal.dataobject; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.info.Contact; +import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -20,6 +23,8 @@ import pc.exam.pp.framework.mybatis.core.dataobject.BaseDO; @Data @Accessors(chain = true) @JsonInclude(JsonInclude.Include.NON_NULL) +@AllArgsConstructor +@NoArgsConstructor public class ExamQuestionAnswer { private static final long serialVersionUID = 1L; @@ -57,4 +62,5 @@ public class ExamQuestionAnswer private String sort; + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperPersonMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperPersonMapper.java index af32cb4a..60287fb1 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperPersonMapper.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperPersonMapper.java @@ -2,7 +2,20 @@ package pc.exam.pp.module.exam.dal.mysql.paper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; +import pc.exam.pp.framework.mybatis.core.query.MPJLambdaWrapperX; +import pc.exam.pp.framework.tenant.core.aop.TenantIgnore; +import pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto; +import pc.exam.pp.module.exam.controller.admin.paper.vo.DeleteRequestVo; +import pc.exam.pp.module.exam.controller.admin.paper.vo.SessionStuPageReqVO; +import pc.exam.pp.module.exam.controller.admin.paper.vo.StudentSessionReqVO; +import pc.exam.pp.module.exam.controller.admin.student.vo.StudentPageReqVO; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperPerson; +import pc.exam.pp.module.exam.dal.dataobject.student.StudentClassDO; +import pc.exam.pp.module.exam.dal.dataobject.student.StudentDO; +import pc.exam.pp.module.system.api.user.dto.AdminUserRespDTO; import java.util.List; @@ -22,7 +35,7 @@ public interface EducationPaperPersonMapper * @param taskId 试卷人员分配主键 * @return 试卷人员分配 */ - public EducationPaperPerson selectEducationPaperPersonByTaskId(String taskId); + List selectEducationPaperPersonByTaskId(String taskId); /** * 查询试卷人员分配列表 @@ -63,4 +76,35 @@ public interface EducationPaperPersonMapper * @return 结果 */ public int deleteEducationPaperPersonByTaskIds(String[] taskIds); + + + + + + + PersonRepDto selectUserById(String personId); + + String selectUserClassName(Long classId); + + List selectEducationPaperPersonBySessionId(String sessionId); + + List selectEducationPaperPersonByNotInSessionId(SessionStuPageReqVO sessionStuPageReqVO); + + Long selectUserClassIdByName(String className); + + + void insertEducationPaperPersonList(List educationPaperPeople); + + int removeSessionStu(StudentSessionReqVO reqVO); + + void deleteEducationPaperPersonBySessionkIds(String[] sessionIds); + + EducationPaperPerson selectByTaskIdAndPersonId(@Param("taskId") String taskId, @Param("studentId") String studentId); + + void updateByTaskIdAndStuId(EducationPaperPerson existing); + + int removeTaskStu(DeleteRequestVo deleteRequestVo); + + List selectEducationPaperPersonBySessionIdNotIn(SessionStuPageReqVO sessionStuPageReqVO); + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperTaskMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperTaskMapper.java index 8a5b9eac..a7b0af7d 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperTaskMapper.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/paper/EducationPaperTaskMapper.java @@ -8,9 +8,8 @@ import org.apache.ibatis.annotations.Param; import pc.exam.pp.framework.common.pojo.PageResult; import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; import pc.exam.pp.framework.mybatis.core.query.LambdaQueryWrapperX; -import pc.exam.pp.framework.tenant.core.aop.TenantIgnore; import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo; -import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; +import pc.exam.pp.module.exam.dal.dataobject.ExamPaperKnowledgePoints; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask; /** @@ -88,7 +87,7 @@ public interface EducationPaperTaskMapper extends BaseMapperX getKeywords(); - List getPoints(@Param("id") Long id); + List getPoints(@Param("id") Long id); Integer getQuCount(@Param("taskSpecialty") String taskSpecialty ,@Param("spName") String spName diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperPersonServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperPersonServiceImpl.java index 29e5dafb..ea208bfc 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperPersonServiceImpl.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperPersonServiceImpl.java @@ -1,11 +1,25 @@ package pc.exam.pp.module.exam.service.paper; +import com.alibaba.excel.util.StringUtils; +import jakarta.annotation.Resource; +import org.apache.poi.hssf.record.DVALRecord; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto; +import pc.exam.pp.module.exam.controller.admin.paper.vo.DeleteRequestVo; +import pc.exam.pp.module.exam.controller.admin.paper.vo.SessionStuPageReqVO; +import pc.exam.pp.module.exam.controller.admin.paper.vo.StudentSessionReqVO; +import pc.exam.pp.module.exam.controller.admin.student.vo.StudentPageReqVO; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperPerson; +import pc.exam.pp.module.exam.dal.dataobject.student.StudentDO; import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperPersonMapper; +import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperSessionMapper; +import pc.exam.pp.module.exam.dal.mysql.student.StudentMapper; +import pc.exam.pp.module.system.api.user.dto.AdminUserRespDTO; +import java.util.ArrayList; import java.util.List; /** @@ -20,6 +34,9 @@ public class EducationPaperPersonServiceImpl implements IEducationPaperPersonSer @Autowired private EducationPaperPersonMapper educationPaperPersonMapper; + + @Autowired + private EducationPaperSessionMapper educationPaperSessionMapper; /** * 查询试卷人员分配 * @@ -27,11 +44,143 @@ public class EducationPaperPersonServiceImpl implements IEducationPaperPersonSer * @return 试卷人员分配 */ @Override - public EducationPaperPerson selectEducationPaperPersonByTaskId(String taskId) + public PageResult selectEducationPaperPersonByTaskId(String taskId) { - return educationPaperPersonMapper.selectEducationPaperPersonByTaskId(taskId); + List educationPaperPeoples= educationPaperPersonMapper.selectEducationPaperPersonByTaskId(taskId); + List personRepDtos=new ArrayList<>(); + if (educationPaperPeoples!=null&&educationPaperPeoples.size()>0){ + for (EducationPaperPerson educationPaperPerson : educationPaperPeoples) { + PersonRepDto personRepDto = educationPaperPersonMapper.selectUserById(educationPaperPerson.getPersonId()); + + if ( StringUtils.isNotBlank(personRepDto.getClassId().toString())){ + personRepDto.setClassName(educationPaperPersonMapper.selectUserClassName(personRepDto.getClassId())) ; + } + + personRepDto.setSessionId(educationPaperPerson.getSessionId()); + personRepDto.setBatch(educationPaperPerson.getBatch()); + personRepDtos.add(personRepDto); + } + } + PageResult pageResult=new PageResult<>(); + pageResult.setList(personRepDtos); + pageResult.setTotal((long) personRepDtos.size()); + return pageResult; + } + + @Override + public PageResult selectEducationPaperPersonBySessionId(String sessionId) { + List educationPaperPeoples= educationPaperPersonMapper.selectEducationPaperPersonBySessionId(sessionId); + List personRepDtos=new ArrayList<>(); + if (educationPaperPeoples!=null&&educationPaperPeoples.size()>0){ + for (EducationPaperPerson educationPaperPerson : educationPaperPeoples) { + PersonRepDto personRepDto = educationPaperPersonMapper.selectUserById(educationPaperPerson.getPersonId()); + + if ( StringUtils.isNotBlank(personRepDto.getClassId().toString())){ + personRepDto.setClassName(educationPaperPersonMapper.selectUserClassName(personRepDto.getClassId())) ; + } + + personRepDto.setSessionId(educationPaperPerson.getSessionId()); + personRepDto.setBatch(educationPaperPerson.getBatch()); + personRepDtos.add(personRepDto); + } + } + PageResult pageResult=new PageResult<>(); + pageResult.setList(personRepDtos); + pageResult.setTotal((long) personRepDtos.size()); + return pageResult; + } + @Override + public PageResult selectEducationPaperPersonBySearch(SessionStuPageReqVO sessionStuPageReqVO) { + String className = sessionStuPageReqVO.getClassName(); + if (StringUtils.isNotBlank(className)) { + Long classId=educationPaperPersonMapper.selectUserClassIdByName(className); + sessionStuPageReqVO.setClassId(classId); + } + List personRepDtos; + + String sessionId = sessionStuPageReqVO.getSessionId(); + if (StringUtils.isNotBlank(sessionId)){ + personRepDtos = educationPaperPersonMapper.selectEducationPaperPersonByNotInSessionId(sessionStuPageReqVO); + } + else { + personRepDtos = educationPaperPersonMapper.selectEducationPaperPersonBySessionIdNotIn(sessionStuPageReqVO); + } + if (personRepDtos!=null&&personRepDtos.size()>0){ + for (PersonRepDto personRepDto : personRepDtos) { + personRepDto.setClassName(educationPaperPersonMapper.selectUserClassName(personRepDto.getClassId())) ; + } + } + PageResult pageResult=new PageResult<>(); + pageResult.setList(personRepDtos); + pageResult.setTotal((long) personRepDtos.size()); + return pageResult; + } + + @Override + public String setStuAndSession(StudentSessionReqVO reqVO) { + //先根据场次id 把该场次的 + //选中学生的id + List studentIds = reqVO.getStudentIds(); + //考场id + String sessionId = reqVO.getSessionId(); + //试卷任务id + String taskId = reqVO.getTaskId(); + //考场批次 + String batch = reqVO.getBatch(); + + + //这里要taskId和studentIds去判断表里是否有 符合这两个条件的数据,因为会有学生在此考场,不设置sessionid的, + //根据taskId和studentIds获得EducationPaperPerson,在判断它的sessionid是否为空,为空把,sessionId和batch赋值再插入 + + List educationPaperPeople=new ArrayList<>(); + + + + if (studentIds!=null&&studentIds.size()>0){ + for (String studentId : studentIds) { + // 查询是否存在该 taskId + studentId 的记录,且 sessionId 为 null + EducationPaperPerson existing = educationPaperPersonMapper.selectByTaskIdAndPersonId(taskId, studentId); + if (existing != null && (existing.getSessionId() == null || existing.getSessionId().isEmpty())) { + // 更新已有记录的 sessionId 和 batch + existing.setSessionId(sessionId); + existing.setBatch(batch); + educationPaperPersonMapper.updateByTaskIdAndStuId(existing); + } else if (existing == null) { + EducationPaperPerson educationPaperPerson=new EducationPaperPerson(); + educationPaperPerson.setPersonId(studentId); + educationPaperPerson.setSessionId(sessionId); + educationPaperPerson.setBatch(batch); + educationPaperPerson.setTaskId(taskId); + educationPaperPeople.add(educationPaperPerson); + } + // 如果存在但 sessionId 已有值,则跳过 + + } + if (educationPaperPeople!=null&&educationPaperPeople.size()>0){ + educationPaperPersonMapper.insertEducationPaperPersonList(educationPaperPeople); + + } + + } + + + + return "0"; + } + + @Override + public int removeSessionStu(StudentSessionReqVO reqVO) { + return educationPaperPersonMapper.removeSessionStu(reqVO); + } + + @Override + public int removeTaskStu(DeleteRequestVo deleteRequestVo) { + return educationPaperPersonMapper.removeTaskStu(deleteRequestVo); + } + + /** * 查询试卷人员分配列表 * @@ -91,4 +240,22 @@ public class EducationPaperPersonServiceImpl implements IEducationPaperPersonSer { return educationPaperPersonMapper.deleteEducationPaperPersonByTaskId(taskId); } + + +// @Override +// public PageResult selectExamStuList(StudentPageReqVO examStu) { +// +// +// PageResult studentDOPageResult = educationPaperPersonMapper.selectExamStuList(examStu); +// List list = studentDOPageResult.getList(); +// if (list!=null&&list.size()>0){ +// for (StudentDO studentDO : list) { +// studentDO.getId() +// +// } +// } +// PageResult pageResult=new PageResult<>(); +// +// return pageResult; +// } } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java index b6ca3e05..2874d380 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperServiceImpl.java @@ -153,6 +153,7 @@ public class EducationPaperServiceImpl implements IEducationPaperService String uuid = IdUtils.simpleUUID(); educationPaper.setPaperId(uuid); educationPaper.setTaskId(taskid); + educationPaper.setTenantId(TenantContextHolder.getRequiredTenantId()); educationPaperMapper.insertEducationPaper(educationPaper); System.out.println(examQuestionIds+"examQuestionIdsexamQuestionIds"); diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperSessionServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperSessionServiceImpl.java index 0831295d..f0f027ff 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperSessionServiceImpl.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperSessionServiceImpl.java @@ -3,6 +3,7 @@ package pc.exam.pp.module.exam.service.paper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperSession; +import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperPersonMapper; import pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperSessionMapper; import pc.exam.pp.module.exam.utils.uuid.IdUtils; @@ -19,7 +20,8 @@ public class EducationPaperSessionServiceImpl implements IEducationPaperSessionS { @Autowired private EducationPaperSessionMapper educationPaperSessionMapper; - + @Autowired + private EducationPaperPersonMapper educationPaperPersonMapper; /** * 查询试卷场次 * @@ -79,6 +81,8 @@ public class EducationPaperSessionServiceImpl implements IEducationPaperSessionS @Override public int deleteEducationPaperSessionBySessionIds(String[] sessionIds) { + + educationPaperPersonMapper.deleteEducationPaperPersonBySessionkIds(sessionIds); return educationPaperSessionMapper.deleteEducationPaperSessionBySessionIds(sessionIds); } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java index 5def6122..29b9aace 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/EducationPaperTaskServiceImpl.java @@ -92,6 +92,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService educationPaperParam.setDirectory("KSWJ"); educationPaperParam.setUploadTime("5"); educationPaperParam.setIsDel("0"); + educationPaperParam.setIsSession("1"); if ("1".equals(educationPaperTask.getTaskType())){ educationPaperParam.setIsRepeat("1"); educationPaperParam.setIsAnswer("1"); @@ -160,7 +161,7 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService } @Override - public List getPoints(String name) { + public List getPoints(String name) { Long id= educationPaperTaskMapper.getPointIdByName(name); return educationPaperTaskMapper.getPoints(id); } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperPersonService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperPersonService.java index 4daf740f..f10338b4 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperPersonService.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperPersonService.java @@ -1,6 +1,12 @@ package pc.exam.pp.module.exam.service.paper; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.module.exam.controller.admin.paper.dto.PersonRepDto; +import pc.exam.pp.module.exam.controller.admin.paper.vo.DeleteRequestVo; +import pc.exam.pp.module.exam.controller.admin.paper.vo.SessionStuPageReqVO; +import pc.exam.pp.module.exam.controller.admin.paper.vo.StudentSessionReqVO; +import pc.exam.pp.module.exam.controller.admin.student.vo.StudentPageReqVO; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperPerson; import java.util.List; @@ -19,7 +25,7 @@ public interface IEducationPaperPersonService * @param taskId 试卷人员分配主键 * @return 试卷人员分配 */ - public EducationPaperPerson selectEducationPaperPersonByTaskId(String taskId); + PageResult selectEducationPaperPersonByTaskId(String taskId); /** * 查询试卷人员分配列表 @@ -60,5 +66,20 @@ public interface IEducationPaperPersonService * @return 结果 */ public int deleteEducationPaperPersonByTaskId(String taskId); + + PageResult selectEducationPaperPersonBySessionId(String sessionId); + + PageResult selectEducationPaperPersonBySearch(SessionStuPageReqVO sessionStuPageReqVO); + + String setStuAndSession(StudentSessionReqVO reqVO); + + int removeSessionStu(StudentSessionReqVO reqVO); + + int removeTaskStu(DeleteRequestVo deleteRequestVo); + + + +// PageResult selectExamStuList(StudentPageReqVO examStu); + } diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperTaskService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperTaskService.java index 3fb249af..a0599e00 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperTaskService.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/paper/IEducationPaperTaskService.java @@ -5,7 +5,7 @@ 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.TempDto; import pc.exam.pp.module.exam.controller.admin.paper.vo.PaperTaskPageVo; -import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; +import pc.exam.pp.module.exam.dal.dataobject.ExamPaperKnowledgePoints; import pc.exam.pp.module.exam.dal.dataobject.EducationPaperTask; import java.util.List; @@ -73,7 +73,7 @@ public interface IEducationPaperTaskService List getKeywords(); - List getPoints(String name); + List getPoints(String name); Integer getQuCount(SchemeParam param); diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml index 6e7c92a4..087e48dc 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperMapper.xml @@ -66,6 +66,7 @@ AND tenant_id =#{tId} and audit = 0 and status = 0 + and deleted ='0' AND qu_level = #{educationPaperScheme.quLevel} @@ -93,17 +94,17 @@ select task_id from education_paper where paper_id=#{paperId} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperParamMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperParamMapper.xml index 7898d8b6..41f4703f 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperParamMapper.xml +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperParamMapper.xml @@ -19,10 +19,11 @@ + - select param_id, task_id, is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_del,is_repeat ,is_answer,is_look,is_connect from education_paper_param + select param_id, task_id, is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_del,is_repeat ,is_answer,is_look,is_connect,is_session from education_paper_param @@ -20,6 +21,7 @@ and task_id = #{taskId} and person_id = #{personId} and session_id = #{sessionId} + and batch = #{batch} @@ -27,6 +29,85 @@ where task_id = #{taskId} + + + + + + + + + insert into education_paper_person @@ -34,22 +115,38 @@ task_id, person_id, session_id, + batch, #{taskId}, #{personId}, #{sessionId}, + #{batch}, + + insert into education_paper_person (task_id, person_id, session_id, batch) VALUES + + ( + #{item.taskId}, #{item.personId}, #{item.sessionId}, #{item.batch} + ) + + + update education_paper_person person_id = #{personId}, session_id = #{sessionId}, + batch = #{batch}, where task_id = #{taskId} + + update education_paper_person set session_id =#{sessionId},batch =#{batch} + where task_id =#{taskId} and person_id=#{personId} + delete from education_paper_person where task_id = #{taskId} @@ -61,4 +158,29 @@ #{taskId} + + DELETE FROM education_paper_person + WHERE session_id = #{sessionId} + AND task_id = #{taskId} + AND batch = #{batch} + AND person_id IN + + #{id} + + + + delete from education_paper_person where education_paper_person.session_id in + + #{sessionId} + + + + DELETE FROM education_paper_person + WHERE task_id = #{taskId} + AND person_id IN + + #{id} + + + \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml index ddcb700d..89061b1f 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/exam/EducationPaperTaskMapper.xml @@ -18,15 +18,13 @@ - + - - @@ -39,18 +37,19 @@