diff --git a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassController.java b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassController.java index d521981..058153b 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassController.java @@ -8,10 +8,7 @@ import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.api.study.ClassServiceI; import com.zcloud.edu.dto.clientobject.study.ClassCO; import com.zcloud.edu.dto.data.study.ClassQuestionDTO; -import com.zcloud.edu.dto.study.ClassAddCmd; -import com.zcloud.edu.dto.study.ClassPageQry; -import com.zcloud.edu.dto.study.ClassPostponeCmd; -import com.zcloud.edu.dto.study.ClassUpdateCmd; +import com.zcloud.edu.dto.study.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -39,5 +36,6 @@ public class AppClassController { return classService.appListPage(qry); } + } diff --git a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassExamPaperController.java b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassExamPaperController.java new file mode 100644 index 0000000..a1e720f --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppClassExamPaperController.java @@ -0,0 +1,93 @@ +package com.zcloud.edu.app.study; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.Response; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.api.study.ClassExamPaperServiceI; +import com.zcloud.edu.dto.clientobject.study.ClassExamPaperCO; +import com.zcloud.edu.dto.study.ClassExamPaperAddCmd; +import com.zcloud.edu.dto.study.ClassExamPaperAutoAddCmd; +import com.zcloud.edu.dto.study.ClassExamPaperPageQry; +import com.zcloud.edu.dto.study.ClassExamPaperUpdateCmd; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-01-13 14:18:21 + */ +@Api(tags = "班级考试信息") +@RequestMapping("/${application.gateway}/app/classExamPaper") +@RestController +@AllArgsConstructor +public class AppClassExamPaperController { + private final ClassExamPaperServiceI classExamPaperService; + + @ApiOperation("新增") + @PostMapping("/save") + public SingleResponse add(@Validated @RequestBody ClassExamPaperAddCmd cmd) { + return classExamPaperService.add(cmd); + } + + @ApiOperation("自动生成试卷") + @PostMapping("/autoSave") + public SingleResponse autoSave(@Validated @RequestBody ClassExamPaperAutoAddCmd cmd) { + return classExamPaperService.autoSave(cmd); + } + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody ClassExamPaperPageQry qry) { + return classExamPaperService.listPage(qry); + } + + @ApiOperation("所有数据") + @GetMapping("/listAll") + public MultiResponse listAll() { + return MultiResponse.of(new ArrayList()); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return classExamPaperService.getInfoById(id); + } + + + @ApiOperation("详情") + @GetMapping("/getInfoByClassId/{classId}") + public SingleResponse getInfoByClassId(@PathVariable("classId") String classId) { + return classExamPaperService.getInfoByClassId(classId); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public Response remove(@PathVariable("id") Long id) { + classExamPaperService.remove(id); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("删除多个") + @DeleteMapping("/ids") + public Response removeBatch(@RequestParam Long[] ids) { + classExamPaperService.removeBatch(ids); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("修改") + @PutMapping("/edit") + public SingleResponse edit(@Validated @RequestBody ClassExamPaperUpdateCmd classExamPaperUpdateCmd) { + classExamPaperService.edit(classExamPaperUpdateCmd); + return SingleResponse.buildSuccess(); + } +} + diff --git a/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentExamRecordController.java b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentExamRecordController.java new file mode 100644 index 0000000..dff29a6 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentExamRecordController.java @@ -0,0 +1,57 @@ +package com.zcloud.edu.app.study; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +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.zcloud.edu.api.study.StudentExamRecordServiceI; +import com.zcloud.edu.dto.clientobject.study.StudentExamRecordCO; +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import com.zcloud.edu.dto.study.StudentExamRecordAddCmd; +import com.zcloud.edu.dto.study.StudentExamRecordPageQry; +import com.zcloud.edu.dto.study.StudentExamRecordUpdateCmd; +import com.zcloud.edu.dto.study.StudentSignPageQry; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-01-13 14:18:16 + */ +@Api(tags = "考试信息") +@RequestMapping("/${application.gateway}/app/studentExamRecord") +@RestController +@AllArgsConstructor +public class AppStudentExamRecordController { + private final StudentExamRecordServiceI studentExamRecordService; + + @ApiOperation("提交试卷") + @PostMapping("/submit") + public SingleResponse submit(@Validated @RequestBody StudentExamRecordAddCmd cmd) { + SSOUser ssoUser = AuthContext.getCurrentUser(); + return studentExamRecordService.add(cmd); + } + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody StudentExamRecordPageQry qry) { + return studentExamRecordService.listPage(qry); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return studentExamRecordService.getInfoById(id); + } +} + 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 new file mode 100644 index 0000000..8a0a584 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/app/study/AppStudentSignController.java @@ -0,0 +1,84 @@ +package com.zcloud.edu.app.study; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +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.zcloud.edu.api.study.StudentSignServiceI; +import com.zcloud.edu.dto.clientobject.study.StudentCO; +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import com.zcloud.edu.dto.study.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-01-13 14:18:19 + */ +@Api(tags = "学员签到") +@RequestMapping("/${application.gateway}/app/studentSign") +@RestController +@AllArgsConstructor +public class AppStudentSignController { + private final StudentSignServiceI studentSignService; + + @ApiOperation("对比人脸") + @PostMapping("/compareFace") + public SingleResponse compareFace(@Validated StudentSignAddCmd cmd) { + return studentSignService.add(cmd); + } + @ApiOperation("验证是否可签到") + @PostMapping("/verify") + public SingleResponse verify(@RequestBody StudentSignVerifyQry qry) { + return studentSignService.verify(qry); + } + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody StudentSignPageQry qry) { + return studentSignService.listPage(qry); + } + + @ApiOperation("所有数据") + @PostMapping("/listAll") + public MultiResponse listAll(@RequestBody ClassAppSignQry qry) { + return studentSignService.listAll(qry); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return SingleResponse.of(new StudentSignCO()); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public Response remove(@PathVariable("id") Long id) { + studentSignService.remove(id); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("删除多个") + @DeleteMapping("/ids") + public Response removeBatch(@RequestParam Long[] ids) { + studentSignService.removeBatch(ids); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("上传签到签字") + @PostMapping("/uploadSignUrl") + public SingleResponse edit(@Validated @RequestBody StudentSignUpdateCmd studentSignUpdateCmd) { + studentSignService.edit(studentSignUpdateCmd); + return SingleResponse.buildSuccess(); + } +} + 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 new file mode 100644 index 0000000..6593bb7 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesController.java @@ -0,0 +1,71 @@ +package com.zcloud.edu.web.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.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.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.ClassPageQry; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zhangyue + * @date 2026/1/26 15:08 + */ +@Api(tags = "") +@RequestMapping("/${application.gateway}/archives") +@RestController +@AllArgsConstructor +public class ArchivesController { + private final ClassServiceI classService; + private final StudentServiceI studentService; + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody ClassPageQry qry) { + return classService.listStudentClass(qry); + } + + @ApiOperation("查询学时证明") + @PostMapping("/getAttendanceRecord") + public SingleResponse getAttendanceRecord(@RequestBody ClassArchivesQry qry) { + return studentService.getAttendanceRecord(qry); + } + + @ApiOperation("查询学习档案") + @PostMapping("/getStudyArchives") + public SingleResponse getStudyArchives(@RequestBody ClassArchivesQry qry) { + return studentService.getStudyArchives(qry); + } + + @ApiOperation("查询学习记录") + @PostMapping("/getStudyRecord") + public SingleResponse getStudyRecord(@RequestBody ClassArchivesQry qry) { + return studentService.getStudyRecord(qry); + } + + @ApiOperation("签字表") + @PostMapping("/getClassSign") + public SingleResponse getClassSign(@RequestBody ClassArchivesQry qry) { + return studentService.getClassSign(qry); + } + + @ApiOperation("学员考核成绩统计表") + @PostMapping("/getClassExamResult") + public SingleResponse getClassExamResult(@RequestBody ClassArchivesQry qry) { + return studentService.getClassExamResult(qry); + } + +} diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesPdfFileController.java b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesPdfFileController.java new file mode 100644 index 0000000..e79f708 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesPdfFileController.java @@ -0,0 +1,82 @@ +package com.zcloud.edu.web.archives; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +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.zcloud.edu.api.archives.ArchivesPdfFileServiceI; +import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd; +import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry; +import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@Api(tags = "") +@RequestMapping("/${application.gateway}/archivesPdfFile") +@RestController +@AllArgsConstructor +public class ArchivesPdfFileController { + private final ArchivesPdfFileServiceI archivesPdfFileService; + + @ApiOperation("新增") + @PostMapping("/save") + public SingleResponse add(@Validated @RequestBody ArchivesPdfFileAddCmd cmd) { + SSOUser ssoUser = AuthContext.getCurrentUser(); + return archivesPdfFileService.add(cmd); + } + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody ArchivesPdfFilePageQry qry) { + return archivesPdfFileService.listPage(qry); + } + + @ApiOperation("所有数据") + @GetMapping("/listAll") + public MultiResponse listAll() { + return MultiResponse.of(new ArrayList()); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return SingleResponse.of(new ArchivesPdfFileCO()); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public Response remove(@PathVariable("id") Long id) { + archivesPdfFileService.remove(id); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("删除多个") + @DeleteMapping("/ids") + public Response removeBatch(@RequestParam Long[] ids) { + archivesPdfFileService.removeBatch(ids); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("修改") + @PutMapping("/edit") + public SingleResponse edit(@Validated @RequestBody ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) { + archivesPdfFileService.edit(archivesPdfFileUpdateCmd); + return SingleResponse.buildSuccess(); + } +} + 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 new file mode 100644 index 0000000..fd24ed5 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewController.java @@ -0,0 +1,82 @@ +package com.zcloud.edu.web.archives; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +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.zcloud.edu.api.archives.ArchivesReviewServiceI; +import com.zcloud.edu.dto.archives.ArchivesReviewAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewPageQry; +import com.zcloud.edu.dto.archives.ArchivesReviewUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewCO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Api(tags = "") +@RequestMapping("/${application.gateway}/archivesReview") +@RestController +@AllArgsConstructor +public class ArchivesReviewController { + private final ArchivesReviewServiceI archivesReviewService; + + @ApiOperation("新增") + @PostMapping("/save") + public SingleResponse add(@Validated @RequestBody ArchivesReviewAddCmd cmd) { + SSOUser ssoUser = AuthContext.getCurrentUser(); + return archivesReviewService.add(cmd); + } + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody ArchivesReviewPageQry qry) { + return archivesReviewService.listPage(qry); + } + + @ApiOperation("所有数据") + @GetMapping("/listAll") + public MultiResponse listAll() { + return MultiResponse.of(new ArrayList()); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return archivesReviewService.getInfoById(id); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public Response remove(@PathVariable("id") Long id) { + archivesReviewService.remove(id); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("删除多个") + @DeleteMapping("/ids") + public Response removeBatch(@RequestParam Long[] ids) { + archivesReviewService.removeBatch(ids); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("修改") + @PutMapping("/edit") + public SingleResponse edit(@Validated @RequestBody ArchivesReviewUpdateCmd archivesReviewUpdateCmd) { + archivesReviewService.edit(archivesReviewUpdateCmd); + return SingleResponse.buildSuccess(); + } +} + 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 new file mode 100644 index 0000000..6b6dbc0 --- /dev/null +++ b/web-adapter/src/main/java/com/zcloud/edu/web/archives/ArchivesReviewRecordController.java @@ -0,0 +1,82 @@ +package com.zcloud.edu.web.archives; + + +import com.alibaba.cola.dto.MultiResponse; +import com.alibaba.cola.dto.PageResponse; +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; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; + +/** + * web-adapter + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@Api(tags = "") +@RequestMapping("/${application.gateway}/archivesReviewRecord") +@RestController +@AllArgsConstructor +public class ArchivesReviewRecordController { + private final ArchivesReviewRecordServiceI archivesReviewRecordService; + + @ApiOperation("新增") + @PostMapping("/save") + public SingleResponse add(@Validated @RequestBody ArchivesReviewRecordAddCmd cmd) { + return archivesReviewRecordService.add(cmd); + } + + @ApiOperation("分页") + @PostMapping("/list") + public PageResponse page(@RequestBody ArchivesReviewRecordPageQry qry) { + return archivesReviewRecordService.listPage(qry); + } + + @ApiOperation("所有数据") + @GetMapping("/listAll") + public MultiResponse listAll() { + return MultiResponse.of(new ArrayList()); + } + + @ApiOperation("详情") + @GetMapping("/{id}") + public SingleResponse getInfoById(@PathVariable("id") Long id) { + return SingleResponse.of(new ArchivesReviewRecordCO()); + } + + @ApiOperation("删除") + @PostMapping("/{id}") + public Response remove(@PathVariable("id") Long id) { + archivesReviewRecordService.remove(id); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("删除多个") + @DeleteMapping("/ids") + public Response removeBatch(@RequestParam Long[] ids) { + archivesReviewRecordService.removeBatch(ids); + return SingleResponse.buildSuccess(); + } + + @ApiOperation("修改") + @PutMapping("/edit") + public SingleResponse edit(@Validated @RequestBody ArchivesReviewRecordUpdateCmd archivesReviewRecordUpdateCmd) { + archivesReviewRecordService.edit(archivesReviewRecordUpdateCmd); + return SingleResponse.buildSuccess(); + } +} + diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/resource/ExamPaperController.java b/web-adapter/src/main/java/com/zcloud/edu/web/resource/ExamPaperController.java index c17d184..118fea3 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/resource/ExamPaperController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/resource/ExamPaperController.java @@ -29,7 +29,7 @@ public class ExamPaperController { @ApiOperation("新增试卷") @PostMapping("/save") - public SingleResponse add(@Validated @RequestBody ExamPaperAddCmd cmd) { + public SingleResponse add(@Validated ExamPaperAddCmd cmd) { return examPaperService.add(cmd); } @ApiOperation("新增继承试卷") diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassController.java index f5f6440..8da2f0a 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassController.java @@ -7,12 +7,10 @@ import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.api.study.ClassServiceI; import com.zcloud.edu.dto.clientobject.study.ClassCO; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.study.ClassCountDTO; import com.zcloud.edu.dto.data.study.ClassQuestionDTO; -import com.zcloud.edu.dto.study.ClassAddCmd; -import com.zcloud.edu.dto.study.ClassPageQry; -import com.zcloud.edu.dto.study.ClassPostponeCmd; -import com.zcloud.edu.dto.study.ClassUpdateCmd; +import com.zcloud.edu.dto.study.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -72,6 +70,11 @@ public class ClassController { public MultiResponse countClassStudent() { return MultiResponse.of(new ArrayList()); } + @ApiOperation("统计人员班级数") + @PostMapping("/countStuClass") + public MultiResponse countStuClass(@RequestBody ClassCountQry qry) { + return classService.countStuClass(qry); + } @ApiOperation("详情") @GetMapping("/{id}") diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassCurriculumController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassCurriculumController.java index eb38715..8b26966 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassCurriculumController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassCurriculumController.java @@ -9,9 +9,7 @@ import com.jjb.saas.framework.auth.model.SSOUser; import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.api.study.ClassCurriculumServiceI; import com.zcloud.edu.dto.clientobject.study.ClassCurriculumCO; -import com.zcloud.edu.dto.study.ClassCurriculumAddCmd; -import com.zcloud.edu.dto.study.ClassCurriculumPageQry; -import com.zcloud.edu.dto.study.ClassCurriculumUpdateCmd; +import com.zcloud.edu.dto.study.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -41,6 +39,12 @@ public class ClassCurriculumController { return classCurriculumService.add(cmdList); } + @ApiOperation("批量新增") + @PostMapping("/saveBatch") + public Response batchAdd(@Validated @RequestBody ClassCurriculumBatchAddCmd cmd) { + return classCurriculumService.batchAdd(cmd); + } + @ApiOperation("分页") @PostMapping("/list") public PageResponse page(@RequestBody ClassCurriculumPageQry qry) { @@ -48,9 +52,9 @@ public class ClassCurriculumController { } @ApiOperation("所有数据") - @GetMapping("/listAll") - public MultiResponse listAll() { - return MultiResponse.of(new ArrayList()); + @PostMapping("/listAll") + public MultiResponse listAll(@RequestBody ClassCurriculumQry qry) { + return classCurriculumService.listAll(qry); } @ApiOperation("详情") diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassExamPaperController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassExamPaperController.java index b3b443c..dbb61b1 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassExamPaperController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/ClassExamPaperController.java @@ -59,11 +59,10 @@ public class ClassExamPaperController { } @ApiOperation("详情") - @GetMapping("/{id}") - public SingleResponse getInfoById(@PathVariable("id") Long id) { - return classExamPaperService.getInfoById(id); + @GetMapping("/getInfoByClassId/{classId}") + public SingleResponse getInfoByClassId(@PathVariable("classId") String classId) { + return classExamPaperService.getInfoByClassId(classId); } - @ApiOperation("删除") @DeleteMapping("/{id}") public Response remove(@PathVariable("id") Long id) { 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..b48ef26 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 @@ -10,6 +10,7 @@ import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.api.study.StudentServiceI; import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.study.StudentAddCmd; +import com.zcloud.edu.dto.study.StudentCountQry; import com.zcloud.edu.dto.study.StudentPageQry; import com.zcloud.edu.dto.study.StudentUpdateCmd; import io.swagger.annotations.Api; @@ -47,6 +48,11 @@ public class StudentController { public PageResponse page(@RequestBody StudentPageQry qry) { return studentService.listPage(qry); } + @ApiOperation("培训记录管理分页") + @PostMapping("/listPageClassByStudent") + public PageResponse listPageClassByStudent(@RequestBody StudentPageQry qry) { + return studentService.listPageClassByStudent(qry); + } @ApiOperation("所有数据") @GetMapping("/listAll") @@ -54,12 +60,37 @@ public class StudentController { return MultiResponse.of(new ArrayList()); } + + + @ApiOperation("查询用户统计") + @PostMapping("/listStudentCount") + public MultiResponse listStudentCount(@RequestBody StudentCountQry qry) { + return studentService.listStudentCount(qry); + } + @ApiOperation("详情") @GetMapping("/{id}") public SingleResponse getInfoById(@PathVariable("id") Long id) { return SingleResponse.of(new StudentCO()); } + @ApiOperation("查看学员详情") + @GetMapping("/getInfoByStudentId/{studentId}") + public SingleResponse getInfoByStudentId(@PathVariable("studentId") String studentId) { + return studentService.getInfoByStudentId(studentId); + } + @ApiOperation("班级内学员数") + @GetMapping("/countStudent/{classId}") + public SingleResponse countStudent(@PathVariable("classId") String classId) { + return SingleResponse.of(studentService.countStudent(classId)); + } + + @ApiOperation("根据企业统计学员") + @PostMapping("/countStudentByCorpId") + public MultiResponse countStudentByCorpId(@RequestBody StudentCountQry qry) { + return studentService.countStudentByCorpId(qry); + } + @ApiOperation("删除") @PostMapping("/{id}") public Response remove(@PathVariable("id") Long 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 8f02cf1..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 @@ -58,6 +58,12 @@ public class StudentExamRecordController { return SingleResponse.of(new StudentExamRecordCO()); } + @ApiOperation("查询考试记录") + @GetMapping("/getInfoByStudentId/{studentId}") + public SingleResponse getInfoByStudentId(@PathVariable("studentId") String studentId) { + return studentExamRecordService.getInfoByStudentId(studentId); + } + @ApiOperation("删除") @DeleteMapping("/{id}") public Response remove(@PathVariable("id") Long id) { 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/ArchivesPdfFileAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileAddExe.java new file mode 100644 index 0000000..b0848ad --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileAddExe.java @@ -0,0 +1,40 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway; +import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE; +import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@Component +@AllArgsConstructor +public class ArchivesPdfFileAddExe { + private final ArchivesPdfFileGateway archivesPdfFileGateway; + + @Transactional(rollbackFor = Exception.class) + public boolean execute(ArchivesPdfFileAddCmd cmd) { + ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE(); + BeanUtils.copyProperties(cmd, archivesPdfFileE); + boolean res = false; + try { + res = archivesPdfFileGateway.add(archivesPdfFileE); + } catch (Exception e) { + throw new RuntimeException(e); + } + if (!res) { + throw new BizException("保存失败"); + } + return true; + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileRemoveExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileRemoveExe.java new file mode 100644 index 0000000..8266aaf --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileRemoveExe.java @@ -0,0 +1,39 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Component +@AllArgsConstructor +public class ArchivesPdfFileRemoveExe { + private final ArchivesPdfFileGateway archivesPdfFileGateway; + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long id) { + boolean res = archivesPdfFileGateway.deletedArchivesPdfFileById(id); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long[] ids) { + boolean res = archivesPdfFileGateway.deletedArchivesPdfFileByIds(ids); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileUpdateExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileUpdateExe.java new file mode 100644 index 0000000..673a772 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesPdfFileUpdateExe.java @@ -0,0 +1,34 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway; +import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE; +import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Component +@AllArgsConstructor +public class ArchivesPdfFileUpdateExe { + private final ArchivesPdfFileGateway archivesPdfFileGateway; + + @Transactional(rollbackFor = Exception.class) + public void execute(ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) { + ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE(); + BeanUtils.copyProperties(archivesPdfFileUpdateCmd, archivesPdfFileE); + boolean res = archivesPdfFileGateway.update(archivesPdfFileE); + if (!res) { + throw new BizException("修改失败"); + } + } +} + 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 new file mode 100644 index 0000000..6f4b8bd --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewAddExe.java @@ -0,0 +1,60 @@ +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 + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Component +@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); + } + if (!res) { + throw new BizException("保存失败"); + } + return true; + } +} + 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 new file mode 100644 index 0000000..9bca2ee --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordAddExe.java @@ -0,0 +1,41 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewRecordGateway; +import com.zcloud.edu.domain.model.archives.ArchivesReviewRecordE; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordAddCmd; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewRecordAddExe { + private final ArchivesReviewRecordGateway archivesReviewRecordGateway; + + @Transactional(rollbackFor = Exception.class) + public boolean execute(ArchivesReviewRecordAddCmd cmd) { + ArchivesReviewRecordE archivesReviewRecordE = new ArchivesReviewRecordE(); + BeanUtils.copyProperties(cmd, archivesReviewRecordE); + archivesReviewRecordE.init(); + boolean res = false; + try { + res = archivesReviewRecordGateway.add(archivesReviewRecordE); + } catch (Exception e) { + throw new RuntimeException(e); + } + if (!res) { + throw new BizException("保存失败"); + } + return true; + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordRemoveExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordRemoveExe.java new file mode 100644 index 0000000..c4d5066 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordRemoveExe.java @@ -0,0 +1,39 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewRecordGateway; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewRecordRemoveExe { + private final ArchivesReviewRecordGateway archivesReviewRecordGateway; + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long id) { + boolean res = archivesReviewRecordGateway.deletedArchivesReviewRecordById(id); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long[] ids) { + boolean res = archivesReviewRecordGateway.deletedArchivesReviewRecordByIds(ids); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordUpdateExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordUpdateExe.java new file mode 100644 index 0000000..ce86853 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRecordUpdateExe.java @@ -0,0 +1,34 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewRecordGateway; +import com.zcloud.edu.domain.model.archives.ArchivesReviewRecordE; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordUpdateCmd; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewRecordUpdateExe { + private final ArchivesReviewRecordGateway archivesReviewRecordGateway; + + @Transactional(rollbackFor = Exception.class) + public void execute(ArchivesReviewRecordUpdateCmd archivesReviewRecordUpdateCmd) { + ArchivesReviewRecordE archivesReviewRecordE = new ArchivesReviewRecordE(); + BeanUtils.copyProperties(archivesReviewRecordUpdateCmd, archivesReviewRecordE); + boolean res = archivesReviewRecordGateway.update(archivesReviewRecordE); + if (!res) { + throw new BizException("修改失败"); + } + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRemoveExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRemoveExe.java new file mode 100644 index 0000000..3149d8e --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewRemoveExe.java @@ -0,0 +1,39 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewGateway; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewRemoveExe { + private final ArchivesReviewGateway archivesReviewGateway; + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long id) { + boolean res = archivesReviewGateway.deletedArchivesReviewById(id); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } + + @Transactional(rollbackFor = Exception.class) + public boolean execute(Long[] ids) { + boolean res = archivesReviewGateway.deletedArchivesReviewByIds(ids); + if (!res) { + throw new BizException("删除失败"); + } + return true; + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewUpdateExe.java b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewUpdateExe.java new file mode 100644 index 0000000..25ff445 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/archives/ArchivesReviewUpdateExe.java @@ -0,0 +1,34 @@ +package com.zcloud.edu.command.archives; + +import com.alibaba.cola.exception.BizException; +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewGateway; +import com.zcloud.edu.domain.model.archives.ArchivesReviewE; +import com.zcloud.edu.dto.archives.ArchivesReviewUpdateCmd; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewUpdateExe { + private final ArchivesReviewGateway archivesReviewGateway; + + @Transactional(rollbackFor = Exception.class) + public void execute(ArchivesReviewUpdateCmd archivesReviewUpdateCmd) { + ArchivesReviewE archivesReviewE = new ArchivesReviewE(); + BeanUtils.copyProperties(archivesReviewUpdateCmd, archivesReviewE); + boolean res = archivesReviewGateway.update(archivesReviewE); + if (!res) { + throw new BizException("修改失败"); + } + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesPdfFileCoConvertor.java b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesPdfFileCoConvertor.java new file mode 100644 index 0000000..0beb4b2 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesPdfFileCoConvertor.java @@ -0,0 +1,24 @@ +package com.zcloud.edu.command.convertor.archives; + +import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; +import org.mapstruct.Mapper; + +import java.util.List; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@Mapper(componentModel = "spring") +public interface ArchivesPdfFileCoConvertor { + /** + * @param archivesPdfFileDOs + * @return + */ + List converDOsToCOs(List archivesPdfFileDOs); +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewCoConvertor.java b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewCoConvertor.java new file mode 100644 index 0000000..0fc9b20 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewCoConvertor.java @@ -0,0 +1,24 @@ +package com.zcloud.edu.command.convertor.archives; + +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewCO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; +import org.mapstruct.Mapper; + +import java.util.List; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Mapper(componentModel = "spring") +public interface ArchivesReviewCoConvertor { + /** + * @param archivesReviewDOs + * @return + */ + List converDOsToCOs(List archivesReviewDOs); +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewRecordCoConvertor.java b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewRecordCoConvertor.java new file mode 100644 index 0000000..431136c --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/convertor/archives/ArchivesReviewRecordCoConvertor.java @@ -0,0 +1,24 @@ +package com.zcloud.edu.command.convertor.archives; + +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import org.mapstruct.Mapper; + +import java.util.List; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@Mapper(componentModel = "spring") +public interface ArchivesReviewRecordCoConvertor { + /** + * @param archivesReviewRecordDOs + * @return + */ + List converDOsToCOs(List archivesReviewRecordDOs); +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesPdfFileQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesPdfFileQueryExe.java new file mode 100644 index 0000000..4807481 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesPdfFileQueryExe.java @@ -0,0 +1,42 @@ +package com.zcloud.edu.command.query.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.zcloud.edu.command.convertor.archives.ArchivesPdfFileCoConvertor; +import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry; +import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository; +import com.zcloud.gbscommon.utils.PageQueryHelper; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Component +@AllArgsConstructor +public class ArchivesPdfFileQueryExe { + private final ArchivesPdfFileRepository archivesPdfFileRepository; + private final ArchivesPdfFileCoConvertor archivesPdfFileCoConvertor; + + /** + * 分页 + * + * @param archivesPdfFilePageQry + * @return + */ + public PageResponse execute(ArchivesPdfFilePageQry archivesPdfFilePageQry) { + Map params = PageQueryHelper.toHashMap(archivesPdfFilePageQry); + PageResponse pageResponse = archivesPdfFileRepository.listPage(params); + List examCenterCOS = archivesPdfFileCoConvertor.converDOsToCOs(pageResponse.getData()); + return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); + } +} + 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 new file mode 100644 index 0000000..d3b0943 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewQueryExe.java @@ -0,0 +1,71 @@ +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; +import java.util.Map; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewQueryExe { + private final ArchivesReviewRepository archivesReviewRepository; + private final ArchivesReviewCoConvertor archivesReviewCoConvertor; + private final ArchivesReviewRecordRepository archivesReviewRecordRepository; + private final ArchivesReviewRecordCoConvertor archivesReviewRecordCoConvertor; + + /** + * 分页 + * + * @param archivesReviewPageQry + * @return + */ + public PageResponse execute(ArchivesReviewPageQry archivesReviewPageQry) { + Map params = PageQueryHelper.toHashMap(archivesReviewPageQry); + PageResponse pageResponse = archivesReviewRepository.listPage(params); + 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/archives/ArchivesReviewRecordQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewRecordQueryExe.java new file mode 100644 index 0000000..67e80c8 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/command/query/archives/ArchivesReviewRecordQueryExe.java @@ -0,0 +1,42 @@ +package com.zcloud.edu.command.query.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.zcloud.edu.command.convertor.archives.ArchivesReviewRecordCoConvertor; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordPageQry; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRecordRepository; +import com.zcloud.gbscommon.utils.PageQueryHelper; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Component +@AllArgsConstructor +public class ArchivesReviewRecordQueryExe { + private final ArchivesReviewRecordRepository archivesReviewRecordRepository; + private final ArchivesReviewRecordCoConvertor archivesReviewRecordCoConvertor; + + /** + * 分页 + * + * @param archivesReviewRecordPageQry + * @return + */ + public PageResponse execute(ArchivesReviewRecordPageQry archivesReviewRecordPageQry) { + Map params = PageQueryHelper.toHashMap(archivesReviewRecordPageQry); + PageResponse pageResponse = archivesReviewRecordRepository.listPage(params); + List examCenterCOS = archivesReviewRecordCoConvertor.converDOsToCOs(pageResponse.getData()); + return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/resource/ExamPaperQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/resource/ExamPaperQueryExe.java index c9d9ce8..8d0f37f 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/resource/ExamPaperQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/resource/ExamPaperQueryExe.java @@ -2,6 +2,7 @@ package com.zcloud.edu.command.query.resource; import cn.hutool.core.bean.BeanUtil; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.exception.BizException; import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.command.convertor.resource.ExamPaperCoConvertor; import com.zcloud.edu.command.convertor.resource.QuestionCoConvertor; @@ -84,7 +85,7 @@ public class ExamPaperQueryExe { public ExamPaperCO getInfoById(Long id) { ExamPaperDO examPaperDO =examPaperRepository.getInfoById(id); if(examPaperDO==null){ - throw new RuntimeException("试卷不存在"); + throw new BizException("试卷不存在"); } ExamPaperCO examPaperCO =new ExamPaperCO(); BeanUtil.copyProperties(examPaperDO,examPaperCO); diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassCurriculumQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassCurriculumQueryExe.java index fae8de9..10e7529 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassCurriculumQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassCurriculumQueryExe.java @@ -1,5 +1,6 @@ package com.zcloud.edu.command.query.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.command.convertor.study.ClassCurriculumChapterCoConvertor; @@ -8,6 +9,7 @@ import com.zcloud.edu.domain.gateway.study.ClassCurriculumChapterGateway; import com.zcloud.edu.dto.clientobject.study.ClassCurriculumCO; import com.zcloud.edu.dto.clientobject.study.ClassCurriculumChapterCO; import com.zcloud.edu.dto.study.ClassCurriculumPageQry; +import com.zcloud.edu.dto.study.ClassCurriculumQry; import com.zcloud.edu.persistence.dataobject.study.ClassCurriculumChapterDO; import com.zcloud.edu.persistence.dataobject.study.ClassCurriculumDO; import com.zcloud.edu.persistence.repository.study.ClassCurriculumChapterRepository; @@ -21,6 +23,7 @@ import org.springframework.util.ObjectUtils; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** @@ -57,15 +60,31 @@ public class ClassCurriculumQueryExe { */ public SingleResponse executeGetInfoById(Long id) { ClassCurriculumDO classCurriculumDO = classCurriculumRepository.getInfoById(id); - List classCurriculumChapterDOList = classCurriculumChapterRepository.listByCurriculumId(classCurriculumDO.getClassCurriculumId()); + List classCurriculumChapterDOList = classCurriculumChapterRepository.listByClassCurriculumId(classCurriculumDO.getClassCurriculumId()); ClassCurriculumCO classCurriculumCO = new ClassCurriculumCO(); BeanUtils.copyProperties(classCurriculumDO, classCurriculumCO); List classCurriculumChapterCOList = classCurriculumChapterCoConvertor.converDOsToCOs(classCurriculumChapterDOList); long videoCount = classCurriculumChapterCOList.stream().filter(bean -> !ObjectUtils.isEmpty(bean.getVideoCoursewareId())).count(); - Tools.buildEntityTree(classCurriculumChapterCOList, "curriculumChapterId", "parentId", "children", "0"); - classCurriculumCO.setChapterList(classCurriculumChapterCOList); + List resultList = Tools.buildEntityTree(classCurriculumChapterCOList, "classCurriculumChapterId", "parentId", "childCurriculumChapterCOList", "0"); + classCurriculumCO.setCurriculumChapterCOList(resultList); classCurriculumCO.setVideoCount(videoCount); return SingleResponse.of(classCurriculumCO); } + + public MultiResponse executeListAll(ClassCurriculumQry qry) { + Map params = PageQueryHelper.toHashMap(qry); + List curList = classCurriculumRepository.listAll(params); + List classCurriculumIds = curList.stream().map(ClassCurriculumDO::getClassCurriculumId).collect(Collectors.toList()); + List chapterList = classCurriculumChapterRepository.listByClassCurriculumIds(classCurriculumIds); + List chapterCoList = classCurriculumChapterCoConvertor.converDOsToCOs(chapterList); + List resultList = Tools.buildEntityTree(chapterCoList, "classCurriculumChapterId", "parentId", "childCurriculumChapterCOList", "0"); + + Map> chapterMap = resultList.stream().collect(Collectors.groupingBy(ClassCurriculumChapterCO::getClassCurriculumId)); + List curriculumList = classCurriculumCoConvertor.converDOsToCOs(curList); + curriculumList.stream().forEach(bean -> { + bean.setCurriculumChapterCOList(chapterMap.get(bean.getClassCurriculumId())); + }); + return MultiResponse.of(curriculumList); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassExamPaperQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassExamPaperQueryExe.java index cea4357..11ceca2 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassExamPaperQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassExamPaperQueryExe.java @@ -1,17 +1,22 @@ package com.zcloud.edu.command.query.study; +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.ClassExamPaperCoConvertor; +import com.zcloud.edu.dto.clientobject.resource.QuestionCO; import com.zcloud.edu.dto.clientobject.study.ClassExamPaperCO; import com.zcloud.edu.dto.study.ClassExamPaperPageQry; +import com.zcloud.edu.persistence.dataobject.QuestionDO; import com.zcloud.edu.persistence.dataobject.study.ClassExamPaperDO; +import com.zcloud.edu.persistence.repository.resource.QuestionRepository; import com.zcloud.edu.persistence.repository.study.ClassExamPaperRepository; import com.zcloud.gbscommon.utils.PageQueryHelper; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -27,6 +32,7 @@ import java.util.Map; public class ClassExamPaperQueryExe { private final ClassExamPaperRepository classExamPaperRepository; private final ClassExamPaperCoConvertor classExamPaperCoConvertor; + private final QuestionRepository questionRepository; /** * 分页 @@ -52,5 +58,19 @@ public class ClassExamPaperQueryExe { BeanUtils.copyProperties(classExamPaperDO, classExamPaperCO); return SingleResponse.of(classExamPaperCO); } + /** + * 详情 + * @param classId + * @return + */ + public SingleResponse executeGetInfoByClassId(String classId) { + ClassExamPaperDO classExamPaperDO = classExamPaperRepository.findByClassId(classId); + List questionDOList = questionRepository.getInfoByExamPaperId(classExamPaperDO.getExamPaperId()); + List questionCOList = BeanUtil.copyToList(questionDOList, QuestionCO.class); + ClassExamPaperCO classExamPaperCO = new ClassExamPaperCO(); + BeanUtils.copyProperties(classExamPaperDO, classExamPaperCO); + classExamPaperCO.setQuestionList(questionCOList); + return SingleResponse.of(classExamPaperCO); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassQueryExe.java index fd9c7b7..b47e07a 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/ClassQueryExe.java @@ -1,15 +1,21 @@ package com.zcloud.edu.command.query.study; +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.cola.dto.MultiResponse; 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.study.ClassCoConvertor; +import com.zcloud.edu.command.convertor.study.StudentCoConvertor; import com.zcloud.edu.dto.clientobject.study.ClassCO; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.study.ClassCountDTO; import com.zcloud.edu.dto.data.study.ClassQuestionDTO; +import com.zcloud.edu.dto.study.ClassCountQry; import com.zcloud.edu.dto.study.ClassPageQry; import com.zcloud.edu.persistence.dataobject.study.ClassDO; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.ClassQuestionPO; import com.zcloud.edu.persistence.mapper.po.study.StudentCountPO; import com.zcloud.edu.persistence.repository.study.ClassRepository; @@ -37,6 +43,7 @@ public class ClassQueryExe { private final ClassRepository classRepository; private final ClassCoConvertor classCoConvertor; private final StudentRepository studentRepository; + private final StudentCoConvertor studentCoConvertor; /** * 分页 @@ -124,5 +131,19 @@ public class ClassQueryExe { BeanUtils.copyProperties(classDO, classCO); return SingleResponse.of(classCO); } + + public MultiResponse executeCountStuClass(ClassCountQry qry){ + Map params = PageQueryHelper.toHashMap(qry); + List studentDOList = studentRepository.countStuClass(params); + List studentCOList = BeanUtil.copyToList(studentDOList, StudentCO.class); + return MultiResponse.of(studentCOList); + } + public PageResponse executeListStudentClass(ClassPageQry classPageQry) { + Map params = PageQueryHelper.toHashMap(classPageQry); + PageResponse pageResponse = classRepository.listStudentClassPage(params); + List examCenterCOS = studentCoConvertor.converDOsToCOs(pageResponse.getData()); + return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); + } + } diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentExamRecordQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentExamRecordQueryExe.java index 6ded692..e7d7652 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentExamRecordQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentExamRecordQueryExe.java @@ -1,13 +1,19 @@ package com.zcloud.edu.command.query.study; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.command.convertor.study.StudentExamRecordCoConvertor; +import com.zcloud.edu.command.convertor.study.StudentExamRecordItemCoConvertor; import com.zcloud.edu.dto.clientobject.study.StudentExamRecordCO; +import com.zcloud.edu.dto.clientobject.study.StudentExamRecordItemCO; import com.zcloud.edu.dto.study.StudentExamRecordPageQry; import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordDO; +import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordItemDO; +import com.zcloud.edu.persistence.repository.study.StudentExamRecordItemRepository; import com.zcloud.edu.persistence.repository.study.StudentExamRecordRepository; 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 +31,8 @@ import java.util.Map; public class StudentExamRecordQueryExe { private final StudentExamRecordRepository studentExamRecordRepository; private final StudentExamRecordCoConvertor studentExamRecordCoConvertor; + private final StudentExamRecordItemRepository studentExamRecordItemRepository; + private final StudentExamRecordItemCoConvertor studentExamRecordItemCoConvertor; /** * 分页 @@ -38,5 +46,24 @@ public class StudentExamRecordQueryExe { List examCenterCOS = studentExamRecordCoConvertor.converDOsToCOs(pageResponse.getData()); return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); } + public SingleResponse executeGetInfoByStudentId(String studentId){ + StudentExamRecordDO studentExamRecordDO = studentExamRecordRepository.getInfoByStudentId(studentId); + StudentExamRecordCO studentExamRecordCO = new StudentExamRecordCO(); + BeanUtils.copyProperties(studentExamRecordDO, studentExamRecordCO); + List recordList = studentExamRecordItemRepository.listByExamRecordId(studentExamRecordDO.getStudentExamRecordId()); + List recordCoList = studentExamRecordItemCoConvertor.converDOsToCOs(recordList); + studentExamRecordCO.setExamRecordItemList(recordCoList); + return SingleResponse.of(studentExamRecordCO); + } + public SingleResponse executeGetInfoById(Long id){ + StudentExamRecordDO studentExamRecordDO = studentExamRecordRepository.getInfoById(id); + StudentExamRecordCO studentExamRecordCO = new StudentExamRecordCO(); + BeanUtils.copyProperties(studentExamRecordDO, studentExamRecordCO); + List recordList = studentExamRecordItemRepository.listByExamRecordId(studentExamRecordDO.getStudentExamRecordId()); + List recordCoList = studentExamRecordItemCoConvertor.converDOsToCOs(recordList); + studentExamRecordCO.setExamRecordItemList(recordCoList); + return SingleResponse.of(studentExamRecordCO); + } + } 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 7ec13e5..4119205 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 @@ -1,15 +1,29 @@ package com.zcloud.edu.command.query.study; +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.cola.dto.MultiResponse; 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.StudentCountQry; import com.zcloud.edu.dto.study.StudentPageQry; -import com.zcloud.edu.persistence.dataobject.study.StudentDO; -import com.zcloud.edu.persistence.repository.study.StudentRepository; +import com.zcloud.edu.persistence.dataobject.study.*; +import com.zcloud.edu.persistence.repository.study.*; import com.zcloud.gbscommon.utils.PageQueryHelper; import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -25,6 +39,10 @@ import java.util.Map; public class StudentQueryExe { private final StudentRepository studentRepository; private final StudentCoConvertor studentCoConvertor; + private final ClassRepository classRepository; + private final ClassCurriculumRepository classCurriculumRepository; + private final ClassCurriculumChapterRepository classCurriculumChapterRepository; + private final StudentSignRepository studentSignRepository; /** * 分页 @@ -38,5 +56,184 @@ public class StudentQueryExe { List examCenterCOS = studentCoConvertor.converDOsToCOs(pageResponse.getData()); return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); } + + public PageResponse executelistPageClassByStudent(StudentPageQry studentPageQry) { + Map params = PageQueryHelper.toHashMap(studentPageQry); + PageResponse pageResponse = studentRepository.listPageClassByStudent(params); + List examCenterCOS = studentCoConvertor.converDOsToCOs(pageResponse.getData()); + return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); + } + + public SingleResponse executeAttendanceRecord(ClassArchivesQry qry){ + StudentDO studentDO = studentRepository.getById(qry.getStuId()); + StudentE studentE = new StudentE(); + BeanUtils.copyProperties(studentDO, studentE); + ClassDO classDO = classRepository.getByClassId(studentDO.getClassId()); + ClassE classE = new ClassE(); + BeanUtils.copyProperties(classDO, classE); + HashMap params = new HashMap(); + params.put("classId", studentDO.getClassId()); + // 课程信息 + List curEList = classCurriculumRepository.listAll(params); + List classCurList = BeanUtil.copyToList(curEList, ClassCurriculumE.class); + + // 课件信息 + List classChapterList = classCurriculumChapterRepository.listVideoByClassId(classE.getClassId()); + List classChapterEList = BeanUtil.copyToList(classChapterList, ClassCurriculumChapterE.class); + + + PersonArchivesE personArchivesE = new PersonArchivesE(); + personArchivesE.initAttendanceRecord(studentE, classE, classChapterEList, classCurList); + PersonArchivesDTO personArchivesDTO = new PersonArchivesDTO(); + BeanUtils.copyProperties(personArchivesE, personArchivesDTO); + return SingleResponse.of(personArchivesDTO); + } + + public SingleResponse executeStudyArchives(ClassArchivesQry qry){ + // 学员信息 + StudentDO studentDO = studentRepository.getById(qry.getStuId()); + StudentDO studentUrl = studentRepository.findFaceUrlByPhone(studentDO.getPhone()); + StudentE studentE = new StudentE(); + studentE.setUserAvatarUrl(studentUrl.getUserAvatarUrl()); + BeanUtils.copyProperties(studentDO, studentE); + // 班级信息 + ClassDO classDO = classRepository.getByClassId(studentDO.getClassId()); + ClassE classE = new ClassE(); + BeanUtils.copyProperties(classDO, classE); + HashMap params = new HashMap(); + params.put("classId", studentDO.getClassId()); + // 课程信息 + List curEList = classCurriculumRepository.listAll(params); + List classCurList = BeanUtil.copyToList(curEList, ClassCurriculumE.class); + + PersonArchivesE personArchivesE = new PersonArchivesE(); + personArchivesE.init(studentE, classE, classCurList); + + + PersonArchivesDTO personArchivesDTO = new PersonArchivesDTO(); + BeanUtils.copyProperties(personArchivesE, personArchivesDTO); + + return SingleResponse.of(personArchivesDTO); + } + + + + + public SingleResponse executeStudyRecord(ClassArchivesQry qry){ + StudentDO studentDO = studentRepository.getById(qry.getStuId()); + StudentE studentE = new StudentE(); + BeanUtils.copyProperties(studentDO, studentE); + ClassDO classDO = classRepository.getByClassId(studentDO.getClassId()); + ClassE classE = new ClassE(); + BeanUtils.copyProperties(classDO, classE); + HashMap params = new HashMap(); + params.put("classId", studentDO.getClassId()); + // 课程信息 + List curEList = classCurriculumRepository.listAll(params); + List classCurList = BeanUtil.copyToList(curEList, ClassCurriculumE.class); + + // 签到照片 + params.put("studentId", studentDO.getStudentId()); + List studentSignList = studentSignRepository.listAllByStudentId(params); + List studentSignEList = BeanUtil.copyToList(studentSignList, StudentSignE.class); + + + PersonArchivesE personArchivesE = new PersonArchivesE(); + personArchivesE.initStudyRecord(studentE, classE, studentSignEList, classCurList); + PersonArchivesDTO personArchivesDTO = new PersonArchivesDTO(); + 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); + HashMap params = new HashMap(); + params.put("classId", 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); + + } + + public SingleResponse executeGetClassExamResult(ClassArchivesQry qry){ + // 班级信息 + ClassDO classDO = classRepository.getByClassId(qry.getClassId()); + ClassE classE = new ClassE(); + BeanUtils.copyProperties(classDO, classE); + + HashMap params = new HashMap(); + params.put("classId", qry.getClassId()); + + // 学员总数 + List stuList = studentRepository.listAll(params); + List stuCOList = BeanUtil.copyToList(stuList, StudentCO.class); + +// // 课程信息 +// List curEList = classCurriculumRepository.listAll(params); +// List classCurList = BeanUtil.copyToList(curEList, ClassCurriculumE.class); + + // 签到人员数量 + params.put("type",1); + List studentSignList = studentSignRepository.listAll(params); + ClassArchivesE classArchivesE = new ClassArchivesE(); + + // 整理数据 + classArchivesE.initClassExamResult(classE, stuList.size(), studentSignList.size()); + ClassArchivesDTO classArchivesDTO = new ClassArchivesDTO(); + BeanUtils.copyProperties(classArchivesE, classArchivesDTO); + // 获取通过和未通过学员 + List passStudentList = new ArrayList(); + List failStudentList = new ArrayList(); + stuCOList.forEach(stu -> { + if (stu.getState() == 0){ + failStudentList.add(stu); + } + if (stu.getState() == 1){ + passStudentList.add(stu); + } + }); + classArchivesDTO.setPassStudentList(passStudentList); + classArchivesDTO.setFailStudentList(failStudentList); + return SingleResponse.of(classArchivesDTO); + } + + + + + public MultiResponse executeCountStudentByCorpId(StudentCountQry qry){ + Map params = PageQueryHelper.toHashMap(qry); + List studentDOList = studentRepository.countStudentByCorpId(params); + List studentCOList = BeanUtil.copyToList(studentDOList, StudentCO.class); + return MultiResponse.of(studentCOList); + } + public MultiResponse executeListStudentCount(StudentCountQry qry){ + Map params = PageQueryHelper.toHashMap(qry); + List studentDOList = studentRepository.listStudentCount(params); + List studentCOList = BeanUtil.copyToList(studentDOList, StudentCO.class); + return MultiResponse.of(studentCOList); + } + + public SingleResponse executeGetInfoByStudentId(String studentId){ + StudentDO studentDO = studentRepository.findInfoByStudentId(studentId); + StudentCO studentCO = BeanUtil.copyProperties(studentDO, StudentCO.class); + return SingleResponse.of(studentCO); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentSignQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentSignQueryExe.java index 605e240..d443515 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentSignQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentSignQueryExe.java @@ -1,15 +1,33 @@ package com.zcloud.edu.command.query.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.Response; +import com.alibaba.cola.dto.SingleResponse; +import com.alibaba.cola.exception.BizException; import com.zcloud.edu.command.convertor.study.StudentSignCoConvertor; +import com.zcloud.edu.domain.model.study.ClassE; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.clientobject.study.StudentSignCO; +import com.zcloud.edu.dto.study.ClassAppSignQry; import com.zcloud.edu.dto.study.StudentSignPageQry; +import com.zcloud.edu.dto.study.StudentSignVerifyQry; +import com.zcloud.edu.persistence.dataobject.study.ClassDO; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; +import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordDO; import com.zcloud.edu.persistence.dataobject.study.StudentSignDO; +import com.zcloud.edu.persistence.repository.study.ClassRepository; +import com.zcloud.edu.persistence.repository.study.StudentExamRecordRepository; +import com.zcloud.edu.persistence.repository.study.StudentRepository; import com.zcloud.edu.persistence.repository.study.StudentSignRepository; import com.zcloud.gbscommon.utils.PageQueryHelper; import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.security.core.parameters.P; import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -25,6 +43,9 @@ import java.util.Map; public class StudentSignQueryExe { private final StudentSignRepository studentSignRepository; private final StudentSignCoConvertor studentSignCoConvertor; + private final ClassRepository classRepository; + private final StudentRepository studentRepository; + private final StudentExamRecordRepository studentExamRecordRepository; /** * 分页 @@ -38,5 +59,44 @@ public class StudentSignQueryExe { List examCenterCOS = studentSignCoConvertor.converDOsToCOs(pageResponse.getData()); return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex()); } + + public MultiResponse executeListAll(ClassAppSignQry qry) { + Map params = PageQueryHelper.toHashMap(qry); + List list = studentSignRepository.listAll(params); + List studentSignCOS = studentSignCoConvertor.converDOsToCOs(list); + return MultiResponse.of(studentSignCOS); + } + + + public SingleResponse executeVerify(StudentSignVerifyQry qry) { + ClassDO classDO = classRepository.getByClassId(qry.getClassId()); + ClassE classE = new ClassE(); + BeanUtils.copyProperties(classDO, classE); + classE.isBegin(); + StudentDO studentDO = studentRepository.findByClassIdAndPhone(classDO.getClassId(), qry.getPhone()); + if (studentDO == null){ + throw new BizException("您不在此班级中"); + } + if(studentDO.getState() == 1){ + throw new BizException("您已经完成此班级的学习"); + } + Map params = new HashMap<>(); + params.put("studentId", studentDO.getStudentId()); + params.put("type", qry.getType()); + if (qry.getType() == 1){ + List list = studentSignRepository.listAllByStudentId(params); + if (list != null && list.size() > 0){ + throw new BizException("您已签到"); + } + } else if (qry.getType() == 2){ + List list = studentExamRecordRepository.listAllByStudentId(studentDO.getStudentId()); + if (list != null && list.size() == classDO.getNumberofexams()){ + throw new BizException("您已经没有考试次数"); + } + } + StudentCO studentCO = new StudentCO(); + BeanUtils.copyProperties(studentDO, studentCO); + return SingleResponse.of(studentCO); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperAddExe.java index 09e6de0..a0dafa3 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperAddExe.java @@ -2,6 +2,7 @@ package com.zcloud.edu.command.resource; import cn.hutool.core.bean.BeanUtil; import com.alibaba.cola.exception.BizException; +import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.command.convertor.resource.QuestionCoConvertor; import com.zcloud.edu.domain.enums.CoursewareTypeEnum; import com.zcloud.edu.domain.gateway.resource.ExamPaperGateway; @@ -12,6 +13,7 @@ import com.zcloud.edu.dto.resource.ExamPaperAddInheritCmd; import com.zcloud.edu.dto.resource.QuestionAddInheritCmd; import com.zcloud.edu.persistence.dataobject.QuestionDO; import com.zcloud.edu.persistence.repository.resource.QuestionRepository; +import com.zcloud.gbscommon.utils.Tools; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -87,6 +89,9 @@ public class ExamPaperAddExe { List questionES =questionCoConvertor.converCmdsToEs(questionList); questionES.forEach(info->{ info.setExamPaperId(examPaperE.getExamPaperId()); + info.setQuestionId(Tools.get32UUID()); + info.setCorpinfoId(AuthContext.getTenantId()); + info.setId(null); }); BigDecimal examScore = questionES.stream().map(QuestionE::getScore).reduce(BigDecimal.ZERO, BigDecimal::add); //判断总分数量是否一致 diff --git a/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperRemoveExe.java b/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperRemoveExe.java index 10bca97..c6da623 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperRemoveExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/resource/ExamPaperRemoveExe.java @@ -38,7 +38,7 @@ public class ExamPaperRemoveExe { public boolean execute(Long id) { ExamPaperDO examPaperDO = examPaperRepository.getById(id); if(examPaperDO==null){ - throw new RuntimeException("试卷不存在"); + throw new BizException("试卷不存在"); } //企业端禁用:所属单位为股份的不能禁用 //股份端禁用:所属单位为各企业的不能禁用 @@ -70,7 +70,7 @@ public class ExamPaperRemoveExe { List examPaperDOList =examPaperRepository.getListByIdList(examPaperRemoveCmd.getIds()); if(CollUtil.isEmpty(examPaperDOList)){ - throw new RuntimeException("试卷不存在"); + throw new BizException("试卷不存在"); } //获取试卷idlist List examPaperIdList = examPaperDOList.stream().map(ExamPaperDO::getExamPaperId).collect(Collectors.toList()); diff --git a/web-app/src/main/java/com/zcloud/edu/command/study/ClassAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/study/ClassAddExe.java index 1080cfa..89e218f 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/study/ClassAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/study/ClassAddExe.java @@ -1,11 +1,14 @@ package com.zcloud.edu.command.study; +import com.alibaba.cola.dto.SingleResponse; 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.study.ClassGateway; import com.zcloud.edu.domain.model.study.ClassE; +import com.zcloud.edu.dto.clientobject.study.ClassCO; import com.zcloud.edu.dto.study.ClassAddCmd; +import com.zcloud.edu.persistence.dataobject.study.ClassDO; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -24,22 +27,21 @@ public class ClassAddExe { private final ClassGateway classGateway; @Transactional(rollbackFor = Exception.class) - public boolean execute(ClassAddCmd cmd) { + public SingleResponse execute(ClassAddCmd cmd) { ClassE classE = new ClassE(); BeanUtils.copyProperties(cmd, classE); SSOUser ssoUser = AuthContext.getCurrentUser(); classE.initSave(ssoUser.getTenantId()); - boolean res = false; try { - res = classGateway.add(classE); + Long id = classGateway.add(classE); + classE.setId(id); } catch (Exception e) { throw new RuntimeException(e); } - if (!res) { - throw new BizException("保存失败"); - } - return true; + ClassCO classCO = new ClassCO(); + BeanUtils.copyProperties(classE, classCO); + return SingleResponse.of(classCO); } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/study/ClassCurriculumAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/study/ClassCurriculumAddExe.java index d94eec5..2368e4b 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/study/ClassCurriculumAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/study/ClassCurriculumAddExe.java @@ -7,7 +7,12 @@ import com.zcloud.edu.domain.gateway.study.ClassCurriculumGateway; import com.zcloud.edu.domain.model.study.ClassCurriculumChapterE; import com.zcloud.edu.domain.model.study.ClassCurriculumE; import com.zcloud.edu.dto.study.ClassCurriculumAddCmd; +import com.zcloud.edu.dto.study.ClassCurriculumBatchAddCmd; import com.zcloud.edu.dto.study.ClassCurriculumChapterAddCmd; +import com.zcloud.edu.persistence.dataobject.CurriculumChapterDO; +import com.zcloud.edu.persistence.dataobject.CurriculumDO; +import com.zcloud.edu.persistence.repository.resource.CurriculumChapterRepository; +import com.zcloud.edu.persistence.repository.resource.CurriculumRepository; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -29,6 +34,8 @@ import java.util.List; public class ClassCurriculumAddExe { private final ClassCurriculumGateway classCurriculumGateway; private final ClassCurriculumChapterGateway classCurriculumChapterGateway; + private final CurriculumRepository curriculumRepository; + private final CurriculumChapterRepository curriculumChapterRepository; @Transactional(rollbackFor = Exception.class) public boolean execute(List cmdList) { @@ -40,28 +47,28 @@ public class ClassCurriculumAddExe { BeanUtils.copyProperties(curCmd, curriculum); BigDecimal decimal = BigDecimal.valueOf(curCmd.getVideoTotalTime()); curriculum.setVideoTotalTime(decimal); - for (ClassCurriculumChapterAddCmd chapterCmd : curCmd.getChapterList()){ + for (ClassCurriculumChapterAddCmd chapterCmd : curCmd.getCurriculumChapterAddCmdList()){ ClassCurriculumChapterE chapter = new ClassCurriculumChapterE(); BeanUtils.copyProperties(chapterCmd, chapter); - if (chapterCmd.getChildren() != null && chapterCmd.getChildren().size() > 0){ - for (ClassCurriculumChapterAddCmd childChapterCmd : chapterCmd.getChildren()){ + if (chapterCmd.getCurriculumChapterAddCmdList() != null && chapterCmd.getCurriculumChapterAddCmdList().size() > 0){ + for (ClassCurriculumChapterAddCmd childChapterCmd : chapterCmd.getCurriculumChapterAddCmdList()){ ClassCurriculumChapterE childChapter = new ClassCurriculumChapterE(); BeanUtils.copyProperties(childChapterCmd, childChapter); - if (chapter.getChildren() != null){ - chapter.getChildren().add(childChapter); + if (chapter.getCurriculumChapterAddCmdList() != null){ + chapter.getCurriculumChapterAddCmdList().add(childChapter); } else { List children = new ArrayList<>(); children.add(childChapter); - chapter.setChildren(children); + chapter.setCurriculumChapterAddCmdList(children); } } } - if (curriculum.getChapterList() != null){ - curriculum.getChapterList().add(chapter); + if (curriculum.getCurriculumChapterAddCmdList() != null){ + curriculum.getCurriculumChapterAddCmdList().add(chapter); } else { List chapterList = new ArrayList<>(); chapterList.add(chapter); - curriculum.setChapterList(chapterList); + curriculum.setCurriculumChapterAddCmdList(chapterList); } } classCurriculumEList.add(curriculum); @@ -75,5 +82,21 @@ public class ClassCurriculumAddExe { } return true; } + + @Transactional(rollbackFor = Exception.class) + public void executeBatchAdd(ClassCurriculumBatchAddCmd cmd) { + List curList = curriculumRepository.listByCurriculumIds(cmd.getCurriculumIds()); + List chapterList = curriculumChapterRepository.listByCurriculumIds(cmd.getCurriculumIds()); + List curEList = BeanUtil.copyToList(curList, ClassCurriculumE.class); + List chapterEList = BeanUtil.copyToList(chapterList, ClassCurriculumChapterE.class); + ClassCurriculumE classCurriculumE = new ClassCurriculumE(); + classCurriculumE.initBatchAdd(curEList, chapterEList, cmd.getClassId()); + try { + classCurriculumGateway.batchAdd(curEList); + classCurriculumChapterGateway.batchAdd(chapterEList); + } catch (Exception e) { + throw new RuntimeException(e); + } + } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/study/StudentExamRecordAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/study/StudentExamRecordAddExe.java index b0c3a70..f46d011 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/study/StudentExamRecordAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/study/StudentExamRecordAddExe.java @@ -1,14 +1,33 @@ package com.zcloud.edu.command.study; +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.cola.dto.Response; +import com.alibaba.cola.dto.SingleResponse; import com.alibaba.cola.exception.BizException; import com.zcloud.edu.domain.gateway.study.StudentExamRecordGateway; +import com.zcloud.edu.domain.model.study.ClassExamPaperE; import com.zcloud.edu.domain.model.study.StudentExamRecordE; +import com.zcloud.edu.domain.model.study.StudentExamRecordItemE; +import com.zcloud.edu.dto.clientobject.study.StudentExamRecordCO; import com.zcloud.edu.dto.study.StudentExamRecordAddCmd; +import com.zcloud.edu.dto.study.StudentExamRecordItemAddCmd; +import com.zcloud.edu.persistence.dataobject.study.ClassDO; +import com.zcloud.edu.persistence.dataobject.study.ClassExamPaperDO; +import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordDO; +import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordItemDO; +import com.zcloud.edu.persistence.repository.study.ClassExamPaperRepository; +import com.zcloud.edu.persistence.repository.study.ClassRepository; +import com.zcloud.edu.persistence.repository.study.StudentExamRecordItemRepository; +import com.zcloud.edu.persistence.repository.study.StudentExamRecordRepository; +import io.swagger.models.auth.In; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; +import java.util.List; + /** * web-app @@ -20,21 +39,41 @@ import org.springframework.transaction.annotation.Transactional; @AllArgsConstructor public class StudentExamRecordAddExe { private final StudentExamRecordGateway studentExamRecordGateway; - + private final ClassExamPaperRepository classExamPaperRepository; + private final StudentExamRecordItemRepository studentExamRecordItemRepository; + private final StudentExamRecordRepository studentExamRecordRepository; + private final ClassRepository classRepository; @Transactional(rollbackFor = Exception.class) - public boolean execute(StudentExamRecordAddCmd cmd) { + public SingleResponse execute(StudentExamRecordAddCmd cmd) { + ClassDO classDO = classRepository.getByClassId(cmd.getClassId()); + Integer count = studentExamRecordRepository.countByStudentId(cmd.getStudentId()); + if (count >= classDO.getNumberofexams()) { + throw new BizException("您已经没有考试次数"); + } + + StudentExamRecordE studentExamRecordE = new StudentExamRecordE(); + ClassExamPaperDO classExamPaper = classExamPaperRepository.findByClassId(cmd.getClassId()); + List questionList = cmd.getQuestionList(); + List queList = BeanUtil.copyToList(questionList, StudentExamRecordItemE.class); BeanUtils.copyProperties(cmd, studentExamRecordE); + studentExamRecordE.submit(classExamPaper.getPassScore(), queList); + boolean res = false; try { res = studentExamRecordGateway.add(studentExamRecordE); + studentExamRecordItemRepository.saveBatch(BeanUtil.copyToList(queList, StudentExamRecordItemDO.class)); } catch (Exception e) { throw new RuntimeException(e); } if (!res) { throw new BizException("保存失败"); } - return true; + + StudentExamRecordCO studentExamRecordCO = new StudentExamRecordCO(); + BeanUtils.copyProperties(studentExamRecordE, studentExamRecordCO); + studentExamRecordCO.setSurplusExamNum(classDO.getNumberofexams() - count - 1); + return SingleResponse.of(studentExamRecordCO); } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignAddExe.java b/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignAddExe.java index 281c1f5..193fa09 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignAddExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignAddExe.java @@ -3,11 +3,21 @@ package com.zcloud.edu.command.study; import com.alibaba.cola.exception.BizException; import com.zcloud.edu.domain.gateway.study.StudentSignGateway; import com.zcloud.edu.domain.model.study.StudentSignE; +import com.zcloud.edu.dto.clientobject.study.StudentSignCO; import com.zcloud.edu.dto.study.StudentSignAddCmd; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; +import com.zcloud.edu.persistence.repository.study.StudentRepository; +import com.zcloud.gbscommon.utils.Base64Util; +import com.zcloud.gbscommon.utils.Tools; +import com.zcloud.gbscommon.zcloudimgfiles.facade.ZcloudImgFilesFacade; import lombok.AllArgsConstructor; +import org.apache.dubbo.config.annotation.DubboReference; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +import java.io.IOException; /** @@ -20,21 +30,44 @@ import org.springframework.transaction.annotation.Transactional; @AllArgsConstructor public class StudentSignAddExe { private final StudentSignGateway studentSignGateway; + private final StudentRepository studentRepository; + @DubboReference + private ZcloudImgFilesFacade zcloudImgFilesFacade; @Transactional(rollbackFor = Exception.class) - public boolean execute(StudentSignAddCmd cmd) { + public StudentSignCO execute(StudentSignAddCmd cmd) { + StudentDO stu = studentRepository.findInfoByStudentId(cmd.getStudentId()); StudentSignE studentSignE = new StudentSignE(); BeanUtils.copyProperties(cmd, studentSignE); + StudentDO student = studentRepository.findFaceUrlByPhone(stu.getPhone()); + + if (student == null || ObjectUtils.isEmpty(student.getUserAvatarUrl())) { + throw new BizException("您还没有录入人脸"); + } + String faceUrl = null; + try { + faceUrl = Base64Util.getBase64String(studentSignE.getFiles()[0]); + studentSignE.compareFace(student.getUserAvatarUrl(), faceUrl); + } catch (Exception e) { + throw new RuntimeException(e); + } + + String path = studentSignE.getType() == 1 ? "clockSign" : "examSign"; + String fileName = Tools.get32UUID() + studentSignE.getFiles()[0].getOriginalFilename().substring(studentSignE.getFiles()[0].getOriginalFilename().lastIndexOf(".")); + studentSignE.setFaceUrl(zcloudImgFilesFacade.saveFile( faceUrl,fileName, path)); + studentSignE.init(stu.getStudentId(), stu.getClassId(), stu.getClassCorpinfoId()); boolean res = false; + StudentSignCO studentSignCO = new StudentSignCO(); try { res = studentSignGateway.add(studentSignE); + BeanUtils.copyProperties(studentSignE, studentSignCO); } catch (Exception e) { throw new RuntimeException(e); } if (!res) { throw new BizException("保存失败"); } - return true; + return studentSignCO; } } diff --git a/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignUpdateExe.java b/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignUpdateExe.java index 0d71678..eb056f7 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignUpdateExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/study/StudentSignUpdateExe.java @@ -4,11 +4,16 @@ import com.alibaba.cola.exception.BizException; import com.zcloud.edu.domain.gateway.study.StudentSignGateway; import com.zcloud.edu.domain.model.study.StudentSignE; import com.zcloud.edu.dto.study.StudentSignUpdateCmd; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; +import com.zcloud.edu.persistence.repository.study.StudentRepository; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import java.util.HashMap; +import java.util.Map; + /** * web-app @@ -20,12 +25,22 @@ import org.springframework.transaction.annotation.Transactional; @AllArgsConstructor public class StudentSignUpdateExe { private final StudentSignGateway studentSignGateway; + private final StudentRepository studentRepository; @Transactional(rollbackFor = Exception.class) public void execute(StudentSignUpdateCmd studentSignUpdateCmd) { StudentSignE studentSignE = new StudentSignE(); BeanUtils.copyProperties(studentSignUpdateCmd, studentSignE); boolean res = studentSignGateway.update(studentSignE); + + Map params = new HashMap<>(); + if (studentSignUpdateCmd.getType() == 1){ + params.put("signFlag",1); + } else if (studentSignUpdateCmd.getType() == 2){ + params.put("examSignFlag",1); + } + params.put("studentId", studentSignUpdateCmd.getStudentId()); + studentRepository.updateStudent(params); if (!res) { throw new BizException("修改失败"); } diff --git a/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesPdfFileServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesPdfFileServiceImpl.java new file mode 100644 index 0000000..8ba9de7 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesPdfFileServiceImpl.java @@ -0,0 +1,59 @@ +package com.zcloud.edu.service.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.api.archives.ArchivesPdfFileServiceI; +import com.zcloud.edu.command.archives.ArchivesPdfFileAddExe; +import com.zcloud.edu.command.archives.ArchivesPdfFileRemoveExe; +import com.zcloud.edu.command.archives.ArchivesPdfFileUpdateExe; +import com.zcloud.edu.command.query.archives.ArchivesPdfFileQueryExe; +import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd; +import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry; +import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Service; + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Service +@AllArgsConstructor +public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileServiceI { + private final ArchivesPdfFileAddExe archivesPdfFileAddExe; + private final ArchivesPdfFileUpdateExe archivesPdfFileUpdateExe; + private final ArchivesPdfFileRemoveExe archivesPdfFileRemoveExe; + private final ArchivesPdfFileQueryExe archivesPdfFileQueryExe; + + @Override + public PageResponse listPage(ArchivesPdfFilePageQry qry) { + + return archivesPdfFileQueryExe.execute(qry); + } + + @Override + public SingleResponse add(ArchivesPdfFileAddCmd cmd) { + + archivesPdfFileAddExe.execute(cmd); + return SingleResponse.buildSuccess(); + } + + @Override + public void edit(ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) { + archivesPdfFileUpdateExe.execute(archivesPdfFileUpdateCmd); + } + + @Override + public void remove(Long id) { + archivesPdfFileRemoveExe.execute(id); + } + + @Override + public void removeBatch(Long[] ids) { + archivesPdfFileRemoveExe.execute(ids); + } +} + diff --git a/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewRecordServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewRecordServiceImpl.java new file mode 100644 index 0000000..e6b0968 --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewRecordServiceImpl.java @@ -0,0 +1,59 @@ +package com.zcloud.edu.service.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.api.archives.ArchivesReviewRecordServiceI; +import com.zcloud.edu.command.archives.ArchivesReviewRecordAddExe; +import com.zcloud.edu.command.archives.ArchivesReviewRecordRemoveExe; +import com.zcloud.edu.command.archives.ArchivesReviewRecordUpdateExe; +import com.zcloud.edu.command.query.archives.ArchivesReviewRecordQueryExe; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordPageQry; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Service; + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Service +@AllArgsConstructor +public class ArchivesReviewRecordServiceImpl implements ArchivesReviewRecordServiceI { + private final ArchivesReviewRecordAddExe archivesReviewRecordAddExe; + private final ArchivesReviewRecordUpdateExe archivesReviewRecordUpdateExe; + private final ArchivesReviewRecordRemoveExe archivesReviewRecordRemoveExe; + private final ArchivesReviewRecordQueryExe archivesReviewRecordQueryExe; + + @Override + public PageResponse listPage(ArchivesReviewRecordPageQry qry) { + + return archivesReviewRecordQueryExe.execute(qry); + } + + @Override + public SingleResponse add(ArchivesReviewRecordAddCmd cmd) { + + archivesReviewRecordAddExe.execute(cmd); + return SingleResponse.buildSuccess(); + } + + @Override + public void edit(ArchivesReviewRecordUpdateCmd archivesReviewRecordUpdateCmd) { + archivesReviewRecordUpdateExe.execute(archivesReviewRecordUpdateCmd); + } + + @Override + public void remove(Long id) { + archivesReviewRecordRemoveExe.execute(id); + } + + @Override + public void removeBatch(Long[] ids) { + archivesReviewRecordRemoveExe.execute(ids); + } +} + 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 new file mode 100644 index 0000000..00927cb --- /dev/null +++ b/web-app/src/main/java/com/zcloud/edu/service/archives/ArchivesReviewServiceImpl.java @@ -0,0 +1,64 @@ +package com.zcloud.edu.service.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.api.archives.ArchivesReviewServiceI; +import com.zcloud.edu.command.archives.ArchivesReviewAddExe; +import com.zcloud.edu.command.archives.ArchivesReviewRemoveExe; +import com.zcloud.edu.command.archives.ArchivesReviewUpdateExe; +import com.zcloud.edu.command.query.archives.ArchivesReviewQueryExe; +import com.zcloud.edu.dto.archives.ArchivesReviewAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewPageQry; +import com.zcloud.edu.dto.archives.ArchivesReviewUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewCO; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Service; + +/** + * web-app + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Service +@AllArgsConstructor +public class ArchivesReviewServiceImpl implements ArchivesReviewServiceI { + private final ArchivesReviewAddExe archivesReviewAddExe; + private final ArchivesReviewUpdateExe archivesReviewUpdateExe; + private final ArchivesReviewRemoveExe archivesReviewRemoveExe; + private final ArchivesReviewQueryExe archivesReviewQueryExe; + + @Override + public PageResponse listPage(ArchivesReviewPageQry qry) { + + return archivesReviewQueryExe.execute(qry); + } + + @Override + public SingleResponse add(ArchivesReviewAddCmd cmd) { + + archivesReviewAddExe.execute(cmd); + return SingleResponse.buildSuccess(); + } + + @Override + public void edit(ArchivesReviewUpdateCmd archivesReviewUpdateCmd) { + archivesReviewUpdateExe.execute(archivesReviewUpdateCmd); + } + + @Override + public void remove(Long id) { + archivesReviewRemoveExe.execute(id); + } + + @Override + 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/ClassCurriculumServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/ClassCurriculumServiceImpl.java index eb5106c..394dbd1 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/ClassCurriculumServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/ClassCurriculumServiceImpl.java @@ -1,5 +1,6 @@ package com.zcloud.edu.service.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; @@ -9,9 +10,7 @@ import com.zcloud.edu.command.study.ClassCurriculumAddExe; import com.zcloud.edu.command.study.ClassCurriculumRemoveExe; import com.zcloud.edu.command.study.ClassCurriculumUpdateExe; import com.zcloud.edu.dto.clientobject.study.ClassCurriculumCO; -import com.zcloud.edu.dto.study.ClassCurriculumAddCmd; -import com.zcloud.edu.dto.study.ClassCurriculumPageQry; -import com.zcloud.edu.dto.study.ClassCurriculumUpdateCmd; +import com.zcloud.edu.dto.study.*; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; @@ -63,5 +62,16 @@ public class ClassCurriculumServiceImpl implements ClassCurriculumServiceI { public SingleResponse getInfoById(Long id) { return classCurriculumQueryExe.executeGetInfoById(id); } + + @Override + public Response batchAdd(ClassCurriculumBatchAddCmd cmd) { + classCurriculumAddExe.executeBatchAdd(cmd); + return Response.buildSuccess(); + } + + @Override + public MultiResponse listAll(ClassCurriculumQry qry) { + return classCurriculumQueryExe.executeListAll(qry); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/ClassExamPaperServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/ClassExamPaperServiceImpl.java index 85cc6b3..c7f2230 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/ClassExamPaperServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/ClassExamPaperServiceImpl.java @@ -67,5 +67,11 @@ public class ClassExamPaperServiceImpl implements ClassExamPaperServiceI { public SingleResponse getInfoById(Long id) { return classExamPaperQueryExe.executeGetInfoById(id); } + + + @Override + public SingleResponse getInfoByClassId(String classId) { + return classExamPaperQueryExe.executeGetInfoByClassId(classId); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/ClassServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/ClassServiceImpl.java index 26ac283..43e218b 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/ClassServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/ClassServiceImpl.java @@ -9,12 +9,10 @@ import com.zcloud.edu.command.study.ClassAddExe; import com.zcloud.edu.command.study.ClassRemoveExe; import com.zcloud.edu.command.study.ClassUpdateExe; import com.zcloud.edu.dto.clientobject.study.ClassCO; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.study.ClassCountDTO; import com.zcloud.edu.dto.data.study.ClassQuestionDTO; -import com.zcloud.edu.dto.study.ClassAddCmd; -import com.zcloud.edu.dto.study.ClassPageQry; -import com.zcloud.edu.dto.study.ClassPostponeCmd; -import com.zcloud.edu.dto.study.ClassUpdateCmd; +import com.zcloud.edu.dto.study.*; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; @@ -38,10 +36,10 @@ public class ClassServiceImpl implements ClassServiceI { } @Override - public SingleResponse add(ClassAddCmd cmd) { + public SingleResponse add(ClassAddCmd cmd) { - classAddExe.execute(cmd); - return SingleResponse.buildSuccess(); + + return classAddExe.execute(cmd); } @Override @@ -85,5 +83,15 @@ public class ClassServiceImpl implements ClassServiceI { public SingleResponse statisticsCount(ClassPageQry qry) { return classQueryExe.executeStatisticsCount(qry); } + + @Override + public MultiResponse countStuClass(ClassCountQry qry) { + return classQueryExe.executeCountStuClass(qry); + } + + @Override + public PageResponse listStudentClass(ClassPageQry qry) { + return classQueryExe.executeListStudentClass(qry); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/StudentExamRecordServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/StudentExamRecordServiceImpl.java index 2bd75d0..0a3824c 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/StudentExamRecordServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/StudentExamRecordServiceImpl.java @@ -1,6 +1,7 @@ package com.zcloud.edu.service.study; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.api.study.StudentExamRecordServiceI; import com.zcloud.edu.command.query.study.StudentExamRecordQueryExe; @@ -14,6 +15,8 @@ import com.zcloud.edu.dto.study.StudentExamRecordUpdateCmd; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; +import java.math.BigDecimal; + /** * web-app * @@ -35,10 +38,8 @@ public class StudentExamRecordServiceImpl implements StudentExamRecordServiceI { } @Override - public SingleResponse add(StudentExamRecordAddCmd cmd) { - - studentExamRecordAddExe.execute(cmd); - return SingleResponse.buildSuccess(); + public SingleResponse add(StudentExamRecordAddCmd cmd) { + return studentExamRecordAddExe.execute(cmd); } @Override @@ -55,5 +56,15 @@ public class StudentExamRecordServiceImpl implements StudentExamRecordServiceI { public void removeBatch(Long[] ids) { studentExamRecordRemoveExe.execute(ids); } + + @Override + public SingleResponse getInfoByStudentId(String studentId) { + return studentExamRecordQueryExe.executeGetInfoByStudentId(studentId); + } + + @Override + public SingleResponse getInfoById(Long id) { + return studentExamRecordQueryExe.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 47ec3a4..66737f1 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 @@ -1,5 +1,6 @@ package com.zcloud.edu.service.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.api.study.StudentServiceI; @@ -7,12 +8,17 @@ import com.zcloud.edu.command.query.study.StudentQueryExe; import com.zcloud.edu.command.study.StudentAddExe; 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.StudentCountQry; import com.zcloud.edu.dto.study.StudentPageQry; import com.zcloud.edu.dto.study.StudentUpdateCmd; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -36,6 +42,11 @@ public class StudentServiceImpl implements StudentServiceI { return studentQueryExe.execute(qry); } + @Override + public PageResponse listPageClassByStudent(StudentPageQry qry) { + return studentQueryExe.executelistPageClassByStudent(qry); + } + @Override public SingleResponse add(List cmdList) { @@ -57,5 +68,49 @@ public class StudentServiceImpl implements StudentServiceI { public void removeBatch(Long[] ids) { studentRemoveExe.execute(ids); } + + @Override + public SingleResponse getAttendanceRecord(ClassArchivesQry qry) { + return studentQueryExe.executeAttendanceRecord(qry); + } + @Override + public SingleResponse getStudyArchives(ClassArchivesQry qry) { + return studentQueryExe.executeStudyArchives(qry); + } + + @Override + 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); + } + + @Override + public SingleResponse getClassExamResult(ClassArchivesQry qry) { + return studentQueryExe.executeGetClassExamResult(qry); + } + + @Override + public MultiResponse countStudentByCorpId(StudentCountQry qry) { + return studentQueryExe.executeCountStudentByCorpId(qry); + } + + @Override + public MultiResponse listStudentCount(StudentCountQry qry) { + return studentQueryExe.executeListStudentCount(qry); + } + + @Override + public SingleResponse getInfoByStudentId(String studentId) { + return studentQueryExe.executeGetInfoByStudentId(studentId); + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/StudentSignServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/StudentSignServiceImpl.java index 93cd311..007e05a 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/StudentSignServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/StudentSignServiceImpl.java @@ -1,16 +1,17 @@ package com.zcloud.edu.service.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.api.study.StudentSignServiceI; import com.zcloud.edu.command.query.study.StudentSignQueryExe; import com.zcloud.edu.command.study.StudentSignAddExe; import com.zcloud.edu.command.study.StudentSignRemoveExe; import com.zcloud.edu.command.study.StudentSignUpdateExe; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.clientobject.study.StudentSignCO; -import com.zcloud.edu.dto.study.StudentSignAddCmd; -import com.zcloud.edu.dto.study.StudentSignPageQry; -import com.zcloud.edu.dto.study.StudentSignUpdateCmd; +import com.zcloud.edu.dto.study.*; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; @@ -35,10 +36,9 @@ public class StudentSignServiceImpl implements StudentSignServiceI { } @Override - public SingleResponse add(StudentSignAddCmd cmd) { + public SingleResponse add(StudentSignAddCmd cmd) { - studentSignAddExe.execute(cmd); - return SingleResponse.buildSuccess(); + return SingleResponse.of(studentSignAddExe.execute(cmd)); } @Override @@ -55,5 +55,15 @@ public class StudentSignServiceImpl implements StudentSignServiceI { public void removeBatch(Long[] ids) { studentSignRemoveExe.execute(ids); } + + @Override + public MultiResponse listAll(ClassAppSignQry qry) { + return studentSignQueryExe.executeListAll(qry); + } + + @Override + public SingleResponse verify(StudentSignVerifyQry qry) { + return studentSignQueryExe.executeVerify(qry); + } } diff --git a/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesPdfFileServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesPdfFileServiceI.java new file mode 100644 index 0000000..611e477 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesPdfFileServiceI.java @@ -0,0 +1,27 @@ +package com.zcloud.edu.api.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd; +import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry; +import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +public interface ArchivesPdfFileServiceI { + PageResponse listPage(ArchivesPdfFilePageQry qry); + + SingleResponse add(ArchivesPdfFileAddCmd cmd); + + void edit(ArchivesPdfFileUpdateCmd cmd); + + void remove(Long id); + + void removeBatch(Long[] ids); +} + diff --git a/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewRecordServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewRecordServiceI.java new file mode 100644 index 0000000..db51053 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewRecordServiceI.java @@ -0,0 +1,27 @@ +package com.zcloud.edu.api.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordPageQry; +import com.zcloud.edu.dto.archives.ArchivesReviewRecordUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewRecordCO; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +public interface ArchivesReviewRecordServiceI { + PageResponse listPage(ArchivesReviewRecordPageQry qry); + + SingleResponse add(ArchivesReviewRecordAddCmd cmd); + + void edit(ArchivesReviewRecordUpdateCmd cmd); + + void remove(Long id); + + void removeBatch(Long[] ids); +} + 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 new file mode 100644 index 0000000..41e8a6c --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/api/archives/ArchivesReviewServiceI.java @@ -0,0 +1,30 @@ +package com.zcloud.edu.api.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.dto.archives.ArchivesReviewAddCmd; +import com.zcloud.edu.dto.archives.ArchivesReviewPageQry; +import com.zcloud.edu.dto.archives.ArchivesReviewUpdateCmd; +import com.zcloud.edu.dto.clientobject.archives.ArchivesReviewCO; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +public interface ArchivesReviewServiceI { + PageResponse listPage(ArchivesReviewPageQry qry); + + SingleResponse add(ArchivesReviewAddCmd cmd); + + void edit(ArchivesReviewUpdateCmd cmd); + + 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/ClassCurriculumServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/ClassCurriculumServiceI.java index d64ebf4..d610d36 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/ClassCurriculumServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/ClassCurriculumServiceI.java @@ -1,13 +1,13 @@ package com.zcloud.edu.api.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.dto.clientobject.study.ClassCurriculumCO; -import com.zcloud.edu.dto.study.ClassCurriculumAddCmd; -import com.zcloud.edu.dto.study.ClassCurriculumPageQry; -import com.zcloud.edu.dto.study.ClassCurriculumUpdateCmd; +import com.zcloud.edu.dto.study.*; +import java.nio.channels.MulticastChannel; import java.util.List; /** @@ -28,5 +28,11 @@ public interface ClassCurriculumServiceI { void removeBatch(Long[] ids); SingleResponse getInfoById(Long id); + + Response batchAdd(ClassCurriculumBatchAddCmd cmd); + + MultiResponse listAll(ClassCurriculumQry qry); + + } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/ClassExamPaperServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/ClassExamPaperServiceI.java index 01a59fb..ec315fd 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/ClassExamPaperServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/ClassExamPaperServiceI.java @@ -28,5 +28,7 @@ public interface ClassExamPaperServiceI { void removeBatch(Long[] ids); SingleResponse getInfoById(Long id); + + SingleResponse getInfoByClassId(String classId); } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/ClassServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/ClassServiceI.java index 9ee2211..7319027 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/ClassServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/ClassServiceI.java @@ -4,12 +4,10 @@ import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.dto.clientobject.study.ClassCO; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.study.ClassCountDTO; import com.zcloud.edu.dto.data.study.ClassQuestionDTO; -import com.zcloud.edu.dto.study.ClassAddCmd; -import com.zcloud.edu.dto.study.ClassPageQry; -import com.zcloud.edu.dto.study.ClassPostponeCmd; -import com.zcloud.edu.dto.study.ClassUpdateCmd; +import com.zcloud.edu.dto.study.*; /** * web-client @@ -40,5 +38,10 @@ public interface ClassServiceI { PageResponse appListPage(ClassPageQry qry); SingleResponse statisticsCount(ClassPageQry qry); + + MultiResponse countStuClass(ClassCountQry qry); + + + PageResponse listStudentClass(ClassPageQry qry); } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/StudentExamRecordServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/StudentExamRecordServiceI.java index 98fcb45..303dfe4 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/StudentExamRecordServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/StudentExamRecordServiceI.java @@ -23,5 +23,9 @@ public interface StudentExamRecordServiceI { void remove(Long id); void removeBatch(Long[] ids); + + SingleResponse getInfoByStudentId(String studentId); + + 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 a74ade3..3cad266 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 @@ -1,11 +1,17 @@ package com.zcloud.edu.api.study; +import com.alibaba.cola.dto.MultiResponse; 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.StudentCountQry; import com.zcloud.edu.dto.study.StudentPageQry; import com.zcloud.edu.dto.study.StudentUpdateCmd; +import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -18,6 +24,8 @@ import java.util.List; public interface StudentServiceI { PageResponse listPage(StudentPageQry qry); + PageResponse listPageClassByStudent(StudentPageQry qry); + SingleResponse add(List cmdList); void edit(StudentUpdateCmd cmd); @@ -25,5 +33,23 @@ public interface StudentServiceI { void remove(Long id); void removeBatch(Long[] ids); + + SingleResponse getAttendanceRecord(ClassArchivesQry qry); + + SingleResponse getStudyArchives(ClassArchivesQry qry); + + SingleResponse getStudyRecord(ClassArchivesQry qry); + + SingleResponse getClassSign(ClassArchivesQry qry); + + Long countStudent(String classId); + + SingleResponse getClassExamResult(ClassArchivesQry qry); + + MultiResponse countStudentByCorpId(StudentCountQry qry); + + MultiResponse listStudentCount(StudentCountQry qry); + + SingleResponse getInfoByStudentId(String studentId); } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/StudentSignServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/StudentSignServiceI.java index 2f11987..e3ac1a0 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/StudentSignServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/StudentSignServiceI.java @@ -1,11 +1,12 @@ package com.zcloud.edu.api.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; +import com.alibaba.cola.dto.Response; import com.alibaba.cola.dto.SingleResponse; +import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.clientobject.study.StudentSignCO; -import com.zcloud.edu.dto.study.StudentSignAddCmd; -import com.zcloud.edu.dto.study.StudentSignPageQry; -import com.zcloud.edu.dto.study.StudentSignUpdateCmd; +import com.zcloud.edu.dto.study.*; /** * web-client @@ -23,5 +24,9 @@ public interface StudentSignServiceI { void remove(Long id); void removeBatch(Long[] ids); + + MultiResponse listAll(ClassAppSignQry qry); + + SingleResponse verify(StudentSignVerifyQry qry); } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileAddCmd.java new file mode 100644 index 0000000..06fd6a8 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileAddCmd.java @@ -0,0 +1,61 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesPdfFileAddCmd extends Command { + @ApiModelProperty(value = "业务id", name = "archivesPdfFileId", required = true) + @NotEmpty(message = "业务id不能为空") + private String archivesPdfFileId; + + @ApiModelProperty(value = "关联表名称", name = "tableName", required = true) + @NotEmpty(message = "关联表名称不能为空") + private String tableName; + + @ApiModelProperty(value = "关联表id", name = "tableId", required = true) + @NotEmpty(message = "关联表id不能为空") + private String tableId; + + @ApiModelProperty(value = "文件路径", name = "filePath", required = true) + @NotEmpty(message = "文件路径不能为空") + private String filePath; + + @ApiModelProperty(value = "档案类型 1 一人一档 2一期一档", name = "type", required = true) + @NotNull(message = "档案类型 1 一人一档 2一期一档不能为空") + private Integer type; + + @ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除", name = "status", required = true) + @NotNull(message = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除不能为空") + private Integer status; + + @ApiModelProperty(value = "上传失败错误原因(上传成功则不传)", name = "errormsg", required = true) + @NotEmpty(message = "上传失败错误原因(上传成功则不传)不能为空") + private String errormsg; + + @ApiModelProperty(value = "方法名称", name = "methodName", required = true) + @NotEmpty(message = "方法名称不能为空") + private String methodName; + + @ApiModelProperty(value = "参数", name = "param", required = true) + @NotEmpty(message = "参数不能为空") + private String param; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFilePageQry.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFilePageQry.java new file mode 100644 index 0000000..7520d9c --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFilePageQry.java @@ -0,0 +1,28 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Data +public class ArchivesPdfFilePageQry extends PageQuery { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private String likeArchivesPdfFileId; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileUpdateCmd.java new file mode 100644 index 0000000..412003b --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesPdfFileUpdateCmd.java @@ -0,0 +1,55 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesPdfFileUpdateCmd extends Command { + @ApiModelProperty(value = "主键id", name = "id", required = true) + @NotNull(message = "主键id不能为空") + private Long id; + @ApiModelProperty(value = "业务id", name = "archivesPdfFileId", required = true) + @NotEmpty(message = "业务id不能为空") + private String archivesPdfFileId; + @ApiModelProperty(value = "关联表名称", name = "tableName", required = true) + @NotEmpty(message = "关联表名称不能为空") + private String tableName; + @ApiModelProperty(value = "关联表id", name = "tableId", required = true) + @NotEmpty(message = "关联表id不能为空") + private String tableId; + @ApiModelProperty(value = "文件路径", name = "filePath", required = true) + @NotEmpty(message = "文件路径不能为空") + private String filePath; + @ApiModelProperty(value = "档案类型 1 一人一档 2一期一档", name = "type", required = true) + @NotNull(message = "档案类型 1 一人一档 2一期一档不能为空") + private Integer type; + @ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除", name = "status", required = true) + @NotNull(message = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除不能为空") + private Integer status; + @ApiModelProperty(value = "上传失败错误原因(上传成功则不传)", name = "errormsg", required = true) + @NotEmpty(message = "上传失败错误原因(上传成功则不传)不能为空") + private String errormsg; + @ApiModelProperty(value = "方法名称", name = "methodName", required = true) + @NotEmpty(message = "方法名称不能为空") + private String methodName; + @ApiModelProperty(value = "参数", name = "param", required = true) + @NotEmpty(message = "参数不能为空") + private String param; +} + 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 new file mode 100644 index 0000000..6f06571 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewAddCmd.java @@ -0,0 +1,77 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; +import java.util.List; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesReviewAddCmd extends Command { + @ApiModelProperty(value = "业务id", name = "archivesReviewId", required = true) + 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) + private Long corpinfoId; + + @ApiModelProperty(value = "编写单位", name = "corpName", required = true) + @NotEmpty(message = "编写单位不能为空") + private String corpName; + + @ApiModelProperty(value = "编写时间", name = "writeDate", required = true) + @NotNull(message = "编写时间不能为空") + private LocalDateTime writeDate; + + @ApiModelProperty(value = "教材类型", name = "materialType", required = true) + @NotEmpty(message = "教材类型不能为空") + private String materialType; + + @ApiModelProperty(value = "会审地点", name = "address", required = true) + @NotEmpty(message = "会审地点不能为空") + private String address; + + @ApiModelProperty(value = "主持人", name = "compere", required = true) + @NotEmpty(message = "主持人不能为空") + private String compere; + + @ApiModelProperty(value = "会审时间", name = "auditDate", required = true) + @NotNull(message = "会审时间不能为空") + 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 new file mode 100644 index 0000000..9ffe777 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewPageQry.java @@ -0,0 +1,29 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Data +public class ArchivesReviewPageQry extends PageQuery { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `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 new file mode 100644 index 0000000..a30fa6b --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordAddCmd.java @@ -0,0 +1,45 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesReviewRecordAddCmd extends Command { + + @ApiModelProperty(value = "会审表id", name = "archivesReviewId", required = true) + @NotEmpty(message = "会审表id不能为空") + private String archivesReviewId; + + @ApiModelProperty(value = "会审人员", name = "reviewUser", required = true) + @NotEmpty(message = "会审人员不能为空") + private String reviewUser; + + @ApiModelProperty(value = "工作部门", name = "department", required = true) + @NotEmpty(message = "工作部门不能为空") + private String department; + + @ApiModelProperty(value = "职务/职称", name = "duties", required = true) + @NotEmpty(message = "职务/职称不能为空") + private String duties; + + @ApiModelProperty(value = "审查意见", name = "checkOpinion", required = true) + @NotEmpty(message = "审查意见不能为空") + private String checkOpinion; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordPageQry.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordPageQry.java new file mode 100644 index 0000000..a828849 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordPageQry.java @@ -0,0 +1,28 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Data +public class ArchivesReviewRecordPageQry extends PageQuery { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private String likeArchivesReviewRecordId; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordUpdateCmd.java new file mode 100644 index 0000000..e09c9d5 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewRecordUpdateCmd.java @@ -0,0 +1,46 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesReviewRecordUpdateCmd extends Command { + @ApiModelProperty(value = "主键", name = "id", required = true) + @NotNull(message = "主键不能为空") + private Long id; + @ApiModelProperty(value = "业务id", name = "archivesReviewRecordId", required = true) + @NotEmpty(message = "业务id不能为空") + private String archivesReviewRecordId; + @ApiModelProperty(value = "会审表id", name = "archivesReviewId", required = true) + @NotEmpty(message = "会审表id不能为空") + private String archivesReviewId; + @ApiModelProperty(value = "会审人员", name = "reviewUser", required = true) + @NotEmpty(message = "会审人员不能为空") + private String reviewUser; + @ApiModelProperty(value = "工作部门", name = "department", required = true) + @NotEmpty(message = "工作部门不能为空") + private String department; + @ApiModelProperty(value = "职务/职称", name = "duties", required = true) + @NotEmpty(message = "职务/职称不能为空") + private String duties; + @ApiModelProperty(value = "审查意见", name = "checkOpinion", required = true) + @NotEmpty(message = "审查意见不能为空") + private String checkOpinion; +} + 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 new file mode 100644 index 0000000..8869cb5 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ArchivesReviewUpdateCmd.java @@ -0,0 +1,54 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.Command; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ArchivesReviewUpdateCmd extends Command { + @ApiModelProperty(value = "id", name = "id", required = true) + @NotNull(message = "id不能为空") + private Long id; + @ApiModelProperty(value = "初版书号", name = "bookNum", required = true) + @NotEmpty(message = "初版书号不能为空") + private String bookNum; + @ApiModelProperty(value = "编写单位", name = "corpName", required = true) + @NotEmpty(message = "编写单位不能为空") + private String corpName; + @ApiModelProperty(value = "编写时间", name = "writeDate", required = true) + @NotNull(message = "编写时间不能为空") + private LocalDateTime writeDate; + @ApiModelProperty(value = "教材类型", name = "materialType", required = true) + @NotEmpty(message = "教材类型不能为空") + private String materialType; + @ApiModelProperty(value = "会审地点", name = "address", required = true) + @NotEmpty(message = "会审地点不能为空") + private String address; + @ApiModelProperty(value = "主持人", name = "compere", required = true) + @NotEmpty(message = "主持人不能为空") + private String compere; + @ApiModelProperty(value = "会审时间", name = "auditDate", required = true) + @NotNull(message = "会审时间不能为空") + private LocalDateTime auditDate; + @ApiModelProperty(value = "会审意见", name = "reviewOpinions", required = true) + @NotEmpty(message = "会审意见不能为空") + private String reviewOpinions; +} + 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 new file mode 100644 index 0000000..7b0b34d --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/archives/ClassArchivesQry.java @@ -0,0 +1,31 @@ +package com.zcloud.edu.dto.archives; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-13 14:18:12 + */ +@Data +public class ClassArchivesQry { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private Long stuId; + private String studentId; + private String classId; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesPdfFileCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesPdfFileCO.java new file mode 100644 index 0000000..e407317 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesPdfFileCO.java @@ -0,0 +1,88 @@ +package com.zcloud.edu.dto.clientobject.archives; + +import com.alibaba.cola.dto.ClientObject; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@Data +public class ArchivesPdfFileCO extends ClientObject { + //主键id + @ApiModelProperty(value = "主键id") + private Long id; + //业务id + @ApiModelProperty(value = "业务id") + private String archivesPdfFileId; + //关联表名称 + @ApiModelProperty(value = "关联表名称") + private String tableName; + //关联表id + @ApiModelProperty(value = "关联表id") + private String tableId; + //文件路径 + @ApiModelProperty(value = "文件路径") + private String filePath; + //档案类型 1 一人一档 2一期一档 + @ApiModelProperty(value = "档案类型 1 一人一档 2一期一档") + private Integer type; + //上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除 + @ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除") + private Integer status; + //上传失败错误原因(上传成功则不传) + @ApiModelProperty(value = "上传失败错误原因(上传成功则不传)") + private String errormsg; + //方法名称 + @ApiModelProperty(value = "方法名称") + private String methodName; + //参数 + @ApiModelProperty(value = "参数") + private String param; + //环境 + @ApiModelProperty(value = "环境") + private String env; + //删除标识true false + @ApiModelProperty(value = "删除标识true false") + private String deleteEnum; + //备注 + @ApiModelProperty(value = "备注") + private String remarks; + //创建人姓名 + @ApiModelProperty(value = "创建人姓名") + private String createName; + //更新人姓名 + @ApiModelProperty(value = "更新人姓名") + private String updateName; + //租户id + @ApiModelProperty(value = "租户id") + private Long tenantId; + //单位id + @ApiModelProperty(value = "单位id") + private Long orgId; + //版本 + @ApiModelProperty(value = "版本") + private Integer version; + //创建时间 + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + //修改时间 + @ApiModelProperty(value = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime updateTime; + //创建人id + @ApiModelProperty(value = "创建人id") + private Long createId; + //修改人id + @ApiModelProperty(value = "修改人id") + private Long updateId; +} + 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 new file mode 100644 index 0000000..aaa3e52 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewCO.java @@ -0,0 +1,108 @@ +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; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Data +public class ArchivesReviewCO extends ClientObject { + private Long id; + //业务id + @ApiModelProperty(value = "业务id") + private String archivesReviewId; + //课程id + @ApiModelProperty(value = "课程id") + private String classCurriculumId; + //班级id + @ApiModelProperty(value = "班级id") + private String classId; + //初版书号 + @ApiModelProperty(value = "初版书号") + private String bookNum; + //班级所属企业id + @ApiModelProperty(value = "班级所属企业id") + private Long corpinfoId; + //编写单位 + @ApiModelProperty(value = "编写单位") + private String corpName; + //编写时间 + @ApiModelProperty(value = "编写时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime writeDate; + //教材类型 + @ApiModelProperty(value = "教材类型") + private String materialType; + //会审地点 + @ApiModelProperty(value = "会审地点") + private String address; + //主持人 + @ApiModelProperty(value = "主持人") + private String compere; + //会审时间 + @ApiModelProperty(value = "会审时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime auditDate; + //会审意见 + @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; + //备注 + @ApiModelProperty(value = "备注") + private String remarks; + //创建人姓名 + @ApiModelProperty(value = "创建人姓名") + private String createName; + //更新人姓名 + @ApiModelProperty(value = "更新人姓名") + private String updateName; + //租户id + @ApiModelProperty(value = "租户id") + private Long tenantId; + //单位id + @ApiModelProperty(value = "单位id") + private Long orgId; + //版本 + @ApiModelProperty(value = "版本") + private Integer version; + //创建时间 + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + //修改时间 + @ApiModelProperty(value = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime updateTime; + //创建人id + @ApiModelProperty(value = "创建人id") + private Long createId; + //修改人id + @ApiModelProperty(value = "修改人id") + private Long updateId; + //环境 + @ApiModelProperty(value = "环境") + private String env; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewRecordCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewRecordCO.java new file mode 100644 index 0000000..c3294d5 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/archives/ArchivesReviewRecordCO.java @@ -0,0 +1,79 @@ +package com.zcloud.edu.dto.clientobject.archives; + +import com.alibaba.cola.dto.ClientObject; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@Data +public class ArchivesReviewRecordCO extends ClientObject { + //主键 + @ApiModelProperty(value = "主键") + private Long id; + //业务id + @ApiModelProperty(value = "业务id") + private String archivesReviewRecordId; + //会审表id + @ApiModelProperty(value = "会审表id") + private String archivesReviewId; + //会审人员 + @ApiModelProperty(value = "会审人员") + private String reviewUser; + //工作部门 + @ApiModelProperty(value = "工作部门") + private String department; + //职务/职称 + @ApiModelProperty(value = "职务/职称") + private String duties; + //审查意见 + @ApiModelProperty(value = "审查意见") + private String checkOpinion; + //删除标识true false + @ApiModelProperty(value = "删除标识true false") + private String deleteEnum; + //备注 + @ApiModelProperty(value = "备注") + private String remarks; + //创建人姓名 + @ApiModelProperty(value = "创建人姓名") + private String createName; + //更新人姓名 + @ApiModelProperty(value = "更新人姓名") + private String updateName; + //租户id + @ApiModelProperty(value = "租户id") + private Long tenantId; + //单位id + @ApiModelProperty(value = "单位id") + private Long orgId; + //版本 + @ApiModelProperty(value = "版本") + private Integer version; + //创建时间 + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime createTime; + //修改时间 + @ApiModelProperty(value = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDateTime updateTime; + //创建人id + @ApiModelProperty(value = "创建人id") + private Long createId; + //修改人id + @ApiModelProperty(value = "修改人id") + private Long updateId; + //环境 + @ApiModelProperty(value = "环境") + private String env; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCO.java index bd1f1b6..46e95ad 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCO.java @@ -49,6 +49,9 @@ public class ClassCO extends ClientObject { //机构ID @ApiModelProperty(value = "机构ID") private Long corpinfoId; + //机构ID + @ApiModelProperty(value = "所属单位") + private String corpName; //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") private Integer state; @@ -64,6 +67,14 @@ public class ClassCO extends ClientObject { //考试次数只有考试时候有用 @ApiModelProperty(value = "考试次数只有考试时候有用") private Integer numberofexams; + + + @ApiModelProperty(value = "学员id(雪花)") + private Long stuId; + + @ApiModelProperty(value = "学员id(uuid)") + private String studentId; + //删除标识true false @ApiModelProperty(value = "删除标识true false") private String deleteEnum; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumCO.java index 480638c..bd22e2f 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumCO.java @@ -42,8 +42,11 @@ public class ClassCurriculumCO extends ClientObject { private long videoCount; // 章节目录 @ApiModelProperty(value = "章节目录") - private List chapterList; + private List curriculumChapterCOList; + //目录级别 1-一级目录 2-二级目录 + @ApiModelProperty(value = "目录级别 1-一级目录 2-二级目录") + private Integer catalogueLevel; @ApiModelProperty(value = "所属单位id") @TableField(exist = false) diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumChapterCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumChapterCO.java index b28fd22..9bd7833 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumChapterCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassCurriculumChapterCO.java @@ -23,7 +23,7 @@ public class ClassCurriculumChapterCO extends ClientObject { private Long id; //业务主键id @ApiModelProperty(value = "业务主键id") - private String curriculumChapterId; + private String classCurriculumChapterId; //班级id @ApiModelProperty(value = "班级id") private String classId; @@ -128,7 +128,7 @@ public class ClassCurriculumChapterCO extends ClientObject { // 章节目录 @ApiModelProperty(value = "章节目录") - private List children; + private List childCurriculumChapterCOList; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassExamPaperCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassExamPaperCO.java index acd2be0..5a1266a 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassExamPaperCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/ClassExamPaperCO.java @@ -2,11 +2,13 @@ package com.zcloud.edu.dto.clientobject.study; import com.alibaba.cola.dto.ClientObject; import com.fasterxml.jackson.annotation.JsonFormat; +import com.zcloud.edu.dto.clientobject.resource.QuestionCO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; +import java.util.List; /** @@ -44,6 +46,8 @@ public class ClassExamPaperCO extends ClientObject { private Integer examTime; @ApiModelProperty(value = "企业名称") private String corpName; + @ApiModelProperty(value = "习题列表") + private List questionList; //删除标识true false @ApiModelProperty(value = "删除标识true false") private String deleteEnum; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentCO.java index 7711494..a8f2f1c 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentCO.java @@ -1,6 +1,7 @@ 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; @@ -23,9 +24,18 @@ public class StudentCO extends ClientObject { //学员userid @ApiModelProperty(value = "学员userid") private Integer userId; + + //学员uuid + @ApiModelProperty(value = "学员uuid") + @TableField(exist = false) + private String userIdUuid; //班级id @ApiModelProperty(value = "班级id") private String classId; + + //班级id(雪花) + @ApiModelProperty(value = "班级id(雪花)") + private String clzId; //学员姓名 @ApiModelProperty(value = "学员姓名") private String name; @@ -81,7 +91,7 @@ public class StudentCO extends ClientObject { @ApiModelProperty(value = "考试签到状态 0-未签到 1-已签到") private Integer examSignFlag; //学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过 - @ApiModelProperty(value = "学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过") + @ApiModelProperty(value = "学员状态 0-未完成 1-已完成") private Integer state; //相关方id集合 @ApiModelProperty(value = "相关方id集合") @@ -95,6 +105,114 @@ public class StudentCO extends ClientObject { //项目名称集合 @ApiModelProperty(value = "项目名称集合") private String projectNames; + + + + @ApiModelProperty(value = "班级数") + @TableField(exist = false) + private Integer classCount; + + @ApiModelProperty(value = "完成班级数") + @TableField(exist = false) + private Integer completeClassCount; + + + + + @ApiModelProperty(value = "完成班级数") + @TableField(exist = false) + private String departmentName; + + + + + + //班级名称 + @ApiModelProperty(value = "班级名称") + @TableField(exist = false) + private String className; + //培训日期 开始时间 + @ApiModelProperty(value = "培训日期 开始时间") + @TableField(exist = false) + private String startTime; + //培训日期 结束日期 + @ApiModelProperty(value = "培训日期 结束日期") + @TableField(exist = false) + private String endTime; + //培训教师id + @ApiModelProperty(value = "培训教师id") + @TableField(exist = false) + private Long teacherId; + //教师名称 + @ApiModelProperty(value = "教师名称") + @TableField(exist = false) + private String teacherName; + //培训行业类型 + @ApiModelProperty(value = "培训行业类型") + @TableField(exist = false) + private String trainType; + //培训行业类型名称 + @ApiModelProperty(value = "培训行业类型名称") + @TableField(exist = false) + private String trainTypeName; + //培训地点 + @ApiModelProperty(value = "培训地点") + @TableField(exist = false) + private String trainingLocation; + //机构ID + @ApiModelProperty(value = "机构ID") + @TableField(exist = false) + private Long corpinfoId; + //所属单位 + @ApiModelProperty(value = "所属单位") + @TableField(exist = false) + private String corpName; + //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 + @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") + @TableField(exist = false) + private Integer classState; + //培训有效期日期 开始时间 + @ApiModelProperty(value = "培训有效期日期 开始时间") + @TableField(exist = false) + private String validStartTime; + //培训有效期日期 结束时间 + @ApiModelProperty(value = "培训有效期日期 结束时间") + @TableField(exist = false) + private String validEndTime; + //1考试0不考试 + @ApiModelProperty(value = "1考试0不考试") + @TableField(exist = false) + private Integer examination; + //考试次数只有考试时候有用 + @ApiModelProperty(value = "考试次数只有考试时候有用") + @TableField(exist = false) + private Integer numberofexams; + + + // 学员统计数量 + @ApiModelProperty(value = "学员统计数量") + @TableField(exist = false) + private Integer studentCount; + + + + + // 年龄 + @ApiModelProperty(value = "年龄") + @TableField(exist = false) + private Integer age; + + //生日 + @ApiModelProperty(value = "生日") + @TableField(exist = false) + private String birthday; + + // 性别 + @ApiModelProperty(value = "性别") + @TableField(exist = false) + private String sex; + + //环境 @ApiModelProperty(value = "环境") private String env; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordCO.java index 08e7e85..3c47f70 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentExamRecordCO.java @@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.time.LocalDateTime; +import java.util.List; /** @@ -55,10 +57,20 @@ public class StudentExamRecordCO extends ClientObject { private Integer examQuestionWrong; //考试得分 @ApiModelProperty(value = "考试得分") - private Object examScore; + private BigDecimal examScore; //考试结果 0 -不通过 1-通过 @ApiModelProperty(value = "考试结果 0 -不通过 1-通过") private Integer result; + + @ApiModelProperty(value = "考试签字") + private String signUrl; + + @ApiModelProperty(value = "试题集合") + private List examRecordItemList; + + @ApiModelProperty(value = "剩余考试次数") + private Integer surplusExamNum; + //环境 @ApiModelProperty(value = "环境") private String env; 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..f485789 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; @@ -26,18 +28,62 @@ public class StudentExamRecordItemCO extends ClientObject { //学员id @ApiModelProperty(value = "学员id") private String studentId; + + //班级id + @ApiModelProperty(value = "班级id") + private String classId; //习题ID @ApiModelProperty(value = "习题ID") private String questionId; //学员答案 - @ApiModelProperty(value = "学员答案") + @ApiModelProperty(value = "正确答案") private String answer; //正确答案 - @ApiModelProperty(value = "正确答案") - private String answerRight; + @ApiModelProperty(value = "学员答案") + private String choiceAnswer; //删除标识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/clientobject/study/StudentSignCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentSignCO.java index 4b76477..13c4c33 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentSignCO.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/StudentSignCO.java @@ -35,6 +35,11 @@ public class StudentSignCO extends ClientObject { //签到人脸路径 @ApiModelProperty(value = "签到人脸路径") private String faceUrl; + + //打卡签字路径 + @ApiModelProperty(value = "打卡签字路径") + private String signUrl; + //签到类型 1-打卡签到 2-人脸签到 @ApiModelProperty(value = "签到类型 1-打卡签到 2-人脸签到") private Integer type; 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..8bf8b91 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/ClassArchivesDTO.java @@ -0,0 +1,97 @@ +package com.zcloud.edu.dto.data.archives; + +import com.zcloud.edu.dto.clientobject.study.StudentCO; +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; + //所属单位名称 + @ApiModelProperty(value = "所属单位名称") + private String corpName; + //状态: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; + @ApiModelProperty(value = "实际参加培训人数") + private Long signCount; + + @ApiModelProperty(value = "合格学员列表") + private List passStudentList; + @ApiModelProperty(value = "不合格学员列表") + private List failStudentList; +} 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 new file mode 100644 index 0000000..8b7367e --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/data/archives/PersonArchivesDTO.java @@ -0,0 +1,143 @@ +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 PersonArchivesDTO { + private Long stuId; + //业务id + @ApiModelProperty(value = "业务id") + private String studentId; + //学员userid + @ApiModelProperty(value = "学员userid") + private Integer userId; + //班级id + @ApiModelProperty(value = "班级id") + private String classId; + //学员姓名 + @ApiModelProperty(value = "学员姓名") + private String name; + //学员所属班级的企业id + @ApiModelProperty(value = "学员所属班级的企业id") + private Long classCorpinfoId; + //手机号 + @ApiModelProperty(value = "手机号") + private String phone; + //身份证号 + @ApiModelProperty(value = "身份证号") + private String userIdCard; + //民族编码 + @ApiModelProperty(value = "民族编码") + private String nation; + //民族名称 + @ApiModelProperty(value = "民族名称") + private String nationName; + //人脸照片url + @ApiModelProperty(value = "人脸照片url") + private String userAvatarUrl; + //现住址 + @ApiModelProperty(value = "现住址") + private String currentAddress; + //户口所在地 + @ApiModelProperty(value = "户口所在地") + private String locationAddress; + //文化程度 数据字典 + @ApiModelProperty(value = "文化程度 数据字典") + private String culturalLevel; + //文化程度名称 + @ApiModelProperty(value = "文化程度名称") + private String culturalLevelName; + //婚姻状态 + @ApiModelProperty(value = "婚姻状态") + private String maritalStatus; + //婚姻状态名称 + @ApiModelProperty(value = "婚姻状态名称") + private String maritalStatusName; + //政治面貌 + @ApiModelProperty(value = "政治面貌") + private String politicalAffiliation; + //政治面貌名称 + @ApiModelProperty(value = "政治面貌名称") + private String politicalAffiliationName; + //岗位名称 + @ApiModelProperty(value = "岗位名称") + private String postName; + //签到状态 0-未签到 1-已签到 + @ApiModelProperty(value = "签到状态 0-未签到 1-已签到") + private Integer signFlag; + //考试签到状态 0-未签到 1-已签到 + @ApiModelProperty(value = "考试签到状态 0-未签到 1-已签到") + private Integer examSignFlag; + //学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过 + @ApiModelProperty(value = "学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过") + private Integer state; + + + //班级名称 + @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 classState; + //培训有效期日期 开始时间 + @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; +} diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassAppSignQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassAppSignQry.java new file mode 100644 index 0000000..016d6f9 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassAppSignQry.java @@ -0,0 +1,32 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-13 14:18:12 + */ +@Data +public class ClassAppSignQry { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private String classId; + private String phone; + private Long stuId; + private String studentId; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCountQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCountQry.java new file mode 100644 index 0000000..8a74c70 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCountQry.java @@ -0,0 +1,31 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + +import java.util.List; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-13 14:18:12 + */ +@Data +public class ClassCountQry { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private List phones; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumAddCmd.java index 0f56247..d2ecd9a 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumAddCmd.java @@ -43,10 +43,15 @@ public class ClassCurriculumAddCmd extends Command { @NotNull(message = "课程总时长不能为空") private double videoTotalTime; + //目录级别 1-一级目录 2-二级目录 + @ApiModelProperty(value = "目录级别 1-一级目录 2-二级目录") + @NotNull(message = "课程总时长不能为空") + private Integer catalogueLevel; + @ApiModelProperty(value = "课程目录", name = "curriculumChapterAddCmdList", required = true) @NotNull(message = "课程目录") - private List chapterList; + private List curriculumChapterAddCmdList; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumBatchAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumBatchAddCmd.java new file mode 100644 index 0000000..9f6cb02 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumBatchAddCmd.java @@ -0,0 +1,36 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.Command; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-16 09:54:32 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ClassCurriculumBatchAddCmd extends Command { + + @ApiModelProperty(value = "课程id", name = "curriculumId", required = true) + @NotEmpty(message = "课程id不能为空") + private List curriculumIds; + + @ApiModelProperty(value = "班级id", name = "classId", required = true) + @NotEmpty(message = "班级id不能为空") + private String classId; + + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumChapterAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumChapterAddCmd.java index 326d33f..e8e71fc 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumChapterAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumChapterAddCmd.java @@ -52,7 +52,7 @@ public class ClassCurriculumChapterAddCmd extends Command { @ApiModelProperty(value = "目录课件", name = "curriculumChapterAddCmdList", required = true) @NotEmpty(message = "目录课件不能为空") - private List children; + private List curriculumChapterAddCmdList; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumQry.java new file mode 100644 index 0000000..a7c7cbd --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/ClassCurriculumQry.java @@ -0,0 +1,29 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-16 09:54:33 + */ +@Data +public class ClassCurriculumQry { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private String likeClassCurriculumId; + private String eqClassId; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentAddCmd.java index b7898c2..e43e43a 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentAddCmd.java @@ -26,7 +26,7 @@ public class StudentAddCmd extends Command { @ApiModelProperty(value = "学员userid", name = "userId", required = true) @NotNull(message = "学员userid不能为空") - private Integer userId; + private Long userId; @ApiModelProperty(value = "班级id", name = "classId", required = true) @NotEmpty(message = "班级id不能为空") diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentCountQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentCountQry.java new file mode 100644 index 0000000..2c4a1a8 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentCountQry.java @@ -0,0 +1,37 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import lombok.Data; + +import java.util.List; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-13 14:18:15 + */ +@Data +public class StudentCountQry { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + private String eqStudentId; + private String eqClassId; + private String likeProjectNames; + private String likeName; + private String likeInterestedIds; + private List corpinfoIds; + private List phones; + +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordAddCmd.java index 0aa2111..45115c1 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordAddCmd.java @@ -9,6 +9,8 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.util.List; /** * web-client @@ -22,60 +24,50 @@ import javax.validation.constraints.NotNull; @AllArgsConstructor public class StudentExamRecordAddCmd extends Command { @ApiModelProperty(value = "业务id", name = "studentExamRecordId", required = true) - @NotEmpty(message = "业务id不能为空") private String studentExamRecordId; @ApiModelProperty(value = "用户id", name = "userId", required = true) - @NotNull(message = "用户id不能为空") private Long userId; @ApiModelProperty(value = "学员id", name = "studentId", required = true) - @NotEmpty(message = "学员id不能为空") private String studentId; @ApiModelProperty(value = "班级id", name = "classId", required = true) - @NotEmpty(message = "班级id不能为空") private String classId; @ApiModelProperty(value = "企业id", name = "corpinfoId", required = true) - @NotNull(message = "企业id不能为空") private Long corpinfoId; @ApiModelProperty(value = "班级-试卷 表ID", name = "classExamPaperId", required = true) - @NotEmpty(message = "班级-试卷 表ID不能为空") private String classExamPaperId; @ApiModelProperty(value = "试卷id", name = "examPaperId", required = true) - @NotEmpty(message = "试卷id不能为空") private String examPaperId; @ApiModelProperty(value = "考试时间", name = "examTimeBegin", required = true) - @NotEmpty(message = "考试时间不能为空") private String examTimeBegin; @ApiModelProperty(value = "考试交卷时间", name = "examTimeEnd", required = true) - @NotEmpty(message = "考试交卷时间不能为空") private String examTimeEnd; @ApiModelProperty(value = "考试总题数", name = "examQuestionNum", required = true) - @NotNull(message = "考试总题数不能为空") private Integer examQuestionNum; @ApiModelProperty(value = "考试对题数", name = "examQuestionRight", required = true) - @NotNull(message = "考试对题数不能为空") private Integer examQuestionRight; @ApiModelProperty(value = "考试错题数", name = "examQuestionWrong", required = true) - @NotNull(message = "考试错题数不能为空") private Integer examQuestionWrong; @ApiModelProperty(value = "考试得分", name = "examScore", required = true) - @NotEmpty(message = "考试得分不能为空") - private Object examScore; + private BigDecimal examScore; @ApiModelProperty(value = "考试结果 0 -不通过 1-通过", name = "result", required = true) - @NotNull(message = "考试结果 0 -不通过 1-通过不能为空") private Integer result; + @ApiModelProperty(value = "选项", name = "questionList", required = true) + @NotNull(message = "选项不能为空") + private List questionList; + } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemAddCmd.java index 57cee40..1d69a2c 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemAddCmd.java @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; +import java.math.BigDecimal; /** * web-client @@ -21,28 +22,24 @@ import javax.validation.constraints.NotEmpty; @AllArgsConstructor public class StudentExamRecordItemAddCmd extends Command { @ApiModelProperty(value = "业务id", name = "studentExamRecordItemId", required = true) - @NotEmpty(message = "业务id不能为空") private String studentExamRecordItemId; @ApiModelProperty(value = "考试记录id", name = "studentExamRecordId", required = true) - @NotEmpty(message = "考试记录id不能为空") private String studentExamRecordId; @ApiModelProperty(value = "学员id", name = "studentId", required = true) - @NotEmpty(message = "学员id不能为空") private String studentId; @ApiModelProperty(value = "习题ID", name = "questionId", required = true) - @NotEmpty(message = "习题ID不能为空") private String questionId; - @ApiModelProperty(value = "学员答案", name = "answer", required = true) - @NotEmpty(message = "学员答案不能为空") + @ApiModelProperty(value = "正确答案", name = "answer", required = true) private String answer; - @ApiModelProperty(value = "正确答案", name = "answerRight", required = true) - @NotEmpty(message = "正确答案不能为空") - private String answerRight; + @ApiModelProperty(value = "学员答案", name = "choiceAnswer", required = true) + private String choiceAnswer; + @ApiModelProperty(value = "分值", name = "score", required = true) + private BigDecimal score; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemUpdateCmd.java index ff90164..901d08b 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemUpdateCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordItemUpdateCmd.java @@ -36,11 +36,11 @@ public class StudentExamRecordItemUpdateCmd extends Command { @ApiModelProperty(value = "习题ID", name = "questionId", required = true) @NotEmpty(message = "习题ID不能为空") private String questionId; - @ApiModelProperty(value = "学员答案", name = "answer", required = true) - @NotEmpty(message = "学员答案不能为空") - private String answer; - @ApiModelProperty(value = "正确答案", name = "answerRight", required = true) + @ApiModelProperty(value = "正确答案", name = "answer", required = true) @NotEmpty(message = "正确答案不能为空") - private String answerRight; + private String answer; + @ApiModelProperty(value = "学员答案", name = "choiceAnswer", required = true) + @NotEmpty(message = "学员答案不能为空") + private String choiceAnswer; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordPageQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordPageQry.java index 61e10ea..5de7d54 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordPageQry.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordPageQry.java @@ -24,5 +24,6 @@ public class StudentExamRecordPageQry extends PageQuery { * - `ne`: 不等比较查询,对应SQL的!=操作符 */ private String likeStudentExamRecordId; + private String likeStudentId; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordUpdateCmd.java index 74f4127..52980cd 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordUpdateCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentExamRecordUpdateCmd.java @@ -9,6 +9,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; +import java.math.BigDecimal; /** * web-client @@ -62,7 +63,7 @@ public class StudentExamRecordUpdateCmd extends Command { private Integer examQuestionWrong; @ApiModelProperty(value = "考试得分", name = "examScore", required = true) @NotEmpty(message = "考试得分不能为空") - private Object examScore; + private BigDecimal examScore; @ApiModelProperty(value = "考试结果 0 -不通过 1-通过", name = "result", required = true) @NotNull(message = "考试结果 0 -不通过 1-通过不能为空") private Integer result; diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentPageQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentPageQry.java index 02db9da..cb21682 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentPageQry.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentPageQry.java @@ -28,6 +28,7 @@ public class StudentPageQry extends PageQuery { private String likeProjectNames; private String likeName; private String likeInterestedIds; - + private String likeClassName; + private Integer state; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignAddCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignAddCmd.java index efc4098..e0f6bf0 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignAddCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignAddCmd.java @@ -6,6 +6,7 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import org.springframework.web.multipart.MultipartFile; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @@ -21,33 +22,26 @@ import javax.validation.constraints.NotNull; @NoArgsConstructor @AllArgsConstructor public class StudentSignAddCmd extends Command { - @ApiModelProperty(value = "学员id", name = "studentId", required = true) - @NotEmpty(message = "学员id不能为空") - private String studentId; - - @ApiModelProperty(value = "业务id", name = "studentSignId", required = true) - @NotEmpty(message = "业务id不能为空") - private String studentSignId; @ApiModelProperty(value = "班级id", name = "classId", required = true) - @NotEmpty(message = "班级id不能为空") private String classId; - @ApiModelProperty(value = "用户id", name = "userId", required = true) - @NotNull(message = "用户id不能为空") - private Long userId; + @ApiModelProperty(value = "学员id", name = "studentId", required = true) + private String studentId; + - @ApiModelProperty(value = "企业id", name = "corpinfoId", required = true) - @NotNull(message = "企业id不能为空") - private Long corpinfoId; - @ApiModelProperty(value = "签到人脸路径", name = "faceUrl", required = true) - @NotEmpty(message = "签到人脸路径不能为空") - private String faceUrl; @ApiModelProperty(value = "签到类型 1-打卡签到 2-人脸签到", name = "type", required = true) @NotNull(message = "签到类型 1-打卡签到 2-人脸签到不能为空") private Integer type; + @ApiModelProperty(value = "手机号", name = "phone", required = true) + private String phone; + + + @ApiModelProperty(value = "人脸照片", name = "files") + @NotEmpty(message = "请上传人脸照片") + private MultipartFile[] files; } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignUpdateCmd.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignUpdateCmd.java index 6b11567..ceb49f2 100644 --- a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignUpdateCmd.java +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignUpdateCmd.java @@ -21,29 +21,25 @@ import javax.validation.constraints.NotNull; @NoArgsConstructor @AllArgsConstructor public class StudentSignUpdateCmd 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 = "studentId", required = true) - @NotEmpty(message = "学员id不能为空") private String studentId; @ApiModelProperty(value = "业务id", name = "studentSignId", required = true) - @NotEmpty(message = "业务id不能为空") private String studentSignId; @ApiModelProperty(value = "班级id", name = "classId", required = true) - @NotEmpty(message = "班级id不能为空") private String classId; @ApiModelProperty(value = "用户id", name = "userId", required = true) - @NotNull(message = "用户id不能为空") private Long userId; @ApiModelProperty(value = "企业id", name = "corpinfoId", required = true) - @NotNull(message = "企业id不能为空") private Long corpinfoId; @ApiModelProperty(value = "签到人脸路径", name = "faceUrl", required = true) - @NotEmpty(message = "签到人脸路径不能为空") private String faceUrl; + @ApiModelProperty(value = "签字路径", name = "signUrl", required = true) + private String signUrl; @ApiModelProperty(value = "签到类型 1-打卡签到 2-人脸签到", name = "type", required = true) - @NotNull(message = "签到类型 1-打卡签到 2-人脸签到不能为空") private Integer type; + } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignVerifyQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignVerifyQry.java new file mode 100644 index 0000000..e30bba4 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/StudentSignVerifyQry.java @@ -0,0 +1,27 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + + +/** + * web-client + * + * @Author zhangyue + * @Date 2026-01-13 14:18:20 + */ +@Data +public class StudentSignVerifyQry{ + + private String classId; + private String phone; + private Integer type; +} + diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesPdfFileGateway.java b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesPdfFileGateway.java new file mode 100644 index 0000000..d795cbb --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesPdfFileGateway.java @@ -0,0 +1,31 @@ +package com.zcloud.edu.domain.gateway.archives; + + +import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE; + +/** + * web-domain + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +public interface ArchivesPdfFileGateway { + + /** + * 新增 + */ + Boolean add(ArchivesPdfFileE archivesPdfFileE); + + /** + * 修改 + */ + Boolean update(ArchivesPdfFileE archivesPdfFileE); + + /** + * 删除 + */ + Boolean deletedArchivesPdfFileById(Long id); + + Boolean deletedArchivesPdfFileByIds(Long[] id); +} + diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewGateway.java b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewGateway.java new file mode 100644 index 0000000..bb4acfd --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewGateway.java @@ -0,0 +1,31 @@ +package com.zcloud.edu.domain.gateway.archives; + + +import com.zcloud.edu.domain.model.archives.ArchivesReviewE; + +/** + * web-domain + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +public interface ArchivesReviewGateway { + + /** + * 新增 + */ + Boolean add(ArchivesReviewE archivesReviewE); + + /** + * 修改 + */ + Boolean update(ArchivesReviewE archivesReviewE); + + /** + * 删除 + */ + Boolean deletedArchivesReviewById(Long id); + + Boolean deletedArchivesReviewByIds(Long[] id); +} + diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewRecordGateway.java b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewRecordGateway.java new file mode 100644 index 0000000..ac4d077 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/archives/ArchivesReviewRecordGateway.java @@ -0,0 +1,31 @@ +package com.zcloud.edu.domain.gateway.archives; + + +import com.zcloud.edu.domain.model.archives.ArchivesReviewRecordE; + +/** + * web-domain + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +public interface ArchivesReviewRecordGateway { + + /** + * 新增 + */ + Boolean add(ArchivesReviewRecordE archivesReviewRecordE); + + /** + * 修改 + */ + Boolean update(ArchivesReviewRecordE archivesReviewRecordE); + + /** + * 删除 + */ + Boolean deletedArchivesReviewRecordById(Long id); + + Boolean deletedArchivesReviewRecordByIds(Long[] id); +} + diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/gateway/study/ClassGateway.java b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/study/ClassGateway.java index c88edda..ee6e32e 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/gateway/study/ClassGateway.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/gateway/study/ClassGateway.java @@ -14,7 +14,7 @@ public interface ClassGateway { /** * 新增 */ - Boolean add(ClassE classE); + Long add(ClassE classE); /** * 修改 diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesPdfFileE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesPdfFileE.java new file mode 100644 index 0000000..8ad860c --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesPdfFileE.java @@ -0,0 +1,61 @@ +package com.zcloud.edu.domain.model.archives; + +import com.jjb.saas.framework.domain.model.BaseE; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * web-domain + * + * @Author zhangyue + * @Date 2026-02-02 10:32:41 + */ +@Data +public class ArchivesPdfFileE extends BaseE { + //主键id + private Long id; + //业务id + private String archivesPdfFileId; + //关联表名称 + private String tableName; + //关联表id + private String tableId; + //文件路径 + private String filePath; + //档案类型 1 一人一档 2一期一档 + private Integer type; + //上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除 + private Integer status; + //上传失败错误原因(上传成功则不传) + private String errormsg; + //方法名称 + private String methodName; + //参数 + private String param; + //环境 + private String env; + //删除标识true false + private String deleteEnum; + //备注 + private String remarks; + //创建人姓名 + private String createName; + //更新人姓名 + private String updateName; + //租户id + private Long tenantId; + //单位id + private Long orgId; + //版本 + private Integer version; + //创建时间 + private LocalDateTime createTime; + //修改时间 + private LocalDateTime updateTime; + //创建人id + private Long createId; + //修改人id + private Long updateId; +} + 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 new file mode 100644 index 0000000..bae1d53 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewE.java @@ -0,0 +1,82 @@ +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; + +/** + * web-domain + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Data +public class ArchivesReviewE extends BaseE { + private Long id; + //业务id + private String archivesReviewId; + //课程id + private String classCurriculumId; + //班级id + private String classId; + //初版书号 + private String bookNum; + //班级所属企业id + private Long corpinfoId; + //编写单位 + private String corpName; + //编写时间 + private LocalDateTime writeDate; + //教材类型 + private String materialType; + //会审地点 + private String address; + //主持人 + private String compere; + //会审时间 + private LocalDateTime auditDate; + //会审意见 + private String reviewOpinions; + //删除标识true false + private String deleteEnum; + //备注 + private String remarks; + //创建人姓名 + private String createName; + //更新人姓名 + private String updateName; + //租户id + private Long tenantId; + //单位id + private Long orgId; + //版本 + private Integer version; + //创建时间 + private LocalDateTime createTime; + //修改时间 + private LocalDateTime updateTime; + //创建人id + private Long createId; + //修改人id + 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 new file mode 100644 index 0000000..b0e22e2 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ArchivesReviewRecordE.java @@ -0,0 +1,67 @@ +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 + * + * @Author zhangyue + * @Date 2026-01-26 10:59:36 + */ +@Data +public class ArchivesReviewRecordE extends BaseE { + //主键 + private Long id; + //业务id + private String archivesReviewRecordId; + //会审表id + private String archivesReviewId; + //会审人员 + private String reviewUser; + //工作部门 + private String department; + //职务/职称 + private String duties; + //审查意见 + private String checkOpinion; + //删除标识true false + private String deleteEnum; + //备注 + private String remarks; + //创建人姓名 + private String createName; + //更新人姓名 + private String updateName; + //租户id + private Long tenantId; + //单位id + private Long orgId; + //版本 + private Integer version; + //创建时间 + private LocalDateTime createTime; + //修改时间 + private LocalDateTime updateTime; + //创建人id + private Long createId; + //修改人id + 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..6e41030 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/ClassArchivesE.java @@ -0,0 +1,110 @@ +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; + // 机构名称 + @ApiModelProperty(value = "机构名称") + private String corpName; + //状态: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; + + @ApiModelProperty(value = "实际参加培训人数") + private Long signCount; + + 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()); + } + public void initClassExamResult(ClassE classE, Integer studentCount, Integer signCount) { + BeanUtils.copyProperties(classE, this); + setClassName(classE.getName()); +// String trainSubject = classCurList.stream().map(ClassCurriculumE::getCurriculumName).collect(Collectors.joining(",")); +// setTrainSubject(trainSubject); + setStudentCount(Long.valueOf(studentCount)); + setSignCount(Long.valueOf(signCount)); + 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 new file mode 100644 index 0000000..4d85c18 --- /dev/null +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/archives/PersonArchivesE.java @@ -0,0 +1,233 @@ +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 groovy.lang.BenchmarkInterceptor; +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 PersonArchivesE extends BaseE { + + private Long stuId; + //业务id + @ApiModelProperty(value = "业务id") + private String studentId; + //学员userid + @ApiModelProperty(value = "学员userid") + private Integer userId; + //班级id + @ApiModelProperty(value = "班级id") + private String classId; + //学员姓名 + @ApiModelProperty(value = "学员姓名") + private String name; + //学员所属班级的企业id + @ApiModelProperty(value = "学员所属班级的企业id") + private Long classCorpinfoId; + //手机号 + @ApiModelProperty(value = "手机号") + private String phone; + //身份证号 + @ApiModelProperty(value = "身份证号") + private String userIdCard; + //民族编码 + @ApiModelProperty(value = "民族编码") + private String nation; + //民族名称 + @ApiModelProperty(value = "民族名称") + private String nationName; + //人脸照片url + @ApiModelProperty(value = "人脸照片url") + private String userAvatarUrl; + //现住址 + @ApiModelProperty(value = "现住址") + private String currentAddress; + //户口所在地 + @ApiModelProperty(value = "户口所在地") + private String locationAddress; + //文化程度 数据字典 + @ApiModelProperty(value = "文化程度 数据字典") + private String culturalLevel; + //文化程度名称 + @ApiModelProperty(value = "文化程度名称") + private String culturalLevelName; + //婚姻状态 + @ApiModelProperty(value = "婚姻状态") + private String maritalStatus; + //婚姻状态名称 + @ApiModelProperty(value = "婚姻状态名称") + private String maritalStatusName; + //政治面貌 + @ApiModelProperty(value = "政治面貌") + private String politicalAffiliation; + //政治面貌名称 + @ApiModelProperty(value = "政治面貌名称") + private String politicalAffiliationName; + //岗位名称 + @ApiModelProperty(value = "岗位名称") + private String postName; + //签到状态 0-未签到 1-已签到 + @ApiModelProperty(value = "签到状态 0-未签到 1-已签到") + private Integer signFlag; + //考试签到状态 0-未签到 1-已签到 + @ApiModelProperty(value = "考试签到状态 0-未签到 1-已签到") + private Integer examSignFlag; + //学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过 + @ApiModelProperty(value = "学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过") + private Integer state; + + + //班级名称 + @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 classState; + //培训有效期日期 开始时间 + @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; + + public void init(StudentE studentE, ClassE classE, List classCurList) { + BeanUtils.copyProperties(studentE, this); + setStuId(studentE.getId()); + setClassName(classE.getName()); + setStartTime(classE.getStartTime()); + setEndTime(classE.getEndTime()); + setTeacherId(classE.getTeacherId()); + setTeacherName(classE.getTeacherName()); + setTrainType(classE.getTrainType()); + setTrainTypeName(classE.getTrainTypeName()); + setTrainingLocation(classE.getTrainingLocation()); + setCorpinfoId(classE.getCorpinfoId()); + setClassState(classE.getState()); + setValidStartTime(classE.getValidStartTime()); + setValidEndTime(classE.getValidEndTime()); + setExamination(classE.getExamination()); + setNumberofexams(classE.getNumberofexams()); + String trainSubject = classCurList.stream().map(ClassCurriculumE::getCurriculumName).collect(Collectors.joining(",")); + setTrainSubject(trainSubject); + setTrainDurationTime(DateUtil.getMinuteSub(classE.getStartTime(), classE.getEndTime())); + } + + public void initAttendanceRecord(StudentE studentE, ClassE classE, List chapterEList, List classCurList) { + BeanUtils.copyProperties(studentE, this); + setStuId(studentE.getId()); + setClassName(classE.getName()); + setStartTime(classE.getStartTime()); + setEndTime(classE.getEndTime()); + setTeacherId(classE.getTeacherId()); + setTeacherName(classE.getTeacherName()); + setTrainType(classE.getTrainType()); + setTrainTypeName(classE.getTrainTypeName()); + setTrainingLocation(classE.getTrainingLocation()); + setCorpinfoId(classE.getCorpinfoId()); + setClassState(classE.getState()); + setValidStartTime(classE.getValidStartTime()); + setValidEndTime(classE.getValidEndTime()); + setExamination(classE.getExamination()); + setNumberofexams(classE.getNumberofexams()); + setVideoCount(chapterEList.size()); + BigDecimal videoTotalTime = classCurList.stream() + .map(ClassCurriculumE::getVideoTotalTime) // 假设getBigDecimalField是获取BigDecimal字段的方法 + .filter(bigDecimal -> bigDecimal != null) // 过滤null值,防止空指针异常 + .reduce(BigDecimal.ZERO, BigDecimal::add); + setVideoTotalTime(videoTotalTime); + } + public void initStudyRecord(StudentE studentE, ClassE classE, List studentSignEList, List classCurList) { + BeanUtils.copyProperties(studentE, this); + setStuId(studentE.getId()); + setClassName(classE.getName()); + setStartTime(classE.getStartTime()); + setEndTime(classE.getEndTime()); + setTeacherId(classE.getTeacherId()); + setTeacherName(classE.getTeacherName()); + setTrainType(classE.getTrainType()); + setTrainTypeName(classE.getTrainTypeName()); + setTrainingLocation(classE.getTrainingLocation()); + setCorpinfoId(classE.getCorpinfoId()); + setClassState(classE.getState()); + setValidStartTime(classE.getValidStartTime()); + setValidEndTime(classE.getValidEndTime()); + setExamination(classE.getExamination()); + setNumberofexams(classE.getNumberofexams()); + BigDecimal videoTotalTime = classCurList.stream() + .map(ClassCurriculumE::getVideoTotalTime) // 假设getBigDecimalField是获取BigDecimal字段的方法 + .filter(bigDecimal -> bigDecimal != null) // 过滤null值,防止空指针异常 + .reduce(BigDecimal.ZERO, BigDecimal::add); + String trainSubject = classCurList.stream().map(ClassCurriculumE::getCurriculumName).collect(Collectors.joining(",")); + setTrainSubject(trainSubject); + setVideoTotalTime(videoTotalTime); + if (studentSignEList != null && studentSignEList.size() > 0){ + for (StudentSignE studentSignE : studentSignEList){ + if(studentSignE.getType() == 1 + && !ObjectUtils.isEmpty(studentSignE.getFaceUrl()) + && ObjectUtils.isEmpty(this.getSignFaceUrl()) ){ + this.setSignFaceUrl(studentSignE.getFaceUrl()); + } + if(studentSignE.getType() == 2 + && !ObjectUtils.isEmpty(studentSignE.getFaceUrl()) + && ObjectUtils.isEmpty(this.getExamSignFaceUrl()) ){ + this.setExamSignFaceUrl(studentSignE.getFaceUrl()); + } + } + } + } + +} diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/resource/QuestionE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/resource/QuestionE.java index b00a848..fe5d8f5 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/resource/QuestionE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/resource/QuestionE.java @@ -64,35 +64,35 @@ public class QuestionE extends BaseE { if (CoursewareTypeEnum.VIDEO_COURSEWARE.getCode().equals(questionE.getCoursewareType())) { // 视频课件 if (questionE.getVideoCoursewareId() == null) { - throw new RuntimeException("请选择正确的视频课件"); + throw new BizException("请选择正确的视频课件"); } } else if (CoursewareTypeEnum.EXAM_QUESTION.getCode().equals(questionE.getCoursewareType())) { // 试卷习题 if (questionE.getExamPaperId() == null) { - throw new RuntimeException("请选择正确的试卷"); + throw new BizException("请选择正确的试卷"); } if (questionE.getScore()==null) { - throw new RuntimeException("请填写正确的分值"); + throw new BizException("请填写正确的分值"); } } else { - throw new RuntimeException("请选择正确的课件类型"); + throw new BizException("请选择正确的课件类型"); } if (QuestionTypeEnum.CHOICE.getCode().equals(questionE.getQuestionType())) { // 单选题 if (questionE.getOptionA() == null || questionE.getOptionB() == null || questionE.getOptionC() == null || questionE.getOptionD() == null) { - throw new RuntimeException("单选题选项不能为空"); + throw new BizException("单选题选项不能为空"); } } else if (QuestionTypeEnum.MULTIPLE.getCode().equals(questionE.getQuestionType())) { // 多选题 if (questionE.getOptionA() == null || questionE.getOptionB() == null || questionE.getOptionC() == null || questionE.getOptionD() == null) { - throw new RuntimeException("多选题选项不能为空"); + throw new BizException("多选题选项不能为空"); } } else if (QuestionTypeEnum.JUDGE.getCode().equals(questionE.getQuestionType())) { // 判断题 if (questionE.getOptionA() == null || questionE.getOptionB() == null) { - throw new RuntimeException("判断题选项不能为空"); + throw new BizException("判断题选项不能为空"); } } } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumChapterE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumChapterE.java index fc30d66..5113b5e 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumChapterE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumChapterE.java @@ -17,7 +17,7 @@ public class ClassCurriculumChapterE extends BaseE { //主键 private Long id; //业务主键id - private String curriculumChapterId; + private String classCurriculumChapterId; //班级id private String classId; //企业ID @@ -33,7 +33,12 @@ public class ClassCurriculumChapterE extends BaseE { //上级ID private String parentId; //子集 - private List children; + private List curriculumChapterAddCmdList; + + + //课程id(批量新增使用) + private String curriculumId; + //删除标识true false private String deleteEnum; //备注 diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumE.java index 3be4cc0..b37d568 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassCurriculumE.java @@ -3,12 +3,16 @@ package com.zcloud.edu.domain.model.study; import com.google.type.Decimal; import com.jjb.saas.framework.domain.model.BaseE; import com.zcloud.gbscommon.utils.Tools; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * web-domain @@ -38,9 +42,9 @@ public class ClassCurriculumE extends BaseE { //更新人姓名 private String updateName; - private List chapterList; - + private List curriculumChapterAddCmdList; + private Integer catalogueLevel; //租户id private Long tenantId; //单位id @@ -62,24 +66,40 @@ public class ClassCurriculumE extends BaseE { List classCurriculumChapterEList = new ArrayList(); for (ClassCurriculumE cur : curList){ cur.setClassCurriculumId(Tools.get32UUID()); - for (ClassCurriculumChapterE chapter : cur.getChapterList()){ - chapter.setCurriculumChapterId(Tools.get32UUID()); + for (ClassCurriculumChapterE chapter : cur.getCurriculumChapterAddCmdList()){ + chapter.setClassCurriculumChapterId(Tools.get32UUID()); chapter.setClassId(cur.getClassId()); chapter.setClassCurriculumId(cur.getClassCurriculumId()); chapter.setParentId("0"); - if (chapter.getChildren() != null && chapter.getChildren().size() > 0){ - for (ClassCurriculumChapterE childChapter : chapter.getChildren()){ - childChapter.setCurriculumChapterId(Tools.get32UUID()); + if (chapter.getCurriculumChapterAddCmdList() != null && chapter.getCurriculumChapterAddCmdList().size() > 0){ + for (ClassCurriculumChapterE childChapter : chapter.getCurriculumChapterAddCmdList()){ + childChapter.setClassCurriculumChapterId(Tools.get32UUID()); childChapter.setClassId(cur.getClassId()); childChapter.setClassCurriculumId(cur.getClassCurriculumId()); - childChapter.setParentId(chapter.getCurriculumChapterId()); + childChapter.setParentId(chapter.getClassCurriculumChapterId()); } - classCurriculumChapterEList.addAll(chapter.getChildren()); + classCurriculumChapterEList.addAll(chapter.getCurriculumChapterAddCmdList()); } } - classCurriculumChapterEList.addAll(cur.getChapterList()); + classCurriculumChapterEList.addAll(cur.getCurriculumChapterAddCmdList()); } return classCurriculumChapterEList; } + + public void initBatchAdd(List curList, List chapterList, String classId){ + Map map = new HashMap(); + for (ClassCurriculumE cur : curList){ + cur.setClassCurriculumId(Tools.get32UUID()); + cur.setClassId(classId); + map.put(cur.getCurriculumId(), cur.getClassCurriculumId()); + } + chapterList.stream().forEach(chapter -> { + chapter.setClassCurriculumId(map.get(chapter.getCurriculumId())); + chapter.setClassId(classId); + chapter.setClassCurriculumChapterId(Tools.get32UUID()); + }); + } + + } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassE.java index e647752..a06176e 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/ClassE.java @@ -1,5 +1,6 @@ package com.zcloud.edu.domain.model.study; +import com.alibaba.cola.exception.BizException; import com.jjb.saas.framework.domain.model.BaseE; import com.zcloud.gbscommon.utils.DateUtil; import com.zcloud.gbscommon.utils.Tools; @@ -7,6 +8,7 @@ import lombok.Data; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; +import java.util.zip.ZipException; /** * web-domain @@ -37,6 +39,8 @@ public class ClassE extends BaseE { private String trainingLocation; //机构ID private Long corpinfoId; + //机构名称 + private String corpName; //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 private Integer state; //培训有效期日期 开始时间 @@ -99,5 +103,16 @@ public class ClassE extends BaseE { } } + /** + * 判断班级是否开班 + */ + public void isBegin(){ + if(DateUtil.isBeforeThan(this.startTime)){ + throw new BizException("班级未开班"); + } else if(DateUtil.isAfter(this.endTime)){ + throw new BizException("班级已结束"); + } + } + } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentE.java index 640ffd6..f991f21 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentE.java @@ -116,5 +116,6 @@ public class StudentE extends BaseE { } } + } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordE.java index ba50c48..a9124e6 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordE.java @@ -1,9 +1,14 @@ package com.zcloud.edu.domain.model.study; import com.jjb.saas.framework.domain.model.BaseE; +import com.zcloud.gbscommon.utils.Tools; import lombok.Data; +import org.springframework.util.ObjectUtils; +import java.math.BigDecimal; import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; /** * web-domain @@ -39,7 +44,7 @@ public class StudentExamRecordE extends BaseE { //考试错题数 private Integer examQuestionWrong; //考试得分 - private Object examScore; + private BigDecimal examScore; //考试结果 0 -不通过 1-通过 private Integer result; //环境 @@ -66,5 +71,38 @@ public class StudentExamRecordE extends BaseE { private Long createId; //修改人id private Long updateId; + // 构造函数 + + public void submit(BigDecimal passScore, List queList){ + + examScore = BigDecimal.ZERO; + examQuestionRight = 0; + examQuestionWrong = 0; + examQuestionNum = 0; + this.setStudentExamRecordId(Tools.get32UUID()); + this.setExamQuestionNum(queList.size()); + for (StudentExamRecordItemE que : queList) { + que.setStudentExamRecordId(this.getStudentExamRecordId()); + que.setStudentExamRecordItemId(Tools.get32UUID()); + que.setStudentId(this.getStudentId()); + que.setClassId(this.getClassId()); + if (!ObjectUtils.isEmpty(que.getChoiceAnswer())){ + String choiceAnswer = que.getChoiceAnswer().chars() + .sorted() + .mapToObj(c -> String.valueOf((char) c)) + .collect(Collectors.joining()); + if (choiceAnswer.equals(que.getAnswer())){ + examScore = examScore.add(que.getScore()); + examQuestionRight++; + } + } + } + this.setExamQuestionWrong(examQuestionNum - examQuestionRight); + if (examScore.compareTo(passScore) >= 0){ + result = 1; + } else { + result = 0; + } + } } diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordItemE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordItemE.java index edaf276..17151cc 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordItemE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentExamRecordItemE.java @@ -3,6 +3,7 @@ package com.zcloud.edu.domain.model.study; import com.jjb.saas.framework.domain.model.BaseE; import lombok.Data; +import java.math.BigDecimal; import java.time.LocalDateTime; /** @@ -20,12 +21,16 @@ public class StudentExamRecordItemE extends BaseE { private String studentExamRecordId; //学员id private String studentId; + //班级id + private String classId; //习题ID private String questionId; - //学员答案 + // private String answer; - //正确答案 - private String answerRight; + // 分数 + private BigDecimal score; + // 学员选择答案 + private String choiceAnswer; //删除标识true false private String deleteEnum; //备注 diff --git a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentSignE.java b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentSignE.java index ecc364a..5736caa 100644 --- a/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentSignE.java +++ b/web-domain/src/main/java/com/zcloud/edu/domain/model/study/StudentSignE.java @@ -1,9 +1,23 @@ package com.zcloud.edu.domain.model.study; +import com.alibaba.cola.exception.BizException; import com.jjb.saas.framework.domain.model.BaseE; +import com.zcloud.gbscommon.utils.Base64Util; +import com.zcloud.gbscommon.utils.FaceUtil; +import com.zcloud.gbscommon.utils.Tools; +import com.zcloud.gbscommon.zcloudimgfiles.facade.ZcloudImgFilesFacade; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.apache.dubbo.config.annotation.DubboReference; +import org.apache.tomcat.util.http.fileupload.ByteArrayOutputStream; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.multipart.MultipartFile; +import java.io.File; +import java.io.InputStream; +import java.net.URL; import java.time.LocalDateTime; +import java.util.Base64; /** * web-domain @@ -26,8 +40,13 @@ public class StudentSignE extends BaseE { private Long corpinfoId; //签到人脸路径 private String faceUrl; + //打卡签字路径 + private String signUrl; //签到类型 1-打卡签到 2-人脸签到 private Integer type; + + private String phone; + private MultipartFile[] files; //环境 private String env; //删除标识true false @@ -52,5 +71,24 @@ public class StudentSignE extends BaseE { private Long createId; //修改人id private Long updateId; + private String prefixUrl = "https://jpfz.qhdsafety.com/gbsFileTest/"; + + @DubboReference + private ZcloudImgFilesFacade zcloudImgFilesFacade; + + public void compareFace(String templateFaceUrl, String faceUrl) throws Exception { + String templateFace = Base64Util.urlToBase64(prefixUrl + templateFaceUrl); + String confidence = FaceUtil.compareFace(templateFace, faceUrl); + + if (Double.valueOf(confidence) < 75) { + throw new BizException("人脸不匹配"); + } + this.setStudentSignId(Tools.get32UUID()); + } + public void init(String studentId, String classId, long corpinfoId){ + this.setStudentId(studentId); + this.setClassId(classId); + this.setCorpinfoId(corpinfoId); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesPdfFileGatewayImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesPdfFileGatewayImpl.java new file mode 100644 index 0000000..6eccbbb --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesPdfFileGatewayImpl.java @@ -0,0 +1,50 @@ +package com.zcloud.edu.gatewayimpl.archives; + +import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway; +import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.Collections; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Service +@AllArgsConstructor +public class ArchivesPdfFileGatewayImpl implements ArchivesPdfFileGateway { + private final ArchivesPdfFileRepository archivesPdfFileRepository; + + @Override + public Boolean add(ArchivesPdfFileE archivesPdfFileE) { + ArchivesPdfFileDO d = new ArchivesPdfFileDO(); + BeanUtils.copyProperties(archivesPdfFileE, d); + archivesPdfFileRepository.save(d); + return true; + } + + @Override + public Boolean update(ArchivesPdfFileE archivesPdfFileE) { + ArchivesPdfFileDO d = new ArchivesPdfFileDO(); + BeanUtils.copyProperties(archivesPdfFileE, d); + archivesPdfFileRepository.updateById(d); + return true; + } + + @Override + public Boolean deletedArchivesPdfFileById(Long id) { + return archivesPdfFileRepository.removeById(id); + } + + @Override + public Boolean deletedArchivesPdfFileByIds(Long[] ids) { + return archivesPdfFileRepository.removeByIds(Collections.singletonList(ids)); + } +} + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewGatewayImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewGatewayImpl.java new file mode 100644 index 0000000..cdef42e --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewGatewayImpl.java @@ -0,0 +1,50 @@ +package com.zcloud.edu.gatewayimpl.archives; + +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewGateway; +import com.zcloud.edu.domain.model.archives.ArchivesReviewE; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRepository; +import lombok.AllArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import java.util.Arrays; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Service +@AllArgsConstructor +public class ArchivesReviewGatewayImpl implements ArchivesReviewGateway { + private final ArchivesReviewRepository archivesReviewRepository; + + @Override + public Boolean add(ArchivesReviewE archivesReviewE) { + ArchivesReviewDO d = new ArchivesReviewDO(); + BeanUtils.copyProperties(archivesReviewE, d); + archivesReviewRepository.save(d); + return true; + } + + @Override + public Boolean update(ArchivesReviewE archivesReviewE) { + ArchivesReviewDO d = new ArchivesReviewDO(); + BeanUtils.copyProperties(archivesReviewE, d); + archivesReviewRepository.updateById(d); + return true; + } + + @Override + public Boolean deletedArchivesReviewById(Long id) { + return archivesReviewRepository.removeById(id); + } + + @Override + public Boolean deletedArchivesReviewByIds(Long[] ids) { + return archivesReviewRepository.removeByIds(Arrays.asList(ids)); + } +} + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewRecordGatewayImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewRecordGatewayImpl.java new file mode 100644 index 0000000..d9fa9c9 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/archives/ArchivesReviewRecordGatewayImpl.java @@ -0,0 +1,50 @@ +package com.zcloud.edu.gatewayimpl.archives; + +import com.zcloud.edu.domain.gateway.archives.ArchivesReviewRecordGateway; +import com.zcloud.edu.domain.model.archives.ArchivesReviewRecordE; +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.Service; + +import java.util.Collections; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Service +@AllArgsConstructor +public class ArchivesReviewRecordGatewayImpl implements ArchivesReviewRecordGateway { + private final ArchivesReviewRecordRepository archivesReviewRecordRepository; + + @Override + public Boolean add(ArchivesReviewRecordE archivesReviewRecordE) { + ArchivesReviewRecordDO d = new ArchivesReviewRecordDO(); + BeanUtils.copyProperties(archivesReviewRecordE, d); + archivesReviewRecordRepository.save(d); + return true; + } + + @Override + public Boolean update(ArchivesReviewRecordE archivesReviewRecordE) { + ArchivesReviewRecordDO d = new ArchivesReviewRecordDO(); + BeanUtils.copyProperties(archivesReviewRecordE, d); + archivesReviewRecordRepository.updateById(d); + return true; + } + + @Override + public Boolean deletedArchivesReviewRecordById(Long id) { + return archivesReviewRecordRepository.removeById(id); + } + + @Override + public Boolean deletedArchivesReviewRecordByIds(Long[] ids) { + return archivesReviewRecordRepository.removeByIds(Collections.singletonList(ids)); + } +} + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/ClassGatewayImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/ClassGatewayImpl.java index 2ba948c..c9588c9 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/ClassGatewayImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/ClassGatewayImpl.java @@ -22,11 +22,11 @@ public class ClassGatewayImpl implements ClassGateway { private final ClassRepository classRepository; @Override - public Boolean add(ClassE classE) { + public Long add(ClassE classE) { ClassDO d = new ClassDO(); BeanUtils.copyProperties(classE, d); classRepository.save(d); - return true; + return d.getId(); } @Override diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/StudentSignGatewayImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/StudentSignGatewayImpl.java index 891507d..0a88dba 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/StudentSignGatewayImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/gatewayimpl/study/StudentSignGatewayImpl.java @@ -26,6 +26,7 @@ public class StudentSignGatewayImpl implements StudentSignGateway { StudentSignDO d = new StudentSignDO(); BeanUtils.copyProperties(studentSignE, d); studentSignRepository.save(d); + studentSignE.setId(d.getId()); return true; } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesPdfFileDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesPdfFileDO.java new file mode 100644 index 0000000..f58eea2 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesPdfFileDO.java @@ -0,0 +1,51 @@ +package com.zcloud.edu.persistence.dataobject.archives; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.jjb.saas.framework.repository.basedo.BaseDO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Data +@TableName("archives_pdf_file") +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ArchivesPdfFileDO extends BaseDO { + //业务id + @ApiModelProperty(value = "业务id") + private String archivesPdfFileId; + //关联表名称 + @ApiModelProperty(value = "关联表名称") + private String tableName; + //关联表id + @ApiModelProperty(value = "关联表id") + private String tableId; + //文件路径 + @ApiModelProperty(value = "文件路径") + private String filePath; + //档案类型 1 一人一档 2一期一档 + @ApiModelProperty(value = "档案类型 1 一人一档 2一期一档") + private Integer type; + //上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除 + @ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除") + private Integer status; + //上传失败错误原因(上传成功则不传) + @ApiModelProperty(value = "上传失败错误原因(上传成功则不传)") + private String errormsg; + //方法名称 + @ApiModelProperty(value = "方法名称") + private String methodName; + //参数 + @ApiModelProperty(value = "参数") + private String param; + + +} + 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 new file mode 100644 index 0000000..96afe61 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewDO.java @@ -0,0 +1,67 @@ +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; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:34 + */ +@Data +@TableName("archives_review") +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ArchivesReviewDO extends BaseDO { + //业务id + @ApiModelProperty(value = "业务id") + private String archivesReviewId; + //课程id + @ApiModelProperty(value = "课程id") + private String classCurriculumId; + //班级id + @ApiModelProperty(value = "班级id") + private String classId; + //初版书号 + @ApiModelProperty(value = "初版书号") + private String bookNum; + //班级所属企业id + @ApiModelProperty(value = "班级所属企业id") + private Long corpinfoId; + //编写单位 + @ApiModelProperty(value = "编写单位") + private String corpName; + //编写时间 + @ApiModelProperty(value = "编写时间") + private LocalDateTime writeDate; + //教材类型 + @ApiModelProperty(value = "教材类型") + private String materialType; + //会审地点 + @ApiModelProperty(value = "会审地点") + private String address; + //主持人 + @ApiModelProperty(value = "主持人") + private String compere; + //会审时间 + @ApiModelProperty(value = "会审时间") + private LocalDateTime auditDate; + //会审意见 + @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/archives/ArchivesReviewRecordDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewRecordDO.java new file mode 100644 index 0000000..fd1636d --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/archives/ArchivesReviewRecordDO.java @@ -0,0 +1,42 @@ +package com.zcloud.edu.persistence.dataobject.archives; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.jjb.saas.framework.repository.basedo.BaseDO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Data +@TableName("archives_review_record") +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ArchivesReviewRecordDO extends BaseDO { + //业务id + @ApiModelProperty(value = "业务id") + private String archivesReviewRecordId; + //会审表id + @ApiModelProperty(value = "会审表id") + private String archivesReviewId; + //会审人员 + @ApiModelProperty(value = "会审人员") + private String reviewUser; + //工作部门 + @ApiModelProperty(value = "工作部门") + private String department; + //职务/职称 + @ApiModelProperty(value = "职务/职称") + private String duties; + //审查意见 + @ApiModelProperty(value = "审查意见") + private String checkOpinion; + + +} + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumChapterDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumChapterDO.java index 00725f5..8002ef3 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumChapterDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumChapterDO.java @@ -23,7 +23,7 @@ import java.math.BigDecimal; public class ClassCurriculumChapterDO extends BaseDO { //业务主键id @ApiModelProperty(value = "业务主键id") - private String curriculumChapterId; + private String classCurriculumChapterId; //班级id @ApiModelProperty(value = "班级id") private String classId; diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumDO.java index 70d8b59..3ecafbb 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassCurriculumDO.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; import java.util.List; @@ -39,6 +40,9 @@ public class ClassCurriculumDO extends BaseDO { @ApiModelProperty(value = "课程总时长") private BigDecimal videoTotalTime; + //目录级别 1-一级目录 2-二级目录 + @ApiModelProperty(value = "目录级别 1-一级目录 2-二级目录") + private Integer catalogueLevel; @ApiModelProperty(value = "所属单位id") @TableField(exist = false) private long corpinfoId; @@ -63,5 +67,6 @@ public class ClassCurriculumDO extends BaseDO { @TableField(exist = false) private String coverPath; + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassDO.java index 85395af..8f92040 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/ClassDO.java @@ -50,6 +50,10 @@ public class ClassDO extends BaseDO { //机构ID @ApiModelProperty(value = "机构ID") private Long corpinfoId; + //所属单位 + @ApiModelProperty(value = "所属单位") + @TableField(exist = false) + private String corpName; //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") private Integer state; @@ -67,13 +71,23 @@ public class ClassDO extends BaseDO { private Integer numberofexams; @ApiModelProperty(value = "班级学员总数") @TableField(exist = false) - private Integer totalCount; + private Integer totalCount = 0; @ApiModelProperty(value = "班级签到人数") @TableField(exist = false) - private Integer signCount; + private Integer signCount = 0; @ApiModelProperty(value = "考试通过人数") @TableField(exist = false) - private Integer finishCount; + private Integer finishCount = 0; + + @ApiModelProperty(value = "学员id(雪花)") + @TableField(exist = false) + private Long stuId; + + @ApiModelProperty(value = "学员id(uuid)") + @TableField(exist = false) + private String studentId; + + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentDO.java index d358451..eddd9df 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentDO.java @@ -24,9 +24,19 @@ public class StudentDO extends BaseDO { //学员userid @ApiModelProperty(value = "学员userid") private Integer userId; + //学员uuid + @ApiModelProperty(value = "学员uuid") + @TableField(exist = false) + private String userIdUuid; + + + //班级id @ApiModelProperty(value = "班级id") private String classId; + //班级id(雪花) + @ApiModelProperty(value = "班级id(雪花)") + private String clzId; //学员姓名 @ApiModelProperty(value = "学员姓名") private String name; @@ -81,8 +91,8 @@ public class StudentDO extends BaseDO { //考试签到状态 0-未签到 1-已签到 @ApiModelProperty(value = "考试签到状态 0-未签到 1-已签到") private Integer examSignFlag; - //学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过 - @ApiModelProperty(value = "学员状态 0-未学习 1-已签到 2-考试通过 3-未签到 4-考试未通过") + //学员状态 0-未完成 1-已完成 + @ApiModelProperty(value = "学员状态 0-未完成 1-已完成") private Integer state; //相关方id集合 @ApiModelProperty(value = "相关方id集合") @@ -97,6 +107,103 @@ public class StudentDO extends BaseDO { @ApiModelProperty(value = "项目名称集合") private String projectNames; + @ApiModelProperty(value = "班级数") + @TableField(exist = false) + private Integer classCount; + + // 学员统计数量 + @ApiModelProperty(value = "学员统计数量") + @TableField(exist = false) + private Integer studentCount; + + + @ApiModelProperty(value = "完成班级数") + @TableField(exist = false) + private Integer completeClassCount; + + + @ApiModelProperty(value = "部门名称") + @TableField(exist = false) + private String departmentName; + + + //班级名称 + @ApiModelProperty(value = "班级名称") + @TableField(exist = false) + private String className; + //培训日期 开始时间 + @ApiModelProperty(value = "培训日期 开始时间") + @TableField(exist = false) + private String startTime; + //培训日期 结束日期 + @ApiModelProperty(value = "培训日期 结束日期") + @TableField(exist = false) + private String endTime; + //培训教师id + @ApiModelProperty(value = "培训教师id") + @TableField(exist = false) + private Long teacherId; + //教师名称 + @ApiModelProperty(value = "教师名称") + @TableField(exist = false) + private String teacherName; + //培训行业类型 + @ApiModelProperty(value = "培训行业类型") + @TableField(exist = false) + private String trainType; + //培训行业类型名称 + @ApiModelProperty(value = "培训行业类型名称") + @TableField(exist = false) + private String trainTypeName; + //培训地点 + @ApiModelProperty(value = "培训地点") + @TableField(exist = false) + private String trainingLocation; + //机构ID + @ApiModelProperty(value = "机构ID") + @TableField(exist = false) + private Long corpinfoId; + //所属单位 + @ApiModelProperty(value = "所属单位") + @TableField(exist = false) + private String corpName; + //状态:1-未申请 2-待开班 3- 培训中 4-培训结束 + @ApiModelProperty(value = "状态:1-未申请 2-待开班 3- 培训中 4-培训结束 ") + @TableField(exist = false) + private Integer classState; + //培训有效期日期 开始时间 + @ApiModelProperty(value = "培训有效期日期 开始时间") + @TableField(exist = false) + private String validStartTime; + //培训有效期日期 结束时间 + @ApiModelProperty(value = "培训有效期日期 结束时间") + @TableField(exist = false) + private String validEndTime; + //1考试0不考试 + @ApiModelProperty(value = "1考试0不考试") + @TableField(exist = false) + private Integer examination; + //考试次数只有考试时候有用 + @ApiModelProperty(value = "考试次数只有考试时候有用") + @TableField(exist = false) + private Integer numberofexams; + + + + // 年龄 + @ApiModelProperty(value = "年龄") + @TableField(exist = false) + private Integer age; + + //生日 + @ApiModelProperty(value = "生日") + @TableField(exist = false) + private String birthday; + + // 性别 + @ApiModelProperty(value = "性别") + @TableField(exist = false) + private String sex; } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordDO.java index 276c048..4ef8b96 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentExamRecordDO.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 * @@ -56,11 +59,35 @@ public class StudentExamRecordDO extends BaseDO { private Integer examQuestionWrong; //考试得分 @ApiModelProperty(value = "考试得分") - private Object examScore; + private BigDecimal examScore; //考试结果 0 -不通过 1-通过 @ApiModelProperty(value = "考试结果 0 -不通过 1-通过") private Integer result; + @ApiModelProperty(value = "学员考试签到id") + private String studentSignId; + + @ApiModelProperty(value = "考试签字") + @TableField(exist = false) + private String signUrl; + + + //试卷名称 + @ApiModelProperty(value = "试卷名称") + @TableField(exist = false) + private String examName; + //试卷总分数 + @ApiModelProperty(value = "试卷总分数") + @TableField(exist = false) + private BigDecimal paperExamScore; + //合格分数 + @ApiModelProperty(value = "合格分数") + @TableField(exist = false) + private BigDecimal passScore; + //考试时长(分钟) + @ApiModelProperty(value = "考试时长(分钟)") + @TableField(exist = false) + private Integer examTime; } 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..3ae9df0 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 * @@ -34,11 +37,48 @@ public class StudentExamRecordItemDO extends BaseDO { @ApiModelProperty(value = "习题ID") private String questionId; //学员答案 - @ApiModelProperty(value = "学员答案") + @ApiModelProperty(value = "正确答案") private String answer; //正确答案 - @ApiModelProperty(value = "正确答案") - private String answerRight; + @ApiModelProperty(value = "学员答案") + private String choiceAnswer; + + + @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/dataobject/study/StudentSignDO.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentSignDO.java index 17b955c..8077fdc 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentSignDO.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/dataobject/study/StudentSignDO.java @@ -1,11 +1,15 @@ 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; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import org.springframework.web.multipart.MultipartFile; + +import java.time.LocalDateTime; /** * web-infrastructure @@ -21,25 +25,48 @@ public class StudentSignDO extends BaseDO { //学员id @ApiModelProperty(value = "学员id") private String studentId; + //业务id @ApiModelProperty(value = "业务id") private String studentSignId; + //班级id @ApiModelProperty(value = "班级id") private String classId; + //用户id @ApiModelProperty(value = "用户id") private Long userId; + //企业id @ApiModelProperty(value = "企业id") private Long corpinfoId; + //签到人脸路径 @ApiModelProperty(value = "签到人脸路径") private String faceUrl; + + //打卡签字路径 + @ApiModelProperty(value = "打卡签字路径") + private String signUrl; + //签到类型 1-打卡签到 2-人脸签到 @ApiModelProperty(value = "签到类型 1-打卡签到 2-人脸签到") private Integer type; + @ApiModelProperty(value = "签到时间") + private LocalDateTime createTime; + @ApiModelProperty(value = "学员名称") + @TableField(exist = false) + private String studentName; + + @ApiModelProperty(value = "班级名称") + @TableField(exist = false) + private String className; + + @ApiModelProperty(value = "培训地点") + @TableField(exist = false) + private String trainingLocation; } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/QuestionMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/QuestionMapper.java index 273f44e..46c0cd4 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/QuestionMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/QuestionMapper.java @@ -15,5 +15,7 @@ import java.util.List; @Mapper public interface QuestionMapper extends BaseMapper { List listByClassId(String classId); + + List listByExamPaperId(String examPaperId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesPdfFileMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesPdfFileMapper.java new file mode 100644 index 0000000..d009dd6 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesPdfFileMapper.java @@ -0,0 +1,17 @@ +package com.zcloud.edu.persistence.mapper.archives; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Mapper +public interface ArchivesPdfFileMapper extends BaseMapper { + +} + 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 new file mode 100644 index 0000000..c091567 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewMapper.java @@ -0,0 +1,23 @@ +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 + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@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 new file mode 100644 index 0000000..0cf596f --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/archives/ArchivesReviewRecordMapper.java @@ -0,0 +1,19 @@ +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 + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Mapper +public interface ArchivesReviewRecordMapper extends BaseMapper { +} + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassCurriculumChapterMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassCurriculumChapterMapper.java index 3db9e2c..09e410f 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassCurriculumChapterMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassCurriculumChapterMapper.java @@ -14,7 +14,9 @@ import java.util.List; */ @Mapper public interface ClassCurriculumChapterMapper extends BaseMapper { - List listByCurriculumId(String classCurriculumId); + List listByClassCurriculumId(String classCurriculumId); + + List listByClassCurriculumIds(List classCurriculumIds); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassMapper.java index 33c2b4b..2d20ee0 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/ClassMapper.java @@ -4,6 +4,7 @@ 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.study.ClassDO; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.ClassQuestionPO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -25,9 +26,12 @@ public interface ClassMapper extends BaseMapper { List listStatistics(@Param("ew") QueryWrapper queryWrapper, String menuPerms); IPage listStuClassPage(IPage page, @Param("params") Map params, String menuPerms); + IPage listStudentClassPage(IPage page, @Param("params") Map params, String menuPerms); List countQuestionByClassId(String classId); ClassDO getInfoById(long id); + + ClassDO getInfoByClassId(String classId); } 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/mapper/study/StudentExamRecordMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordMapper.java index d302fc3..1c48514 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentExamRecordMapper.java @@ -1,8 +1,12 @@ package com.zcloud.edu.persistence.mapper.study; +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.study.ClassDO; import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * web-infrastructure @@ -12,6 +16,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface StudentExamRecordMapper extends BaseMapper { + StudentExamRecordDO getInfoByStudentId(@Param("studentId") String studentId); + + StudentExamRecordDO getInfoById(@Param("id") Long id); + + Integer countByStudentId(@Param("studentId") String studentId); + + IPage listPage(IPage page, @Param("ew") QueryWrapper queryWrapper, String menuPerms); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java index 86abf92..6721a1d 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java @@ -1,10 +1,13 @@ package com.zcloud.edu.persistence.mapper.study; +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.study.ClassDO; import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.StudentCountPO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; @@ -17,9 +20,26 @@ import java.util.Map; */ @Mapper public interface StudentMapper extends BaseMapper { + + IPage listPageClassByStudent(IPage page, @Param("params") Map params); + long postponeUpdateStudent(String classId); List countStudentByClass(List classIds); + StudentDO findByClassIdAndPhone(@Param("classId") String classId, @Param("phone") String phone); + StudentDO findFaceUrlByPhone(@Param("phone") String phone); + + List countStuClass(@Param("params") Map params); + + List listAll(@Param("params") Map params); + + void updateStudent(@Param("params") Map params); + + List countStudentByCorpId(@Param("params") Map params); + + List listStudentCount(@Param("params") Map params); + + StudentDO findInfoByStudentId(@Param("studentId") String studentId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentSignMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentSignMapper.java index 511ebfd..3f3e78e 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentSignMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentSignMapper.java @@ -3,6 +3,10 @@ package com.zcloud.edu.persistence.mapper.study; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zcloud.edu.persistence.dataobject.study.StudentSignDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; /** * web-infrastructure @@ -12,6 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface StudentSignMapper extends BaseMapper { - + List listAll(@Param("params") Map params); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesPdfFileRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesPdfFileRepository.java new file mode 100644 index 0000000..82ad853 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesPdfFileRepository.java @@ -0,0 +1,18 @@ +package com.zcloud.edu.persistence.repository.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.jjb.saas.framework.repository.repo.BaseRepository; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; + +import java.util.Map; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +public interface ArchivesPdfFileRepository extends BaseRepository { + PageResponse listPage(Map params); +} + 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 new file mode 100644 index 0000000..f9e38b9 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRecordRepository.java @@ -0,0 +1,21 @@ +package com.zcloud.edu.persistence.repository.archives; + +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; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +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 new file mode 100644 index 0000000..4a0ed4c --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/archives/ArchivesReviewRepository.java @@ -0,0 +1,20 @@ +package com.zcloud.edu.persistence.repository.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.jjb.saas.framework.repository.repo.BaseRepository; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; + +import java.util.Map; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +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/ArchivesPdfFileRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesPdfFileRepositoryImpl.java new file mode 100644 index 0000000..9303a18 --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesPdfFileRepositoryImpl.java @@ -0,0 +1,39 @@ +package com.zcloud.edu.persistence.repository.impl.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jjb.saas.framework.repository.common.PageHelper; +import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO; +import com.zcloud.edu.persistence.mapper.archives.ArchivesPdfFileMapper; +import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository; +import com.zcloud.gbscommon.utils.PageQueryHelper; +import com.zcloud.gbscommon.utils.Query; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-02-02 10:32:42 + */ +@Service +@RequiredArgsConstructor +public class ArchivesPdfFileRepositoryImpl extends BaseRepositoryImpl implements ArchivesPdfFileRepository { + private final ArchivesPdfFileMapper archivesPdfFileMapper; + + @Override + public PageResponse listPage(Map params) { + IPage iPage = new Query().getPage(params); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params); + queryWrapper.orderByDesc("create_time"); + IPage result = archivesPdfFileMapper.selectPage(iPage, queryWrapper); + return PageHelper.pageToResponse(result, result.getRecords()); + } +} + 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 new file mode 100644 index 0000000..640cadd --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRecordRepositoryImpl.java @@ -0,0 +1,49 @@ +package com.zcloud.edu.persistence.repository.impl.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jjb.saas.framework.repository.common.PageHelper; +import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewRecordDO; +import com.zcloud.edu.persistence.mapper.archives.ArchivesReviewRecordMapper; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRecordRepository; +import com.zcloud.gbscommon.utils.PageQueryHelper; +import com.zcloud.gbscommon.utils.Query; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:37 + */ +@Service +@RequiredArgsConstructor +public class ArchivesReviewRecordRepositoryImpl extends BaseRepositoryImpl implements ArchivesReviewRecordRepository { + private final ArchivesReviewRecordMapper archivesReviewRecordMapper; + + @Override + public PageResponse listPage(Map params) { + IPage iPage = new Query().getPage(params); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params); + queryWrapper.orderByDesc("create_time"); + IPage 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 new file mode 100644 index 0000000..d71a1ad --- /dev/null +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/archives/ArchivesReviewRepositoryImpl.java @@ -0,0 +1,45 @@ +package com.zcloud.edu.persistence.repository.impl.archives; + +import com.alibaba.cola.dto.PageResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jjb.saas.framework.repository.common.PageHelper; +import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; +import com.zcloud.edu.persistence.dataobject.archives.ArchivesReviewDO; +import com.zcloud.edu.persistence.mapper.archives.ArchivesReviewMapper; +import com.zcloud.edu.persistence.repository.archives.ArchivesReviewRepository; +import com.zcloud.gbscommon.utils.PageQueryHelper; +import com.zcloud.gbscommon.utils.Query; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * web-infrastructure + * + * @Author zhangyue + * @Date 2026-01-26 10:59:35 + */ +@Service +@RequiredArgsConstructor +public class ArchivesReviewRepositoryImpl extends BaseRepositoryImpl implements ArchivesReviewRepository { + private final ArchivesReviewMapper archivesReviewMapper; + + @Override + public PageResponse listPage(Map params) { + IPage iPage = new Query().getPage(params); + QueryWrapper queryWrapper = new 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/resource/CurriculumChapterRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumChapterRepositoryImpl.java index 7476510..98b62b3 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumChapterRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumChapterRepositoryImpl.java @@ -57,5 +57,14 @@ public class CurriculumChapterRepositoryImpl extends BaseRepositoryImpl listByCurriculumIds(List curriculumIds) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("curriculum_id", curriculumIds); + queryWrapper.eq("delete_enum", "FALSE"); + + return curriculumChapterMapper.selectList(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumRepositoryImpl.java index 3e17fbb..ad6e54c 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/CurriculumRepositoryImpl.java @@ -56,5 +56,14 @@ public class CurriculumRepositoryImpl extends BaseRepositoryImpl listByCurriculumIds(List curriculumIds) { + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("curriculum_id", curriculumIds); + queryWrapper.eq("delete_enum", "FALSE"); + return curriculumMapper.selectList(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/QuestionRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/QuestionRepositoryImpl.java index 2d24d70..5522abc 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/QuestionRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/resource/QuestionRepositoryImpl.java @@ -1,5 +1,6 @@ package com.zcloud.edu.persistence.repository.impl.resource; +import com.alibaba.cola.dto.MultiResponse; import com.jjb.saas.framework.repository.common.PageHelper; import com.zcloud.edu.domain.enums.CoursewareTypeEnum; import com.zcloud.edu.persistence.dataobject.QuestionDO; @@ -60,6 +61,11 @@ public class QuestionRepositoryImpl extends BaseRepositoryImpl getInfoByExamPaperId(String examPaperId) { + return questionMapper.listByExamPaperId(examPaperId); + } + @Override public boolean saveBatch(List list) { diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumChapterRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumChapterRepositoryImpl.java index 88a5223..e4949cd 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumChapterRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumChapterRepositoryImpl.java @@ -40,8 +40,8 @@ public class ClassCurriculumChapterRepositoryImpl extends BaseRepositoryImpl listByCurriculumId(String classCurriculumId) { - return classCurriculumChapterMapper.listByCurriculumId(classCurriculumId); + public List listByClassCurriculumId(String classCurriculumId) { + return classCurriculumChapterMapper.listByClassCurriculumId(classCurriculumId); } @Override @@ -61,5 +61,21 @@ public class ClassCurriculumChapterRepositoryImpl extends BaseRepositoryImpl listByClassCurriculumIds(List classCurriculumIds) { + return classCurriculumChapterMapper.listByClassCurriculumIds(classCurriculumIds); + + } + + @Override + public List listVideoByClassId(String classId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("class_id", classId); + queryWrapper.isNotNull("video_courseware_id"); + queryWrapper.ne("video_courseware_id", ""); + queryWrapper.eq("delete_enum", "FALSE"); + return classCurriculumChapterMapper.selectList(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumRepositoryImpl.java index 1611d4d..c3bef3c 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassCurriculumRepositoryImpl.java @@ -14,6 +14,7 @@ import com.zcloud.gbscommon.utils.Query; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -66,5 +67,14 @@ public class ClassCurriculumRepositoryImpl extends BaseRepositoryImpl listAll(Map params) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params); + queryWrapper.orderByDesc("create_time"); + queryWrapper.eq("delete_enum", "FALSE"); + return classCurriculumMapper.selectList(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassExamPaperRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassExamPaperRepositoryImpl.java index 3694b42..bfb109d 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassExamPaperRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassExamPaperRepositoryImpl.java @@ -66,5 +66,13 @@ public class ClassExamPaperRepositoryImpl extends BaseRepositoryImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("class_id", classId); + queryWrapper.eq("delete_enum", "FALSE"); + return classExamPaperMapper.selectOne(queryWrapper); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassRepositoryImpl.java index c0b93dd..a337008 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/ClassRepositoryImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.jjb.saas.framework.repository.common.PageHelper; import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; import com.zcloud.edu.persistence.dataobject.study.ClassDO; +import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.study.ClassMapper; import com.zcloud.edu.persistence.mapper.po.study.ClassQuestionPO; import com.zcloud.edu.persistence.repository.study.ClassRepository; @@ -56,11 +57,16 @@ public class ClassRepositoryImpl extends BaseRepositoryImpl listStudentClassPage(Map params) { + IPage iPage = new Query().getPage(params); + IPage result = classMapper.listStudentClassPage(iPage, params, null); + return PageHelper.pageToResponse(result, result.getRecords()); + } + @Override public ClassDO getByClassId(String classId) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("class_id", classId); - return classMapper.selectOne(queryWrapper); + return classMapper.getInfoByClassId(classId); } @Override 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 cfa4f2c..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 @@ -14,6 +14,7 @@ import com.zcloud.gbscommon.utils.Query; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -54,5 +55,10 @@ public class StudentExamRecordItemRepositoryImpl extends BaseRepositoryImpl listByExamRecordId(String examRecordId) { + return studentExamRecordItemMapper.listByExamRecordId(examRecordId); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordRepositoryImpl.java index 67f993b..36d03a0 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentExamRecordRepositoryImpl.java @@ -14,6 +14,7 @@ import com.zcloud.gbscommon.utils.Query; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -54,5 +55,28 @@ public class StudentExamRecordRepositoryImpl extends BaseRepositoryImpl listAllByStudentId(String studentId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("student_id", studentId); + queryWrapper.eq("delete_enum", "FALSE"); + return studentExamRecordMapper.selectList(queryWrapper); + } + + @Override + public StudentExamRecordDO getInfoByStudentId(String studentId) { + return studentExamRecordMapper.getInfoByStudentId(studentId); + } + + @Override + public Integer countByStudentId(String studentId) { + return studentExamRecordMapper.countByStudentId(studentId); + } + + @Override + public StudentExamRecordDO getInfoById(Long id) { + return studentExamRecordMapper.getInfoById(id); + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java index 70a5f99..a2cc972 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java @@ -40,6 +40,13 @@ public class StudentRepositoryImpl extends BaseRepositoryImpl listPageClassByStudent(Map params) { + IPage iPage = new Query().getPage(params); + IPage result = studentMapper.listPageClassByStudent(iPage, params); + return PageHelper.pageToResponse(result, result.getRecords()); + } + @Override public Boolean addBatch(List studentDOs) { saveBatch(studentDOs); @@ -74,5 +81,45 @@ public class StudentRepositoryImpl extends BaseRepositoryImpl countStuClass(Map params) { + return studentMapper.countStuClass(params); + } + + @Override + public StudentDO findInfoByStudentId(String studentId) { + return studentMapper.findInfoByStudentId(studentId); + } + + @Override + public List listAll(Map params) { + return studentMapper.listAll(params); + } + + @Override + public void updateStudent(Map params) { + studentMapper.updateStudent(params); + } + + @Override + public List countStudentByCorpId(Map params) { + return studentMapper.countStudentByCorpId(params); + } + + @Override + public List listStudentCount(Map params) { + return studentMapper.listStudentCount(params); + } + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentSignRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentSignRepositoryImpl.java index 4dc8b7d..5a1d324 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentSignRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentSignRepositoryImpl.java @@ -1,11 +1,13 @@ package com.zcloud.edu.persistence.repository.impl.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.jjb.saas.framework.repository.common.PageHelper; import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; +import com.zcloud.edu.persistence.dataobject.QuestionDO; import com.zcloud.edu.persistence.dataobject.study.StudentSignDO; import com.zcloud.edu.persistence.mapper.study.StudentSignMapper; import com.zcloud.edu.persistence.repository.study.StudentSignRepository; @@ -13,7 +15,9 @@ import com.zcloud.gbscommon.utils.PageQueryHelper; import com.zcloud.gbscommon.utils.Query; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import java.util.List; import java.util.Map; /** @@ -45,5 +49,30 @@ public class StudentSignRepositoryImpl extends BaseRepositoryImpl listAll(Map params) { + return studentSignMapper.listAll(params); + } + + @Override + public List listAllByStudentId(Map params) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("student_id", params.get("studentId")); + queryWrapper.eq("delete_enum", "FALSE"); + if (!ObjectUtils.isEmpty(params.get("type"))){ + queryWrapper.eq("type", params.get("type")); + } + if (!ObjectUtils.isEmpty(params.get("orderCreateTime"))){ + queryWrapper.orderByDesc("create_time"); + } + queryWrapper.isNotNull("sign_url"); + return studentSignMapper.selectList(queryWrapper); + } + + @Override + public Integer countByClassId(String classId) { + return 1; + } } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumChapterRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumChapterRepository.java index 913e4ab..1310aef 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumChapterRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumChapterRepository.java @@ -21,5 +21,7 @@ public interface CurriculumChapterRepository extends BaseRepository getListByCurriculumId(String curriculumId); void deleteByCurriculumId(String curriculumId); + + List listByCurriculumIds(List curriculumIds); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumRepository.java index 901fa1c..74e0e15 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/CurriculumRepository.java @@ -22,5 +22,7 @@ public interface CurriculumRepository extends BaseRepository { boolean updateState(@NotNull(message = "id不能为空") List id, @NotNull(message = "课程状态不能为空") Integer sellFlag); CurriculumDO getInfoById(Long id); + + List listByCurriculumIds(List curriculumIds); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/QuestionRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/QuestionRepository.java index cb0d7f8..546ca21 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/QuestionRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/resource/QuestionRepository.java @@ -1,5 +1,6 @@ package com.zcloud.edu.persistence.repository.resource; +import com.alibaba.cola.dto.MultiResponse; import com.zcloud.edu.persistence.dataobject.QuestionDO; import com.alibaba.cola.dto.SingleResponse; import com.alibaba.cola.dto.PageResponse; @@ -24,6 +25,8 @@ public interface QuestionRepository extends BaseRepository { SingleResponse getInfoById(Long id); + List getInfoByExamPaperId(String examPaperId); + boolean saveBatch(List list); Long getCountByVideoCourseware(String videoCoursewareId); diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumChapterRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumChapterRepository.java index 6f7036b..08557f7 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumChapterRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumChapterRepository.java @@ -16,10 +16,14 @@ import java.util.Map; public interface ClassCurriculumChapterRepository extends BaseRepository { PageResponse listPage(Map params); - List listByCurriculumId(String classCurriculumId); + List listByClassCurriculumId(String classCurriculumId); Integer deleteByCurriculumId(String classCurriculumId); Integer deleteByClassId(String classId); + + List listByClassCurriculumIds(List classCurriculumIds); + + List listVideoByClassId(String classId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumRepository.java index 81fda9d..797e54c 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassCurriculumRepository.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.study.ClassCurriculumDO; +import java.util.List; import java.util.Map; /** @@ -22,5 +23,7 @@ public interface ClassCurriculumRepository extends BaseRepository listAll(Map params); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassExamPaperRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassExamPaperRepository.java index c129fac..587f6ca 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassExamPaperRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/ClassExamPaperRepository.java @@ -22,5 +22,7 @@ public interface ClassExamPaperRepository extends BaseRepository { PageResponse listStuClassPage(Map params); + PageResponse listStudentClassPage(Map params); + ClassDO getByClassId(String classId); List countQuestionByClassId(String classId); diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordItemRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordItemRepository.java index fb8beed..3a31de5 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordItemRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordItemRepository.java @@ -5,6 +5,7 @@ import com.jjb.saas.framework.repository.repo.BaseRepository; import com.zcloud.edu.persistence.dataobject.study.StudentExamRecordItemDO; import io.swagger.models.auth.In; +import java.util.List; import java.util.Map; /** @@ -19,5 +20,7 @@ public interface StudentExamRecordItemRepository extends BaseRepository listByExamRecordId(String examRecordId); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordRepository.java index ee0069a..f7537ad 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentExamRecordRepository.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.study.StudentExamRecordDO; +import java.util.List; import java.util.Map; /** @@ -18,5 +19,13 @@ public interface StudentExamRecordRepository extends BaseRepository listAllByStudentId(String studentId); + + StudentExamRecordDO getInfoByStudentId(String studentId); + + Integer countByStudentId(String studentId); + + StudentExamRecordDO getInfoById(Long id); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java index 69ad773..1471758 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java @@ -17,6 +17,7 @@ import java.util.Map; */ public interface StudentRepository extends BaseRepository { PageResponse listPage(Map params); + PageResponse listPageClassByStudent(Map params); Boolean addBatch(List studentDOs); Long countByClassId(String classId); @@ -27,5 +28,20 @@ public interface StudentRepository extends BaseRepository { List countStudentByClass(List classIds); + StudentDO findByClassIdAndPhone(String classId, String phone); + + StudentDO findFaceUrlByPhone(String phone); + + List countStuClass(Map params); + + StudentDO findInfoByStudentId(String studentId); + + List listAll(Map params); + + void updateStudent(Map params); + + List countStudentByCorpId(Map params); + + List listStudentCount(Map params); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentSignRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentSignRepository.java index 1c687dd..5d182cc 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentSignRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentSignRepository.java @@ -1,9 +1,11 @@ package com.zcloud.edu.persistence.repository.study; +import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.jjb.saas.framework.repository.repo.BaseRepository; import com.zcloud.edu.persistence.dataobject.study.StudentSignDO; +import java.util.List; import java.util.Map; /** @@ -16,5 +18,12 @@ public interface StudentSignRepository extends BaseRepository { PageResponse listPage(Map params); Integer deleteByClassId(String classId); + + List listAll(Map params); + + List listAllByStudentId(Map params); + + Integer countByClassId(String classId); + } diff --git a/web-infrastructure/src/main/resources/mapper/QuestionMapper.xml b/web-infrastructure/src/main/resources/mapper/QuestionMapper.xml index cff66e2..622d97c 100644 --- a/web-infrastructure/src/main/resources/mapper/QuestionMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/QuestionMapper.xml @@ -14,5 +14,17 @@ AND q.delete_enum = 'FALSE' and q.courseware_type = 1 + + diff --git a/web-infrastructure/src/main/resources/mapper/archives/ArchivesPdfFileMapper.xml b/web-infrastructure/src/main/resources/mapper/archives/ArchivesPdfFileMapper.xml new file mode 100644 index 0000000..08b09af --- /dev/null +++ b/web-infrastructure/src/main/resources/mapper/archives/ArchivesPdfFileMapper.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml new file mode 100644 index 0000000..a45a984 --- /dev/null +++ b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewRecordMapper.xml b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewRecordMapper.xml new file mode 100644 index 0000000..745a325 --- /dev/null +++ b/web-infrastructure/src/main/resources/mapper/archives/ArchivesReviewRecordMapper.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/web-infrastructure/src/main/resources/mapper/study/ClassCurriculumChapterMapper.xml b/web-infrastructure/src/main/resources/mapper/study/ClassCurriculumChapterMapper.xml index 95b39ef..b14095f 100644 --- a/web-infrastructure/src/main/resources/mapper/study/ClassCurriculumChapterMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/ClassCurriculumChapterMapper.xml @@ -3,10 +3,10 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - SELECT c.id, - c.curriculum_chapter_id, + c.class_curriculum_chapter_id, c.class_id, c.corpinfo_id, c.class_curriculum_id, @@ -29,5 +29,36 @@ c.parent_id, c.sort + + diff --git a/web-infrastructure/src/main/resources/mapper/study/ClassMapper.xml b/web-infrastructure/src/main/resources/mapper/study/ClassMapper.xml index 3c88367..1e0f331 100644 --- a/web-infrastructure/src/main/resources/mapper/study/ClassMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/ClassMapper.xml @@ -38,10 +38,36 @@ c.numberofexams FROM class c - left join training_type t on t.training_type_id = c.train_type + left join training_type t on t.training_type_id = c.train_type WHERE c.id = #{id} + + 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/StudentExamRecordMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordMapper.xml index 99d240b..6529358 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentExamRecordMapper.xml @@ -3,6 +3,88 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + diff --git a/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml index fc6de82..ae0751b 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml @@ -20,7 +20,7 @@ SELECT count(*) total_count, count(CASE WHEN sign_flag = 1 THEN 1 END) sign_count, - count(CASE WHEN state = 3 THEN 1 END) finish_count, + count(CASE WHEN state = 1 THEN 1 END) finish_count, class_id FROM student @@ -34,7 +34,263 @@ GROUP BY class_id + + + + + + + + + update + student + + + ,sign_flag = #{params.signFlag} + + + ,exam_sign_flag = #{params.examSignFlag} + + + where + student_id = #{params.studentId} + + + + + + + + + + diff --git a/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml index e4b8556..d6bc1ad 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentSignMapper.xml @@ -3,6 +3,52 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + + + + + + + + + + + + + + +