From a0893303ce8a4049834c97c614cab34e8ab341f7 Mon Sep 17 00:00:00 2001 From: zhangyue Date: Wed, 28 Jan 2026 08:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0API=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=92=8C=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/study/AppStudentSignController.java | 2 +- .../edu/web/archives/ArchivesController.java | 7 ++ .../archives/ArchivesReviewController.java | 2 +- .../ArchivesReviewRecordController.java | 4 +- .../edu/web/study/StudentController.java | 5 + .../study/StudentExamRecordController.java | 2 +- .../edu/web/study/StudentSignController.java | 7 +- .../archives/ArchivesReviewAddExe.java | 20 ++++ .../archives/ArchivesReviewRecordAddExe.java | 1 + .../archives/ArchivesReviewQueryExe.java | 29 ++++++ .../command/query/study/StudentQueryExe.java | 32 +++++++ .../archives/ArchivesReviewServiceImpl.java | 5 + .../edu/service/study/StudentServiceImpl.java | 11 +++ .../api/archives/ArchivesReviewServiceI.java | 3 + .../zcloud/edu/api/study/StudentServiceI.java | 5 + .../dto/archives/ArchivesReviewAddCmd.java | 10 +- .../dto/archives/ArchivesReviewPageQry.java | 1 + .../archives/ArchivesReviewRecordAddCmd.java | 3 - .../dto/archives/ArchivesReviewUpdateCmd.java | 18 +--- .../edu/dto/archives/ClassArchivesQry.java | 1 + .../archives/ArchivesReviewCO.java | 13 ++- .../study/StudentExamRecordItemCO.java | 42 ++++++++ .../dto/data/archives/ClassArchivesDTO.java | 86 +++++++++++++++++ .../dto/data/archives/PersonArchivesDTO.java | 4 + .../model/archives/ArchivesReviewE.java | 18 +++- .../model/archives/ArchivesReviewRecordE.java | 12 +++ .../domain/model/archives/ClassArchivesE.java | 95 +++++++++++++++++++ .../model/archives/PersonArchivesE.java | 1 + .../dataobject/archives/ArchivesReviewDO.java | 7 +- .../study/StudentExamRecordItemDO.java | 40 ++++++++ .../mapper/archives/ArchivesReviewMapper.java | 6 ++ .../archives/ArchivesReviewRecordMapper.java | 4 +- .../study/StudentExamRecordItemMapper.java | 5 +- .../ArchivesReviewRecordRepository.java | 3 + .../archives/ArchivesReviewRepository.java | 2 + .../ArchivesReviewRecordRepositoryImpl.java | 10 ++ .../ArchivesReviewRepositoryImpl.java | 12 ++- .../StudentExamRecordItemRepositoryImpl.java | 6 +- .../mapper/archives/ArchivesReviewMapper.xml | 21 ++++ .../study/StudentExamRecordItemMapper.xml | 21 +++- .../mapper/study/StudentSignMapper.xml | 19 +++- 41 files changed, 544 insertions(+), 51 deletions(-) create mode 100644 web-client/src/main/java/com/zcloud/edu/dto/data/archives/ClassArchivesDTO.java create mode 100644 web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ClassArchivesE.java diff --git a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentSignController.java b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentSignController.java index b968d7a..0ae036c 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentSignController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentSignController.java @@ -49,7 +49,7 @@ public class AppStudentSignController { } @ApiOperation("所有数据") - @GetMapping("/listAll") + @PostMapping("/listAll") public MultiResponse listAll(@RequestBody ClassAppSignQry qry) { return studentSignService.listAll(qry); } diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesController.java b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesController.java index 3fadd8c..1a5b64e 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesController.java @@ -8,6 +8,7 @@ import com.zcloud.edu.api.study.ClassServiceI; import com.zcloud.edu.api.study.StudentServiceI; import com.zcloud.edu.dto.archives.ClassArchivesQry; import com.zcloud.edu.dto.clientobject.study.ClassCO; +import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; import com.zcloud.edu.dto.study.ClassPageQry; import io.swagger.annotations.Api; @@ -54,4 +55,10 @@ public class ArchivesController { return studentService.getStudyRecord(qry); } + @ApiOperation("签字表") + @PostMapping("/getClassSign") + public SingleResponse getClassSign(@RequestBody ClassArchivesQry qry) { + return studentService.getClassSign(qry); + } + } diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewController.java b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewController.java index 4f6f238..fd24ed5 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewController.java @@ -55,7 +55,7 @@ public class ArchivesReviewController { @ApiOperation("详情") @GetMapping("/{id}") public SingleResponse getInfoById(@PathVariable("id") Long id) { - return SingleResponse.of(new ArchivesReviewCO()); + return archivesReviewService.getInfoById(id); } @ApiOperation("删除") diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewRecordController.java b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewRecordController.java index 6059ec2..6b6dbc0 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewRecordController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewRecordController.java @@ -7,6 +7,7 @@ import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.jjb.saas.framework.auth.model.SSOUser; import com.jjb.saas.framework.auth.utils.AuthContext; +import com.jjb.saas.framework.sdk.http.annotation.request.Post; import com.zcloud.edu.api.archives.ArchivesReviewRecordServiceI; import com.zcloud.edu.dto.archives.ArchivesReviewRecordAddCmd; import com.zcloud.edu.dto.archives.ArchivesReviewRecordPageQry; @@ -36,7 +37,6 @@ public class ArchivesReviewRecordController { @ApiOperation("新增") @PostMapping("/save") public SingleResponse add(@Validated @RequestBody ArchivesReviewRecordAddCmd cmd) { - SSOUser ssoUser = AuthContext.getCurrentUser(); return archivesReviewRecordService.add(cmd); } @@ -59,7 +59,7 @@ public class ArchivesReviewRecordController { } @ApiOperation("删除") - @DeleteMapping("/{id}") + @PostMapping("/{id}") public Response remove(@PathVariable("id") Long id) { archivesReviewRecordService.remove(id); return SingleResponse.buildSuccess(); diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java index 7537940..81a1e7f 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java @@ -59,6 +59,11 @@ public class StudentController { public SingleResponse getInfoById(@PathVariable("id") Long id) { return SingleResponse.of(new StudentCO()); } + @ApiOperation("班级内学员数") + @GetMapping("/countStudent/{classId}") + public SingleResponse countStudent(@PathVariable("classId") String classId) { + return SingleResponse.of(studentService.countStudent(classId)); + } @ApiOperation("删除") @PostMapping("/{id}") diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentExamRecordController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentExamRecordController.java index 69fe24e..f689c19 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentExamRecordController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentExamRecordController.java @@ -60,7 +60,7 @@ public class StudentExamRecordController { @ApiOperation("查询考试记录") @GetMapping("/getInfoByStudentId/{studentId}") - public SingleResponse getInfoByStudentId(@PathVariable("id") String studentId) { + public SingleResponse getInfoByStudentId(@PathVariable("studentId") String studentId) { return studentExamRecordService.getInfoByStudentId(studentId); } diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentSignController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentSignController.java index 1b01636..efc0f64 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentSignController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentSignController.java @@ -9,6 +9,7 @@ import com.jjb.saas.framework.auth.model.SSOUser; import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.api.study.StudentSignServiceI; import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import com.zcloud.edu.dto.study.ClassAppSignQry; import com.zcloud.edu.dto.study.StudentSignAddCmd; import com.zcloud.edu.dto.study.StudentSignPageQry; import com.zcloud.edu.dto.study.StudentSignUpdateCmd; @@ -47,9 +48,9 @@ public class StudentSignController { } @ApiOperation("所有数据") - @GetMapping("/listAll") - public MultiResponse listAll() { - return MultiResponse.of(new ArrayList()); + @PostMapping("/listAll") + public MultiResponse listAll(@RequestBody ClassAppSignQry qry) { + return studentSignService.listAll(qry); } @ApiOperation("详情") diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewAddExe.java index 4018692..6f4b8bd 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewAddExe.java @@ -1,14 +1,23 @@ package com.zcloud.edu.command.archives; +import cn.hutool.core.bean.BeanUtil; import com.alibaba.cola.exception.BizException; +import com.jjb.saas.framework.auth.model.SSOUser; +import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.domain.gateway.archives.ArchivesReviewGateway; import com.zcloud.edu.domain.model.archives.ArchivesReviewE; +import com.zcloud.edu.domain.model.archives.ArchivesReviewRecordE; import com.zcloud.edu.dto.archives.ArchivesReviewAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordAddCmd; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRecordRepository; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + /** * web-app @@ -20,14 +29,25 @@ import org.springframework.transaction.annotation.Transactional; @AllArgsConstructor public class ArchivesReviewAddExe { private final ArchivesReviewGateway archivesReviewGateway; + private final ArchivesReviewRecordRepository archivesReviewRecordRepository; @Transactional(rollbackFor = Exception.class) public boolean execute(ArchivesReviewAddCmd cmd) { ArchivesReviewE archivesReviewE = new ArchivesReviewE(); + SSOUser ssoUser = AuthContext.getCurrentUser(); + List archivesReviewRecordAddCmdList = cmd.getArchivesReviewRecordAddCmdList(); BeanUtils.copyProperties(cmd, archivesReviewE); + + archivesReviewE.init(ssoUser.getTenantId()); boolean res = false; try { res = archivesReviewGateway.add(archivesReviewE); + if (archivesReviewRecordAddCmdList != null && archivesReviewRecordAddCmdList.size() > 0){ + ArchivesReviewRecordE archivesReviewRecordE = new ArchivesReviewRecordE(); + List archivesReviewRecordEList = BeanUtil.copyToList(archivesReviewRecordAddCmdList, ArchivesReviewRecordE.class); + archivesReviewRecordE.initList(archivesReviewRecordEList, archivesReviewE.getArchivesReviewId()); + archivesReviewRecordRepository.saveBatch(BeanUtil.copyToList(archivesReviewRecordEList, ArchivesReviewRecordDO.class)); + } } catch (Exception e) { throw new RuntimeException(e); } diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordAddExe.java index 67ad36a..9bca2ee 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordAddExe.java @@ -25,6 +25,7 @@ public class ArchivesReviewRecordAddExe { public boolean execute(ArchivesReviewRecordAddCmd cmd) { ArchivesReviewRecordE archivesReviewRecordE = new ArchivesReviewRecordE(); BeanUtils.copyProperties(cmd, archivesReviewRecordE); + archivesReviewRecordE.init(); boolean res = false; try { res = archivesReviewRecordGateway.add(archivesReviewRecordE); diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewQueryExe.java index 2fcb7b9..d3b0943 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewQueryExe.java @@ -1,13 +1,22 @@ package com.zcloud.edu.command.query.archives; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.jjb.saas.framework.auth.model.SSOUser; +import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.command.convertor.archives.ArchivesReviewCoConvertor; +import com.zcloud.edu.command.convertor.archives.ArchivesReviewRecordCoConvertor; +import com.zcloud.edu.domain.model.archives.ArchivesReviewE; import com.zcloud.edu.dto.archives.ArchivesReviewPageQry; import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewCO; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRecordRepository; import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRepository; import com.zcloud.gbscommon.utils.PageQueryHelper; import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import java.util.List; @@ -25,6 +34,8 @@ import java.util.Map; public class ArchivesReviewQueryExe { private final ArchivesReviewRepository archivesReviewRepository; private final ArchivesReviewCoConvertor archivesReviewCoConvertor; + private final ArchivesReviewRecordRepository archivesReviewRecordRepository; + private final ArchivesReviewRecordCoConvertor archivesReviewRecordCoConvertor; /** * 分页 @@ -38,5 +49,23 @@ public class ArchivesReviewQueryExe { List examCenterCOS = archivesReviewCoConvertor.converDOsToCOs(pageResponse.getData()); return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); } + + public SingleResponse executeGetInfoById(Long id) { + + ArchivesReviewE archivesReviewE = new ArchivesReviewE(); + + ArchivesReviewDO archivesReviewDO = archivesReviewRepository.getInfoById(id); + BeanUtils.copyProperties(archivesReviewDO, archivesReviewE); + SSOUser ssoUser = AuthContext.getCurrentUser(); + archivesReviewE.initInfo(ssoUser.getTenantName()); + BeanUtils.copyProperties(archivesReviewE, archivesReviewDO); + ArchivesReviewCO archivesReviewCO = new ArchivesReviewCO(); + BeanUtils.copyProperties(archivesReviewDO, archivesReviewCO); + + List arrList =archivesReviewRecordRepository.listByReviewId(archivesReviewDO.getArchivesReviewId()); + List recordList = archivesReviewRecordCoConvertor.converDOsToCOs(arrList); + archivesReviewCO.setArchivesReviewRecordList(recordList); + return SingleResponse.of(archivesReviewCO); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java index 5f3ee47..0470170 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java @@ -4,10 +4,13 @@ import cn.hutool.core.bean.BeanUtil; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.command.convertor.study.StudentCoConvertor; +import com.zcloud.edu.domain.model.archives.ClassArchivesE; import com.zcloud.edu.domain.model.archives.PersonArchivesE; import com.zcloud.edu.domain.model.study.*; import com.zcloud.edu.dto.archives.ClassArchivesQry; import com.zcloud.edu.dto.clientobject.study.StudentCO; +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; import com.zcloud.edu.dto.study.StudentPageQry; import com.zcloud.edu.persistence.dataobject.study.*; @@ -134,5 +137,34 @@ public class StudentQueryExe { BeanUtils.copyProperties(personArchivesE, personArchivesDTO); return SingleResponse.of(personArchivesDTO); } + + public SingleResponse executeGetClassSign(ClassArchivesQry qry){ + ClassDO classDO = classRepository.getByClassId(qry.getClassId()); + ClassE classE = new ClassE(); + long stuCount = studentRepository.countByClassId(qry.getClassId()); + BeanUtils.copyProperties(classDO, classE); + // 课程信息 + ClassCurriculumE classCurriculumE = new ClassCurriculumE(); + Map params = classCurriculumE.initListAllParams(qry.getClassId()); + List curEList = classCurriculumRepository.listAll(params); + List classCurList = BeanUtil.copyToList(curEList, ClassCurriculumE.class); + + List studentSignList = studentSignRepository.listAll(params); + ClassArchivesE classArchivesE = new ClassArchivesE(); + classArchivesE.initClassSign(classE, stuCount, classCurList); + ClassArchivesDTO classArchivesDTO = new ClassArchivesDTO(); + BeanUtils.copyProperties(classArchivesE, classArchivesDTO); + classArchivesDTO.setSignList(BeanUtil.copyToList(studentSignList, StudentSignCO.class)); + return SingleResponse.of(classArchivesDTO); + } + + + public Long executeCountStudent(String classId){ + return studentRepository.countByClassId(classId); + + } + + + } diff --git a/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewServiceImpl.java index c2172c8..00927cb 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewServiceImpl.java @@ -55,5 +55,10 @@ public class ArchivesReviewServiceImpl implements ArchivesReviewServiceI { public void removeBatch(Long[] ids) { archivesReviewRemoveExe.execute(ids); } + + @Override + public SingleResponse getInfoById(Long id) { + return archivesReviewQueryExe.executeGetInfoById(id); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java index ec56ea2..76eefef 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java @@ -9,6 +9,7 @@ import com.zcloud.edu.command.study.StudentRemoveExe; import com.zcloud.edu.command.study.StudentUpdateExe; import com.zcloud.edu.dto.archives.ClassArchivesQry; import com.zcloud.edu.dto.clientobject.study.StudentCO; +import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; import com.zcloud.edu.dto.study.StudentAddCmd; import com.zcloud.edu.dto.study.StudentPageQry; @@ -73,5 +74,15 @@ public class StudentServiceImpl implements StudentServiceI { public SingleResponse getStudyRecord(ClassArchivesQry qry) { return studentQueryExe.executeStudyRecord(qry); } + + @Override + public SingleResponse getClassSign(ClassArchivesQry qry) { + return studentQueryExe.executeGetClassSign(qry); + } + + @Override + public Long countStudent(String classId) { + return studentQueryExe.executeCountStudent(classId); + } } diff --git a/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewServiceI.java index 20d85d9..41e8a6c 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewServiceI.java @@ -23,5 +23,8 @@ public interface ArchivesReviewServiceI { void remove(Long id); void removeBatch(Long[] ids); + + + SingleResponse getInfoById(Long id); } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java index 850bb32..d66fce2 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java @@ -4,6 +4,7 @@ import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.dto.archives.ClassArchivesQry; import com.zcloud.edu.dto.clientobject.study.StudentCO; +import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; import com.zcloud.edu.dto.study.StudentAddCmd; import com.zcloud.edu.dto.study.StudentPageQry; @@ -33,5 +34,9 @@ public interface StudentServiceI { SingleResponse getStudyArchives(ClassArchivesQry qry); SingleResponse getStudyRecord(ClassArchivesQry qry); + + SingleResponse getClassSign(ClassArchivesQry qry); + + Long countStudent(String classId); } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewAddCmd.java index 8d071fa..6f06571 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewAddCmd.java @@ -11,6 +11,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; +import java.util.List; /** * web-client @@ -24,7 +25,6 @@ import java.time.LocalDateTime; @AllArgsConstructor public class ArchivesReviewAddCmd extends Command { @ApiModelProperty(value = "业务id", name = "archivesReviewId", required = true) - @NotEmpty(message = "业务id不能为空") private String archivesReviewId; @ApiModelProperty(value = "课程id", name = "classCurriculumId", required = true) @@ -40,8 +40,7 @@ public class ArchivesReviewAddCmd extends Command { private String bookNum; @ApiModelProperty(value = "班级所属企业id", name = "corpinfoId", required = true) - @NotNull(message = "班级所属企业id不能为空") - private Integer corpinfoId; + private Long corpinfoId; @ApiModelProperty(value = "编写单位", name = "corpName", required = true) @NotEmpty(message = "编写单位不能为空") @@ -49,7 +48,6 @@ public class ArchivesReviewAddCmd extends Command { @ApiModelProperty(value = "编写时间", name = "writeDate", required = true) @NotNull(message = "编写时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime writeDate; @ApiModelProperty(value = "教材类型", name = "materialType", required = true) @@ -66,12 +64,14 @@ public class ArchivesReviewAddCmd extends Command { @ApiModelProperty(value = "会审时间", name = "auditDate", required = true) @NotNull(message = "会审时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime auditDate; @ApiModelProperty(value = "会审意见", name = "reviewOpinions", required = true) @NotEmpty(message = "会审意见不能为空") private String reviewOpinions; + @ApiModelProperty(value = "安全培训教材会审情况", name = "archivesReviewRecordAddCmdList", required = true) + private List archivesReviewRecordAddCmdList; + } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewPageQry.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewPageQry.java index 946e24d..9ffe777 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewPageQry.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewPageQry.java @@ -24,5 +24,6 @@ public class ArchivesReviewPageQry extends PageQuery { * - `ne`: 不等比较查询,对应SQL的!=操作符 */ private String likeArchivesReviewId; + private String eqClassId; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordAddCmd.java index c0d31b4..a30fa6b 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordAddCmd.java @@ -20,9 +20,6 @@ import javax.validation.constraints.NotEmpty; @NoArgsConstructor @AllArgsConstructor public class ArchivesReviewRecordAddCmd extends Command { - @ApiModelProperty(value = "业务id", name = "archivesReviewRecordId", required = true) - @NotEmpty(message = "业务id不能为空") - private String archivesReviewRecordId; @ApiModelProperty(value = "会审表id", name = "archivesReviewId", required = true) @NotEmpty(message = "会审表id不能为空") diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewUpdateCmd.java index 313ec90..8869cb5 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewUpdateCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewUpdateCmd.java @@ -23,30 +23,17 @@ import java.time.LocalDateTime; @NoArgsConstructor @AllArgsConstructor public class ArchivesReviewUpdateCmd extends Command { - @ApiModelProperty(value = "${column.comment}", name = "id", required = true) - @NotNull(message = "${column.comment}不能为空") + @ApiModelProperty(value = "id", name = "id", required = true) + @NotNull(message = "id不能为空") private Long id; - @ApiModelProperty(value = "业务id", name = "archivesReviewId", required = true) - @NotEmpty(message = "业务id不能为空") - private String archivesReviewId; - @ApiModelProperty(value = "课程id", name = "classCurriculumId", required = true) - @NotEmpty(message = "课程id不能为空") - private String classCurriculumId; - @ApiModelProperty(value = "班级id", name = "classId", required = true) - @NotEmpty(message = "班级id不能为空") - private String classId; @ApiModelProperty(value = "初版书号", name = "bookNum", required = true) @NotEmpty(message = "初版书号不能为空") private String bookNum; - @ApiModelProperty(value = "班级所属企业id", name = "corpinfoId", required = true) - @NotNull(message = "班级所属企业id不能为空") - private Integer corpinfoId; @ApiModelProperty(value = "编写单位", name = "corpName", required = true) @NotEmpty(message = "编写单位不能为空") private String corpName; @ApiModelProperty(value = "编写时间", name = "writeDate", required = true) @NotNull(message = "编写时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime writeDate; @ApiModelProperty(value = "教材类型", name = "materialType", required = true) @NotEmpty(message = "教材类型不能为空") @@ -59,7 +46,6 @@ public class ArchivesReviewUpdateCmd extends Command { private String compere; @ApiModelProperty(value = "会审时间", name = "auditDate", required = true) @NotNull(message = "会审时间不能为空") - @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime auditDate; @ApiModelProperty(value = "会审意见", name = "reviewOpinions", required = true) @NotEmpty(message = "会审意见不能为空") diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ClassArchivesQry.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ClassArchivesQry.java index 8d95f2d..7b0b34d 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/archives/ClassArchivesQry.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ClassArchivesQry.java @@ -25,6 +25,7 @@ public class ClassArchivesQry { */ private Long stuId; private String studentId; + private String classId; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewCO.java index 9110a79..aaa3e52 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewCO.java @@ -1,11 +1,13 @@ package com.zcloud.edu.dto.clientobject.archives; import com.alibaba.cola.dto.ClientObject; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; +import java.util.List; /** @@ -31,7 +33,7 @@ public class ArchivesReviewCO extends ClientObject { private String bookNum; //班级所属企业id @ApiModelProperty(value = "班级所属企业id") - private Integer corpinfoId; + private Long corpinfoId; //编写单位 @ApiModelProperty(value = "编写单位") private String corpName; @@ -55,6 +57,15 @@ public class ArchivesReviewCO extends ClientObject { //会审意见 @ApiModelProperty(value = "会审意见") private String reviewOpinions; + + @ApiModelProperty(value = "安全培训教材会审情况") + @TableField(exist = false) + private List archivesReviewRecordList; + + // 教材名称 + @ApiModelProperty(value = "教材名称") + @TableField(exist = false) + private String curriculumName; //删除标识true false @ApiModelProperty(value = "删除标识true false") private String deleteEnum; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordItemCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordItemCO.java index 8e748a2..3327a5d 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordItemCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordItemCO.java @@ -1,10 +1,12 @@ package com.zcloud.edu.dto.clientobject.study; import com.alibaba.cola.dto.ClientObject; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.time.LocalDateTime; @@ -38,6 +40,46 @@ public class StudentExamRecordItemCO extends ClientObject { //删除标识true false @ApiModelProperty(value = "删除标识true false") private String deleteEnum; + + + + + @ApiModelProperty(value = "试题类型(1单选题、2多选题、3判断题)") + @TableField(exist = false) + private Integer questionType; + //题干 + @ApiModelProperty(value = "题干") + @TableField(exist = false) + private String questionDry; + //选项A + @ApiModelProperty(value = "选项A") + @TableField(exist = false) + private String optionA; + //选项B + @ApiModelProperty(value = "选项B") + @TableField(exist = false) + private String optionB; + //选项C + @ApiModelProperty(value = "选项C") + @TableField(exist = false) + private String optionC; + //选项D + @ApiModelProperty(value = "选项D") + @TableField(exist = false) + private String optionD; + //课件类型(1:视频课件、2:试卷习题) + @ApiModelProperty(value = "课件类型(1:视频课件、2:试卷习题)") + @TableField(exist = false) + private Integer coursewareType; + //答案解析 + @ApiModelProperty(value = "答案解析") + @TableField(exist = false) + private String descr; + //分值 + @ApiModelProperty(value = "分值") + @TableField(exist = false) + private BigDecimal score; + //备注 @ApiModelProperty(value = "备注") private String remarks; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/data/archives/ClassArchivesDTO.java b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/ClassArchivesDTO.java new file mode 100644 index 0000000..36c0cb0 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/ClassArchivesDTO.java @@ -0,0 +1,86 @@ +package com.zcloud.edu.dto.data.archives; + +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author zhangyue + * @date 2026/1/26 16:56 + */ +@Data +public class ClassArchivesDTO { + + //班级id(uuid) + @ApiModelProperty(value = "班级id(uuid)") + private String classId; + //班级id(雪花) + @ApiModelProperty(value = "班级id(雪花)") + private Long clzId; + + //班级名称 + @ApiModelProperty(value = "班级名称") + private String className; + //培训日期 开始时间 + @ApiModelProperty(value = "培训日期 开始时间") + private String startTime; + //培训日期 结束日期 + @ApiModelProperty(value = "培训日期 结束日期") + private String endTime; + //培训教师id + @ApiModelProperty(value = "培训教师id") + private Long teacherId; + //教师名称 + @ApiModelProperty(value = "教师名称") + private String teacherName; + //培训行业类型 + @ApiModelProperty(value = "培训行业类型") + private String trainType; + //培训行业类型名称 + @ApiModelProperty(value = "培训行业类型名称") + private String trainTypeName; + //培训地点 + @ApiModelProperty(value = "培训地点") + private String trainingLocation; + //机构ID + @ApiModelProperty(value = "机构ID") + private Long corpinfoId; + //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 + @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") + private Integer state; + //培训有效期日期 开始时间 + @ApiModelProperty(value = "培训有效期日期 开始时间") + private String validStartTime; + //培训有效期日期 结束时间 + @ApiModelProperty(value = "培训有效期日期 结束时间") + private String validEndTime; + //1考试0不考试 + @ApiModelProperty(value = "1考试0不考试") + private Integer examination; + //考试次数只有考试时候有用 + @ApiModelProperty(value = "考试次数只有考试时候有用") + private Integer numberofexams; + @ApiModelProperty(value = "培训时长") + private Long trainDurationTime; + @ApiModelProperty(value = "培训科目") + private String trainSubject; + + @ApiModelProperty(value = "视频时长") + private BigDecimal videoTotalTime; + @ApiModelProperty(value = "课件数") + private Integer videoCount; + + @ApiModelProperty(value = "打卡签到人脸图片路径") + private String signFaceUrl; + @ApiModelProperty(value = "考试签到人脸图片路径") + private String examSignFaceUrl; + @ApiModelProperty(value = "签字列表") + private List signList; + + + @ApiModelProperty(value = "学员数") + private Long studentCount; +} diff --git a/web-client/src/main/java/com/zcloud/edu/dto/data/archives/PersonArchivesDTO.java b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/PersonArchivesDTO.java index 813278c..8b7367e 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/data/archives/PersonArchivesDTO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/PersonArchivesDTO.java @@ -1,9 +1,11 @@ package com.zcloud.edu.dto.data.archives; +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; +import java.util.List; /** * @author zhangyue @@ -136,4 +138,6 @@ public class PersonArchivesDTO { private String signFaceUrl; @ApiModelProperty(value = "考试签到人脸图片路径") private String examSignFaceUrl; + @ApiModelProperty(value = "签字列表") + private List signList; } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewE.java index d8afa28..bae1d53 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewE.java @@ -1,7 +1,9 @@ package com.zcloud.edu.domain.model.archives; import com.jjb.saas.framework.domain.model.BaseE; +import com.zcloud.gbscommon.utils.Tools; import lombok.Data; +import org.springframework.util.ObjectUtils; import java.time.LocalDateTime; @@ -23,7 +25,7 @@ public class ArchivesReviewE extends BaseE { //初版书号 private String bookNum; //班级所属企业id - private Integer corpinfoId; + private Long corpinfoId; //编写单位 private String corpName; //编写时间 @@ -62,5 +64,19 @@ public class ArchivesReviewE extends BaseE { private Long updateId; //环境 private String env; + + public void initInfo(String corpName) { + if (ObjectUtils.isEmpty(this.address)){ + this.address = corpName; + } + if (ObjectUtils.isEmpty(this.corpName)){ + this.corpName = corpName; + } + } + + public void init(Long tenantId) { + this.setCorpinfoId(tenantId); + this.setArchivesReviewId(Tools.get32UUID()); + } } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewRecordE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewRecordE.java index 419d30a..b0e22e2 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewRecordE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewRecordE.java @@ -1,9 +1,11 @@ package com.zcloud.edu.domain.model.archives; import com.jjb.saas.framework.domain.model.BaseE; +import com.zcloud.gbscommon.utils.Tools; import lombok.Data; import java.time.LocalDateTime; +import java.util.List; /** * web-domain @@ -51,5 +53,15 @@ public class ArchivesReviewRecordE extends BaseE { private Long updateId; //环境 private String env; + + public void initList(List list, String archivesReviewId){ + list.stream().forEach(archivesReviewRecordE -> { + archivesReviewRecordE.setArchivesReviewId(archivesReviewId); + archivesReviewRecordE.setArchivesReviewRecordId(Tools.get32UUID()); + }); + } + public void init(){ + this.setArchivesReviewRecordId(Tools.get32UUID()); + } } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ClassArchivesE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ClassArchivesE.java new file mode 100644 index 0000000..46ce250 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ClassArchivesE.java @@ -0,0 +1,95 @@ +package com.zcloud.edu.domain.model.archives; + +import com.jjb.saas.framework.domain.model.BaseE; +import com.zcloud.edu.domain.model.study.*; +import com.zcloud.gbscommon.utils.DateUtil; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.beans.BeanUtils; +import org.springframework.util.ObjectUtils; + +import java.math.BigDecimal; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author zhangyue + * @date 2026/1/26 17:38 + */ +@Data +public class ClassArchivesE extends BaseE { + + //班级id(uuid) + @ApiModelProperty(value = "班级id(uuid)") + private String classId; + //班级id(雪花) + @ApiModelProperty(value = "班级id(雪花)") + private Long clzId; + //班级名称 + @ApiModelProperty(value = "班级名称") + private String className; + //培训日期 开始时间 + @ApiModelProperty(value = "培训日期 开始时间") + private String startTime; + //培训日期 结束日期 + @ApiModelProperty(value = "培训日期 结束日期") + private String endTime; + //培训教师id + @ApiModelProperty(value = "培训教师id") + private Long teacherId; + //教师名称 + @ApiModelProperty(value = "教师名称") + private String teacherName; + //培训行业类型 + @ApiModelProperty(value = "培训行业类型") + private String trainType; + //培训行业类型名称 + @ApiModelProperty(value = "培训行业类型名称") + private String trainTypeName; + //培训地点 + @ApiModelProperty(value = "培训地点") + private String trainingLocation; + //机构ID + @ApiModelProperty(value = "机构ID") + private Long corpinfoId; + //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 + @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") + private Integer state; + //培训有效期日期 开始时间 + @ApiModelProperty(value = "培训有效期日期 开始时间") + private String validStartTime; + //培训有效期日期 结束时间 + @ApiModelProperty(value = "培训有效期日期 结束时间") + private String validEndTime; + //1考试0不考试 + @ApiModelProperty(value = "1考试0不考试") + private Integer examination; + @ApiModelProperty(value = "培训时长") + private Long trainDurationTime; + @ApiModelProperty(value = "培训科目") + private String trainSubject; + + @ApiModelProperty(value = "视频时长") + private BigDecimal videoTotalTime; + @ApiModelProperty(value = "课件数") + private Integer videoCount; + + @ApiModelProperty(value = "打卡签到人脸图片路径") + private String signFaceUrl; + @ApiModelProperty(value = "考试签到人脸图片路径") + private String examSignFaceUrl; + + + @ApiModelProperty(value = "学员数") + private Long studentCount; + + public void initClassSign(ClassE classE, Long studentCount, List classCurList) { + BeanUtils.copyProperties(classE, this); + String trainSubject = classCurList.stream().map(ClassCurriculumE::getCurriculumName).collect(Collectors.joining(",")); + + setTrainSubject(trainSubject); + setStudentCount(studentCount); + setClzId(classE.getId()); + } + +} diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/PersonArchivesE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/PersonArchivesE.java index c0aede6..4d85c18 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/PersonArchivesE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/PersonArchivesE.java @@ -229,4 +229,5 @@ public class PersonArchivesE extends BaseE { } } } + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewDO.java index 5d652d1..96afe61 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewDO.java @@ -1,5 +1,6 @@ package com.zcloud.edu.persistence.dataobject.archives; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.jjb.saas.framework.repository.basedo.BaseDO; import io.swagger.annotations.ApiModelProperty; @@ -34,7 +35,7 @@ public class ArchivesReviewDO extends BaseDO { private String bookNum; //班级所属企业id @ApiModelProperty(value = "班级所属企业id") - private Integer corpinfoId; + private Long corpinfoId; //编写单位 @ApiModelProperty(value = "编写单位") private String corpName; @@ -56,6 +57,10 @@ public class ArchivesReviewDO extends BaseDO { //会审意见 @ApiModelProperty(value = "会审意见") private String reviewOpinions; + // 教材名称 + @ApiModelProperty(value = "教材名称") + @TableField(exist = false) + private String curriculumName; } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordItemDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordItemDO.java index 43b83c7..a2d523b 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordItemDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordItemDO.java @@ -1,5 +1,6 @@ package com.zcloud.edu.persistence.dataobject.study; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.jjb.saas.framework.repository.basedo.BaseDO; import io.swagger.annotations.ApiModelProperty; @@ -7,6 +8,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import java.math.BigDecimal; + /** * web-infrastructure * @@ -41,5 +44,42 @@ public class StudentExamRecordItemDO extends BaseDO { private String answerRight; + @ApiModelProperty(value = "试题类型(1单选题、2多选题、3判断题)") + @TableField(exist = false) + private Integer questionType; + //题干 + @ApiModelProperty(value = "题干") + @TableField(exist = false) + private String questionDry; + //选项A + @ApiModelProperty(value = "选项A") + @TableField(exist = false) + private String optionA; + //选项B + @ApiModelProperty(value = "选项B") + @TableField(exist = false) + private String optionB; + //选项C + @ApiModelProperty(value = "选项C") + @TableField(exist = false) + private String optionC; + //选项D + @ApiModelProperty(value = "选项D") + @TableField(exist = false) + private String optionD; + //课件类型(1:视频课件、2:试卷习题) + @ApiModelProperty(value = "课件类型(1:视频课件、2:试卷习题)") + @TableField(exist = false) + private Integer coursewareType; + //答案解析 + @ApiModelProperty(value = "答案解析") + @TableField(exist = false) + private String descr; + //分值 + @ApiModelProperty(value = "分值") + @TableField(exist = false) + private BigDecimal score; + + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewMapper.java index d144fa9..c091567 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewMapper.java @@ -1,8 +1,12 @@ package com.zcloud.edu.persistence.mapper.archives; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; +import com.zcloud.edu.persistence.dataobject.study.ClassDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * web-infrastructure @@ -12,6 +16,8 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ArchivesReviewMapper extends BaseMapper { + IPage listPage(IPage page, @Param("ew") QueryWrapper queryWrapper, String menuPerms); + ArchivesReviewDO getInfoById(@Param("id") Long id); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewRecordMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewRecordMapper.java index 1d4af7f..0cf596f 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewRecordMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewRecordMapper.java @@ -3,6 +3,9 @@ package com.zcloud.edu.persistence.mapper.archives; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * web-infrastructure @@ -12,6 +15,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ArchivesReviewRecordMapper extends BaseMapper { - } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordItemMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordItemMapper.java index 676f37d..6776259 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordItemMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordItemMapper.java @@ -3,6 +3,9 @@ package com.zcloud.edu.persistence.mapper.study; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordItemDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * web-infrastructure @@ -12,6 +15,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface StudentExamRecordItemMapper extends BaseMapper { - + List listByExamRecordId(@Param("examRecordId") String examRecordId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRecordRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRecordRepository.java index 4e2c022..f9e38b9 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRecordRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRecordRepository.java @@ -4,6 +4,7 @@ import com.alibaba.cola.dto.PageResponse; import com.jjb.saas.framework.repository.repo.BaseRepository; import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import java.util.List; import java.util.Map; /** @@ -14,5 +15,7 @@ import java.util.Map; */ public interface ArchivesReviewRecordRepository extends BaseRepository { PageResponse listPage(Map params); + + List listByReviewId(String reviewId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRepository.java index 10bdd46..4a0ed4c 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRepository.java @@ -14,5 +14,7 @@ import java.util.Map; */ public interface ArchivesReviewRepository extends BaseRepository { PageResponse listPage(Map params); + + ArchivesReviewDO getInfoById(Long id); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRecordRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRecordRepositoryImpl.java index 935fe5b..640cadd 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRecordRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRecordRepositoryImpl.java @@ -13,6 +13,7 @@ import com.zcloud.gbscommon.utils.Query; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -35,5 +36,14 @@ public class ArchivesReviewRecordRepositoryImpl extends BaseRepositoryImpl result = archivesReviewRecordMapper.selectPage(iPage, queryWrapper); return PageHelper.pageToResponse(result, result.getRecords()); } + + @Override + public List listByReviewId(String reviewId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("archives_review_id", reviewId); + queryWrapper.eq("delete_enum", "FALSE"); + queryWrapper.orderByDesc("create_time"); + return archivesReviewRecordMapper.selectList(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRepositoryImpl.java index af200d1..d71a1ad 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRepositoryImpl.java @@ -30,10 +30,16 @@ public class ArchivesReviewRepositoryImpl extends BaseRepositoryImpl listPage(Map params) { IPage iPage = new Query().getPage(params); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params); - queryWrapper.orderByDesc("create_time"); - IPage result = archivesReviewMapper.selectPage(iPage, queryWrapper); + queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params, "cc."); + queryWrapper.eq("cc.delete_enum", "FALSE"); + queryWrapper.orderByDesc("cc.create_time"); + IPage result = archivesReviewMapper.listPage(iPage, queryWrapper, null); return PageHelper.pageToResponse(result, result.getRecords()); } + + @Override + public ArchivesReviewDO getInfoById(Long id) { + return archivesReviewMapper.getInfoById(id); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordItemRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordItemRepositoryImpl.java index 744ee62..ace3bfa 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordItemRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordItemRepositoryImpl.java @@ -58,11 +58,7 @@ public class StudentExamRecordItemRepositoryImpl extends BaseRepositoryImpl listByExamRecordId(String examRecordId) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("exam_record_id", examRecordId); - queryWrapper.eq("delete_enum", "FALSE"); - queryWrapper.orderByDesc("create_time"); - return studentExamRecordItemMapper.selectList(queryWrapper); + return studentExamRecordItemMapper.listByExamRecordId(examRecordId); } } diff --git a/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml index b8dff85..a45a984 100644 --- a/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml @@ -3,6 +3,27 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + diff --git a/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordItemMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordItemMapper.xml index 5ac2ad7..ffb3fb0 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordItemMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordItemMapper.xml @@ -3,6 +3,25 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + diff --git a/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml index 2cefd45..cdc0065 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml @@ -7,17 +7,26 @@ SELECT s.name student_name, cl.name class_name, - ss.create_time, cl.training_location, - ss.type, - ss.face_url + ss.* FROM student_sign ss LEFT JOIN student s ON ss.student_id = ss.student_id LEFT JOIN class cl ON cl.class_id = s.class_id - WHERE - ss.student_id = #{params.studentId} + + + AND ss.class_id = #{params.classId} + + + AND ss.student_id = #{params.studentId} + AND ss.delete_enum = 'FALSE' + and ss.sign_url is not null + and ss.sign_url != '' + order by + ss.create_time desc + +