From c88a9ad1b5b8c579896f8096ecf2da3df25aaa9e Mon Sep 17 00:00:00 2001 From: tuyp Date: Mon, 8 Jul 2024 13:35:30 +0800 Subject: [PATCH] 普陀督导组结构校对 --- src/main/java/com/subsidy/controller/AdministerController.java | 36 ++++++++++++++++++++++++++++++++---- src/main/java/com/subsidy/controller/ClassDictController.java | 19 +++++++++++++------ src/main/java/com/subsidy/controller/ClassTypeDictController.java | 12 ++++++++++++ src/main/java/com/subsidy/controller/ClassVodFaceCheckController.java | 22 ++++++++++++++++++++++ src/main/java/com/subsidy/controller/ContentVodMappingController.java | 2 +- src/main/java/com/subsidy/controller/CourseDictController.java | 9 +++------ src/main/java/com/subsidy/controller/DuDaoController.java | 2 +- src/main/java/com/subsidy/controller/ExerciseDictController.java | 1 - src/main/java/com/subsidy/controller/ImageCheckRecordController.java | 4 ++-- src/main/java/com/subsidy/controller/MemberController.java | 39 ++++++++++++++++++++++++++++++--------- src/main/java/com/subsidy/controller/OssController.java | 2 +- src/main/java/com/subsidy/controller/RenSheJuController.java | 5 +++++ src/main/java/com/subsidy/controller/VodLabelDictController.java | 2 +- src/main/java/com/subsidy/dto/classDict/AddClassDTO.java | 2 ++ src/main/java/com/subsidy/dto/classDict/SocialTestDetailDTO.java | 16 ++++++++++++++++ src/main/java/com/subsidy/dto/contentVod/ContentVodDTO.java | 1 + src/main/java/com/subsidy/dto/course/AddCourseDTO.java | 3 +++ src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java | 2 ++ src/main/java/com/subsidy/dto/dudao/ActivityList.java | 23 +++++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/AnswerAndQuestionList.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/AnswerBasic.java | 17 +++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ChapterExamBasic.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ChapterList2.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ChapterList3.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ClassBaseInfoDTO.java | 16 ++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ClassCodeBasic.java | 17 +++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ClassHourBasic.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ClassHourBehaviorDTO.java | 19 +++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/ExamList.java | 21 +++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/LoginList.java | 27 +++++++++++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/UploadChapterBehaviorDTO.java | 19 +++++++++++++++++++ src/main/java/com/subsidy/dto/dudao/UploadClassAnswerQuestionBehaviorDTO.java | 14 ++++++++++++++ src/main/java/com/subsidy/dto/dudao/UploadClassCodeDTO.java | 17 +++++++++++++++++ src/main/java/com/subsidy/dto/image/ImageCheckDTO.java | 5 +++++ src/main/java/com/subsidy/dto/member/CheckItemDTO.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java | 20 ++++++++++++++++++++ src/main/java/com/subsidy/dto/renshe/ClassHourBehaviorDTO.java | 1 + src/main/java/com/subsidy/mapper/AdministerMapper.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/mapper/ClassDictMapper.java | 8 +++++++- src/main/java/com/subsidy/mapper/ClassVodFaceCheckMapper.java | 22 ++++++++++++++++++++++ src/main/java/com/subsidy/mapper/ContentVodMappingMapper.java | 15 ++++++++++++++- src/main/java/com/subsidy/mapper/CourseContentMapper.java | 3 +++ src/main/java/com/subsidy/mapper/CourseDictMapper.java | 2 +- src/main/java/com/subsidy/mapper/DudaoMapper.java | 8 ++++---- src/main/java/com/subsidy/mapper/MemberMapper.java | 9 +++++++++ src/main/java/com/subsidy/mapper/PaperDictMapper.java | 13 +++++++++++++ src/main/java/com/subsidy/mapper/RenSheJuMapper.java | 6 +++++- src/main/java/com/subsidy/mapper/VodDictMapper.java | 7 +++---- src/main/java/com/subsidy/model/ClassDictDO.java | 20 +++++++++++++++++++- src/main/java/com/subsidy/model/ClassMemberMappingDO.java | 5 +++++ src/main/java/com/subsidy/model/ClassVodFaceCheckDO.java | 39 +++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/CourseDictDO.java | 6 ++++++ src/main/java/com/subsidy/model/MemberDO.java | 34 ++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/model/PaperDictDO.java | 5 +++++ src/main/java/com/subsidy/service/AdministerService.java | 12 +++++++++++- src/main/java/com/subsidy/service/ClassDictService.java | 8 ++++++-- src/main/java/com/subsidy/service/ClassTypeDictService.java | 4 ++++ src/main/java/com/subsidy/service/ClassVodFaceCheckService.java | 16 ++++++++++++++++ src/main/java/com/subsidy/service/DudaoService.java | 3 +-- src/main/java/com/subsidy/service/MemberService.java | 8 ++++++-- src/main/java/com/subsidy/service/RenSheJuService.java | 2 ++ src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java | 399 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------- src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------- src/main/java/com/subsidy/service/impl/ClassTypeDictServiceImpl.java | 47 ++++++++++++++++++++++++++++++++++++++++++----- src/main/java/com/subsidy/service/impl/ClassVodFaceCheckServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/subsidy/service/impl/ContentVodMappingServiceImpl.java | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------- src/main/java/com/subsidy/service/impl/CourseDictServiceImpl.java | 28 ++++++++++++++++++---------- src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java | 44 ++++++++++++++++++++++++-------------------- src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------- src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java | 23 ++++++++--------------- src/main/java/com/subsidy/service/impl/MemberServiceImpl.java | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java | 42 +++++++++++++++++++++++++++++++++--------- src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- src/main/java/com/subsidy/service/impl/VodLabelDictServiceImpl.java | 6 ++---- src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java | 17 ++++++++--------- src/main/java/com/subsidy/util/ExcelFormatUtils.java | 2 ++ src/main/java/com/subsidy/util/excel/ExcelUtil.java | 241 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- src/main/java/com/subsidy/util/websocket/WebSocketUtil.java | 11 +++++++++-- src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java | 4 ++++ src/main/java/com/subsidy/vo/administer/ExportSocialExerciseTestVO.java | 35 +++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/classdict/ClassDetail.java | 13 +++++++++++++ src/main/java/com/subsidy/vo/classdict/ClassSettingsVO.java | 11 +++++++++++ src/main/java/com/subsidy/vo/classdict/SocialTestDetailVO.java | 24 ++++++++++++++++++++++++ src/main/java/com/subsidy/vo/classdict/SocialTestRecordVO.java | 24 ++++++++++++++++++++++++ src/main/java/com/subsidy/vo/classdict/VodPassRateVO.java | 12 ++++++++++++ src/main/java/com/subsidy/vo/course/QueryCoursesVO.java | 5 +++++ src/main/java/com/subsidy/vo/dudao/ClassBaseInfoVO.java | 26 ++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/dudao/DailyActivitiesVO.java | 14 ++++++++++++++ src/main/java/com/subsidy/vo/dudao/DailyAnswerVO.java | 20 ++++++++++++++++++++ src/main/java/com/subsidy/vo/dudao/DailyStudyInfoVO.java | 41 +++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/dudao/EpidemicSituationClassBasic.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/dudao/ExamActivitiesVO.java | 12 ++++++++++++ src/main/java/com/subsidy/vo/dudao/MemberVO.java | 15 +++++++++++++++ src/main/java/com/subsidy/vo/dudao/RensheResponseVO.java | 21 +++++++++++++++++++++ src/main/java/com/subsidy/vo/member/CheckItemVO.java | 13 +++++++++++++ src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java | 20 -------------------- src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java | 1 + src/main/java/com/subsidy/vo/member/MemberVodVO.java | 4 ++-- src/main/java/com/subsidy/vo/member/MyCoursesVO.java | 2 ++ src/main/java/com/subsidy/vo/member/SocialContentVodNewVO.java | 24 ++++++++++++++++++++++++ src/main/java/com/subsidy/vo/member/SocialContentVodVO.java | 18 ++++++++++++++++++ src/main/java/com/subsidy/vo/member/SocialCourseTestVO.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/member/SocialVodTestVO.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/subsidy/vo/paper/MemberMaxScoreVO.java | 16 ++++++++++++++++ src/main/java/com/subsidy/vo/paper/QueryPapersVO.java | 4 ++++ src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java | 5 +++++ src/main/java/com/subsidy/vo/vod/VodInfoVO.java | 14 ++++++++++++++ src/main/java/com/subsidy/vo/vodLabel/VodLabelTreeVO.java | 5 +++-- src/main/resources/application-dev.properties | 7 ++++++- src/main/resources/code.properties | 2 ++ src/main/resources/mapper/AdministerMapper.xml | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ClassDictMapper.xml | 34 ++++++++++++++++++++++++++++++++++ src/main/resources/mapper/ClassVodFaceCheckMapper.xml | 15 +++++++++++++++ src/main/resources/mapper/ContentVodMappingMapper.xml | 38 +++++++++++++++++++++----------------- src/main/resources/mapper/CourseDictMapper.xml | 6 +++++- src/main/resources/mapper/DudaoMapper.xml | 20 ++++++++++---------- src/main/resources/mapper/MemberMapper.xml | 37 +++++++++++++++++++++++++++++++++++++ src/main/resources/mapper/OprMemDictMapper.xml | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------- src/main/resources/mapper/PaperDictMapper.xml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- src/main/resources/mapper/RenSheJuMapper.xml | 20 ++++++++++++++++++++ src/main/resources/mapper/VodDictMapper.xml | 13 +++++++++++++ src/main/resources/mapper/VodLabelDictMapper.xml | 2 +- 122 files changed, 3188 insertions(+), 362 deletions(-) create mode 100644 src/main/java/com/subsidy/controller/ClassVodFaceCheckController.java create mode 100644 src/main/java/com/subsidy/dto/classDict/SocialTestDetailDTO.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ActivityList.java create mode 100644 src/main/java/com/subsidy/dto/dudao/AnswerAndQuestionList.java create mode 100644 src/main/java/com/subsidy/dto/dudao/AnswerBasic.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ChapterExamBasic.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ChapterList2.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ChapterList3.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ClassBaseInfoDTO.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ClassCodeBasic.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ClassHourBasic.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ClassHourBehaviorDTO.java create mode 100644 src/main/java/com/subsidy/dto/dudao/ExamList.java create mode 100644 src/main/java/com/subsidy/dto/dudao/LoginList.java create mode 100644 src/main/java/com/subsidy/dto/dudao/UploadChapterBehaviorDTO.java create mode 100644 src/main/java/com/subsidy/dto/dudao/UploadClassAnswerQuestionBehaviorDTO.java create mode 100644 src/main/java/com/subsidy/dto/dudao/UploadClassCodeDTO.java create mode 100644 src/main/java/com/subsidy/dto/member/CheckItemDTO.java create mode 100644 src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java create mode 100644 src/main/java/com/subsidy/mapper/ClassVodFaceCheckMapper.java create mode 100644 src/main/java/com/subsidy/model/ClassVodFaceCheckDO.java create mode 100644 src/main/java/com/subsidy/service/ClassVodFaceCheckService.java create mode 100644 src/main/java/com/subsidy/service/impl/ClassVodFaceCheckServiceImpl.java create mode 100644 src/main/java/com/subsidy/vo/administer/ExportSocialExerciseTestVO.java create mode 100644 src/main/java/com/subsidy/vo/classdict/ClassDetail.java create mode 100644 src/main/java/com/subsidy/vo/classdict/SocialTestDetailVO.java create mode 100644 src/main/java/com/subsidy/vo/classdict/SocialTestRecordVO.java create mode 100644 src/main/java/com/subsidy/vo/classdict/VodPassRateVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/ClassBaseInfoVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/DailyActivitiesVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/DailyAnswerVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/DailyStudyInfoVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/EpidemicSituationClassBasic.java create mode 100644 src/main/java/com/subsidy/vo/dudao/ExamActivitiesVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/MemberVO.java create mode 100644 src/main/java/com/subsidy/vo/dudao/RensheResponseVO.java create mode 100644 src/main/java/com/subsidy/vo/member/CheckItemVO.java delete mode 100644 src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java create mode 100644 src/main/java/com/subsidy/vo/member/SocialContentVodNewVO.java create mode 100644 src/main/java/com/subsidy/vo/member/SocialContentVodVO.java create mode 100644 src/main/java/com/subsidy/vo/member/SocialCourseTestVO.java create mode 100644 src/main/java/com/subsidy/vo/member/SocialVodTestVO.java create mode 100644 src/main/java/com/subsidy/vo/paper/MemberMaxScoreVO.java create mode 100644 src/main/java/com/subsidy/vo/vod/VodInfoVO.java create mode 100644 src/main/resources/mapper/ClassVodFaceCheckMapper.xml diff --git a/src/main/java/com/subsidy/controller/AdministerController.java b/src/main/java/com/subsidy/controller/AdministerController.java index 80452ae..3847da4 100644 --- a/src/main/java/com/subsidy/controller/AdministerController.java +++ b/src/main/java/com/subsidy/controller/AdministerController.java @@ -6,9 +6,9 @@ import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.administer.*; -import com.subsidy.dto.member.QingxuetangLoginDTO; import com.subsidy.model.*; import com.subsidy.service.AdministerService; +import com.subsidy.dto.classDict.SocialTestDetailDTO; import com.subsidy.vo.member.DownloadFailMembersDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; -import java.util.List; /** *

@@ -122,20 +121,49 @@ public class AdministerController { } @PostMapping("exerciseTest") - @ApiOperation("班级管理--测评成绩 id 班级id userName paperId pageSize pageNum") + @ApiOperation("##2024.3##班级管理(企业线上化培训)--测评成绩 id 班级id userName paperId pageSize pageNum") @LoginRequired public ResponseVO exerciseTest(@RequestBody ClassDetailDTO classDetailDTO) { return ResponseData.generateCreatedResponse(0, administerService.exerciseTest(classDetailDTO)); } @PostMapping("exportExerciseTest") - @ApiOperation("班级管理--测评成绩 id 班级id userName paperId") + @ApiOperation("##2024.3##班级管理--测评成绩 id 班级id userName paperId") @LoginRequired public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception { classDetailDTO.setFlag(true); administerService.exportExerciseTest(classDetailDTO); } + @PostMapping("socialExerciseTest") + @ApiOperation("##2024.3##社会化、学徒制--班级管理--测评成绩 id 班级id userName paperId pageSize pageNum") + @LoginRequired + public ResponseVO socialExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) { + return ResponseData.generateCreatedResponse(0, administerService.socialExerciseTest(classDetailDTO)); + } + + @PostMapping("socialTestDetail") + @ApiOperation("##2024.3##社会化、学徒制--班级管理--测评概览 id 班级id memberId 学员id") + @LoginRequired + public ResponseVO socialTestDetail(@RequestBody SocialTestDetailDTO socialTestDetailDTO) { + return ResponseData.generateCreatedResponse(0, administerService.socialTestDetail(socialTestDetailDTO)); + } + + @PostMapping("socialTestRecord") + @ApiOperation("##2024.3##社会化、学徒制--班级管理--测评记录 id 班级id memberId 学员id ") + @LoginRequired + public ResponseVO socialTestRecord(@RequestBody SocialTestDetailDTO socialTestDetailDTO) { + return ResponseData.generateCreatedResponse(0, administerService.socialTestRecord(socialTestDetailDTO)); + } + + @PostMapping("exportSocialExerciseTest") + @ApiOperation("##2024.3##班级管理--测评成绩 id 班级id userName ") + @LoginRequired + public void exportSocialExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception { + classDetailDTO.setFlag(true); + administerService.exportSocialExerciseTest(classDetailDTO); + } + @PostMapping("getMemberPapers") @ApiOperation("获取某个成员某个卷子的做题历史 memberId paperId") @LoginRequired diff --git a/src/main/java/com/subsidy/controller/ClassDictController.java b/src/main/java/com/subsidy/controller/ClassDictController.java index dda4bdc..9f82cc7 100644 --- a/src/main/java/com/subsidy/controller/ClassDictController.java +++ b/src/main/java/com/subsidy/controller/ClassDictController.java @@ -38,7 +38,7 @@ public class ClassDictController { private ClassDictService classDictService; @PostMapping("getAllClasses") - @ApiOperation("获取某公司下的所有班级 companyId 所选企业id className 班级名称 openStatus 开放状态 startDate 开始时间 endDate 结束时间") + @ApiOperation("##2024.3##获取某公司下的所有班级 companyId 所选企业id className 班级名称 openStatus 开放状态 0:开课中 1:待开始 2:已结课 startDate 开始时间 endDate 结束时间 classType:班级类型:0:企业线上培训 2:学徒制 ") @LoginRequired public ResponseVO getAllClasses(@RequestBody ClassDictDO classDictDO)throws Exception{ return ResponseData.generateCreatedResponse(0,classDictService.getAllClasses(classDictDO)); @@ -52,20 +52,22 @@ public class ClassDictController { } @PostMapping("addClass") - @ApiOperation("添加班级 userId:登录人id companyId courseId classType classTypeId(证书课程的话传0) className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进 memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime]") + @ApiOperation("##2024.3##添加班级 userId:登录人id companyId courseId classType:班级类型:0:企业线上培训 1:企业内训 2:学徒制 classTypeId(证书课程的话传0)" + + " className startDate endDate testRule 是否视频看完再做测试 isOrder 是否按照顺序播放 isFastPlay 是否快进" + + " memberIds [] 班级学员 classNoticeDOS[noticeType noticeTime paperTime测试时间开关 paperTimeLimit测试时间限制 faceCheck 人脸识别开关 vodIds[] ") @LoginRequired public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){ return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO)); } @PostMapping("updateClass") - @ApiOperation("修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 " + + @ApiOperation("##2024.3##修改班级 id className classTypeId startDate endDate isOrder 是否按顺序播放 isFastPlay 是否允许快进 " + "testRule:测试规则 classType limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证" + "activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" + - "firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode") + "firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode paperTime测试时间开关 paperTimeLimit测试时间限制 faceCheck 人脸识别开关 vodIds[]") @LoginRequired - public ResponseVO updateClass(@RequestBody ClassDictDO classDictDO){ - return ResponseData.generateCreatedResponse(0,classDictService.updateClass(classDictDO)); + public ResponseVO updateClass(@RequestBody AddClassDTO addClassDTO){ + return ResponseData.generateCreatedResponse(0,classDictService.updateClass(addClassDTO)); } @PostMapping("classDetail") @@ -136,5 +138,10 @@ public class ClassDictController { classDictService.downloadFailClassMembers(downloadFailClassMembers); } + @PostMapping("classVods") + @ApiOperation("##2024.3##通过班级id查询视频 id 班级id") + public ResponseVO classVods(@RequestBody ClassDictDO classDictDO){ + return ResponseData.generateCreatedResponse(0,classDictService.classVods(classDictDO)); + } } diff --git a/src/main/java/com/subsidy/controller/ClassTypeDictController.java b/src/main/java/com/subsidy/controller/ClassTypeDictController.java index 7d24892..13c7de4 100644 --- a/src/main/java/com/subsidy/controller/ClassTypeDictController.java +++ b/src/main/java/com/subsidy/controller/ClassTypeDictController.java @@ -60,4 +60,16 @@ public class ClassTypeDictController { return ResponseData.generateCreatedResponse(0,classTypeDictService.queryClassTypes(classTypeDTO)); } + @PostMapping("queryOnlineClassTypes") + @ApiOperation("查看内训和企业线上化 companyId") + public ResponseVO queryOnlineClassTypes(@RequestBody ClassTypeDictDO classTypeDictDO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.queryOnlineClassTypes(classTypeDictDO)); + } + + @PostMapping("querySocialClassTypes") + @ApiOperation("查看社会化学徒制 companyId") + public ResponseVO querySocialClassTypes(@RequestBody ClassTypeDictDO classTypeDictDO){ + return ResponseData.generateCreatedResponse(0,classTypeDictService.querySocialClassTypes(classTypeDictDO)); + } + } diff --git a/src/main/java/com/subsidy/controller/ClassVodFaceCheckController.java b/src/main/java/com/subsidy/controller/ClassVodFaceCheckController.java new file mode 100644 index 0000000..e1266ec --- /dev/null +++ b/src/main/java/com/subsidy/controller/ClassVodFaceCheckController.java @@ -0,0 +1,22 @@ +package com.subsidy.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 百分比认证视频表 前端控制器 + *

+ * + * @author Tuyp + * @since 2024-03-18 + */ +@RestController +@Api(tags = "百分比认证视频表") +@RequestMapping("/class-vod-face-check-do") +public class ClassVodFaceCheckController { + +} diff --git a/src/main/java/com/subsidy/controller/ContentVodMappingController.java b/src/main/java/com/subsidy/controller/ContentVodMappingController.java index db806d5..6d7fc33 100644 --- a/src/main/java/com/subsidy/controller/ContentVodMappingController.java +++ b/src/main/java/com/subsidy/controller/ContentVodMappingController.java @@ -47,7 +47,7 @@ public class ContentVodMappingController { } @PostMapping("addContentVod") - @ApiOperation("添加课程内容视频:contentId/内容ID、vodIds [vodId, vodAliasName]") + @ApiOperation("##2024.3##添加课程内容视频:contentId/内容ID、vodIds [vodId, vodAliasName]") @LoginRequired public ResponseVO addContentVod(@RequestBody AddContentVodDTO addContentVod) { contentVodMappingService.addContentVod(addContentVod); diff --git a/src/main/java/com/subsidy/controller/CourseDictController.java b/src/main/java/com/subsidy/controller/CourseDictController.java index f1ba6ab..12ee15d 100644 --- a/src/main/java/com/subsidy/controller/CourseDictController.java +++ b/src/main/java/com/subsidy/controller/CourseDictController.java @@ -22,9 +22,6 @@ import org.springframework.web.bind.annotation.RestController; *

* 前端控制器 *

- * - * @author DengMin - * @since 2021-10-11 */ @RestController @Api(tags = "课程表") @@ -35,7 +32,7 @@ public class CourseDictController { private CourseDictService courseDictService; @PostMapping("addCourse") - @ApiOperation("添加课程 companyId courseName courseType coverPage openStatus remark fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[] businessIds[]") + @ApiOperation("##2024.3##添加课程 companyId courseName courseType coverPage openStatus remark fieldDictDOS[] categoryDOS[] jobDictDOS[] rankDictDOS[] businessIds[] courseDataType 0:企业线上培训 1:学徒制 ") @LoginRequired public ResponseVO addCourse(@RequestBody AddCourseDTO addCourseDTO){ return ResponseData.generateCreatedResponse(0,courseDictService.addCourse(addCourseDTO)); @@ -49,7 +46,7 @@ public class CourseDictController { } @PostMapping("queryCourses") - @ApiOperation("平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId businessId rankId courseType openStatus") + @ApiOperation("##2024.3##平台运营者--查询课程 pageSize pageNum courseName fieldId categoryId jobId businessId rankId courseType openStatus courseDataType 0:企业线上培训 1:学徒制") @LoginRequired public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){ return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO)); @@ -63,7 +60,7 @@ public class CourseDictController { } @PostMapping("queryCompanyCourse") - @ApiOperation("企业内容管理-- { companyId 所选企业id pageSize pageNum courseName categoryId jobId rankId openStatus}") + @ApiOperation("##2024.3##企业内容管理-- { companyId 所选企业id pageSize pageNum courseName categoryId jobId rankId openStatus courseDataType 0:企业线上培训 1:学徒制}") @LoginRequired public ResponseVO queryCompanyCourse(@RequestBody QueryCoursesDTO queryCoursesDTO){ return ResponseData.generateCreatedResponse(0,courseDictService.queryCompanyCourse(queryCoursesDTO)); diff --git a/src/main/java/com/subsidy/controller/DuDaoController.java b/src/main/java/com/subsidy/controller/DuDaoController.java index b2b4a49..00aef23 100644 --- a/src/main/java/com/subsidy/controller/DuDaoController.java +++ b/src/main/java/com/subsidy/controller/DuDaoController.java @@ -1,7 +1,7 @@ package com.subsidy.controller; import com.subsidy.service.DudaoService; -import com.subsidy.vo.renshe.RensheResponseVO; +import com.subsidy.vo.dudao.RensheResponseVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/com/subsidy/controller/ExerciseDictController.java b/src/main/java/com/subsidy/controller/ExerciseDictController.java index e79a973..69905c2 100644 --- a/src/main/java/com/subsidy/controller/ExerciseDictController.java +++ b/src/main/java/com/subsidy/controller/ExerciseDictController.java @@ -84,5 +84,4 @@ public class ExerciseDictController { return ResponseData.generateCreatedResponse(0,exerciseDictService.select(file,paperId,courseId)); } - } diff --git a/src/main/java/com/subsidy/controller/ImageCheckRecordController.java b/src/main/java/com/subsidy/controller/ImageCheckRecordController.java index 3061f87..18a33c3 100644 --- a/src/main/java/com/subsidy/controller/ImageCheckRecordController.java +++ b/src/main/java/com/subsidy/controller/ImageCheckRecordController.java @@ -43,14 +43,14 @@ public class ImageCheckRecordController { } @PostMapping("imageCheck") - @ApiOperation("课程/测评人身核验(权威库:身份证) PC端 id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") + @ApiOperation("课程/测评人身核验(权威库:身份证) PC端 vodId id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") @TimeRequired public ResponseVO imageCheck(@RequestBody ImageCheckDTO imageCheckDTO) throws Exception { return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckDTO)); } @PostMapping("h5ImageCheck") - @ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") + @ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 vodId id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") @TimeRequired public ResponseVO h5CheckResult(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{ return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckDTO)); diff --git a/src/main/java/com/subsidy/controller/MemberController.java b/src/main/java/com/subsidy/controller/MemberController.java index 83e2a7d..15d6454 100644 --- a/src/main/java/com/subsidy/controller/MemberController.java +++ b/src/main/java/com/subsidy/controller/MemberController.java @@ -1,19 +1,16 @@ package com.subsidy.controller; -import com.alibaba.fastjson.JSON; import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseVO; import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.dto.administer.VerifyCodeDTO; -import com.subsidy.dto.live.PolyvInfoDTO; import com.subsidy.dto.member.*; -import com.subsidy.dto.vod.InsertHistoryNewDTO; -import com.subsidy.mapper.MemberMapper; import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.MemberDO; import com.subsidy.service.MemberService; import com.subsidy.vo.live.PolyvInfoVO; +import com.subsidy.dto.member.CheckItemDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -50,8 +47,6 @@ public class MemberController { memberService.exportAllMembers(getAllDTO); } - - @PostMapping("deleteMember") @ApiOperation("删除成员 id ") @LoginRequired @@ -106,7 +101,6 @@ public class MemberController { return ResponseData.generateCreatedResponse(0,memberService.kexinkuLogin(kexinkuLoginDTO)); } - @PostMapping("checkStatus") @ApiOperation("实名制验证状态 id") @TimeRequired @@ -130,7 +124,7 @@ public class MemberController { @PostMapping("myCourses") @ApiOperation("手机端:我的学习--补贴培训课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ") -// @LoginRequired + @LoginRequired @TimeRequired public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){ return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO)); @@ -145,13 +139,32 @@ public class MemberController { } @PostMapping("contentVod") - @ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") + @ApiOperation("##2024.3##企业线上培训----手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") @LoginRequired @TimeRequired public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){ return ResponseData.generateCreatedResponse(0,memberService.contentVod(contentVodDTO)); } + @PostMapping("socialContentVod") + @ApiOperation("##2024.3##社会化学徒制----手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") + @LoginRequired + @TimeRequired + public ResponseVO socialContentVod(@RequestBody ContentMemberDTO contentVodDTO){ + return ResponseData.generateCreatedResponse(0,memberService.socialContentVod(contentVodDTO)); + } + + + + + + + @PostMapping("checkItem") + @ApiOperation("##2024.3##每次点开题目或者视频的时候看下前置事项 memberId classId vodId:当前视频的id paperId:上一个视频的题目id type 0:视频 1:习题") + public ResponseVO checkItem(@RequestBody CheckItemDTO checkItemVO){ + return ResponseData.generateCreatedResponse(0,memberService.checkItem(checkItemVO)); + } + @PostMapping("contentFiles") @ApiOperation("手机端:目录+课件 courseId 课程 memberId 学员id") @LoginRequired @@ -176,6 +189,14 @@ public class MemberController { return ResponseData.generateCreatedResponse(0,memberService.getCourseTest(contentMemberDTO)); } + @PostMapping("socialCourseTest") + @ApiOperation("##2024.3##获取课程下的测试情况 {memberId 成员id 班级id classId courseId 课程id }") + @LoginRequired + @TimeRequired + public ResponseVO socialCourseTest(@RequestBody ContentMemberDTO contentMemberDTO){ + return ResponseData.generateCreatedResponse(0,memberService.socialCourseTest(contentMemberDTO)); + } + @PostMapping("getTestDoneDetail") @ApiOperation("获取某个测评学生的完成情况 paperId memberId") @LoginRequired diff --git a/src/main/java/com/subsidy/controller/OssController.java b/src/main/java/com/subsidy/controller/OssController.java index d3841e0..8eefa3e 100644 --- a/src/main/java/com/subsidy/controller/OssController.java +++ b/src/main/java/com/subsidy/controller/OssController.java @@ -165,7 +165,7 @@ public class OssController { // 完成分片上传。 CompleteMultipartUploadResult completeMultipartUploadResult = ossClient.completeMultipartUpload(completeMultipartUploadRequest); - uploadFileVO.setUrl(completeMultipartUploadResult.getLocation()); + uploadFileVO.setUrl(completeMultipartUploadResult.getLocation().replace("http","https")); System.out.println(completeMultipartUploadResult.getLocation()); } catch (OSSException oe) { System.out.println("Caught an OSSException, which means your request made it to OSS, " diff --git a/src/main/java/com/subsidy/controller/RenSheJuController.java b/src/main/java/com/subsidy/controller/RenSheJuController.java index fc1d0ad..2d5b548 100644 --- a/src/main/java/com/subsidy/controller/RenSheJuController.java +++ b/src/main/java/com/subsidy/controller/RenSheJuController.java @@ -69,4 +69,9 @@ public class RenSheJuController { return renSheJuService.clear(); } + @PostMapping("post6plus") + public RensheResponseVO post6plus() throws Exception { + return renSheJuService.post6plus(); + } + } diff --git a/src/main/java/com/subsidy/controller/VodLabelDictController.java b/src/main/java/com/subsidy/controller/VodLabelDictController.java index c92faf6..3e5aee4 100644 --- a/src/main/java/com/subsidy/controller/VodLabelDictController.java +++ b/src/main/java/com/subsidy/controller/VodLabelDictController.java @@ -70,7 +70,7 @@ public class VodLabelDictController { @PostMapping(value = "queryVodLabelTree") @ApiOperation("获取目录和视频") - @LoginRequired +// @LoginRequired public ResponseVO getContentVodTree() { return ResponseData.generateCreatedResponse(0, vodLableDictService.queryVodLabelTree()); } diff --git a/src/main/java/com/subsidy/dto/classDict/AddClassDTO.java b/src/main/java/com/subsidy/dto/classDict/AddClassDTO.java index 9933f04..cc1efcc 100644 --- a/src/main/java/com/subsidy/dto/classDict/AddClassDTO.java +++ b/src/main/java/com/subsidy/dto/classDict/AddClassDTO.java @@ -13,5 +13,7 @@ public class AddClassDTO extends ClassDictDO { private List memberIds; + private List vodIds; + private List classNoticeDOS; } diff --git a/src/main/java/com/subsidy/dto/classDict/SocialTestDetailDTO.java b/src/main/java/com/subsidy/dto/classDict/SocialTestDetailDTO.java new file mode 100644 index 0000000..61acb16 --- /dev/null +++ b/src/main/java/com/subsidy/dto/classDict/SocialTestDetailDTO.java @@ -0,0 +1,16 @@ +package com.subsidy.dto.classDict; + +import lombok.Data; + +@Data +public class SocialTestDetailDTO { + + private Integer pageSize; + + private Integer pageNum; + + private Long memberId; + + private Long id; + +} diff --git a/src/main/java/com/subsidy/dto/contentVod/ContentVodDTO.java b/src/main/java/com/subsidy/dto/contentVod/ContentVodDTO.java index 79c52eb..36ddadd 100644 --- a/src/main/java/com/subsidy/dto/contentVod/ContentVodDTO.java +++ b/src/main/java/com/subsidy/dto/contentVod/ContentVodDTO.java @@ -10,4 +10,5 @@ public class ContentVodDTO { private Long vodId; private String vodAliasName; + } diff --git a/src/main/java/com/subsidy/dto/course/AddCourseDTO.java b/src/main/java/com/subsidy/dto/course/AddCourseDTO.java index 4405956..6a5b789 100644 --- a/src/main/java/com/subsidy/dto/course/AddCourseDTO.java +++ b/src/main/java/com/subsidy/dto/course/AddCourseDTO.java @@ -67,4 +67,7 @@ public class AddCourseDTO { */ private List businessIds; + private Integer courseDataType; + + } diff --git a/src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java b/src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java index 3ef2fb7..57aa914 100644 --- a/src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java +++ b/src/main/java/com/subsidy/dto/course/QueryCoursesDTO.java @@ -27,4 +27,6 @@ public class QueryCoursesDTO { private String openStatus; + private Integer courseDataType; + } diff --git a/src/main/java/com/subsidy/dto/dudao/ActivityList.java b/src/main/java/com/subsidy/dto/dudao/ActivityList.java new file mode 100644 index 0000000..18fc0bd --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ActivityList.java @@ -0,0 +1,23 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class ActivityList { + /** + * 是否通过,0.通过 1.未通过 + */ + private Integer access; + /** + * 检验类型,1.人脸识别 2.弹出框点击事件 3.课堂答题 4.其他 + */ + private Integer activityDetection; + /** + * 活跃度检测时间,【13位时间戳】【精确到毫秒】 + */ + private Long activityTime; + /** + * 错误类型,1.人脸识别未通过2.弹出框未点击3.没有做课堂答题4.课堂答题合格率不达标 + */ + private Integer errorInfo; +} diff --git a/src/main/java/com/subsidy/dto/dudao/AnswerAndQuestionList.java b/src/main/java/com/subsidy/dto/dudao/AnswerAndQuestionList.java new file mode 100644 index 0000000..d3d7588 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/AnswerAndQuestionList.java @@ -0,0 +1,18 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class AnswerAndQuestionList { + + /** + * 回答时间 + */ + private long answer; + /** + * 提问时间 + */ + private long question; + + +} diff --git a/src/main/java/com/subsidy/dto/dudao/AnswerBasic.java b/src/main/java/com/subsidy/dto/dudao/AnswerBasic.java new file mode 100644 index 0000000..16f78f3 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/AnswerBasic.java @@ -0,0 +1,17 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class AnswerBasic { + + /** + * 答疑辅导,提问和回答都存在值时才进行传递 + */ + private List answerAndQuestionList; + private String downCode; + private String identity; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ChapterExamBasic.java b/src/main/java/com/subsidy/dto/dudao/ChapterExamBasic.java new file mode 100644 index 0000000..e40dde7 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ChapterExamBasic.java @@ -0,0 +1,47 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class ChapterExamBasic { + + /** + * 是否通过,0通过1未通过 + */ + private Long access; + /** + * 活跃度列表(数组),【数组】 + */ + private List activityList; + /** + * 章节(课程)编码 + */ + private String chapterCode; + /** + * 临时班级(项目)编号 + */ + private String downCode; + /** + * 章节(课程)考试时间列表,【数组】 + */ + private List examList; + /** + * 章节(课程)考试总时长,该字段数据应为当日产生examList列表内多条结束时间-开始时间累加和【秒】 + */ + private Long examTime; + /** + * 学员身份证号,会对身份证号长度、格式进行校验、X用大写 + */ + private String identity; + /** + * 学员电话号,会对学生手机号长度、格式进行校验 + */ + private String phone; + /** + * 学员姓名 + */ + private String studentName; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ChapterList2.java b/src/main/java/com/subsidy/dto/dudao/ChapterList2.java new file mode 100644 index 0000000..9734507 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ChapterList2.java @@ -0,0 +1,18 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class ChapterList2 { + + private String chapterCode; + + private String chapterName; + + private Integer isExam; + + private String chapterTime; + + private String examTime; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ChapterList3.java b/src/main/java/com/subsidy/dto/dudao/ChapterList3.java new file mode 100644 index 0000000..ef83ddd --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ChapterList3.java @@ -0,0 +1,31 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class ChapterList3 { + + /** + * 章节(课程)编码,与基本信息内的章节(课程)编码相对应 + */ + private String chapterCode; + + /** + * 章节(课程)学习时长,该学习时间段内本章节学习累计时长【秒】 + */ + private long chapterTime; + + /** + * 学习结束时间(视频播放结束时间),【13位时间戳】【精确到毫秒】 + */ + private Long endTime; + /** + * 章节(课程)暂停时长,该学习时间段内本章节播放暂停累计时长【秒】(2023年2月1日开始实行) + */ + private Long pauseTime; + /** + * 学习开始时间(视频播放开始时间),【13位时间戳】【精确到毫秒】 + */ + private Long startTime; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ClassBaseInfoDTO.java b/src/main/java/com/subsidy/dto/dudao/ClassBaseInfoDTO.java new file mode 100644 index 0000000..12681e2 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ClassBaseInfoDTO.java @@ -0,0 +1,16 @@ +package com.subsidy.dto.dudao; + +import com.subsidy.vo.dudao.EpidemicSituationClassBasic; +import lombok.Data; + +import java.util.List; + +@Data +public class ClassBaseInfoDTO { + + private List epidemicSituationClassBasic; + + private String privateKey; + + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ClassCodeBasic.java b/src/main/java/com/subsidy/dto/dudao/ClassCodeBasic.java new file mode 100644 index 0000000..2baeace --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ClassCodeBasic.java @@ -0,0 +1,17 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class ClassCodeBasic { + + /** + * 班级(项目)编号 + */ + private String classCode; + /** + * 临时班级(项目)编号 + */ + private String downCode; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ClassHourBasic.java b/src/main/java/com/subsidy/dto/dudao/ClassHourBasic.java new file mode 100644 index 0000000..b592271 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ClassHourBasic.java @@ -0,0 +1,51 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class ClassHourBasic { + + + /** + * 临时班级(临时项目)编号 + */ + private String downCode; + + /** + * 学员姓名 + */ + private String studentName; + /** + * 学员电话号,会对学生手机号长度、格式进行校验 + */ + private String phone; + /** + * 学员身份证号,会对身份证号长度、格式进行校验、X用大写 + */ + private String identity; + /** + * 当日累计学习时长,视频暂停时间不计入【秒】 + */ + private long learnTime; + + /** + * 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】 + */ + private long loginTime; + /** + * 当日累计播放时长,视频暂停时间计入【秒】 + */ + private Long playTime; + /** + * 上线时间列表,【数组】 + */ + private List loginList; + /** + * 活跃度列表,【数组】 + */ + private List activityList; + + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ClassHourBehaviorDTO.java b/src/main/java/com/subsidy/dto/dudao/ClassHourBehaviorDTO.java new file mode 100644 index 0000000..467532f --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ClassHourBehaviorDTO.java @@ -0,0 +1,19 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class ClassHourBehaviorDTO { + + /** + * 班级(项目)学时列表,【数组】班级(项目)学时列表 + */ + private List classHourBasic; + /** + * 私钥 + */ + private String privateKey; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/ExamList.java b/src/main/java/com/subsidy/dto/dudao/ExamList.java new file mode 100644 index 0000000..4d2af4d --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/ExamList.java @@ -0,0 +1,21 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +@Data +public class ExamList { + + /** + * 章节(课程)考试时间列表,【13位时间戳】【精确到毫秒】 + */ + private long endTime; + /** + * 登录ip,会对IP进行校验 + */ + private String ip; + /** + * 章节(课程)考试开始时间,【13位时间戳】【精确到毫秒】 + */ + private long startTime; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/LoginList.java b/src/main/java/com/subsidy/dto/dudao/LoginList.java new file mode 100644 index 0000000..b1f2399 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/LoginList.java @@ -0,0 +1,27 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class LoginList { + + /** + * 章节(课程)学时列表 + */ + private List chapterList; + /** + * 下线时间,【13位时间戳】【精确到毫秒】 + */ + private long endTime; + /** + * 登录ip,会对IP进行校验 + */ + private String ip; + /** + * 上线时间,【13位时间戳】【精确到毫秒】 + */ + private long startTime; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/UploadChapterBehaviorDTO.java b/src/main/java/com/subsidy/dto/dudao/UploadChapterBehaviorDTO.java new file mode 100644 index 0000000..06abc33 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/UploadChapterBehaviorDTO.java @@ -0,0 +1,19 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class UploadChapterBehaviorDTO { + + /** + * 章节(课程)考试列表,【数组】 + */ + private List chapterExamBasic; + /** + * 私钥 + */ + private String privateKey; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/UploadClassAnswerQuestionBehaviorDTO.java b/src/main/java/com/subsidy/dto/dudao/UploadClassAnswerQuestionBehaviorDTO.java new file mode 100644 index 0000000..91bc88e --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/UploadClassAnswerQuestionBehaviorDTO.java @@ -0,0 +1,14 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class UploadClassAnswerQuestionBehaviorDTO { + + private List answerBasic; + + private String privateKey; + +} diff --git a/src/main/java/com/subsidy/dto/dudao/UploadClassCodeDTO.java b/src/main/java/com/subsidy/dto/dudao/UploadClassCodeDTO.java new file mode 100644 index 0000000..70122b7 --- /dev/null +++ b/src/main/java/com/subsidy/dto/dudao/UploadClassCodeDTO.java @@ -0,0 +1,17 @@ +package com.subsidy.dto.dudao; + +import lombok.Data; + +import java.util.List; + +@Data +public class UploadClassCodeDTO { + + private List classCodeBasic; + /** + * 私钥 + */ + private String privateKey; + + +} diff --git a/src/main/java/com/subsidy/dto/image/ImageCheckDTO.java b/src/main/java/com/subsidy/dto/image/ImageCheckDTO.java index 711c0bb..bafc1c2 100644 --- a/src/main/java/com/subsidy/dto/image/ImageCheckDTO.java +++ b/src/main/java/com/subsidy/dto/image/ImageCheckDTO.java @@ -25,4 +25,9 @@ public class ImageCheckDTO { */ private Integer classPlace; + /** + * 视频id + */ + private Long vodId; + } diff --git a/src/main/java/com/subsidy/dto/member/CheckItemDTO.java b/src/main/java/com/subsidy/dto/member/CheckItemDTO.java new file mode 100644 index 0000000..149adb0 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/CheckItemDTO.java @@ -0,0 +1,18 @@ +package com.subsidy.dto.member; + +import lombok.Data; + +@Data +public class CheckItemDTO { + + private Long memberId; + + private Long classId; + + private Long vodId; + + private Long paperId; + + private Integer type; + +} diff --git a/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java b/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java new file mode 100644 index 0000000..636bba4 --- /dev/null +++ b/src/main/java/com/subsidy/dto/member/ImportClassMemberDTO.java @@ -0,0 +1,20 @@ +package com.subsidy.dto.member; + +import com.subsidy.util.excel.ExcelColumnUtil; +import lombok.Data; + +@Data +public class ImportClassMemberDTO { + + @ExcelColumnUtil(value = "姓名", col = 1) + private String userName; + + @ExcelColumnUtil(value = "身份证", col = 2) + private String idCard; + + @ExcelColumnUtil(value = "手机号", col = 3) + private String telephone; + + private String reason; + +} diff --git a/src/main/java/com/subsidy/dto/renshe/ClassHourBehaviorDTO.java b/src/main/java/com/subsidy/dto/renshe/ClassHourBehaviorDTO.java index 2888c7e..2342a9b 100644 --- a/src/main/java/com/subsidy/dto/renshe/ClassHourBehaviorDTO.java +++ b/src/main/java/com/subsidy/dto/renshe/ClassHourBehaviorDTO.java @@ -1,5 +1,6 @@ package com.subsidy.dto.renshe; +import com.subsidy.dto.renshe.ClassHourBasic; import lombok.Data; import java.util.List; diff --git a/src/main/java/com/subsidy/mapper/AdministerMapper.java b/src/main/java/com/subsidy/mapper/AdministerMapper.java index 047a156..0efd26a 100644 --- a/src/main/java/com/subsidy/mapper/AdministerMapper.java +++ b/src/main/java/com/subsidy/mapper/AdministerMapper.java @@ -8,6 +8,9 @@ import com.subsidy.model.ClassDictDO; import com.subsidy.model.CompanyDictDO; import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; +import com.subsidy.vo.classdict.SocialTestDetailVO; +import com.subsidy.vo.classdict.SocialTestRecordVO; +import com.subsidy.vo.classdict.VodPassRateVO; import com.subsidy.vo.company.GetAllCompanyVO; import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.sign.AnswerRecordVO; @@ -44,6 +47,21 @@ public interface AdministerMapper extends BaseMapper { IPage exerciseTest(IPage iPage, Long classId, String userName); /** + * 计算某个人的章通过率 + */ + VodPassRateVO vodPassRate(Long classId, Long memberId); + + /** + * 测评概览 + */ + List socialTestDetail(Long classId, Long memberId); + + /** + * 班级考试详情 倒序 + */ + List socialTestRecord(Long classId,Long memberId); + + /** * 获取班级成员---答疑记录 */ IPage answerRecord(IPage iPage, Long classId, String userName); diff --git a/src/main/java/com/subsidy/mapper/ClassDictMapper.java b/src/main/java/com/subsidy/mapper/ClassDictMapper.java index a16ad8e..c2db077 100644 --- a/src/main/java/com/subsidy/mapper/ClassDictMapper.java +++ b/src/main/java/com/subsidy/mapper/ClassDictMapper.java @@ -6,6 +6,7 @@ import com.subsidy.model.ClassDictDO; import com.subsidy.model.MemberDO; import com.subsidy.model.VodDictDO; import com.subsidy.vo.classdict.*; +import com.subsidy.vo.vod.VodInfoVO; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; @@ -25,7 +26,7 @@ public interface ClassDictMapper extends BaseMapper { /** * 获取某企业的全部班级 */ - List getAllClasses(ClassDictDO classDictDO); + List getAllClasses(Long companyId,String className,String startDate,String endDate,String openStatus,Integer classType); /** * 获取某班级下的全部视频 @@ -72,4 +73,9 @@ public interface ClassDictMapper extends BaseMapper { */ List dailyClassInfo(); + /** + * 查看班级里有多少视频 + */ + List classVods(Long classId); + } diff --git a/src/main/java/com/subsidy/mapper/ClassVodFaceCheckMapper.java b/src/main/java/com/subsidy/mapper/ClassVodFaceCheckMapper.java new file mode 100644 index 0000000..040748d --- /dev/null +++ b/src/main/java/com/subsidy/mapper/ClassVodFaceCheckMapper.java @@ -0,0 +1,22 @@ +package com.subsidy.mapper; + +import com.subsidy.model.ClassVodFaceCheckDO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 百分比认证视频表 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2024-03-18 + */ +@Repository +public interface ClassVodFaceCheckMapper extends BaseMapper { + + List faceVodIds(Long classId); + +} diff --git a/src/main/java/com/subsidy/mapper/ContentVodMappingMapper.java b/src/main/java/com/subsidy/mapper/ContentVodMappingMapper.java index 45b4ae0..ad5ef7e 100644 --- a/src/main/java/com/subsidy/mapper/ContentVodMappingMapper.java +++ b/src/main/java/com/subsidy/mapper/ContentVodMappingMapper.java @@ -2,8 +2,11 @@ package com.subsidy.mapper; import com.subsidy.model.ContentVodMappingDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.model.CourseDictDO; import org.springframework.stereotype.Repository; +import java.util.List; + /** *

* 目录视频关系表 Mapper 接口 @@ -12,7 +15,17 @@ import org.springframework.stereotype.Repository; * @author DengMin * @since 2022-07-19 */ - @Repository +@Repository public interface ContentVodMappingMapper extends BaseMapper { + /** + * 查看章节属于哪个课程,返回课程的详细信息 + */ + CourseDictDO getCourseByContentId(Long contentId); + + /** + * 查看某个课程之前视频的ids + */ + List oldVodIds(Long contentId); + } diff --git a/src/main/java/com/subsidy/mapper/CourseContentMapper.java b/src/main/java/com/subsidy/mapper/CourseContentMapper.java index 3c156c2..c96dbc2 100644 --- a/src/main/java/com/subsidy/mapper/CourseContentMapper.java +++ b/src/main/java/com/subsidy/mapper/CourseContentMapper.java @@ -36,5 +36,8 @@ public interface CourseContentMapper extends BaseMapper { */ List contentFiles(Long courseId); + /** + * 课程最大的orderNo + */ Integer selectMaxOrderNo(Long courseId); } diff --git a/src/main/java/com/subsidy/mapper/CourseDictMapper.java b/src/main/java/com/subsidy/mapper/CourseDictMapper.java index d225141..73a7d71 100644 --- a/src/main/java/com/subsidy/mapper/CourseDictMapper.java +++ b/src/main/java/com/subsidy/mapper/CourseDictMapper.java @@ -27,7 +27,7 @@ public interface CourseDictMapper extends BaseMapper { * courseName fieldId categoryId jobId courseRank courseType * @return */ - IPage queryCourses(IPage page, String courseName, Long fieldId,Long categoryId,Long jobId,Long rankId, String courseType,Long companyId,String openStatus,Long businessId); + IPage queryCourses(IPage page, String courseName, Long fieldId,Long categoryId,Long jobId,Long rankId, String courseType,Long companyId,String openStatus,Long businessId,Integer courseDataType); /** * 通过课程id查询课程下的学生-----弃用 diff --git a/src/main/java/com/subsidy/mapper/DudaoMapper.java b/src/main/java/com/subsidy/mapper/DudaoMapper.java index 9d98311..94ee5da 100644 --- a/src/main/java/com/subsidy/mapper/DudaoMapper.java +++ b/src/main/java/com/subsidy/mapper/DudaoMapper.java @@ -1,11 +1,11 @@ package com.subsidy.mapper; -import com.subsidy.dto.renshe.ChapterList2; -import com.subsidy.dto.renshe.ChapterList3; +import com.subsidy.dto.dudao.ChapterList2; +import com.subsidy.dto.dudao.ChapterList3; import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.MemberDO; import com.subsidy.model.OprMemDictDO; -import com.subsidy.vo.renshe.*; +import com.subsidy.vo.dudao.*; import org.springframework.stereotype.Repository; import java.util.List; @@ -111,7 +111,7 @@ public interface DudaoMapper { /** * 考试活跃度检测--人脸 */ - List examActivities(Long classId,Long memberId); + List examActivities(Long classId, Long memberId); /** * 找到某人某个时间段内的测评记录 diff --git a/src/main/java/com/subsidy/mapper/MemberMapper.java b/src/main/java/com/subsidy/mapper/MemberMapper.java index 2e38eb5..e62130d 100644 --- a/src/main/java/com/subsidy/mapper/MemberMapper.java +++ b/src/main/java/com/subsidy/mapper/MemberMapper.java @@ -93,6 +93,15 @@ public interface MemberMapper extends BaseMapper { */ List memberLives(Long memberId); + /** + * 查看某个人某个课程的视频是否已经学完 + */ + Integer checkClassVodPlayStatus(Long memberId,Long classId,Long vodId); + + /** + * 查看某个人某个课程的视频是否已经学完 + */ + Integer checkClassPaperPassStatus(Long memberId,Long classId,Long paperId); } diff --git a/src/main/java/com/subsidy/mapper/PaperDictMapper.java b/src/main/java/com/subsidy/mapper/PaperDictMapper.java index 14bdb23..6444d5b 100644 --- a/src/main/java/com/subsidy/mapper/PaperDictMapper.java +++ b/src/main/java/com/subsidy/mapper/PaperDictMapper.java @@ -1,7 +1,9 @@ package com.subsidy.mapper; +import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.PaperDictDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.subsidy.vo.paper.MemberMaxScoreVO; import com.subsidy.vo.paper.QueryPapersVO; import org.springframework.stereotype.Repository; @@ -34,4 +36,15 @@ public interface PaperDictMapper extends BaseMapper { */ Integer queryCoursePapersCnt(Long courseId); + /** + * 某学员某个班级某个视频获得的最高分数 + */ + MemberMaxScoreVO memberMaxScore(Long memberId, Long classId, Long vodId); + + /** + * 通过 courseId paperId 查看卷子 + * 倒序查询课程对应的卷子 + */ + List lastPaper(Long courseId); + } diff --git a/src/main/java/com/subsidy/mapper/RenSheJuMapper.java b/src/main/java/com/subsidy/mapper/RenSheJuMapper.java index 59bebde..52637fa 100644 --- a/src/main/java/com/subsidy/mapper/RenSheJuMapper.java +++ b/src/main/java/com/subsidy/mapper/RenSheJuMapper.java @@ -116,7 +116,7 @@ public interface RenSheJuMapper { List passExamCheck(Long classId); /** - * 进入到课程第二次做人脸识别 弃用 + * 进入到课程第二次做人脸识别 */ List studyCheck(Long classId); @@ -145,5 +145,9 @@ public interface RenSheJuMapper { */ List imageClassIds(String classType); + /** + * 补推人脸识别数据 + */ + List post6plus(Long classId); } diff --git a/src/main/java/com/subsidy/mapper/VodDictMapper.java b/src/main/java/com/subsidy/mapper/VodDictMapper.java index 637d65b..36ef2ae 100644 --- a/src/main/java/com/subsidy/mapper/VodDictMapper.java +++ b/src/main/java/com/subsidy/mapper/VodDictMapper.java @@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.subsidy.model.VodDictDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.subsidy.vo.vod.ClassVodCompleteInfoVO; -import com.subsidy.vo.vod.GetContendVodsVO; -import com.subsidy.vo.vod.QueryVodPageVO; -import com.subsidy.vo.vod.VodPlayStateVO; +import com.subsidy.vo.vod.*; import org.springframework.stereotype.Repository; import java.util.List; @@ -51,4 +48,6 @@ public interface VodDictMapper extends BaseMapper { List getCompanyVod(Long contentId); IPage queryVodPage(Page page, Long labelId, String vodName); + + List vodInfo(Long labelId); } diff --git a/src/main/java/com/subsidy/model/ClassDictDO.java b/src/main/java/com/subsidy/model/ClassDictDO.java index 1588e82..a34a16e 100644 --- a/src/main/java/com/subsidy/model/ClassDictDO.java +++ b/src/main/java/com/subsidy/model/ClassDictDO.java @@ -48,7 +48,10 @@ public class ClassDictDO extends BaseModel { */ private String classTypeId; - private String classType; + /** + * 班级类型:0:企业线上培训 1:企业内训 2:学徒制 + */ + private Integer classType; /** * 课程id @@ -145,4 +148,19 @@ public class ClassDictDO extends BaseModel { */ private Integer checkFlag; + /** + * 考试时间限制 为空的时候不限制 + */ + private Integer paperTimeLimit; + + /** + * 人脸识别开关 + */ + private Integer faceCheck; + + /** + * 考试时长开关 + */ + private Integer paperTime; + } diff --git a/src/main/java/com/subsidy/model/ClassMemberMappingDO.java b/src/main/java/com/subsidy/model/ClassMemberMappingDO.java index ae1f3f2..9af7c1d 100644 --- a/src/main/java/com/subsidy/model/ClassMemberMappingDO.java +++ b/src/main/java/com/subsidy/model/ClassMemberMappingDO.java @@ -50,4 +50,9 @@ public class ClassMemberMappingDO extends BaseModel { */ private String photo; + /** + * + */ + private Integer submitFlag; + } diff --git a/src/main/java/com/subsidy/model/ClassVodFaceCheckDO.java b/src/main/java/com/subsidy/model/ClassVodFaceCheckDO.java new file mode 100644 index 0000000..1c3991b --- /dev/null +++ b/src/main/java/com/subsidy/model/ClassVodFaceCheckDO.java @@ -0,0 +1,39 @@ +package com.subsidy.model; + +import com.subsidy.util.BaseModel; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 百分比认证视频表 + *

+ * + * @author Tuyp + * @since 2024-03-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("class_vod_face_check") +public class ClassVodFaceCheckDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 班级id + */ + private Long classId; + + /** + * 视频id + */ + private Long vodId; + + +} diff --git a/src/main/java/com/subsidy/model/CourseDictDO.java b/src/main/java/com/subsidy/model/CourseDictDO.java index 7965cb5..4ad6459 100644 --- a/src/main/java/com/subsidy/model/CourseDictDO.java +++ b/src/main/java/com/subsidy/model/CourseDictDO.java @@ -43,6 +43,12 @@ public class CourseDictDO extends BaseModel { */ private String courseType; + + /** + * 0:企业线上培训 1:学徒制 + */ + private Integer courseDataType; + /** * 课程封面 */ diff --git a/src/main/java/com/subsidy/model/MemberDO.java b/src/main/java/com/subsidy/model/MemberDO.java index d8d8c7c..60eeaf0 100644 --- a/src/main/java/com/subsidy/model/MemberDO.java +++ b/src/main/java/com/subsidy/model/MemberDO.java @@ -104,5 +104,39 @@ public class MemberDO extends BaseModel { */ private String status; + /** + * QQ号 + */ + private String qqNo; + + /** + * 微信账号 + */ + private String wechat; + + /** + * 实习状态 + */ + private String practiceStatus; + + /** + * 学院id + */ + private Long collegeId; + + /** + * 专业id + */ + private String major; + + /** + * 入学年份 + */ + private String enrollmentYear; + + /** + * 人员类型 0:学院 2 :职工 + */ + private Integer memberType; } diff --git a/src/main/java/com/subsidy/model/PaperDictDO.java b/src/main/java/com/subsidy/model/PaperDictDO.java index ea61b8f..d2834cc 100644 --- a/src/main/java/com/subsidy/model/PaperDictDO.java +++ b/src/main/java/com/subsidy/model/PaperDictDO.java @@ -40,5 +40,10 @@ public class PaperDictDO extends BaseModel { */ private Integer paperStatus; + /** + * 视频id + */ + private Long vodId; + } diff --git a/src/main/java/com/subsidy/service/AdministerService.java b/src/main/java/com/subsidy/service/AdministerService.java index b08ccee..b25bc13 100644 --- a/src/main/java/com/subsidy/service/AdministerService.java +++ b/src/main/java/com/subsidy/service/AdministerService.java @@ -6,11 +6,13 @@ import com.subsidy.dto.administer.*; import com.subsidy.model.*; import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; +import com.subsidy.dto.classDict.SocialTestDetailDTO; +import com.subsidy.vo.classdict.SocialTestDetailVO; +import com.subsidy.vo.classdict.SocialTestRecordVO; import com.subsidy.vo.image.GetMemberCheckDetailVO; import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.DownloadFailMembersDTO; import com.subsidy.vo.member.ImportMemberResultVO; -import com.subsidy.vo.member.ImportMemberVO; import com.subsidy.vo.sign.AnswerRecordVO; import org.springframework.web.multipart.MultipartFile; @@ -55,6 +57,14 @@ public interface AdministerService extends IService { List exportExerciseTest(ClassDetailDTO classDetailDTO)throws Exception; + IPage socialExerciseTest(ClassDetailDTO classDetailDTO); + + List socialTestDetail(SocialTestDetailDTO socialTestDetailDTO); + + List socialTestRecord(SocialTestDetailDTO socialTestDetailDTO); + + List exportSocialExerciseTest(ClassDetailDTO classDetailDTO)throws Exception; + List getMemberPapers(ExerciseDoneResultDO exerciseDoneResultDO); List getPaperDetail(ExerciseDoneHistoryDO exerciseDoneHistoryDO); diff --git a/src/main/java/com/subsidy/service/ClassDictService.java b/src/main/java/com/subsidy/service/ClassDictService.java index 297be20..9545bdb 100644 --- a/src/main/java/com/subsidy/service/ClassDictService.java +++ b/src/main/java/com/subsidy/service/ClassDictService.java @@ -8,10 +8,12 @@ import com.subsidy.dto.classDict.GetSpareMembersDTO; import com.subsidy.model.ClassDictDO; import com.subsidy.model.ClassMemberMappingDO; import com.subsidy.model.MemberDO; +import com.subsidy.vo.classdict.ClassDetail; import com.subsidy.vo.classdict.GetAllClassesVO; import com.subsidy.vo.classdict.GetClassBaseInfoVO; import com.subsidy.vo.member.DownloadFailClassMembers; import com.subsidy.vo.member.ImportClassMembersVO; +import com.subsidy.vo.vod.VodInfoVO; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; @@ -33,9 +35,9 @@ public interface ClassDictService extends IService { Long addClass(AddClassDTO addClassDTO); - String updateClass(ClassDictDO classDictDO); + String updateClass(AddClassDTO addClassDTO); - ClassDictDO classDetail(ClassDictDO classDictDO); + ClassDetail classDetail(ClassDictDO classDictDO); String removeMember(ClassMemberMappingDO classMemberMappingDO); @@ -55,4 +57,6 @@ public interface ClassDictService extends IService { void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers); + List classVods(ClassDictDO classDictDO); + } diff --git a/src/main/java/com/subsidy/service/ClassTypeDictService.java b/src/main/java/com/subsidy/service/ClassTypeDictService.java index caf118d..cce4936 100644 --- a/src/main/java/com/subsidy/service/ClassTypeDictService.java +++ b/src/main/java/com/subsidy/service/ClassTypeDictService.java @@ -1,6 +1,7 @@ package com.subsidy.service; import com.subsidy.dto.classDict.ClassTypeDTO; +import com.subsidy.mapper.ClassTypeDictMapper; import com.subsidy.model.ClassTypeDictDO; import com.baomidou.mybatisplus.extension.service.IService; @@ -24,4 +25,7 @@ public interface ClassTypeDictService extends IService { List queryClassTypes(ClassTypeDTO classTypeDTO); + List queryOnlineClassTypes(ClassTypeDictDO classTypeDictDO); + + ClassTypeDictDO querySocialClassTypes(ClassTypeDictDO classTypeDictDO); } diff --git a/src/main/java/com/subsidy/service/ClassVodFaceCheckService.java b/src/main/java/com/subsidy/service/ClassVodFaceCheckService.java new file mode 100644 index 0000000..8c2aada --- /dev/null +++ b/src/main/java/com/subsidy/service/ClassVodFaceCheckService.java @@ -0,0 +1,16 @@ +package com.subsidy.service; + +import com.subsidy.model.ClassVodFaceCheckDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 百分比认证视频表 服务类 + *

+ * + * @author Tuyp + * @since 2024-03-18 + */ +public interface ClassVodFaceCheckService extends IService { + +} diff --git a/src/main/java/com/subsidy/service/DudaoService.java b/src/main/java/com/subsidy/service/DudaoService.java index f7c46f9..d6139a8 100644 --- a/src/main/java/com/subsidy/service/DudaoService.java +++ b/src/main/java/com/subsidy/service/DudaoService.java @@ -1,7 +1,6 @@ package com.subsidy.service; -import com.subsidy.dto.renshe.*; -import com.subsidy.vo.renshe.RensheResponseVO; +import com.subsidy.vo.dudao.RensheResponseVO; import java.io.IOException; diff --git a/src/main/java/com/subsidy/service/MemberService.java b/src/main/java/com/subsidy/service/MemberService.java index 86df841..c3e3838 100644 --- a/src/main/java/com/subsidy/service/MemberService.java +++ b/src/main/java/com/subsidy/service/MemberService.java @@ -3,10 +3,8 @@ package com.subsidy.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.subsidy.dto.administer.VerifyCodeDTO; -import com.subsidy.dto.live.PolyvInfoDTO; import com.subsidy.dto.member.*; import com.subsidy.model.ExerciseDoneResultDO; -import com.subsidy.model.FileDictDO; import com.subsidy.model.MemberDO; import com.subsidy.vo.administer.UserRoleVO; import com.subsidy.vo.live.MemberLivesVO; @@ -59,12 +57,18 @@ public interface MemberService extends IService { ContentVodNewVO contentVod(ContentMemberDTO contentVodDTO); + SocialContentVodNewVO socialContentVod(ContentMemberDTO contentMemberDTO); + + CheckItemVO checkItem(CheckItemDTO checkItemDTO); + List contentFiles(ContentMemberDTO contentMemberDTO); IPage studyHistory(StudyHistoryDTO studyHistoryDTO); List getCourseTest(ContentMemberDTO contentMemberDTO); + List socialCourseTest(ContentMemberDTO contentMemberDTO); + List getPaperDoneDetail(ExerciseDoneResultDO exerciseDoneResultDO); GetStudyInfoVO getStudyInfo(MemberDO memberDO); diff --git a/src/main/java/com/subsidy/service/RenSheJuService.java b/src/main/java/com/subsidy/service/RenSheJuService.java index a21e4a8..4ef8f7d 100644 --- a/src/main/java/com/subsidy/service/RenSheJuService.java +++ b/src/main/java/com/subsidy/service/RenSheJuService.java @@ -26,4 +26,6 @@ public interface RenSheJuService { void test(); + RensheResponseVO post6plus() throws Exception ; + } diff --git a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java index f0686ef..9830552 100644 --- a/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.common.exception.HttpException; import com.subsidy.dto.administer.*; +import com.subsidy.dto.classDict.SocialTestDetailDTO; import com.subsidy.dto.member.ImportMemberDTO; import com.subsidy.mapper.*; import com.subsidy.model.*; @@ -14,6 +15,9 @@ import com.subsidy.util.*; import com.subsidy.util.excel.ExcelUtil; import com.subsidy.vo.administer.*; import com.subsidy.vo.classdict.ClassDetailVO; +import com.subsidy.vo.classdict.SocialTestDetailVO; +import com.subsidy.vo.classdict.SocialTestRecordVO; +import com.subsidy.vo.classdict.VodPassRateVO; import com.subsidy.vo.company.GetAllCompanyVO; import com.subsidy.vo.done.GetMaxScoreVO; import com.subsidy.vo.done.TestScoreInfoVO; @@ -93,9 +97,6 @@ public class AdministerServiceImpl extends ServiceImpl longs = new ArrayList(); + longs.add(0L); + longs.add(1L); + longs.add(3L); + AdministerDO administerDO1 = this.baseMapper.selectOne(new QueryWrapper() .lambda() .eq(AdministerDO::getAccountName, administerDO.getAccountName()) - .ne(AdministerDO::getRole, 2)); + .in(AdministerDO::getRole, longs)); if (null == administerDO1) { throw new HttpException(10012); } + if (0 == administerDO1.getRole()) { + + int count = serviceAdministerMappingMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ServiceAdministerMappingDO::getAdministerId, administerDO1.getId()) + .eq(ServiceAdministerMappingDO::getServiceId, 1)); + + if (count == 0) { + throw new HttpException(10029); + } + + } + if ("0".equals(administerDO1.getStatus())) { throw new HttpException(10013); } @@ -241,7 +263,7 @@ public class AdministerServiceImpl extends ServiceImpl() -// .lambda() -// .eq(RoleAdministerMappingDO::getAdministerId, administerDO.getId())); -// administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId()); - -// CompanyDictDO companyDictDO = companyDictMapper.selectById(administerDO.getCompanyId()); -// administerPermissionVO.setCompanyName(companyDictDO.getCompanyName()); -// administerPermissionVO.setShortName(companyDictDO.getShortName()); administerPermissionVO.setRole(administerDO.getRole()); /** @@ -881,6 +894,84 @@ public class AdministerServiceImpl extends ServiceImpl socialExerciseTest(ClassDetailDTO classDetailDTO) { + + Page pager = new Page(classDetailDTO.getPageNum(), classDetailDTO.getPageSize()); + + IPage exerciseTestVOIPage = this.baseMapper.exerciseTest(pager, classDetailDTO.getId(), classDetailDTO.getUserName()); + List classSignVOS = exerciseTestVOIPage.getRecords(); + + for (ExerciseTestVO exerciseTestVO : classSignVOS) { + //章通过率 + VodPassRateVO vodPassRateVO = this.baseMapper.vodPassRate(classDetailDTO.getId(), exerciseTestVO.getId()); + exerciseTestVO.setTtl(vodPassRateVO.getTtl()); + exerciseTestVO.setPs(vodPassRateVO.getPs()); + + //总评价 + if (vodPassRateVO.getTtl() == vodPassRateVO.getPs()) { + exerciseTestVO.setResult("合格"); + } else { + exerciseTestVO.setResult("不合格"); + } + } + exerciseTestVOIPage.setRecords(classSignVOS); + return exerciseTestVOIPage; + } + + public List socialTestDetail(SocialTestDetailDTO socialTestDetailDTO) { + return this.baseMapper.socialTestDetail(socialTestDetailDTO.getId(), socialTestDetailDTO.getMemberId()); + } + + public List socialTestRecord(SocialTestDetailDTO socialTestDetailDTO) { + return this.baseMapper.socialTestRecord(socialTestDetailDTO.getId(), socialTestDetailDTO.getMemberId()); + } + + public List exportSocialExerciseTest(ClassDetailDTO classDetailDTO) throws Exception { + + Page pager = new Page(0, -1L); + + IPage exerciseTestVOIPage = this.baseMapper.exerciseTest(pager, classDetailDTO.getId(), classDetailDTO.getUserName()); + List exerciseTestVOS = exerciseTestVOIPage.getRecords(); + + //课程详情 + ClassDictDO classDictDO = classDictMapper.selectById(classDetailDTO.getId()); + + List result = new ArrayList<>(); + + for (ExerciseTestVO exerciseTestVO : exerciseTestVOS) { + //遍历学生,查看每个人最好的一次成绩 + List socialTestDetailVOIPage = this.baseMapper.socialTestDetail(classDetailDTO.getId(), exerciseTestVO.getId()); + + MemberDO memberDO = memberMapper.selectById(exerciseTestVO.getId()); + + for (SocialTestDetailVO socialTestDetailVO : socialTestDetailVOIPage) { + ExportSocialExerciseTestVO exportSocialExerciseTestVO = new ExportSocialExerciseTestVO(); + exportSocialExerciseTestVO.setUserName(memberDO.getUserName()); + exportSocialExerciseTestVO.setIdCard(memberDO.getIdCard()); + exportSocialExerciseTestVO.setTelephone(memberDO.getTelephone()); + exportSocialExerciseTestVO.setVodName(socialTestDetailVO.getVodName()); + exportSocialExerciseTestVO.setStartDate(socialTestDetailVO.getStartDate()); + exportSocialExerciseTestVO.setEndDate(socialTestDetailVO.getCreateDate()); + exportSocialExerciseTestVO.setScore(socialTestDetailVO.getScore()); + exportSocialExerciseTestVO.setResult(socialTestDetailVO.getResult()); + result.add(exportSocialExerciseTestVO); + } + } + + if (classDetailDTO.getFlag()) { + CompanyDictDO companyDictDO = companyDictMapper.selectById(classDictDO.getCompanyId()); + String studyDate = classDictDO.getStartDate() + " 至 " + classDictDO.getEndDate(); + + if (null == companyDictDO.getCompanyName()) { + ExcelUtil.writeSocialTestExcel(null, studyDate, classDictDO.getClassName(), "测试成绩表", result, ExcelFormatUtils.socialScoreList); + } else { + ExcelUtil.writeSocialTestExcel(companyDictDO.getCompanyName(), studyDate, classDictDO.getClassName(), "测试成绩表", result, ExcelFormatUtils.socialScoreList); + } + } + + return result; + } + public List getMemberPapers(ExerciseDoneResultDO exerciseDoneResultDO) { return exerciseDoneResultMapper.queryExerciseDoneResult(exerciseDoneResultDO.getMemberId(), null, exerciseDoneResultDO.getPaperId()); } @@ -1359,32 +1450,48 @@ public class AdministerServiceImpl extends ServiceImpl paperDictDOS = paperDictMapper.selectList(new QueryWrapper() - .lambda() - .eq(PaperDictDO::getCourseId, classDictDO1.getCourseId())); + if (0 == classDictDO.getClassType()) { + /** + * 测试成绩 企业线上化导出 + */ + //查看这个班级的课程下有几个试卷 - for (int i = 0; i < paperDictDOS.size(); i++) { + //通过班级找课程 + ClassDictDO classDictDO1 = classDictMapper.selectById(classDetailDTO.getId()); + //通过课程id去找这个课程有几套卷子 + List paperDictDOS = paperDictMapper.selectList(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, classDictDO1.getCourseId())); + + for (int i = 0; i < paperDictDOS.size(); i++) { + ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); + classDetailDTO.setFlag(false); + classDetailDTO.setPaperId(paperDictDOS.get(i).getId()); + List exerciseTestVOS = exportExerciseTest(classDetailDTO); + if (null == companyDictDO) { + testListExcel(null, studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.scoreList, exerciseTestVOS, null, 0, baos2); + } else { + testListExcel(companyDictDO.getCompanyName(), studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.scoreList, exerciseTestVOS, null, 0, baos2); + } + compressFileToZipStream(zipOutputStream, baos2, "test" + i + ".xlsx"); + } + } else if (2 == classDictDO.getClassType()) { + /** + * 学徒制导出 + */ ByteArrayOutputStream baos2 = new ByteArrayOutputStream(); classDetailDTO.setFlag(false); - classDetailDTO.setPaperId(paperDictDOS.get(i).getId()); - List exerciseTestVOS = exportExerciseTest(classDetailDTO); + List exportSocialExerciseTestVOS = exportSocialExerciseTest(classDetailDTO); + if (null == companyDictDO) { - testListExcel(null, studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.scoreList, exerciseTestVOS, null, 0, baos2); + socialTestListExcel(null, studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.socialScoreList, exportSocialExerciseTestVOS, null, 0, baos2); } else { - testListExcel(companyDictDO.getCompanyName(), studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.scoreList, exerciseTestVOS, null, 0, baos2); + socialTestListExcel(companyDictDO.getCompanyName(), studyDate, classDictDO.getClassName(), "测试成绩表", ExcelFormatUtils.socialScoreList, exportSocialExerciseTestVOS, null, 0, baos2); } - compressFileToZipStream(zipOutputStream, baos2, "test" + i + ".xlsx"); + compressFileToZipStream(zipOutputStream, baos2, "test.xlsx"); } + /** * 答疑记录 */ @@ -2212,7 +2319,7 @@ public class AdministerServiceImpl extends ServiceImpl headerList, List exerciseTestVOS, String datePattern, int colWidth, OutputStream out) { + + // 声明一个工作薄 + SXSSFWorkbook workbook = new SXSSFWorkbook(1000);//缓存 + workbook.setCompressTempFiles(true); + //表头样式 + CellStyle titleStyle = workbook.createCellStyle(); + setStyle(titleStyle); + Font titleFont = workbook.createFont(); + titleFont.setFontHeightInPoints((short) 20); + titleFont.setBoldweight((short) 700); + titleStyle.setFont(titleFont); + + //第二行 + CellStyle secondStyle = workbook.createCellStyle(); + secondStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框 + secondStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框 + secondStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框 + secondStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框 + secondStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); + Font secondFont = workbook.createFont(); + secondStyle.setFont(secondFont); + + //第三行 + CellStyle thirdStyle = workbook.createCellStyle(); + thirdStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框 + thirdStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框 + thirdStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框 + thirdStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框 + secondStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); + Font thirdFont = workbook.createFont(); + thirdStyle.setFont(thirdFont); + + // 列头样式 + CellStyle headerStyle = workbook.createCellStyle(); + setStyle(headerStyle); + Font headerFont = workbook.createFont(); + headerFont.setFontHeightInPoints((short) 12); + headerFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);//粗体显示 + headerStyle.setFont(headerFont); + + // 数据单元格样式 + CellStyle cellStyle = workbook.createCellStyle(); + setStyle(cellStyle); + Font cellFont = workbook.createFont(); + cellFont.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL); + cellStyle.setFont(cellFont); + // 生成一个(带标题)表格 + SXSSFSheet sheet = workbook.createSheet(); + //设置列宽 + int minBytes = 17;//至少字节数 + int[] arrColWidth = new int[headerList.size()]; + // 产生表格标题行,以及设置列宽 + String[] headers = new String[headerList.size()]; + int ii = 0; + for (int i = 0; i < headerList.size(); i++) { + + headers[ii] = headerList.get(i); + + int bytes = headerList.get(i).getBytes().length; + arrColWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, arrColWidth[ii] * 256); + ii++; + } + + //第二行 + int[] secondWidth = new int[2]; + // 产生表格标题行,以及设置列宽 + String[] secondHead = new String[2]; + List secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate); + + //第三行 + int[] thirdWidth = new int[2]; + // 产生表格标题行,以及设置列宽 + String[] thirdHead = new String[2]; + List thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统"); + + + ii = 0; + for (int i = 0; i < 2; i++) { + secondHead[ii] = secondList.get(i); + int bytes = secondList.get(i).getBytes().length; + secondWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, secondWidth[ii] * 256); + ii++; + } + + ii = 0; + for (int i = 0; i < 2; i++) { + thirdHead[ii] = thirdList.get(i); + int bytes = thirdList.get(i).getBytes().length; + thirdWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, thirdWidth[ii] * 256); + ii++; + } + + // 遍历集合数据,产生数据行 + //标题 0 + SXSSFRow titleRow = sheet.createRow(0);//表头 rowIndex=0 + titleRow.createCell(0).setCellValue(title); + setBorderStyle(HSSFCellStyle.BORDER_THIN, new CellRangeAddress(0, 0, 0, 0), sheet, workbook); //给合并过的单元格加边框 + titleRow.getCell(0).setCellStyle(titleStyle); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, headerList.size() - 1)); + + //第二行 1 + SXSSFRow secondRow = sheet.createRow(1); //第二行 rowIndex =1 + CellRangeAddress cellRangeAddress21 = new CellRangeAddress(1, 1, 0, 3); + sheet.addMergedRegion(cellRangeAddress21); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框 + + CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 4, 8); + sheet.addMergedRegion(cellRangeAddress22); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框 + + secondRow.createCell(0).setCellValue(secondHead[0]); + secondRow.getCell(0).setCellStyle(secondStyle); + + secondRow.createCell(4).setCellValue(secondHead[1]); + secondRow.getCell(4).setCellStyle(secondStyle); + + //第三行 2 + SXSSFRow thirdRow = sheet.createRow(2); //第二行 rowIndex =1 + CellRangeAddress cellRangeAddress31 = new CellRangeAddress(2, 2, 0, 3); + sheet.addMergedRegion(cellRangeAddress31); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框 + + CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 8); + sheet.addMergedRegion(cellRangeAddress32); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框 + thirdRow.createCell(0).setCellValue(thirdHead[0]); + thirdRow.getCell(0).setCellStyle(thirdStyle); + + thirdRow.createCell(4).setCellValue(thirdHead[1]); + thirdRow.getCell(4).setCellStyle(thirdStyle); + + //标题 3 + SXSSFRow headerRow = sheet.createRow(3); //列头 rowIndex =1 + for (int i = 0; i < headers.length; i++) { + headerRow.createCell(i).setCellValue(headers[i]); + headerRow.getCell(i).setCellStyle(headerStyle); + } + + int seq = 1; + + //内容 + int rowIndex = 0; + for (ExportSocialExerciseTestVO exerciseTestVO : exerciseTestVOS) { + if (rowIndex == 65535 || rowIndex == 0) { + if (rowIndex != 0) { + sheet = workbook.createSheet();//如果数据超过了,则在第二页显示 + } + rowIndex = 4;//数据内容从 rowIndex=2开始 + } + + SXSSFRow dataRow = sheet.createRow(rowIndex); + + SXSSFCell newCell = dataRow.createCell(0); + cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(seq); + + + newCell = dataRow.createCell(1); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exerciseTestVO.getUserName()); + + + newCell = dataRow.createCell(2); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exerciseTestVO.getIdCard()); + + + newCell = dataRow.createCell(3); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exerciseTestVO.getTelephone()); + + newCell = dataRow.createCell(4); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exerciseTestVO.getVodName()); + + newCell = dataRow.createCell(5); + newCell.setCellStyle(cellStyle); + if (null != exerciseTestVO.getScore()){ + newCell.setCellValue(exerciseTestVO.getScore()); + } + + //开始时间 + newCell = dataRow.createCell(6); + newCell.setCellStyle(cellStyle); + if (null != exerciseTestVO.getScore()){ + newCell.setCellValue(exerciseTestVO.getStartDate()); + } + + //结束时间 + newCell = dataRow.createCell(7); + newCell.setCellStyle(cellStyle); + if (null != exerciseTestVO.getScore()){ + newCell.setCellValue(exerciseTestVO.getEndDate()); + } + + newCell = dataRow.createCell(8); + newCell.setCellStyle(cellStyle); + if (null != exerciseTestVO.getScore() && exerciseTestVO.getScore()>=60){ + newCell.setCellValue("合格"); + }else { + newCell.setCellValue("不合格"); + } + + rowIndex++; + seq++; + + } + try { + workbook.write(out); + workbook.close(); + workbook.dispose(); + } catch (IOException e) { + e.printStackTrace(); + } + } + public static void askListExcel(String companyName, String studyDate, String courseName, String title, List headerList, List answerRecordVOS, String datePattern, int colWidth, OutputStream out) { // 声明一个工作薄 SXSSFWorkbook workbook = new SXSSFWorkbook(1000);//缓存 diff --git a/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java index a61cc1a..0a755a5 100644 --- a/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ClassDictServiceImpl.java @@ -11,17 +11,9 @@ import com.subsidy.dto.classDict.AddClassDTO; import com.subsidy.dto.classDict.AddMemberToClassDTO; import com.subsidy.dto.classDict.GetClassBaseInfoDTO; import com.subsidy.dto.classDict.GetSpareMembersDTO; -import com.subsidy.dto.member.ImportMemberDTO; import com.subsidy.jobs.CourseNotificationJob; import com.subsidy.mapper.*; -import com.subsidy.model.AnsweringQuestionDO; -import com.subsidy.model.ClassDictDO; -import com.subsidy.model.ClassMemberMappingDO; -import com.subsidy.model.ClassNoticeDO; -import com.subsidy.model.CompanyDictDO; -import com.subsidy.model.CourseDictDO; -import com.subsidy.model.MemberDO; -import com.subsidy.model.VodDictDO; +import com.subsidy.model.*; import com.subsidy.service.ClassDictService; import com.subsidy.util.ConstantUtils; import com.subsidy.util.DateFormatUtil; @@ -29,14 +21,12 @@ import com.subsidy.util.QuartzUtil; import com.subsidy.util.SMSUtils; import com.subsidy.util.excel.ExcelUtil; import com.subsidy.util.websocket.WebSocketUtil; -import com.subsidy.vo.classdict.ClassSettingsVO; -import com.subsidy.vo.classdict.GetAllClassesVO; -import com.subsidy.vo.classdict.GetClassBaseInfoVO; -import com.subsidy.vo.classdict.SystemSettings; +import com.subsidy.vo.classdict.*; import com.subsidy.vo.member.DownloadFailClassMembers; import com.subsidy.vo.member.DownloadFailClassMembersDTO; -import com.subsidy.vo.member.ImportClassMemberDTO; +import com.subsidy.dto.member.ImportClassMemberDTO; import com.subsidy.vo.member.ImportClassMembersVO; +import com.subsidy.vo.vod.VodInfoVO; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -49,6 +39,7 @@ import org.springframework.web.socket.WebSocketSession; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; +import java.util.concurrent.ConcurrentHashMap; /** *

@@ -88,10 +79,13 @@ public class ClassDictServiceImpl extends ServiceImpl getAllClasses(ClassDictDO classDictDO) throws Exception { DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); - List getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO); + List getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO.getCompanyId(),classDictDO.getClassName(),classDictDO.getStartDate(),classDictDO.getEndDate(),classDictDO.getOpenStatus(),classDictDO.getClassType()); for (GetAllClassesVO getAllClassesVO : getAllClassesVOS) { Calendar calendar = Calendar.getInstance(); calendar.setTime(fmt.parse(getAllClassesVO.getEndDate())); @@ -99,9 +93,9 @@ public class ClassDictServiceImpl extends ServiceImpl vodIds = addClassDTO.getVodIds(); + if (null != vodIds && vodIds.size() > 0) { + for (Long vodId : vodIds) { + ClassVodFaceCheckDO classVodFaceCheckDO = new ClassVodFaceCheckDO(); + classVodFaceCheckDO.setClassId(classDictDO.getId()); + classVodFaceCheckDO.setVodId(vodId); + classVodFaceCheckMapper.insert(classVodFaceCheckDO); + } + } + //添加通知 if (null != addClassDTO.getClassNoticeDOS()) { List classNoticeDOS = addClassDTO.getClassNoticeDOS(); @@ -158,9 +163,45 @@ public class ClassDictServiceImpl extends ServiceImpl vodIds = addClassDTO.getVodIds(); + if (null != vodIds && vodIds.size() > 0) { + + // + List oldIds = classVodFaceCheckMapper.faceVodIds(addClassDTO.getId()); + List newIds = addClassDTO.getVodIds(); + + List newVodIds = new ArrayList<>(); + for (Long lg : newIds) { + newVodIds.add(lg); + } + + newIds.removeAll(oldIds); // + if (newIds.size() > 0) { + for (Long lg : newIds) { + ClassVodFaceCheckDO classVodFaceCheckDO = new ClassVodFaceCheckDO(); + classVodFaceCheckDO.setVodId(lg); + classVodFaceCheckDO.setClassId(addClassDTO.getId()); + classVodFaceCheckMapper.insert(classVodFaceCheckDO); + } + } + + oldIds.removeAll(newVodIds); + if (oldIds.size() > 0) { + for (Long lg : oldIds) { + classVodFaceCheckMapper.delete(new QueryWrapper() + .lambda() + .eq(ClassVodFaceCheckDO::getClassId, addClassDTO.getId()) + .eq(ClassVodFaceCheckDO::getVodId, lg)); + } + } + } + //班级所在公司 SystemSettings systemSettings = this.baseMapper.getCompanySettings(classDictDO.getId()); @@ -177,6 +218,11 @@ public class ClassDictServiceImpl extends ServiceImpl webSocketMap = WebSocketUtil.webSocketMap; +// for (Map.Entry entry : webSocketMap.entrySet()) { +// webSocketMap.get(entry.getKey()).sendMessage(new TextMessage(data)); +// } } catch (Exception e) { e.printStackTrace(); } @@ -186,8 +232,18 @@ public class ClassDictServiceImpl extends ServiceImpl longs = classVodFaceCheckMapper.faceVodIds(classDictDO.getId()); + classDetail.setVodIds(longs); + + return classDetail; } public String removeMember(ClassMemberMappingDO classMemberMappingDO) { @@ -302,7 +358,6 @@ public class ClassDictServiceImpl extends ServiceImpl classVods(ClassDictDO classDictDO) { + return this.baseMapper.classVods(classDictDO.getId()); + } } diff --git a/src/main/java/com/subsidy/service/impl/ClassTypeDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/ClassTypeDictServiceImpl.java index 16c71e9..c8a4377 100644 --- a/src/main/java/com/subsidy/service/impl/ClassTypeDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ClassTypeDictServiceImpl.java @@ -1,6 +1,7 @@ package com.subsidy.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.subsidy.common.exception.HttpException; import com.subsidy.dto.classDict.ClassTypeDTO; import com.subsidy.mapper.RoleAdministerMappingMapper; import com.subsidy.model.ClassDictDO; @@ -32,11 +33,33 @@ public class ClassTypeDictServiceImpl extends ServiceImpl() + .lambda() + .eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId()) + .eq(ClassTypeDictDO::getClassType, classTypeDictDO.getClassType())); + + if (count > 0) { + throw new HttpException(40002); + } + this.baseMapper.insert(classTypeDictDO); return ConstantUtils.ADD_SUCCESS; } public String updateClassType(ClassTypeDictDO classTypeDictDO) { + + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId()) + .eq(ClassTypeDictDO::getClassType, classTypeDictDO.getClassType()) + .ne(ClassTypeDictDO::getId, classTypeDictDO.getId())); + + if (count > 0) { + throw new HttpException(40002); + } + + this.baseMapper.updateById(classTypeDictDO); return ConstantUtils.SET_SUCCESS; } @@ -53,10 +76,10 @@ public class ClassTypeDictServiceImpl extends ServiceImpl() .lambda() - .eq(RoleAdministerMappingDO::getAdministerId,classTypeDTO.getUserId()) - .eq(RoleAdministerMappingDO::getRoleId,1)); + .eq(RoleAdministerMappingDO::getAdministerId, classTypeDTO.getUserId()) + .eq(RoleAdministerMappingDO::getRoleId, 1)); - if (count>0){ + if (count > 0) { //平台支持 ClassTypeDictDO classTypeDictDO = this.baseMapper.selectById(1); classTypeDictDOS.add(classTypeDictDO); @@ -65,10 +88,24 @@ public class ClassTypeDictServiceImpl extends ServiceImpl classTypeDictDOList = this.baseMapper.selectList(new QueryWrapper() .lambda() - .eq(ClassTypeDictDO::getCompanyId,classTypeDTO.getCompanyId())); + .eq(ClassTypeDictDO::getCompanyId, classTypeDTO.getCompanyId())); - classTypeDictDOS.addAll(classTypeDictDOList); + classTypeDictDOS.addAll(classTypeDictDOList); return classTypeDictDOS; } + public List queryOnlineClassTypes(ClassTypeDictDO classTypeDictDO) { + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId()) + .ne(ClassTypeDictDO::getClassType, "社会化、学徒制")); + } + + public ClassTypeDictDO querySocialClassTypes(ClassTypeDictDO classTypeDictDO) { + return this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId()) + .eq(ClassTypeDictDO::getClassType, "社会化、学徒制")); + } + } diff --git a/src/main/java/com/subsidy/service/impl/ClassVodFaceCheckServiceImpl.java b/src/main/java/com/subsidy/service/impl/ClassVodFaceCheckServiceImpl.java new file mode 100644 index 0000000..2d9a7a3 --- /dev/null +++ b/src/main/java/com/subsidy/service/impl/ClassVodFaceCheckServiceImpl.java @@ -0,0 +1,20 @@ +package com.subsidy.service.impl; + +import com.subsidy.model.ClassVodFaceCheckDO; +import com.subsidy.mapper.ClassVodFaceCheckMapper; +import com.subsidy.service.ClassVodFaceCheckService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 百分比认证视频表 服务实现类 + *

+ * + * @author Tuyp + * @since 2024-03-18 + */ +@Service +public class ClassVodFaceCheckServiceImpl extends ServiceImpl implements ClassVodFaceCheckService { + +} diff --git a/src/main/java/com/subsidy/service/impl/ContentVodMappingServiceImpl.java b/src/main/java/com/subsidy/service/impl/ContentVodMappingServiceImpl.java index e381d25..ae495b2 100644 --- a/src/main/java/com/subsidy/service/impl/ContentVodMappingServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ContentVodMappingServiceImpl.java @@ -6,9 +6,8 @@ import com.subsidy.dto.content.GetContendVodsDTO; import com.subsidy.dto.contentVod.AddContentVodDTO; import com.subsidy.dto.contentVod.ContentVodDTO; import com.subsidy.dto.vod.ChangeOrdersDTO; -import com.subsidy.mapper.VodDictMapper; -import com.subsidy.model.ContentVodMappingDO; -import com.subsidy.mapper.ContentVodMappingMapper; +import com.subsidy.mapper.*; +import com.subsidy.model.*; import com.subsidy.service.ContentVodMappingService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.vo.vod.GetContendVodsVO; @@ -16,6 +15,8 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -33,6 +34,12 @@ public class ContentVodMappingServiceImpl extends ServiceImpl getContendVods(GetContendVodsDTO getContendVodsDTO) { List contendVods = vodDictMapper.getContendVods(getContendVodsDTO.getVodName(), getContendVodsDTO.getContentId()); @@ -40,15 +47,15 @@ public class ContentVodMappingServiceImpl extends ServiceImpl().lambda() .eq(ContentVodMappingDO::getContentId, changeOrdersDTO.getContentId()) .eq(ContentVodMappingDO::getVodId, changeOrdersDTO.getVodIds().get(i))); ContentVodMappingDO contentVodMapping = new ContentVodMappingDO(); contentVodMapping.setId(contentVodMappingDO.getId()); - contentVodMapping.setOrderNo(i+1); + contentVodMapping.setOrderNo(i + 1); this.baseMapper.updateById(contentVodMapping); } } @@ -60,20 +67,24 @@ public class ContentVodMappingServiceImpl extends ServiceImpl() + .lambda() + .eq(PaperDictDO::getVodId, contentVodDTO.getVodId())); + this.baseMapper.deleteById(contentVodMappingDO.getId()); } @Override public void addContentVod(AddContentVodDTO addContentVod) { - if(CollectionUtils.isNotEmpty(addContentVod.getVodIds())) { + if (CollectionUtils.isNotEmpty(addContentVod.getVodIds())) { List list = this.baseMapper.selectList(new QueryWrapper() .lambda() .eq(ContentVodMappingDO::getContentId, addContentVod.getContentId())); - if(CollectionUtils.isNotEmpty(list)) { + if (CollectionUtils.isNotEmpty(list)) { this.baseMapper.deleteBatchIds(list.stream().map(ContentVodMappingDO::getId).collect(Collectors.toList())); } @@ -82,24 +93,68 @@ public class ContentVodMappingServiceImpl extends ServiceImpl().lambda() + ContentVodMappingDO cvm = this.baseMapper.selectOne(new QueryWrapper().lambda() .eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId()) .eq(ContentVodMappingDO::getContentId, addContentVod.getContentId())); - if(cvm == null) { + if (cvm == null) { ContentVodMappingDO contentVodMappingDO = new ContentVodMappingDO(); contentVodMappingDO.setContentId(addContentVod.getContentId()); contentVodMappingDO.setVodId(contentVodDTO.getVodId()); contentVodMappingDO.setVodAliasName(contentVodDTO.getVodAliasName()); - contentVodMappingDO.setOrderNo(++ orderNo); + contentVodMappingDO.setOrderNo(++orderNo); this.baseMapper.insert(contentVodMappingDO); } } } + + //查看该章节的课程是社会化还是学徒制 + CourseDictDO courseDictDO = this.baseMapper.getCourseByContentId(addContentVod.getContentId()); + + if (1 == courseDictDO.getCourseDataType()) { + + //找到之前存在的卷子的视频ids + List oldVodIds = this.baseMapper.oldVodIds(addContentVod.getContentId()); + + //新视频的ids + List contentVodDTOS = addContentVod.getVodIds(); + List newIds = new ArrayList<>(); + HashMap hashMap = new HashMap<>(); + for (ContentVodDTO contentVodDTO : contentVodDTOS) { + newIds.add(contentVodDTO.getVodId()); + hashMap.put(contentVodDTO.getVodId(),contentVodDTO.getVodAliasName()); + } + + List newIds2 = new ArrayList<>(); + for (Long lg : newIds) { + newIds2.add(lg); + } + + newIds.removeAll(oldVodIds); // + if (newIds.size() > 0) { + for (Long lg : newIds) { + PaperDictDO paperDictDO = new PaperDictDO(); + paperDictDO.setCourseId(courseDictDO.getId()); + paperDictDO.setPaperName(hashMap.get(lg)); + paperDictDO.setPaperStatus(1); + paperDictDO.setVodId(lg); + paperDictMapper.insert(paperDictDO); + } + } + + oldVodIds.removeAll(newIds2); // + if (oldVodIds.size() > 0) { + paperDictMapper.delete(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, courseDictDO.getId()) + .in(PaperDictDO::getVodId, oldVodIds)); + } + } + } @Override @@ -108,7 +163,7 @@ public class ContentVodMappingServiceImpl extends ServiceImpl fieldDictDOS = addCourseDTO.getFieldDictDOS(); for (Long lg : fieldDictDOS) { @@ -144,7 +143,6 @@ public class CourseDictServiceImpl extends ServiceImpl businessId = addCourseDTO.getBusinessIds(); @@ -187,7 +185,7 @@ public class CourseDictServiceImpl extends ServiceImpl queryCourses(QueryCoursesDTO queryCoursesDTO) { Page pager = new Page(queryCoursesDTO.getPageNum(), queryCoursesDTO.getPageSize()); - IPage iPage = this.baseMapper.queryCourses(pager, queryCoursesDTO.getCourseName(), queryCoursesDTO.getFieldId(), queryCoursesDTO.getCategoryId(), queryCoursesDTO.getJobId(), queryCoursesDTO.getRankId(), queryCoursesDTO.getCourseType(), null, queryCoursesDTO.getOpenStatus(), queryCoursesDTO.getBusinessId()); + IPage iPage = this.baseMapper.queryCourses(pager, queryCoursesDTO.getCourseName(), queryCoursesDTO.getFieldId(), queryCoursesDTO.getCategoryId(), queryCoursesDTO.getJobId(), queryCoursesDTO.getRankId(), queryCoursesDTO.getCourseType(), null, queryCoursesDTO.getOpenStatus(), queryCoursesDTO.getBusinessId(),queryCoursesDTO.getCourseDataType()); List queryCoursesVOS = iPage.getRecords(); for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) { @@ -243,8 +241,14 @@ public class CourseDictServiceImpl extends ServiceImpl iPage = this.baseMapper.queryCourses(pager, queryCoursesDTO.getCourseName(), null, queryCoursesDTO.getCategoryId(), queryCoursesDTO.getJobId(), queryCoursesDTO.getRankId(), null, queryCoursesDTO.getCompanyId(), queryCoursesDTO.getOpenStatus(), - queryCoursesDTO.getBusinessId()); + queryCoursesDTO.getBusinessId(),queryCoursesDTO.getCourseDataType()); List queryCoursesVOS = iPage.getRecords(); for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) { @@ -388,7 +392,6 @@ public class CourseDictServiceImpl extends ServiceImpl businessScopeDictDOS = businessScopeDictMapper.getBusinessScope(queryCoursesVO.getId()); List businessVOS = new ArrayList<>(); @@ -410,9 +413,14 @@ public class CourseDictServiceImpl extends ServiceImpl imageClassIds = dudaoMapper.imageClassIds("0"); Set classIds = new HashSet<>(); +// classIds.add(424L); vodClassIds.stream().forEach(x->classIds.add(x)); examClassIds.stream().forEach(x->classIds.add(x)); @@ -100,11 +97,11 @@ public class DudaoServiceImpl implements DudaoService { //班级基本信息 ClassBaseInfoVO classBaseInfoVO = dudaoMapper.classBaseInfo(classId); BeanUtils.copyProperties(classBaseInfoVO, epidemicSituationClassBasic); - epidemicSituationClassBasic.setClassCode(classBaseInfoVO.getDownCode()); + epidemicSituationClassBasic.setDownCode(classBaseInfoVO.getDownCode()); //章节 List chapterLists = dudaoMapper.classChapters(classId); - ChapterList2 chapterList2 = chapterLists.get(chapterLists.size() - 1); + com.subsidy.dto.dudao.ChapterList2 chapterList2 = chapterLists.get(chapterLists.size() - 1); chapterList2.setIsExam(1); epidemicSituationClassBasic.setChapterList(chapterLists); @@ -178,6 +175,9 @@ public class DudaoServiceImpl implements DudaoService { //产生视频学习数据的班级 List vodClassIds = dudaoMapper.vodClassIds("0"); +// List vodClassIds = new ArrayList<>(); +// vodClassIds.add(424L); + List result = new ArrayList<>(); for (Long classId : vodClassIds){ @@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService { for (DailyStudyInfoVO dailyStudyInfoVO : result) { ClassHourBasic classHourBasic = new ClassHourBasic(); BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic); - classHourBasic.setClassCode(dailyStudyInfoVO.getClassCode()); + classHourBasic.setDownCode(String.valueOf(dailyStudyInfoVO.getClassId())); //上线时间列表 //找到当天每次上线下线时间 @@ -306,6 +306,9 @@ public class DudaoServiceImpl implements DudaoService { //找出前一天产生考试数据的班级 List classIds = dudaoMapper.dailyExamBasic("0"); +// ListclassIds = new ArrayList<>(); +// classIds.add(424L); + try { if (classIds.size() > 0) { for (Long classId : classIds) { @@ -319,7 +322,7 @@ public class DudaoServiceImpl implements DudaoService { //章节课程考试时间列表 ChapterExamBasic chapterExamBasic = new ChapterExamBasic(); - chapterExamBasic.setClassCode(classDictDO.getClassCode()); + chapterExamBasic.setDownCode(String.valueOf(classDictDO.getId())); //最后一节课作为chapterCode String vodId = dudaoMapper.classVodName(classId); @@ -358,7 +361,7 @@ public class DudaoServiceImpl implements DudaoService { //下线时间 List loginOutRecords = dudaoMapper.loginOutRecords(memberDO.getId()); -// boolean flag = false; + boolean flag = false; for (int i = 0; i < loginRecords.size(); i++) { //找到该时间段内的测评 @@ -368,17 +371,17 @@ public class DudaoServiceImpl implements DudaoService { examList.setStartTime(Timestamp.valueOf(exerciseDoneResultDO.getStartDate()).getTime()); examList.setEndTime(Timestamp.valueOf(exerciseDoneResultDO.getCreateDate()).getTime()); examList.setIp(loginRecords.get(i).getIpAddress()); -// if ("合格".equals(exerciseDoneResultDO.getResult())) { -// flag = true; -// } + if ("合格".equals(exerciseDoneResultDO.getResult())) { + flag = true; + } examLists.add(examList); } } -// if (flag == true) { -// chapterExamBasic.setAccess(0L); -// } else { -// chapterExamBasic.setAccess(1L); -// } + if (flag == true) { + chapterExamBasic.setAccess(0L); + } else { + chapterExamBasic.setAccess(1L); + } chapterExamBasic.setExamList(examLists); chapterExamBasics.add(chapterExamBasic); } @@ -423,6 +426,7 @@ public class DudaoServiceImpl implements DudaoService { return null; } } catch (Exception e) { + e.printStackTrace(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); renshejuHistoryDO.setInterfaceName(DudaoConstant.POST_3); renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString()); @@ -473,7 +477,7 @@ public class DudaoServiceImpl implements DudaoService { AnswerBasic answerBasic = new AnswerBasic(); String downCode = key.split(":")[0]; String identity = key.split(":")[1]; - answerBasic.setClassCode(downCode); + answerBasic.setDownCode(downCode); answerBasic.setIdentity(identity); answerBasic.setAnswerAndQuestionList(hashMap.get(key)); answerBasics.add(answerBasic); diff --git a/src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java index 5265494..aebf3ec 100644 --- a/src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ExerciseDictServiceImpl.java @@ -10,9 +10,7 @@ import com.subsidy.dto.exercise.JudgeDTO; import com.subsidy.dto.exercise.SelectDTO; import com.subsidy.dto.exercise.SubmitDTO; import com.subsidy.dto.member.ImportMemberDTO; -import com.subsidy.mapper.ExerciseDictMapper; -import com.subsidy.mapper.ExerciseDoneHistoryMapper; -import com.subsidy.mapper.ExerciseDoneResultMapper; +import com.subsidy.mapper.*; import com.subsidy.model.*; import com.subsidy.service.ExerciseDictService; import com.subsidy.util.ConstantUtils; @@ -55,6 +53,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl() - .lambda() - .eq(ExerciseDoneResultDO::getMemberId,submitDTO.getMemberId()) - .eq(ExerciseDoneResultDO::getClassId,submitDTO.getClassId()) - .eq(ExerciseDoneResultDO::getPaperId,submitDTO.getPaperId()) - .eq(ExerciseDoneResultDO::getStartDate,submitDTO.getStartDate())); + .lambda() + .eq(ExerciseDoneResultDO::getMemberId, submitDTO.getMemberId()) + .eq(ExerciseDoneResultDO::getClassId, submitDTO.getClassId()) + .eq(ExerciseDoneResultDO::getPaperId, submitDTO.getPaperId()) + .eq(ExerciseDoneResultDO::getStartDate, submitDTO.getStartDate())); - if (count == 0){ + if (count == 0) { try { Date startDate = startDateFormat1.parse(submitDTO.getStartDate()); - if (new Date().getTime() - startDate.getTime() < 180 * 1000L) { + if (2== classDictDO.getClassType() && null != classDictDO.getPaperTime() && null != classDictDO.getPaperTimeLimit() && 1 == classDictDO.getPaperTime() && new Date().getTime() - startDate.getTime() < classDictDO.getPaperTimeLimit() * 60 * 1000L) { throw new HttpException(20003); } - } catch (ParseException e) { + if (1 == classDictDO.getClassType() && null != classDictDO.getPaperTime() && null != classDictDO.getPaperTimeLimit() && 1 == classDictDO.getPaperTime() && new Date().getTime() - startDate.getTime() < classDictDO.getPaperTimeLimit() * 60 * 1000L) { + throw new HttpException(20003); + } + + if (0 == classDictDO.getClassType() && new Date().getTime() - startDate.getTime() < 3 * 60 * 1000L) { + throw new HttpException(20003); + } + + } catch (ParseException e) { + e.printStackTrace(); } int rightCounts = 0; @@ -146,6 +165,27 @@ public class ExerciseDictServiceImpl extends ServiceImpl() + .lambda() + .eq(ClassMemberMappingDO::getMemberId, submitDTO.getMemberId()) + .eq(ClassMemberMappingDO::getClassId, submitDTO.getClassId())); + classMemberMappingDO.setSubmitFlag(1); + classMemberMappingMapper.updateById(classMemberMappingDO); + } else if (2 == classDictDO.getClassType() || 1 == classDictDO.getClassType()) { + List paperIds = paperDictMapper.lastPaper(classDictDO.getCourseId()); + if (submitDTO.getPaperId() .equals( paperIds.get(0))){ + //企业线上化 只要提交过,就将状态置为1,之后视频数据不在写入 + ClassMemberMappingDO classMemberMappingDO = classMemberMappingMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ClassMemberMappingDO::getMemberId, submitDTO.getMemberId()) + .eq(ClassMemberMappingDO::getClassId, submitDTO.getClassId())); + classMemberMappingDO.setSubmitFlag(1); + classMemberMappingMapper.updateById(classMemberMappingDO); + } + } return exerciseDoneResultDO.getId(); } @@ -154,12 +194,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl { ExerciseDictDO exerciseDictDO = new ExerciseDictDO(); - exerciseDictDO.setTitle("

"+s.getTitle()+"

"); + exerciseDictDO.setTitle("

" + s.getTitle() + "

"); exerciseDictDO.setRightAnswer(s.getAnswer()); exerciseDictDO.setExerciseType(s.getExerciseType()); exerciseDictDO.setDifficulty("适中"); @@ -175,12 +215,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl { ExerciseDictDO exerciseDictDO = new ExerciseDictDO(); - exerciseDictDO.setTitle("

"+s.getTitle()+"

"); + exerciseDictDO.setTitle("

" + s.getTitle() + "

"); exerciseDictDO.setOrderNo(s.getId()); exerciseDictDO.setExerciseType(s.getExerciseType()); //选项 @@ -192,16 +232,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl").append(s.getAnswerD()).append("

\",\"value\":\"D\"}]"); exerciseDictDO.setItems(items.toString()); - if ("单选题".equals(s.getExerciseType())){ + if ("单选题".equals(s.getExerciseType())) { exerciseDictDO.setRightAnswer(s.getRightAnswer()); - }else { + } else { String[] answers = s.getRightAnswer().split(","); StringBuffer answer = new StringBuffer(); answer.append("["); int i = 0; - for (String split : answers){ + for (String split : answers) { answer.append("\"").append(split).append("\""); - if(i!=answers.length-1){ + if (i != answers.length - 1) { answer.append(","); } i++; diff --git a/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java b/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java index bd733dc..1db5358 100644 --- a/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java @@ -71,19 +71,19 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl() .lambda() .eq(ActivityDetectionDO::getFaceCheckId,imageCheckRecordDO.getId())); @@ -328,12 +325,8 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl imple @Autowired private CompanyMemberMappingMapper companyMemberMappingMapper; + @Autowired + private ExerciseDictMapper exerciseDictMapper; + public IPage getAll(GetAllDTO getAllDTO) { Page pager = new Page(getAllDTO.getPageNum(), getAllDTO.getPageSize()); @@ -807,7 +806,7 @@ public class MemberServiceImpl extends ServiceImpl imple if (i == 0 && contentStatus) { //第一个视频默认打开 memberVodVO.setStatus(true); - } else if (memberVodVO.getPercent().equals("100")) { + } else if (100 == memberVodVO.getPercent()) { //这个视频看完了,已解锁 memberVodVO.setStatus(true); } else { @@ -853,6 +852,240 @@ public class MemberServiceImpl extends ServiceImpl imple return contentVodNewVO; } + + public SocialContentVodNewVO socialContentVod(ContentMemberDTO contentMemberDTO) { + + SocialContentVodNewVO socialContentVodNewVO = new SocialContentVodNewVO(); + + //课程详细信息 + ClassDictDO classDictDO = classDictMapper.selectById(contentMemberDTO.getClassId()); + socialContentVodNewVO.setIsFastPlay(classDictDO.getIsFastPlay()); + socialContentVodNewVO.setIsOrder(classDictDO.getIsOrder()); + socialContentVodNewVO.setTestRule(classDictDO.getTestRule()); + + List socialContentVodVOS = new ArrayList<>(); + + //查看所有的content 目录 + List courseContentDOS = courseContentMapper.selectList(new QueryWrapper() + .lambda() + .eq(CourseContentDO::getCourseId, contentMemberDTO.getCourseId()) + .orderByAsc(CourseContentDO::getOrderNo)); + + ClassDictDO classDictDO1 = classDictMapper.selectById(contentMemberDTO.getClassId()); + + //查看这个课程所有考试 + List paperDictDOS = paperDictMapper.selectList(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId())); + + /** + * 视频id paperId + */ + HashMap hashMap = new HashMap<>(); + for (PaperDictDO paperDictDO : paperDictDOS) { + hashMap.put(paperDictDO.getVodId(), paperDictDO.getId()); + } + + int i = 0; + //遍历目录 + for (CourseContentDO courseContentDO : courseContentDOS) { + SocialContentVodVO socialContentVodVO = new SocialContentVodVO(); + socialContentVodVO.setContent(courseContentDO.getContent()); + + List memberVodVOS = courseContentMapper.contentVodProcess(courseContentDO.getId(), contentMemberDTO.getMemberId(), contentMemberDTO.getClassId()); + + //视频状态 + Boolean vodFlag = true; + int playCount = 0; + + //题目状态 + Boolean testFlag = true; + List socialVodTestVOS = new ArrayList<>(); + + if (1 == classDictDO1.getIsOrder()) { + for (MemberVodVO memberVodVO : memberVodVOS) { + + //视频+1 + SocialVodTestVO vodVo = new SocialVodTestVO(); + vodVo.setId(memberVodVO.getId()); + vodVo.setItemName(memberVodVO.getVodName()); + vodVo.setPercent(memberVodVO.getPercent()); + vodVo.setVodUrl(memberVodVO.getVodUrl()); + vodVo.setLeftLength(memberVodVO.getLeftLength()); + vodVo.setPlayRecord(memberVodVO.getPlayRecord()); + vodVo.setId(memberVodVO.getId()); + vodVo.setVodLength(memberVodVO.getVodLength()); + //这个视频的人脸有没有做 + int vodFaceCheck = activityDetectionMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ActivityDetectionDO::getVodId,memberVodVO.getId()) + .eq(ActivityDetectionDO::getMemberId,contentMemberDTO.getMemberId()) + .eq(ActivityDetectionDO::getClassId,contentMemberDTO.getClassId()) + .eq(ActivityDetectionDO::getStatus,1)); + if (vodFaceCheck > 0){ + vodVo.setVodFaceCheckFlag(true); + }else { + vodVo.setVodFaceCheckFlag(false); + } + + //当前视频有没有做过活跃度检测 + Integer count = activityDetectionMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ActivityDetectionDO::getVodId, memberVodVO.getId()) + .eq(ActivityDetectionDO::getMemberId, contentMemberDTO.getMemberId()) + .eq(ActivityDetectionDO::getClassId, contentMemberDTO.getClassId()) + .eq(ActivityDetectionDO::getStatus, 1)); + + if (count > 0) { + vodVo.setActivityStatus(true); + } else { + vodVo.setActivityStatus(false); + } + + if (i == 0 && vodFlag) { + vodVo.setStatus(true); + } else if(memberVodVO.getPercent().equals("100")|| testFlag) { + //这个视频看完了,已解锁 + vodVo.setStatus(true); + } else { + vodVo.setStatus(false); + vodFlag = false; + } + //视频+1 + vodVo.setItemType(0); + socialVodTestVOS.add(vodVo); + + SocialVodTestVO testVO = new SocialVodTestVO(); + //查看该视频对应的试卷名 并赋值 + PaperDictDO paperDictDO = paperDictMapper.selectOne(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId()) + .eq(PaperDictDO::getVodId, memberVodVO.getId())); + testVO.setId(paperDictDO.getId()); + testVO.setItemName(paperDictDO.getPaperName()); + testVO.setItemType(1); + testVO.setId(paperDictDO.getId()); + if (vodFlag && 100 == memberVodVO.getPercent()) { + //视频全部看完 + playCount++; + //计算最好成绩 memberId,classId,vodId + MemberMaxScoreVO memberMaxScoreVO = paperDictMapper.memberMaxScore(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), memberVodVO.getId()); + if (null == memberMaxScoreVO) { + testVO.setTestStatus("待完成"); + testVO.setStatus(false); + testFlag = false; + } else { + testVO.setRightCount(memberMaxScoreVO.getRightCounts()); + testVO.setTotalCount(memberMaxScoreVO.getTotalCounts()); + if ("合格".equals(memberMaxScoreVO.getResult())) { + testVO.setTestStatus("通过"); + testVO.setStatus(true); + testFlag = true; + } else { + testVO.setTestStatus("未通过"); + testVO.setStatus(false); + testFlag = false; + } + } + } else { + //视频看完后才可以做题 + testVO.setTestStatus("待解锁"); + testVO.setStatus(false); + testFlag = false; + } + socialVodTestVOS.add(testVO); + i++; + } + } else { + //课程不需要按照顺序播放 ,全部是解锁标识 + for (MemberVodVO memberVodVO : memberVodVOS) { + SocialVodTestVO vodVO = new SocialVodTestVO(); + vodVO.setId(memberVodVO.getId()); + vodVO.setItemName(memberVodVO.getVodName()); + vodVO.setVodLength(memberVodVO.getVodLength()); + vodVO.setPercent(memberVodVO.getPercent()); + vodVO.setLeftLength(memberVodVO.getLeftLength()); + vodVO.setItemType(0); + vodVO.setStatus(true); + vodVO.setVodUrl(memberVodVO.getVodUrl()); + //这个视频的人脸有没有做 + int vodFaceCheck = activityDetectionMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ActivityDetectionDO::getVodId,memberVodVO.getId()) + .eq(ActivityDetectionDO::getMemberId,contentMemberDTO.getMemberId()) + .eq(ActivityDetectionDO::getClassId,contentMemberDTO.getClassId()) + .eq(ActivityDetectionDO::getStatus,1)); + if (vodFaceCheck > 0){ + vodVO.setVodFaceCheckFlag(true); + }else { + vodVO.setVodFaceCheckFlag(false); + } + socialVodTestVOS.add(vodVO); + + SocialVodTestVO testVO = new SocialVodTestVO(); + //查看该视频对应的试卷名 并赋值 + PaperDictDO paperDictDO = paperDictMapper.selectOne(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId()) + .eq(PaperDictDO::getVodId, memberVodVO.getId())); + testVO.setItemName(paperDictDO.getPaperName()); + testVO.setItemType(1); + testVO.setId(paperDictDO.getId()); + memberVodVO.setStatus(true); + if (100==memberVodVO.getPercent()) { + //视频全部看完 + playCount++; + //计算最好成绩 memberId,classId,vodId + MemberMaxScoreVO memberMaxScoreVO = paperDictMapper.memberMaxScore(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), memberVodVO.getId()); + if (null == memberMaxScoreVO) { + testVO.setTestStatus("待完成"); + } else { + testVO.setRightCount(memberMaxScoreVO.getRightCounts()); + testVO.setTotalCount(memberMaxScoreVO.getTotalCounts()); + if ("合格".equals(memberMaxScoreVO.getResult())) { + testVO.setTestStatus("通过"); + } else { + testVO.setTestStatus("未通过"); + } + } + } else { + //视频看完后才可以做题 + testVO.setTestStatus("待解锁"); + } + socialVodTestVOS.add(testVO); + } + } + + socialContentVodVO.setSocialVodTestVOS(socialVodTestVOS); + socialContentVodVO.setPlayVods(playCount); + socialContentVodVO.setTotalVods(memberVodVOS.size()); + socialContentVodVOS.add(socialContentVodVO); + } + socialContentVodNewVO.setSocialContentVodVOS(socialContentVodVOS); + + //最新的视频记录 + List contentVodNewVOS = vodPlayHistoryMapper.memberRecentPlay(contentMemberDTO.getClassId(), contentMemberDTO.getMemberId()); + if (contentVodNewVOS.size() > 0) { + socialContentVodNewVO.setId(contentVodNewVOS.get(0).getId()); + socialContentVodNewVO.setPlayRecord(contentVodNewVOS.get(0).getPlayRecord()); + } + return socialContentVodNewVO; + } + + public CheckItemVO checkItem(CheckItemDTO checkItemDTO){ + CheckItemVO checkItemVO = new CheckItemVO(); + if (0 == checkItemDTO.getType()){ + //视频 查看上一个视频对应的题目是否已经通过 + Integer integer = this.baseMapper.checkClassPaperPassStatus(checkItemDTO.getMemberId(), checkItemDTO.getClassId(), checkItemDTO.getPaperId()); + checkItemVO.setNextFlag(integer); + }else { + //题目 vodId 当前题目对应的视频id + Integer integer = this.baseMapper.checkClassVodPlayStatus(checkItemDTO.getMemberId(), checkItemDTO.getClassId(), checkItemDTO.getVodId()); + checkItemVO.setNextFlag(integer); + } + return checkItemVO; + } + public List contentFiles(ContentMemberDTO contentMemberDTO) { List contentFilesVOS = new ArrayList<>(); @@ -925,6 +1158,118 @@ public class MemberServiceImpl extends ServiceImpl imple return queryPapersVOS; } + public List socialCourseTest(ContentMemberDTO contentMemberDTO) { + + //课程详细信息 + List socialContentVodVOS = new ArrayList<>(); + + //查看所有的content 目录 + List courseContentDOS = courseContentMapper.selectList(new QueryWrapper() + .lambda() + .eq(CourseContentDO::getCourseId, contentMemberDTO.getCourseId()) + .orderByAsc(CourseContentDO::getOrderNo)); + + ClassDictDO classDictDO1 = classDictMapper.selectById(contentMemberDTO.getClassId()); + + //查看这个课程所有考试 + List paperDictDOS = paperDictMapper.selectList(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId())); + + /** + * 视频id paperId + */ + HashMap hashMap = new HashMap<>(); + for (PaperDictDO paperDictDO : paperDictDOS) { + hashMap.put(paperDictDO.getVodId(), paperDictDO.getId()); + } + + //遍历目录 + for (CourseContentDO courseContentDO : courseContentDOS) { + List memberVodVOS = courseContentMapper.contentVodProcess(courseContentDO.getId(), contentMemberDTO.getMemberId(), contentMemberDTO.getClassId()); + + //视频状态 + Boolean vodFlag = true; + + if (1 == classDictDO1.getIsOrder()) { + for (MemberVodVO memberVodVO : memberVodVOS) { + + SocialCourseTestVO socialCourseTestVO = new SocialCourseTestVO(); + //查看该视频对应的试卷名 并赋值 + PaperDictDO paperDictDO = paperDictMapper.selectOne(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId()) + .eq(PaperDictDO::getVodId, memberVodVO.getId())); + socialCourseTestVO.setItemName(paperDictDO.getPaperName()); + socialCourseTestVO.setId(paperDictDO.getId()); + + + if (vodFlag && 100 == memberVodVO.getPercent()) { + //视频全部看完 + //计算最好成绩 memberId,classId,vodId + MemberMaxScoreVO memberMaxScoreVO = paperDictMapper.memberMaxScore(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), memberVodVO.getId()); + if (null == memberMaxScoreVO) { + socialCourseTestVO.setTestStatus("待完成"); + } else { + socialCourseTestVO.setRightCount(memberMaxScoreVO.getRightCounts()); + socialCourseTestVO.setTotalCount(memberMaxScoreVO.getTotalCounts()); + if ("合格".equals(memberMaxScoreVO.getResult())) { + socialCourseTestVO.setTestStatus("通过"); + } else { + socialCourseTestVO.setTestStatus("未通过"); + } + } + } else { + //视频看完后才可以做题 + socialCourseTestVO.setTestStatus("待解锁"); + } + socialContentVodVOS.add(socialCourseTestVO); + } + } else { + //课程不需要按照顺序播放 ,全部是解锁标识 + for (MemberVodVO memberVodVO : memberVodVOS) { + SocialCourseTestVO testVO = new SocialCourseTestVO(); + memberVodVO.setStatus(true); + //查一下该视频对应的考卷 + //查看该视频对应的试卷名 并赋值 + PaperDictDO paperDictDO = paperDictMapper.selectOne(new QueryWrapper() + .lambda() + .eq(PaperDictDO::getCourseId, contentMemberDTO.getCourseId()) + .eq(PaperDictDO::getVodId, memberVodVO.getId())); + testVO.setId(paperDictDO.getId()); + testVO.setItemName(paperDictDO.getPaperName()); + int totalCnt = exerciseDictMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ExerciseDictDO::getPaperId,paperDictDO.getId())); + testVO.setTotalCount(totalCnt); + + if (100 ==memberVodVO.getPercent()) { + //视频全部看完 + //计算最好成绩 memberId,classId,vodId + MemberMaxScoreVO memberMaxScoreVO = paperDictMapper.memberMaxScore(contentMemberDTO.getMemberId(), contentMemberDTO.getClassId(), memberVodVO.getId()); + if (null == memberMaxScoreVO) { + testVO.setTestStatus("待完成"); + testVO.setRightCount(memberMaxScoreVO.getRightCounts()); + } else { + testVO.setRightCount(memberMaxScoreVO.getRightCounts()); + if ("合格".equals(memberMaxScoreVO.getResult())) { + testVO.setTestStatus("通过"); + } else { + testVO.setTestStatus("未通过"); + } + } + } else { + //视频看完后才可以做题 + testVO.setTestStatus("待解锁"); + testVO.setRightCount(0); + } + socialContentVodVOS.add(testVO); + } + } + } + return socialContentVodVOS; + } + public List getPaperDoneDetail(ExerciseDoneResultDO exerciseDoneResultDO) { return exerciseDoneResultMapper.selectList(new QueryWrapper() .lambda() diff --git a/src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java index 83b17a1..f8aad2d 100644 --- a/src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/PaperDictServiceImpl.java @@ -2,12 +2,17 @@ package com.subsidy.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.subsidy.common.exception.HttpException; +import com.subsidy.mapper.CourseDictMapper; +import com.subsidy.mapper.ExerciseDictMapper; +import com.subsidy.model.CourseDictDO; +import com.subsidy.model.ExerciseDictDO; import com.subsidy.model.PaperDictDO; import com.subsidy.mapper.PaperDictMapper; import com.subsidy.service.PaperDictService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.subsidy.util.ConstantUtils; import com.subsidy.vo.paper.QueryPapersVO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -24,28 +29,47 @@ import java.util.List; @Service public class PaperDictServiceImpl extends ServiceImpl implements PaperDictService { - public List queryPapers(PaperDictDO paperDictDO){ - return this.baseMapper.queryPapers(paperDictDO.getCourseId(),paperDictDO.getPaperName(),null); + @Autowired + private CourseDictMapper courseDictMapper; + + @Autowired + private ExerciseDictMapper exerciseDictMapper; + + public List queryPapers(PaperDictDO paperDictDO) { + + CourseDictDO courseDictDO = courseDictMapper.selectById(paperDictDO.getCourseId()); + List queryPapersVOS = this.baseMapper.queryPapers(paperDictDO.getCourseId(), paperDictDO.getPaperName(), null); + //学徒制要查看题目数量 + if (1 == courseDictDO.getCourseDataType()) { + for (QueryPapersVO queryPapers : queryPapersVOS) { + //题目个数 + int count = exerciseDictMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ExerciseDictDO::getPaperId,queryPapers.getId())); + queryPapers.setExerciseCnt(count); + } + } + return queryPapersVOS; } - public String deletePaper(PaperDictDO paperDictDO){ + public String deletePaper(PaperDictDO paperDictDO) { this.baseMapper.deleteById(paperDictDO.getId()); return ConstantUtils.DELETE_SUCCESS; } - public String updateStatus(PaperDictDO paperDictDO){ + public String updateStatus(PaperDictDO paperDictDO) { this.baseMapper.updateById(paperDictDO); return ConstantUtils.SET_SUCCESS; } - public String addPaper(PaperDictDO paperDictDO){ + public String addPaper(PaperDictDO paperDictDO) { Integer count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(PaperDictDO::getCourseId,paperDictDO.getCourseId()) - .eq(PaperDictDO::getPaperName,paperDictDO.getPaperName())); + .lambda() + .eq(PaperDictDO::getCourseId, paperDictDO.getCourseId()) + .eq(PaperDictDO::getPaperName, paperDictDO.getPaperName())); - if (count>0){ + if (count > 0) { throw new HttpException(50001); } paperDictDO.setPaperStatus(0); diff --git a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java index 89c9b2a..5f63f19 100644 --- a/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java @@ -12,7 +12,6 @@ import com.subsidy.model.*; import com.subsidy.service.RenSheJuService; import com.subsidy.util.OSSUtils; import com.subsidy.util.RenSheJuConstant; -import com.subsidy.util.SMSUtils; import com.subsidy.vo.renshe.*; import net.sf.json.JSONObject; import okhttp3.*; @@ -70,6 +69,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { List imageClassIds = renSheJuMapper.imageClassIds("0"); Set classIds = new HashSet<>(); +// classIds.add(490L); vodClassIds.stream().forEach(x -> classIds.add(x)); examClassIds.stream().forEach(x -> classIds.add(x)); @@ -161,6 +161,9 @@ public class RenSheJuServiceImpl implements RenSheJuService { // 产生视频学习数据的班级 List vodClassIds = renSheJuMapper.vodClassIds("0"); +// List vodClassIds = new ArrayList<>(); +// vodClassIds.add(490L); + List result = new ArrayList<>(); try { @@ -279,6 +282,9 @@ public class RenSheJuServiceImpl implements RenSheJuService { //找出前一天产生考试数据的班级 List classIds = renSheJuMapper.dailyExamBasic("0"); +// List classIds = new ArrayList<>(); +// classIds.add(490L); + try { if (classIds.size() > 0) { for (Long classId : classIds) { @@ -670,6 +676,86 @@ public class RenSheJuServiceImpl implements RenSheJuService { return null; } + public RensheResponseVO post6plus() throws Exception { + + List rensheResponseVOS = new ArrayList<>(); + + OkHttpClient client = new OkHttpClient().newBuilder() + .build(); + MediaType mediaType = MediaType.parse("application/json"); + + List classIds = new ArrayList<>(); + + classIds.add(477L); + + for (Long classId : classIds) { + + //计算开始时间和截止时间 + ClassDictDO classDictDO = classDictMapper.selectById(classId); + + UploadImageDTO uploadImage = new UploadImageDTO(); + uploadImage.setPrivateKey(getSecret()); + uploadImage.setClassCode(classDictDO.getClassCode()); + + List imageDetailLists = new ArrayList<>(); + try { + + List classImageChecksVOS2 = renSheJuMapper.post6plus(classId); + + for (ClassImageChecksVO cicon : classImageChecksVOS2) { + ImageDetailList imageDetailList = new ImageDetailList(); + BeanUtils.copyProperties(cicon, imageDetailList); + imageDetailList.setImageBase64("data:image/jpeg;base64," + OSSUtils.image2Base64(cicon.getImage())); + imageDetailLists.add(imageDetailList); + } + + uploadImage.setImageDetailList(imageDetailLists); + + if (imageDetailLists.size() > 0) { + System.out.println(com.alibaba.fastjson.JSONObject.toJSONString(uploadImage)); + RequestBody body = RequestBody.create(mediaType, JSONObject.fromObject(uploadImage).toString()); + Request request = new Request.Builder() + .url(renSheConfig.getUrl() + "/import/downstream/enterprise/uploadImage") + .method("POST", body) + .addHeader("User-Agent", "Apifox/1.0.0 (https://www.apifox.cn)") + .addHeader("Content-Type", "application/json") + .build(); + Response response = client.newCall(request).execute(); + RensheResponseVO rensheResponseVO = JSON.parseObject(response.body().string(), RensheResponseVO.class); + + RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); + renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_7); + renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadImage).toString()); + if (null != rensheResponseVO.getCtt()) { + renshejuHistoryDO.setOutputParam(rensheResponseVO.getCtt().toString()); + } else { + renshejuHistoryDO.setOutputParam(rensheResponseVO.getMsg()); + } + renshejuHistoryMapper.insert(renshejuHistoryDO); + rensheResponseVOS.add(rensheResponseVO); + } else { + RenshejuHistoryDO renshejuHistoryDO1 = new RenshejuHistoryDO(); + renshejuHistoryDO1.setInterfaceName(RenSheJuConstant.POST_7); + renshejuHistoryDO1.setInputParam(JSONObject.fromObject(uploadImage).toString()); + renshejuHistoryDO1.setOutputParam(RenSheJuConstant.NO_DATA); + renshejuHistoryMapper.insert(renshejuHistoryDO1); + } + + } catch (Exception e) { + e.printStackTrace(); + RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); + renshejuHistoryDO.setInterfaceName(RenSheJuConstant.POST_7); + renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadImage).toString()); + renshejuHistoryDO.setOutputParam(RenSheJuConstant.PUSH_FAIL); + renshejuHistoryMapper.insert(renshejuHistoryDO); + + } + } + + return null; + } + + public RensheStringVO clear() throws IOException { OkHttpClient client = new OkHttpClient().newBuilder() diff --git a/src/main/java/com/subsidy/service/impl/VodLabelDictServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodLabelDictServiceImpl.java index 0728ccf..8187a10 100644 --- a/src/main/java/com/subsidy/service/impl/VodLabelDictServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodLabelDictServiceImpl.java @@ -10,6 +10,7 @@ import com.subsidy.model.VodLabelDictDO; import com.subsidy.mapper.VodLabelDictMapper; import com.subsidy.service.VodLabelDictService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.subsidy.vo.vod.VodInfoVO; import com.subsidy.vo.vodLabel.VodLabelTreeVO; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -43,10 +44,7 @@ public class VodLabelDictServiceImpl extends ServiceImpl queryVodLabelTree() { List list = this.baseMapper.queryVodLabel(); for (VodLabelTreeVO vodLabelTreeVO : list) { - List vodDictDOList = vodDictMapper.selectList(new QueryWrapper() - .lambda() - .eq(VodDictDO::getLabelId, vodLabelTreeVO.getId()) - .orderByDesc(VodDictDO::getOrderNo)); + List vodDictDOList = vodDictMapper.vodInfo(vodLabelTreeVO.getId()); vodLabelTreeVO.setVods(vodDictDOList); } return list; diff --git a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java index e9a0611..1661b0d 100644 --- a/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java +++ b/src/main/java/com/subsidy/service/impl/VodPlayHistoryServiceImpl.java @@ -61,16 +61,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl() + Integer count = classMemberMappingMapper.selectCount(new QueryWrapper() .lambda() - .eq(ExerciseDoneResultDO::getClassId, vodPlayHistoryDO.getClassId()) - .eq(ExerciseDoneResultDO::getMemberId, vodPlayHistoryDO.getMemberId())); + .eq(ClassMemberMappingDO::getClassId, vodPlayHistoryDO.getClassId()) + .eq(ClassMemberMappingDO::getMemberId, vodPlayHistoryDO.getMemberId()) + .eq(ClassMemberMappingDO::getSubmitFlag, 1)); //只有开始学习时间晚于签到时间的数据才会插进去 Date date = new Date(); @@ -138,10 +136,11 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl() + Integer count = classMemberMappingMapper.selectCount(new QueryWrapper() .lambda() - .eq(ExerciseDoneResultDO::getClassId, insertHistoryNewDTO.getClassId()) - .eq(ExerciseDoneResultDO::getMemberId, insertHistoryNewDTO.getMemberId())); + .eq(ClassMemberMappingDO::getClassId, insertHistoryNewDTO.getClassId()) + .eq(ClassMemberMappingDO::getMemberId, insertHistoryNewDTO.getMemberId()) + .eq(ClassMemberMappingDO::getSubmitFlag, 1)); //只有开始学习时间晚于签到时间的数据才会插进去 Date date = new Date(); diff --git a/src/main/java/com/subsidy/util/ExcelFormatUtils.java b/src/main/java/com/subsidy/util/ExcelFormatUtils.java index c0330e2..b8bbe05 100644 --- a/src/main/java/com/subsidy/util/ExcelFormatUtils.java +++ b/src/main/java/com/subsidy/util/ExcelFormatUtils.java @@ -12,6 +12,8 @@ public class ExcelFormatUtils { public static final List scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间","测评时间", "总评价"); + public static final List socialScoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "课节名称", "测试成绩","开始时间","结束时间", "总评价"); + public static final List answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间"); public static final List studyLogList = Arrays.asList("开始时间","结束时间","课程","类型","学习时长","累计有效时长"); diff --git a/src/main/java/com/subsidy/util/excel/ExcelUtil.java b/src/main/java/com/subsidy/util/excel/ExcelUtil.java index 2372344..366469f 100644 --- a/src/main/java/com/subsidy/util/excel/ExcelUtil.java +++ b/src/main/java/com/subsidy/util/excel/ExcelUtil.java @@ -2,8 +2,10 @@ package com.subsidy.util.excel; import com.subsidy.model.MemberDO; import com.subsidy.vo.administer.ExerciseTestVO; +import com.subsidy.vo.administer.ExportSocialExerciseTestVO; import com.subsidy.vo.administer.MemberStudyLogVO; import com.subsidy.vo.classdict.ClassDetailVO; +import com.subsidy.vo.classdict.SocialTestDetailVO; import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.sign.AnswerRecordVO; import lombok.extern.slf4j.Slf4j; @@ -315,6 +317,7 @@ public class ExcelUtil { /** * 导出excel文件 + * * @param list * @param cls * @param @@ -325,7 +328,7 @@ public class ExcelUtil { Field[] fields = cls.getDeclaredFields(); List fieldList = Arrays.stream(fields).filter(field -> { ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); - if(annotation != null) { + if (annotation != null) { field.setAccessible(true); return true; } @@ -333,7 +336,7 @@ public class ExcelUtil { }).sorted(Comparator.comparing(field -> { int col = 0; ExcelColumn annotation = field.getAnnotation(ExcelColumn.class); - if(annotation != null) { + if (annotation != null) { col = annotation.col(); } return col; @@ -1060,6 +1063,240 @@ public class ExcelUtil { } } + + public static void writeSocialTestExcel(String companyName, String studyDate, String courseName, String title, List list, List headerList) throws Exception { + + ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletResponse response = requestAttributes.getResponse(); + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.addHeader("content-disposition", "attachment;filename=" + + java.net.URLEncoder.encode("test.xlsx", "utf-8")); + + // 声明一个工作薄 + SXSSFWorkbook workbook = new SXSSFWorkbook(1000);//缓存 + workbook.setCompressTempFiles(true); + //表头样式 + CellStyle titleStyle = workbook.createCellStyle(); + setStyle(titleStyle); + Font titleFont = workbook.createFont(); + titleFont.setFontHeightInPoints((short) 20); + titleFont.setBoldweight((short) 700); + titleStyle.setFont(titleFont); + + //第二行 + CellStyle secondStyle = workbook.createCellStyle(); + secondStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框 + secondStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框 + secondStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框 + secondStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框 + secondStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); + Font secondFont = workbook.createFont(); + secondStyle.setFont(secondFont); + + //第三行 + CellStyle thirdStyle = workbook.createCellStyle(); + thirdStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN); //下边框 + thirdStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);//左边框 + thirdStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);//上边框 + thirdStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);//右边框 + secondStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); + Font thirdFont = workbook.createFont(); + thirdStyle.setFont(thirdFont); + + // 列头样式 + CellStyle headerStyle = workbook.createCellStyle(); + setStyle(headerStyle); + Font headerFont = workbook.createFont(); + headerFont.setFontHeightInPoints((short) 12); + headerFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);//粗体显示 + headerStyle.setFont(headerFont); + + // 数据单元格样式 + CellStyle cellStyle = workbook.createCellStyle(); + setStyle(cellStyle); + Font cellFont = workbook.createFont(); + cellFont.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL); + cellStyle.setFont(cellFont); + // 生成一个(带标题)表格 + SXSSFSheet sheet = workbook.createSheet(); + //设置列宽 + int minBytes = 17;//至少字节数 + int[] arrColWidth = new int[headerList.size()]; + // 产生表格标题行,以及设置列宽 + String[] headers = new String[headerList.size()]; + int ii = 0; + for (int i = 0; i < headerList.size(); i++) { + + headers[ii] = headerList.get(i); + + int bytes = headerList.get(i).getBytes().length; + arrColWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, arrColWidth[ii] * 256); + ii++; + } + + //第二行 + int[] secondWidth = new int[2]; + // 产生表格标题行,以及设置列宽 + String[] secondHead = new String[2]; + List secondList = Arrays.asList("培训实施单位:" + companyName, "培训时间:" + studyDate); + + //第三行 + int[] thirdWidth = new int[2]; + // 产生表格标题行,以及设置列宽 + String[] thirdHead = new String[2]; + List thirdList = Arrays.asList("培训项目:" + courseName, "培训平台:有课互联系统"); + + + ii = 0; + for (int i = 0; i < 2; i++) { + secondHead[ii] = secondList.get(i); + int bytes = secondList.get(i).getBytes().length; + secondWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, secondWidth[ii] * 256); + ii++; + } + + ii = 0; + for (int i = 0; i < 2; i++) { + thirdHead[ii] = thirdList.get(i); + int bytes = thirdList.get(i).getBytes().length; + thirdWidth[ii] = bytes < minBytes ? minBytes : bytes; + sheet.setColumnWidth(ii, thirdWidth[ii] * 256); + ii++; + } + + // 遍历集合数据,产生数据行 + //标题 0 + SXSSFRow titleRow = sheet.createRow(0);//表头 rowIndex=0 + titleRow.createCell(0).setCellValue(title); + setBorderStyle(HSSFCellStyle.BORDER_THIN, new CellRangeAddress(0, 0, 0, 0), sheet, workbook); //给合并过的单元格加边框 + titleRow.getCell(0).setCellStyle(titleStyle); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, headerList.size() - 1)); + + //第二行 1 + SXSSFRow secondRow = sheet.createRow(1); //第二行 rowIndex =1 + CellRangeAddress cellRangeAddress21 = new CellRangeAddress(1, 1, 0, 3); + sheet.addMergedRegion(cellRangeAddress21); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress21, sheet, workbook); //给合并过的单元格加边框 + + CellRangeAddress cellRangeAddress22 = new CellRangeAddress(1, 1, 4, 8); + sheet.addMergedRegion(cellRangeAddress22); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress22, sheet, workbook); //给合并过的单元格加边框 + + secondRow.createCell(0).setCellValue(secondHead[0]); + secondRow.getCell(0).setCellStyle(secondStyle); + + secondRow.createCell(4).setCellValue(secondHead[1]); + secondRow.getCell(4).setCellStyle(secondStyle); + + //第三行 2 + SXSSFRow thirdRow = sheet.createRow(2); //第二行 rowIndex =1 + CellRangeAddress cellRangeAddress31 = new CellRangeAddress(2, 2, 0, 3); + sheet.addMergedRegion(cellRangeAddress31); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress31, sheet, workbook); //给合并过的单元格加边框 + + CellRangeAddress cellRangeAddress32 = new CellRangeAddress(2, 2, 5, 8); + sheet.addMergedRegion(cellRangeAddress32); + setBorderStyle(HSSFCellStyle.BORDER_THIN, cellRangeAddress32, sheet, workbook); //给合并过的单元格加边框 + thirdRow.createCell(0).setCellValue(thirdHead[0]); + thirdRow.getCell(0).setCellStyle(thirdStyle); + + thirdRow.createCell(4).setCellValue(thirdHead[1]); + thirdRow.getCell(4).setCellStyle(thirdStyle); + + //标题 3 + SXSSFRow headerRow = sheet.createRow(3); //列头 rowIndex =1 + for (int i = 0; i < headers.length; i++) { + headerRow.createCell(i).setCellValue(headers[i]); + headerRow.getCell(i).setCellStyle(headerStyle); + } + + int seq = 1; + + //内容 + int rowIndex = 0; + for (ExportSocialExerciseTestVO exportSocialExerciseTestVO : list) { + if (rowIndex == 65535 || rowIndex == 0) { + if (rowIndex != 0) { + sheet = workbook.createSheet();//如果数据超过了,则在第二页显示 + } + rowIndex = 4;//数据内容从 rowIndex=2开始 + } + + SXSSFRow dataRow = sheet.createRow(rowIndex); + + SXSSFCell newCell = dataRow.createCell(0); + cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(seq); + + + newCell = dataRow.createCell(1); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exportSocialExerciseTestVO.getUserName()); + + + newCell = dataRow.createCell(2); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exportSocialExerciseTestVO.getIdCard()); + + + newCell = dataRow.createCell(3); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exportSocialExerciseTestVO.getTelephone()); + + newCell = dataRow.createCell(4); + newCell.setCellStyle(cellStyle); + newCell.setCellValue(exportSocialExerciseTestVO.getVodName()); + + //次数 + newCell = dataRow.createCell(5); + newCell.setCellStyle(cellStyle); + if (null != exportSocialExerciseTestVO.getScore()) { + newCell.setCellValue(exportSocialExerciseTestVO.getScore()); + }else { + newCell.setCellValue(0); + } + + //次数 + newCell = dataRow.createCell(6); + newCell.setCellStyle(cellStyle); + if (null != exportSocialExerciseTestVO.getScore()) { + newCell.setCellValue(exportSocialExerciseTestVO.getStartDate()); + } + + //次数 + newCell = dataRow.createCell(7); + newCell.setCellStyle(cellStyle); + if (null != exportSocialExerciseTestVO.getScore()) { + newCell.setCellValue(exportSocialExerciseTestVO.getEndDate()); + } + + newCell = dataRow.createCell(8); + newCell.setCellStyle(cellStyle); + if (null != exportSocialExerciseTestVO.getScore() && exportSocialExerciseTestVO.getScore() >= 60) { + newCell.setCellValue("合格"); + } else { + newCell.setCellValue("不合格"); + } + + rowIndex++; + seq++; + + } + + try { + OutputStream outputStream = response.getOutputStream(); + workbook.write(outputStream); + workbook.close(); + workbook.dispose(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static void writeAnswerExcel(String companyName, String studyDate, String courseName, String title, List list, List headerList) throws Exception { ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); diff --git a/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java b/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java index bbfed41..10a4a0a 100644 --- a/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java +++ b/src/main/java/com/subsidy/util/websocket/WebSocketUtil.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature; import com.subsidy.common.ResponseData; import com.subsidy.common.exception.HttpException; import com.subsidy.mapper.ClassDictMapper; +import com.subsidy.mapper.ClassVodFaceCheckMapper; import com.subsidy.mapper.MemberMapper; import com.subsidy.mapper.OprMemDictMapper; import com.subsidy.model.OprMemDictDO; @@ -33,7 +34,7 @@ import java.util.concurrent.*; public class WebSocketUtil implements WebSocketHandler { @Autowired - private OprMemDictMapper oprMemDictMapper; + private ClassVodFaceCheckMapper classVodFaceCheckMapper; @Autowired private ClassDictMapper classDictMapper; @@ -46,7 +47,7 @@ public class WebSocketUtil implements WebSocketHandler { private int reconnectionSeconds = 30; //每次断连间隔重新连接秒 /** - selfExport + * selfExport * 存放建立连接webSocket对象 Map */ public static ConcurrentHashMap webSocketMap = new ConcurrentHashMap(); @@ -86,6 +87,12 @@ public class WebSocketUtil implements WebSocketHandler { // 数据操作 SystemSettings systemSettings = memberMapper.companySettings(id); //公司配置 List classSettings = classDictMapper.getClassSettings(id); + for (ClassSettingsVO csv : classSettings) { + //配置的视频id + List longs = classVodFaceCheckMapper.faceVodIds(csv.getId()); + csv.setVodIds(longs); + } + systemSettings.setClassSettingsVOS(classSettings); if (CollectionUtils.isNotEmpty(classSettings)) { String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue); diff --git a/src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java b/src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java index 96879a1..4d3b0cb 100644 --- a/src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java +++ b/src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java @@ -36,4 +36,8 @@ public class ExerciseTestVO { private String companyName; + private Integer ttl; + + private Integer ps; + } diff --git a/src/main/java/com/subsidy/vo/administer/ExportSocialExerciseTestVO.java b/src/main/java/com/subsidy/vo/administer/ExportSocialExerciseTestVO.java new file mode 100644 index 0000000..74bff10 --- /dev/null +++ b/src/main/java/com/subsidy/vo/administer/ExportSocialExerciseTestVO.java @@ -0,0 +1,35 @@ +package com.subsidy.vo.administer; + +import com.subsidy.util.excel.ExcelColumn; +import lombok.Data; + +@Data +public class ExportSocialExerciseTestVO { + + private Long id; + + @ExcelColumn(col = 1,value = "成员名称") + private String userName; + + @ExcelColumn(col = 2,value = "身份证号码") + private String idCard; + + @ExcelColumn(col = 3,value = "联系方式") + private String telephone; + + @ExcelColumn(col = 4,value = "课节名称") + private String vodName; + + @ExcelColumn(col = 5,value = "测试成绩") + private Integer score; + + @ExcelColumn(col = 6,value = "开始时间") + private String startDate; + + @ExcelColumn(col = 7,value = "结束时间") + private String endDate; + + @ExcelColumn(col = 8,value = "评价") + private String result; + +} diff --git a/src/main/java/com/subsidy/vo/classdict/ClassDetail.java b/src/main/java/com/subsidy/vo/classdict/ClassDetail.java new file mode 100644 index 0000000..d2eb7ed --- /dev/null +++ b/src/main/java/com/subsidy/vo/classdict/ClassDetail.java @@ -0,0 +1,13 @@ +package com.subsidy.vo.classdict; + +import com.subsidy.model.ClassDictDO; +import lombok.Data; + +import java.util.List; + +@Data +public class ClassDetail extends ClassDictDO { + + private List vodIds; + +} diff --git a/src/main/java/com/subsidy/vo/classdict/ClassSettingsVO.java b/src/main/java/com/subsidy/vo/classdict/ClassSettingsVO.java index caf2461..cacac60 100644 --- a/src/main/java/com/subsidy/vo/classdict/ClassSettingsVO.java +++ b/src/main/java/com/subsidy/vo/classdict/ClassSettingsVO.java @@ -2,6 +2,8 @@ package com.subsidy.vo.classdict; import lombok.Data; +import java.util.List; + @Data public class ClassSettingsVO { @@ -69,4 +71,13 @@ public class ClassSettingsVO { private Integer timeLimit; private Integer activityFlag; + + private List vodIds; + + private Integer paperTime; + + private Integer faceCheck; + + private Integer paperTimeLimit; + } diff --git a/src/main/java/com/subsidy/vo/classdict/SocialTestDetailVO.java b/src/main/java/com/subsidy/vo/classdict/SocialTestDetailVO.java new file mode 100644 index 0000000..454ee96 --- /dev/null +++ b/src/main/java/com/subsidy/vo/classdict/SocialTestDetailVO.java @@ -0,0 +1,24 @@ +package com.subsidy.vo.classdict; + +import lombok.Data; + +@Data +public class SocialTestDetailVO { + + private Long id; + + private String vodName; + + private String paperName; + + private Integer score; + + private Integer cnt; + + private String result; + + private String startDate; + + private String createDate; + +} diff --git a/src/main/java/com/subsidy/vo/classdict/SocialTestRecordVO.java b/src/main/java/com/subsidy/vo/classdict/SocialTestRecordVO.java new file mode 100644 index 0000000..d5fc426 --- /dev/null +++ b/src/main/java/com/subsidy/vo/classdict/SocialTestRecordVO.java @@ -0,0 +1,24 @@ +package com.subsidy.vo.classdict; + +import lombok.Data; + +@Data +public class SocialTestRecordVO { + + private Long id; + + private String vodName; + + private String paperName; + + private Integer rightCounts; + + private Integer totalCounts; + + private String result; + + private String createDate; + + private String startDate; + +} diff --git a/src/main/java/com/subsidy/vo/classdict/VodPassRateVO.java b/src/main/java/com/subsidy/vo/classdict/VodPassRateVO.java new file mode 100644 index 0000000..e69634a --- /dev/null +++ b/src/main/java/com/subsidy/vo/classdict/VodPassRateVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.classdict; + +import lombok.Data; + +@Data +public class VodPassRateVO { + + private Integer ttl; + + private Integer ps; + +} diff --git a/src/main/java/com/subsidy/vo/course/QueryCoursesVO.java b/src/main/java/com/subsidy/vo/course/QueryCoursesVO.java index 30478b7..8c5e1de 100644 --- a/src/main/java/com/subsidy/vo/course/QueryCoursesVO.java +++ b/src/main/java/com/subsidy/vo/course/QueryCoursesVO.java @@ -58,6 +58,11 @@ public class QueryCoursesVO { private Integer paperCount; /** + * 企业线上培训/学徒制 + */ + private Integer courseDataType; + + /** * 开放状态 */ private Integer openStatus; diff --git a/src/main/java/com/subsidy/vo/dudao/ClassBaseInfoVO.java b/src/main/java/com/subsidy/vo/dudao/ClassBaseInfoVO.java new file mode 100644 index 0000000..4bae795 --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/ClassBaseInfoVO.java @@ -0,0 +1,26 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class ClassBaseInfoVO { + + private String downCode; + + private String shortName; + + private Long learnHour; + + private Long courseHour; + + private Long startDate; + + private Long endDate; + + private String areaName; + + private String trainingName; + + private String trainingCode; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/DailyActivitiesVO.java b/src/main/java/com/subsidy/vo/dudao/DailyActivitiesVO.java new file mode 100644 index 0000000..92dff70 --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/DailyActivitiesVO.java @@ -0,0 +1,14 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class DailyActivitiesVO { + + private Integer access; + + private Long activityTime; + + private Integer checkType; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/DailyAnswerVO.java b/src/main/java/com/subsidy/vo/dudao/DailyAnswerVO.java new file mode 100644 index 0000000..cae57b5 --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/DailyAnswerVO.java @@ -0,0 +1,20 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class DailyAnswerVO { + + private Long id; + + private Long askId; + + private String downCode; + + private String identity; + + private Long answer; + + private Long question; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/DailyStudyInfoVO.java b/src/main/java/com/subsidy/vo/dudao/DailyStudyInfoVO.java new file mode 100644 index 0000000..3cb0820 --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/DailyStudyInfoVO.java @@ -0,0 +1,41 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class DailyStudyInfoVO { + + private Long classId; + + private Long memberId; + + /** + * 临时班级(临时项目)编号 + */ + private String classCode; + /** + * 学员身份证号,会对身份证号长度、格式进行校验、X用大写 + */ + private String identity; + + /** + * 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】 + */ + private String phone; + + /** + * 当日累计学习时长,视频暂停时间不计入【秒】 + */ + private long learnTime; + + /** + * 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】 + */ + private long loginTime; + + /** + * 学员姓名 + */ + private String studentName; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/EpidemicSituationClassBasic.java b/src/main/java/com/subsidy/vo/dudao/EpidemicSituationClassBasic.java new file mode 100644 index 0000000..a62387b --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/EpidemicSituationClassBasic.java @@ -0,0 +1,33 @@ +package com.subsidy.vo.dudao; + +import com.subsidy.dto.dudao.ChapterList2; +import lombok.Data; + +import java.util.List; + +@Data +public class EpidemicSituationClassBasic { + + private String areaName; + + private List chapterList; + + private Long courseHour; + + private String downCode; + + private Long endDate; + + private Long learnHour; + + private String shortName; + + private Long startDate; + + private List studentList; + + private String trainingCode; + + private String trainingName; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/ExamActivitiesVO.java b/src/main/java/com/subsidy/vo/dudao/ExamActivitiesVO.java new file mode 100644 index 0000000..b8144fd --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/ExamActivitiesVO.java @@ -0,0 +1,12 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class ExamActivitiesVO { + + private Integer access; + + private Long activityTime; + +} diff --git a/src/main/java/com/subsidy/vo/dudao/MemberVO.java b/src/main/java/com/subsidy/vo/dudao/MemberVO.java new file mode 100644 index 0000000..eb61956 --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/MemberVO.java @@ -0,0 +1,15 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class MemberVO { + + private String name; + + private String phone; + + private String identity; + + +} diff --git a/src/main/java/com/subsidy/vo/dudao/RensheResponseVO.java b/src/main/java/com/subsidy/vo/dudao/RensheResponseVO.java new file mode 100644 index 0000000..7279d6a --- /dev/null +++ b/src/main/java/com/subsidy/vo/dudao/RensheResponseVO.java @@ -0,0 +1,21 @@ +package com.subsidy.vo.dudao; + +import lombok.Data; + +@Data +public class RensheResponseVO { + + /** + * 响应码 + */ + private long c; + /** + * 响应体 + */ + private Object ctt; + /** + * 响应信息 + */ + private String msg; + +} diff --git a/src/main/java/com/subsidy/vo/member/CheckItemVO.java b/src/main/java/com/subsidy/vo/member/CheckItemVO.java new file mode 100644 index 0000000..accee7a --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/CheckItemVO.java @@ -0,0 +1,13 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +@Data +public class CheckItemVO { + + /** + * 1 通过 0 不通过 + */ + private Integer nextFlag; + +} diff --git a/src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java b/src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java deleted file mode 100644 index 3debde7..0000000 --- a/src/main/java/com/subsidy/vo/member/ImportClassMemberDTO.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.subsidy.vo.member; - -import com.subsidy.util.excel.ExcelColumnUtil; -import lombok.Data; - -@Data -public class ImportClassMemberDTO { - - @ExcelColumnUtil(value = "姓名", col = 1) - private String userName; - - @ExcelColumnUtil(value = "身份证", col = 2) - private String idCard; - - @ExcelColumnUtil(value = "手机号", col = 3) - private String telephone; - - private String reason; - -} diff --git a/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java b/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java index 97682bf..baec04b 100644 --- a/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java +++ b/src/main/java/com/subsidy/vo/member/ImportClassMembersVO.java @@ -1,5 +1,6 @@ package com.subsidy.vo.member; +import com.subsidy.dto.member.ImportClassMemberDTO; import lombok.Data; import java.util.List; diff --git a/src/main/java/com/subsidy/vo/member/MemberVodVO.java b/src/main/java/com/subsidy/vo/member/MemberVodVO.java index 61c9832..78bb479 100644 --- a/src/main/java/com/subsidy/vo/member/MemberVodVO.java +++ b/src/main/java/com/subsidy/vo/member/MemberVodVO.java @@ -9,10 +9,10 @@ public class MemberVodVO { private Integer vodLength; - private String percent; + private Integer percent; /** - * 解锁状态 + * 解锁状态 true:已解锁 false:未解锁 */ private Boolean status; diff --git a/src/main/java/com/subsidy/vo/member/MyCoursesVO.java b/src/main/java/com/subsidy/vo/member/MyCoursesVO.java index 0b22235..ff8c6be 100644 --- a/src/main/java/com/subsidy/vo/member/MyCoursesVO.java +++ b/src/main/java/com/subsidy/vo/member/MyCoursesVO.java @@ -20,6 +20,8 @@ public class MyCoursesVO { private String endDate; + private String classType; + private Integer totalCnt; private Integer studyCnt; diff --git a/src/main/java/com/subsidy/vo/member/SocialContentVodNewVO.java b/src/main/java/com/subsidy/vo/member/SocialContentVodNewVO.java new file mode 100644 index 0000000..8c2133d --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/SocialContentVodNewVO.java @@ -0,0 +1,24 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class SocialContentVodNewVO { + + //最新的视频id + private Long id; + + //最新的视频记录 + private Integer playRecord; + + private Integer isFastPlay; + + private Integer testRule; + + private Integer isOrder; + + private List socialContentVodVOS; + +} diff --git a/src/main/java/com/subsidy/vo/member/SocialContentVodVO.java b/src/main/java/com/subsidy/vo/member/SocialContentVodVO.java new file mode 100644 index 0000000..7b00cfa --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/SocialContentVodVO.java @@ -0,0 +1,18 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +import java.util.List; + +@Data +public class SocialContentVodVO { + + private String content; + + private Integer totalVods; + + private Integer playVods; + + private List socialVodTestVOS; + +} diff --git a/src/main/java/com/subsidy/vo/member/SocialCourseTestVO.java b/src/main/java/com/subsidy/vo/member/SocialCourseTestVO.java new file mode 100644 index 0000000..5318284 --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/SocialCourseTestVO.java @@ -0,0 +1,31 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +@Data +public class SocialCourseTestVO { + + /** + * 试卷id + */ + private Long id; + + /** + * 视频别名/卷子名称 + */ + private String itemName; + + /** + * 做对题数 + */ + private Integer rightCount; + + /** + * 总体数 + */ + private Integer totalCount; + + private String testStatus; + + +} diff --git a/src/main/java/com/subsidy/vo/member/SocialVodTestVO.java b/src/main/java/com/subsidy/vo/member/SocialVodTestVO.java new file mode 100644 index 0000000..f50c6b2 --- /dev/null +++ b/src/main/java/com/subsidy/vo/member/SocialVodTestVO.java @@ -0,0 +1,54 @@ +package com.subsidy.vo.member; + +import lombok.Data; + +@Data +public class SocialVodTestVO { + + /** + * 视频id、题目id + */ + private Long id; + + /** + * 视频别名/卷子名称 + */ + private String itemName; + + /** + * 类型 0:视频 1考试 + */ + private Integer itemType; + + private Integer vodLength; + + /** + * 做对题数 + */ + private Integer rightCount; + + /** + * 总体数 + */ + private Integer totalCount; + + /** + * 视频进度 + */ + private Integer percent; + + private Integer playRecord; + + private String leftLength; + + private String vodUrl; + + private Boolean activityStatus; + + private String testStatus; + + private Boolean status; + + private Boolean vodFaceCheckFlag; + +} diff --git a/src/main/java/com/subsidy/vo/paper/MemberMaxScoreVO.java b/src/main/java/com/subsidy/vo/paper/MemberMaxScoreVO.java new file mode 100644 index 0000000..0cda808 --- /dev/null +++ b/src/main/java/com/subsidy/vo/paper/MemberMaxScoreVO.java @@ -0,0 +1,16 @@ +package com.subsidy.vo.paper; + +import lombok.Data; + +@Data +public class MemberMaxScoreVO { + + private Long paperId; + + private Integer rightCounts; + + private Integer totalCounts; + + private String result; + +} diff --git a/src/main/java/com/subsidy/vo/paper/QueryPapersVO.java b/src/main/java/com/subsidy/vo/paper/QueryPapersVO.java index 8c5457c..3d7ac3c 100644 --- a/src/main/java/com/subsidy/vo/paper/QueryPapersVO.java +++ b/src/main/java/com/subsidy/vo/paper/QueryPapersVO.java @@ -9,6 +9,8 @@ public class QueryPapersVO { private String paperName; + private String vodName; + private String paperStatus; private Integer completeCnt; @@ -25,4 +27,6 @@ public class QueryPapersVO { private Integer checkResult; + private Integer exerciseCnt; + } diff --git a/src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java b/src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java index d44aaff..ee9e806 100644 --- a/src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java +++ b/src/main/java/com/subsidy/vo/renshe/DailyStudyInfoVO.java @@ -24,6 +24,11 @@ public class DailyStudyInfoVO { private String phone; /** + * 当日累计登陆时长,该字段数据应为当日产生LoginList列表内多条下线时间-上线时间累加和【秒】 + */ + private long loginTime; + + /** * 学员姓名 */ private String studentName; diff --git a/src/main/java/com/subsidy/vo/vod/VodInfoVO.java b/src/main/java/com/subsidy/vo/vod/VodInfoVO.java new file mode 100644 index 0000000..52ee159 --- /dev/null +++ b/src/main/java/com/subsidy/vo/vod/VodInfoVO.java @@ -0,0 +1,14 @@ +package com.subsidy.vo.vod; + +import lombok.Data; + +@Data +public class VodInfoVO { + + private Long id; + + private Long labelId; + + private String vodName; + +} diff --git a/src/main/java/com/subsidy/vo/vodLabel/VodLabelTreeVO.java b/src/main/java/com/subsidy/vo/vodLabel/VodLabelTreeVO.java index 8d703d7..d47866a 100644 --- a/src/main/java/com/subsidy/vo/vodLabel/VodLabelTreeVO.java +++ b/src/main/java/com/subsidy/vo/vodLabel/VodLabelTreeVO.java @@ -1,7 +1,8 @@ package com.subsidy.vo.vodLabel; -import com.subsidy.model.VodDictDO; +import com.subsidy.vo.vod.VodInfoVO; import lombok.Data; + import java.util.List; @Data @@ -11,5 +12,5 @@ public class VodLabelTreeVO { private String labelName; - private List vods; + private List vods; } diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 427c151..83da02a 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -65,4 +65,9 @@ qxueyou.url=https://dev.qxueyou.com/auth/user/token renshe.url = https://test.shzypxy.com renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 -renshe.putuo = http://180.167.195.117:18015/ddproject \ No newline at end of file +renshe.putuo = http://180.167.195.117:18015/ddproject + +#renshe.url = https://api.shzypxy.com +#renshe.url = http://trial.shzypxy.com/api +#renshe.secretKey = ad927f0b-6a39-43a7-bac7-163baef1fff7 +#renshe.putuo = http://180.167.195.117:18025/ddproject \ No newline at end of file diff --git a/src/main/resources/code.properties b/src/main/resources/code.properties index 9ce8341..9326718 100644 --- a/src/main/resources/code.properties +++ b/src/main/resources/code.properties @@ -22,6 +22,7 @@ meishu.code-message[10025]=身份证识别错误 meishu.code-message[10026]=姓名或身份证号格式不正确 meishu.code-message[10027]=该手机号已注册 meishu.code-message[10028]=该成员已在其他公司入职 +meishu.code-message[10029]=该账号未被授权 meishu.code-message[20001]=该课程已存在 @@ -30,6 +31,7 @@ meishu.code-message[20002]=该成员已存在 meishu.code-message[30001]=该部门已存在 meishu.code-message[40001]=该目录已存在 +meishu.code-message[40002]=该类型已存在 meishu.code-message[50001]=该试卷已存在 diff --git a/src/main/resources/mapper/AdministerMapper.xml b/src/main/resources/mapper/AdministerMapper.xml index 8af8de4..910be51 100644 --- a/src/main/resources/mapper/AdministerMapper.xml +++ b/src/main/resources/mapper/AdministerMapper.xml @@ -110,6 +110,140 @@ order by t2.account_name ASC + + + + + + + @@ -264,4 +280,22 @@ AND t1.delete_date IS NULL + + diff --git a/src/main/resources/mapper/ClassVodFaceCheckMapper.xml b/src/main/resources/mapper/ClassVodFaceCheckMapper.xml new file mode 100644 index 0000000..b3dd664 --- /dev/null +++ b/src/main/resources/mapper/ClassVodFaceCheckMapper.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/src/main/resources/mapper/ContentVodMappingMapper.xml b/src/main/resources/mapper/ContentVodMappingMapper.xml index 8c3e7d8..a08a0c6 100644 --- a/src/main/resources/mapper/ContentVodMappingMapper.xml +++ b/src/main/resources/mapper/ContentVodMappingMapper.xml @@ -2,23 +2,27 @@ - - - - - - - - - - + - - - create_date, - update_date, - delete_date, - id, content_id, vod_id, vod_alias_name, order_no - + diff --git a/src/main/resources/mapper/CourseDictMapper.xml b/src/main/resources/mapper/CourseDictMapper.xml index 4309dbf..896cded 100644 --- a/src/main/resources/mapper/CourseDictMapper.xml +++ b/src/main/resources/mapper/CourseDictMapper.xml @@ -21,7 +21,8 @@ t.course_type, t.open_status, t.cover_page, - t.remark + t.remark, + t.course_data_type FROM course_dict t LEFT JOIN course_field_mapping t2 ON t.id = t2.course_id @@ -66,6 +67,9 @@ and t6.business_id = #{businessId} + + and t.course_data_type = #{courseDataType} + diff --git a/src/main/resources/mapper/DudaoMapper.xml b/src/main/resources/mapper/DudaoMapper.xml index 4f52ff8..178fc66 100644 --- a/src/main/resources/mapper/DudaoMapper.xml +++ b/src/main/resources/mapper/DudaoMapper.xml @@ -88,7 +88,7 @@ AND t.delete_date IS NULL - SELECT t2.class_id as downCode, t2.member_id, @@ -177,7 +177,7 @@ and t3.area_name = '普陀' - SELECT t1.id, t1.ask_id, @@ -217,7 +217,7 @@ and t3.area_name = '普陀' - SELECT t2.id AS downCode, t2.class_code, @@ -246,7 +246,7 @@ AND t7.delete_date IS NULL - SELECT t7.id AS chapterCode, IFNULL( t6.vod_alias_name, t7.vod_name ) as chapterName, @@ -272,7 +272,7 @@ t7.order_no - SELECT t2.user_name as name, t2.telephone as phone, @@ -287,9 +287,9 @@ - SELECT - t.class_id AS downCode, + t.class_id, t3.id AS member_id, t3.user_name AS studentName, t3.telephone AS phone, @@ -392,7 +392,7 @@ order by id - SELECT t2.id as chapterCode, t.play_length AS chapterTime, @@ -410,7 +410,7 @@ and t.class_id = #{classId} - SELECT t1.`status` as access, unix_timestamp( t1.create_date )*1000 as activityTime, @@ -475,7 +475,7 @@ AND member_id = #{memberId} - SELECT t1.result AS access, UNIX_TIMESTAMP( t1.create_date )* 1000 AS activityTime diff --git a/src/main/resources/mapper/MemberMapper.xml b/src/main/resources/mapper/MemberMapper.xml index e1dd900..dceec01 100644 --- a/src/main/resources/mapper/MemberMapper.xml +++ b/src/main/resources/mapper/MemberMapper.xml @@ -69,6 +69,7 @@ t3.course_name, t2.start_date, t2.end_date, + t9.class_type, t4.cnt AS totalCnt, t5.result AS studyCnt, t6.ttlMember, @@ -89,6 +90,7 @@ GROUP BY t.class_id ) t6 ON t.class_id = t6.class_id LEFT JOIN class_dict t2 ON t.class_id = t2.id LEFT JOIN course_dict t3 ON t2.course_id = t3.id + left join class_type_dict t9 on t2.class_type_id = t9.id LEFT JOIN ( SELECT t.course_id, @@ -123,6 +125,7 @@ LEFT JOIN vod_dict t2 ON t.vod_id = t2.id WHERE t.member_id = #{memberId} + and t.delete_date IS NULL GROUP BY t.member_id, t.vod_id, @@ -468,4 +471,38 @@ and t2.live_id IS not NULL AND t.member_id = #{memberId} + + + + diff --git a/src/main/resources/mapper/OprMemDictMapper.xml b/src/main/resources/mapper/OprMemDictMapper.xml index c4c5631..688783c 100644 --- a/src/main/resources/mapper/OprMemDictMapper.xml +++ b/src/main/resources/mapper/OprMemDictMapper.xml @@ -146,69 +146,125 @@ SELECT - id, + t.id, + t2.vod_name, paper_name, paper_status FROM paper_dict t + left join vod_dict t2 on t.vod_id = t2.id WHERE t.delete_date is null and t.course_id = #{courseId} @@ -60,4 +43,59 @@ AND t.course_id = #{courseId} + + + diff --git a/src/main/resources/mapper/RenSheJuMapper.xml b/src/main/resources/mapper/RenSheJuMapper.xml index b8b8915..cc6919b 100644 --- a/src/main/resources/mapper/RenSheJuMapper.xml +++ b/src/main/resources/mapper/RenSheJuMapper.xml @@ -488,5 +488,25 @@ AND t.delete_date IS NULL + diff --git a/src/main/resources/mapper/VodDictMapper.xml b/src/main/resources/mapper/VodDictMapper.xml index 902a731..37c25cf 100644 --- a/src/main/resources/mapper/VodDictMapper.xml +++ b/src/main/resources/mapper/VodDictMapper.xml @@ -140,4 +140,17 @@ AND delete_date IS NULL + + diff --git a/src/main/resources/mapper/VodLabelDictMapper.xml b/src/main/resources/mapper/VodLabelDictMapper.xml index 797da16..3b3e4a3 100644 --- a/src/main/resources/mapper/VodLabelDictMapper.xml +++ b/src/main/resources/mapper/VodLabelDictMapper.xml @@ -20,7 +20,7 @@ -- libgit2 0.25.0