Commit c88a9ad1 by 涂亚平

普陀督导组结构校对

1 parent 6e9f568f
Showing with 1602 additions and 176 deletions
...@@ -6,9 +6,9 @@ import com.subsidy.common.ResponseVO; ...@@ -6,9 +6,9 @@ import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.*; import com.subsidy.dto.administer.*;
import com.subsidy.dto.member.QingxuetangLoginDTO;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.service.AdministerService; import com.subsidy.service.AdministerService;
import com.subsidy.dto.classDict.SocialTestDetailDTO;
import com.subsidy.vo.member.DownloadFailMembersDTO; import com.subsidy.vo.member.DownloadFailMembersDTO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List;
/** /**
* <p> * <p>
...@@ -122,20 +121,49 @@ public class AdministerController { ...@@ -122,20 +121,49 @@ public class AdministerController {
} }
@PostMapping("exerciseTest") @PostMapping("exerciseTest")
@ApiOperation("班级管理--测评成绩 id 班级id userName paperId pageSize pageNum") @ApiOperation("##2024.3##班级管理(企业线上化培训)--测评成绩 id 班级id userName paperId pageSize pageNum")
@LoginRequired @LoginRequired
public ResponseVO exerciseTest(@RequestBody ClassDetailDTO classDetailDTO) { public ResponseVO exerciseTest(@RequestBody ClassDetailDTO classDetailDTO) {
return ResponseData.generateCreatedResponse(0, administerService.exerciseTest(classDetailDTO)); return ResponseData.generateCreatedResponse(0, administerService.exerciseTest(classDetailDTO));
} }
@PostMapping("exportExerciseTest") @PostMapping("exportExerciseTest")
@ApiOperation("班级管理--测评成绩 id 班级id userName paperId") @ApiOperation("##2024.3##班级管理--测评成绩 id 班级id userName paperId")
@LoginRequired @LoginRequired
public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception { public void exportExerciseTest(@RequestBody ClassDetailDTO classDetailDTO) throws Exception {
classDetailDTO.setFlag(true); classDetailDTO.setFlag(true);
administerService.exportExerciseTest(classDetailDTO); 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") @PostMapping("getMemberPapers")
@ApiOperation("获取某个成员某个卷子的做题历史 memberId paperId") @ApiOperation("获取某个成员某个卷子的做题历史 memberId paperId")
@LoginRequired @LoginRequired
......
...@@ -38,7 +38,7 @@ public class ClassDictController { ...@@ -38,7 +38,7 @@ public class ClassDictController {
private ClassDictService classDictService; private ClassDictService classDictService;
@PostMapping("getAllClasses") @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 @LoginRequired
public ResponseVO getAllClasses(@RequestBody ClassDictDO classDictDO)throws Exception{ public ResponseVO getAllClasses(@RequestBody ClassDictDO classDictDO)throws Exception{
return ResponseData.generateCreatedResponse(0,classDictService.getAllClasses(classDictDO)); return ResponseData.generateCreatedResponse(0,classDictService.getAllClasses(classDictDO));
...@@ -52,20 +52,22 @@ public class ClassDictController { ...@@ -52,20 +52,22 @@ public class ClassDictController {
} }
@PostMapping("addClass") @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 @LoginRequired
public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){ public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){
return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO)); return ResponseData.generateCreatedResponse(0,classDictService.addClass(addClassDTO));
} }
@PostMapping("updateClass") @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:测试前人脸识别验证" + "testRule:测试规则 classType limitHour 学习上限时长 imageClassCheck:首次进入班级时人脸验证 imageTestCheck:测试前人脸识别验证" +
"activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" + "activityDetection:活跃度检测开启/关闭 activityDetectionMethod:活跃度检测方式 firstDragAllowed:首次播放允许拖曳" +
"firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode") "firstSpeedAllowed:首次播放允许倍速 playSnap 课程抓拍 classCode paperTime测试时间开关 paperTimeLimit测试时间限制 faceCheck 人脸识别开关 vodIds[]")
@LoginRequired @LoginRequired
public ResponseVO updateClass(@RequestBody ClassDictDO classDictDO){ public ResponseVO updateClass(@RequestBody AddClassDTO addClassDTO){
return ResponseData.generateCreatedResponse(0,classDictService.updateClass(classDictDO)); return ResponseData.generateCreatedResponse(0,classDictService.updateClass(addClassDTO));
} }
@PostMapping("classDetail") @PostMapping("classDetail")
...@@ -136,5 +138,10 @@ public class ClassDictController { ...@@ -136,5 +138,10 @@ public class ClassDictController {
classDictService.downloadFailClassMembers(downloadFailClassMembers); classDictService.downloadFailClassMembers(downloadFailClassMembers);
} }
@PostMapping("classVods")
@ApiOperation("##2024.3##通过班级id查询视频 id 班级id")
public ResponseVO classVods(@RequestBody ClassDictDO classDictDO){
return ResponseData.generateCreatedResponse(0,classDictService.classVods(classDictDO));
}
} }
...@@ -60,4 +60,16 @@ public class ClassTypeDictController { ...@@ -60,4 +60,16 @@ public class ClassTypeDictController {
return ResponseData.generateCreatedResponse(0,classTypeDictService.queryClassTypes(classTypeDTO)); 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));
}
} }
package com.subsidy.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 百分比认证视频表 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-03-18
*/
@RestController
@Api(tags = "百分比认证视频表")
@RequestMapping("/class-vod-face-check-do")
public class ClassVodFaceCheckController {
}
...@@ -47,7 +47,7 @@ public class ContentVodMappingController { ...@@ -47,7 +47,7 @@ public class ContentVodMappingController {
} }
@PostMapping("addContentVod") @PostMapping("addContentVod")
@ApiOperation("添加课程内容视频:contentId/内容ID、vodIds [vodId, vodAliasName]") @ApiOperation("##2024.3##添加课程内容视频:contentId/内容ID、vodIds [vodId, vodAliasName]")
@LoginRequired @LoginRequired
public ResponseVO addContentVod(@RequestBody AddContentVodDTO addContentVod) { public ResponseVO addContentVod(@RequestBody AddContentVodDTO addContentVod) {
contentVodMappingService.addContentVod(addContentVod); contentVodMappingService.addContentVod(addContentVod);
......
...@@ -22,9 +22,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -22,9 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
* <p> * <p>
* 前端控制器 * 前端控制器
* </p> * </p>
*
* @author DengMin
* @since 2021-10-11
*/ */
@RestController @RestController
@Api(tags = "课程表") @Api(tags = "课程表")
...@@ -35,7 +32,7 @@ public class CourseDictController { ...@@ -35,7 +32,7 @@ public class CourseDictController {
private CourseDictService courseDictService; private CourseDictService courseDictService;
@PostMapping("addCourse") @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 @LoginRequired
public ResponseVO addCourse(@RequestBody AddCourseDTO addCourseDTO){ public ResponseVO addCourse(@RequestBody AddCourseDTO addCourseDTO){
return ResponseData.generateCreatedResponse(0,courseDictService.addCourse(addCourseDTO)); return ResponseData.generateCreatedResponse(0,courseDictService.addCourse(addCourseDTO));
...@@ -49,7 +46,7 @@ public class CourseDictController { ...@@ -49,7 +46,7 @@ public class CourseDictController {
} }
@PostMapping("queryCourses") @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 @LoginRequired
public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){ public ResponseVO queryCourses(@RequestBody QueryCoursesDTO queryCoursesDTO){
return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO)); return ResponseData.generateCreatedResponse(0,courseDictService.queryCourses(queryCoursesDTO));
...@@ -63,7 +60,7 @@ public class CourseDictController { ...@@ -63,7 +60,7 @@ public class CourseDictController {
} }
@PostMapping("queryCompanyCourse") @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 @LoginRequired
public ResponseVO queryCompanyCourse(@RequestBody QueryCoursesDTO queryCoursesDTO){ public ResponseVO queryCompanyCourse(@RequestBody QueryCoursesDTO queryCoursesDTO){
return ResponseData.generateCreatedResponse(0,courseDictService.queryCompanyCourse(queryCoursesDTO)); return ResponseData.generateCreatedResponse(0,courseDictService.queryCompanyCourse(queryCoursesDTO));
......
package com.subsidy.controller; package com.subsidy.controller;
import com.subsidy.service.DudaoService; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -84,5 +84,4 @@ public class ExerciseDictController { ...@@ -84,5 +84,4 @@ public class ExerciseDictController {
return ResponseData.generateCreatedResponse(0,exerciseDictService.select(file,paperId,courseId)); return ResponseData.generateCreatedResponse(0,exerciseDictService.select(file,paperId,courseId));
} }
} }
...@@ -43,14 +43,14 @@ public class ImageCheckRecordController { ...@@ -43,14 +43,14 @@ public class ImageCheckRecordController {
} }
@PostMapping("imageCheck") @PostMapping("imageCheck")
@ApiOperation("课程/测评人身核验(权威库:身份证) PC端 id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") @ApiOperation("课程/测评人身核验(权威库:身份证) PC端 vodId id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId")
@TimeRequired @TimeRequired
public ResponseVO imageCheck(@RequestBody ImageCheckDTO imageCheckDTO) throws Exception { public ResponseVO imageCheck(@RequestBody ImageCheckDTO imageCheckDTO) throws Exception {
return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckDTO)); return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckDTO));
} }
@PostMapping("h5ImageCheck") @PostMapping("h5ImageCheck")
@ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId") @ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 vodId id 用户id classId 班级id classPlace 1:视频的时候检测 2:测评的时候检测 paperId")
@TimeRequired @TimeRequired
public ResponseVO h5CheckResult(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{ public ResponseVO h5CheckResult(@RequestBody ImageCheckDTO imageCheckDTO)throws Exception{
return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckDTO)); return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckDTO));
......
package com.subsidy.controller; package com.subsidy.controller;
import com.alibaba.fastjson.JSON;
import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO; import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired; import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.common.interceptor.TimeRequired; import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.administer.VerifyCodeDTO; import com.subsidy.dto.administer.VerifyCodeDTO;
import com.subsidy.dto.live.PolyvInfoDTO;
import com.subsidy.dto.member.*; 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.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.service.MemberService; import com.subsidy.service.MemberService;
import com.subsidy.vo.live.PolyvInfoVO; import com.subsidy.vo.live.PolyvInfoVO;
import com.subsidy.dto.member.CheckItemDTO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -50,8 +47,6 @@ public class MemberController { ...@@ -50,8 +47,6 @@ public class MemberController {
memberService.exportAllMembers(getAllDTO); memberService.exportAllMembers(getAllDTO);
} }
@PostMapping("deleteMember") @PostMapping("deleteMember")
@ApiOperation("删除成员 id ") @ApiOperation("删除成员 id ")
@LoginRequired @LoginRequired
...@@ -106,7 +101,6 @@ public class MemberController { ...@@ -106,7 +101,6 @@ public class MemberController {
return ResponseData.generateCreatedResponse(0,memberService.kexinkuLogin(kexinkuLoginDTO)); return ResponseData.generateCreatedResponse(0,memberService.kexinkuLogin(kexinkuLoginDTO));
} }
@PostMapping("checkStatus") @PostMapping("checkStatus")
@ApiOperation("实名制验证状态 id") @ApiOperation("实名制验证状态 id")
@TimeRequired @TimeRequired
...@@ -130,7 +124,7 @@ public class MemberController { ...@@ -130,7 +124,7 @@ public class MemberController {
@PostMapping("myCourses") @PostMapping("myCourses")
@ApiOperation("手机端:我的学习--补贴培训课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ") @ApiOperation("手机端:我的学习--补贴培训课程 memberId 学员id status 状态 0:全部 1:进行中 2:待开始 3:已完成 ")
// @LoginRequired @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){ public ResponseVO myCourses(@RequestBody MyCoursesDTO myCoursesDTO){
return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO)); return ResponseData.generateCreatedResponse(0,memberService.myCourses(myCoursesDTO));
...@@ -145,13 +139,32 @@ public class MemberController { ...@@ -145,13 +139,32 @@ public class MemberController {
} }
@PostMapping("contentVod") @PostMapping("contentVod")
@ApiOperation("手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id") @ApiOperation("##2024.3##企业线上培训----手机端:目录+视频 classId 班级id courseId 课程 memberId 学员id")
@LoginRequired @LoginRequired
@TimeRequired @TimeRequired
public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){ public ResponseVO contentVod(@RequestBody ContentMemberDTO contentVodDTO){
return ResponseData.generateCreatedResponse(0,memberService.contentVod(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") @PostMapping("contentFiles")
@ApiOperation("手机端:目录+课件 courseId 课程 memberId 学员id") @ApiOperation("手机端:目录+课件 courseId 课程 memberId 学员id")
@LoginRequired @LoginRequired
...@@ -176,6 +189,14 @@ public class MemberController { ...@@ -176,6 +189,14 @@ public class MemberController {
return ResponseData.generateCreatedResponse(0,memberService.getCourseTest(contentMemberDTO)); 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") @PostMapping("getTestDoneDetail")
@ApiOperation("获取某个测评学生的完成情况 paperId memberId") @ApiOperation("获取某个测评学生的完成情况 paperId memberId")
@LoginRequired @LoginRequired
......
...@@ -165,7 +165,7 @@ public class OssController { ...@@ -165,7 +165,7 @@ public class OssController {
// 完成分片上传。 // 完成分片上传。
CompleteMultipartUploadResult completeMultipartUploadResult = ossClient.completeMultipartUpload(completeMultipartUploadRequest); CompleteMultipartUploadResult completeMultipartUploadResult = ossClient.completeMultipartUpload(completeMultipartUploadRequest);
uploadFileVO.setUrl(completeMultipartUploadResult.getLocation()); uploadFileVO.setUrl(completeMultipartUploadResult.getLocation().replace("http","https"));
System.out.println(completeMultipartUploadResult.getLocation()); System.out.println(completeMultipartUploadResult.getLocation());
} catch (OSSException oe) { } catch (OSSException oe) {
System.out.println("Caught an OSSException, which means your request made it to OSS, " System.out.println("Caught an OSSException, which means your request made it to OSS, "
......
...@@ -69,4 +69,9 @@ public class RenSheJuController { ...@@ -69,4 +69,9 @@ public class RenSheJuController {
return renSheJuService.clear(); return renSheJuService.clear();
} }
@PostMapping("post6plus")
public RensheResponseVO post6plus() throws Exception {
return renSheJuService.post6plus();
}
} }
...@@ -70,7 +70,7 @@ public class VodLabelDictController { ...@@ -70,7 +70,7 @@ public class VodLabelDictController {
@PostMapping(value = "queryVodLabelTree") @PostMapping(value = "queryVodLabelTree")
@ApiOperation("获取目录和视频") @ApiOperation("获取目录和视频")
@LoginRequired // @LoginRequired
public ResponseVO getContentVodTree() { public ResponseVO getContentVodTree() {
return ResponseData.generateCreatedResponse(0, vodLableDictService.queryVodLabelTree()); return ResponseData.generateCreatedResponse(0, vodLableDictService.queryVodLabelTree());
} }
......
...@@ -13,5 +13,7 @@ public class AddClassDTO extends ClassDictDO { ...@@ -13,5 +13,7 @@ public class AddClassDTO extends ClassDictDO {
private List<Long> memberIds; private List<Long> memberIds;
private List<Long> vodIds;
private List<ClassNoticeDO> classNoticeDOS; private List<ClassNoticeDO> classNoticeDOS;
} }
package com.subsidy.dto.classDict;
import lombok.Data;
@Data
public class SocialTestDetailDTO {
private Integer pageSize;
private Integer pageNum;
private Long memberId;
private Long id;
}
...@@ -10,4 +10,5 @@ public class ContentVodDTO { ...@@ -10,4 +10,5 @@ public class ContentVodDTO {
private Long vodId; private Long vodId;
private String vodAliasName; private String vodAliasName;
} }
...@@ -67,4 +67,7 @@ public class AddCourseDTO { ...@@ -67,4 +67,7 @@ public class AddCourseDTO {
*/ */
private List<Long> businessIds; private List<Long> businessIds;
private Integer courseDataType;
} }
...@@ -27,4 +27,6 @@ public class QueryCoursesDTO { ...@@ -27,4 +27,6 @@ public class QueryCoursesDTO {
private String openStatus; private String openStatus;
private Integer courseDataType;
} }
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;
}
package com.subsidy.dto.dudao;
import lombok.Data;
@Data
public class AnswerAndQuestionList {
/**
* 回答时间
*/
private long answer;
/**
* 提问时间
*/
private long question;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class AnswerBasic {
/**
* 答疑辅导,提问和回答都存在值时才进行传递
*/
private List<AnswerAndQuestionList> answerAndQuestionList;
private String downCode;
private String identity;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class ChapterExamBasic {
/**
* 是否通过,0通过1未通过
*/
private Long access;
/**
* 活跃度列表(数组),【数组】
*/
private List<ActivityList> activityList;
/**
* 章节(课程)编码
*/
private String chapterCode;
/**
* 临时班级(项目)编号
*/
private String downCode;
/**
* 章节(课程)考试时间列表,【数组】
*/
private List<ExamList> examList;
/**
* 章节(课程)考试总时长,该字段数据应为当日产生examList列表内多条结束时间-开始时间累加和【秒】
*/
private Long examTime;
/**
* 学员身份证号,会对身份证号长度、格式进行校验、X用大写
*/
private String identity;
/**
* 学员电话号,会对学生手机号长度、格式进行校验
*/
private String phone;
/**
* 学员姓名
*/
private String studentName;
}
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;
}
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;
}
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> epidemicSituationClassBasic;
private String privateKey;
}
package com.subsidy.dto.dudao;
import lombok.Data;
@Data
public class ClassCodeBasic {
/**
* 班级(项目)编号
*/
private String classCode;
/**
* 临时班级(项目)编号
*/
private String downCode;
}
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> loginList;
/**
* 活跃度列表,【数组】
*/
private List<ActivityList> activityList;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class ClassHourBehaviorDTO {
/**
* 班级(项目)学时列表,【数组】班级(项目)学时列表
*/
private List<ClassHourBasic> classHourBasic;
/**
* 私钥
*/
private String privateKey;
}
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;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class LoginList {
/**
* 章节(课程)学时列表
*/
private List<ChapterList3> chapterList;
/**
* 下线时间,【13位时间戳】【精确到毫秒】
*/
private long endTime;
/**
* 登录ip,会对IP进行校验
*/
private String ip;
/**
* 上线时间,【13位时间戳】【精确到毫秒】
*/
private long startTime;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class UploadChapterBehaviorDTO {
/**
* 章节(课程)考试列表,【数组】
*/
private List<ChapterExamBasic> chapterExamBasic;
/**
* 私钥
*/
private String privateKey;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class UploadClassAnswerQuestionBehaviorDTO {
private List<AnswerBasic> answerBasic;
private String privateKey;
}
package com.subsidy.dto.dudao;
import lombok.Data;
import java.util.List;
@Data
public class UploadClassCodeDTO {
private List<ClassCodeBasic> classCodeBasic;
/**
* 私钥
*/
private String privateKey;
}
...@@ -25,4 +25,9 @@ public class ImageCheckDTO { ...@@ -25,4 +25,9 @@ public class ImageCheckDTO {
*/ */
private Integer classPlace; private Integer classPlace;
/**
* 视频id
*/
private Long vodId;
} }
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;
}
package com.subsidy.vo.member; package com.subsidy.dto.member;
import com.subsidy.util.excel.ExcelColumnUtil; import com.subsidy.util.excel.ExcelColumnUtil;
import lombok.Data; import lombok.Data;
......
package com.subsidy.dto.renshe; package com.subsidy.dto.renshe;
import com.subsidy.dto.renshe.ClassHourBasic;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
......
...@@ -8,6 +8,9 @@ import com.subsidy.model.ClassDictDO; ...@@ -8,6 +8,9 @@ import com.subsidy.model.ClassDictDO;
import com.subsidy.model.CompanyDictDO; import com.subsidy.model.CompanyDictDO;
import com.subsidy.vo.administer.*; import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO; 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.company.GetAllCompanyVO;
import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.sign.AnswerRecordVO; import com.subsidy.vo.sign.AnswerRecordVO;
...@@ -44,6 +47,21 @@ public interface AdministerMapper extends BaseMapper<AdministerDO> { ...@@ -44,6 +47,21 @@ public interface AdministerMapper extends BaseMapper<AdministerDO> {
IPage<ExerciseTestVO> exerciseTest(IPage iPage, Long classId, String userName); IPage<ExerciseTestVO> exerciseTest(IPage iPage, Long classId, String userName);
/** /**
* 计算某个人的章通过率
*/
VodPassRateVO vodPassRate(Long classId, Long memberId);
/**
* 测评概览
*/
List<SocialTestDetailVO> socialTestDetail(Long classId, Long memberId);
/**
* 班级考试详情 倒序
*/
List<SocialTestRecordVO> socialTestRecord(Long classId,Long memberId);
/**
* 获取班级成员---答疑记录 * 获取班级成员---答疑记录
*/ */
IPage<AnswerRecordVO> answerRecord(IPage iPage, Long classId, String userName); IPage<AnswerRecordVO> answerRecord(IPage iPage, Long classId, String userName);
......
...@@ -6,6 +6,7 @@ import com.subsidy.model.ClassDictDO; ...@@ -6,6 +6,7 @@ import com.subsidy.model.ClassDictDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.model.VodDictDO; import com.subsidy.model.VodDictDO;
import com.subsidy.vo.classdict.*; import com.subsidy.vo.classdict.*;
import com.subsidy.vo.vod.VodInfoVO;
import org.springframework.data.repository.query.Param; import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -25,7 +26,7 @@ public interface ClassDictMapper extends BaseMapper<ClassDictDO> { ...@@ -25,7 +26,7 @@ public interface ClassDictMapper extends BaseMapper<ClassDictDO> {
/** /**
* 获取某企业的全部班级 * 获取某企业的全部班级
*/ */
List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO); List<GetAllClassesVO> getAllClasses(Long companyId,String className,String startDate,String endDate,String openStatus,Integer classType);
/** /**
* 获取某班级下的全部视频 * 获取某班级下的全部视频
...@@ -72,4 +73,9 @@ public interface ClassDictMapper extends BaseMapper<ClassDictDO> { ...@@ -72,4 +73,9 @@ public interface ClassDictMapper extends BaseMapper<ClassDictDO> {
*/ */
List<Long> dailyClassInfo(); List<Long> dailyClassInfo();
/**
* 查看班级里有多少视频
*/
List<VodInfoVO> classVods(Long classId);
} }
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;
/**
* <p>
* 百分比认证视频表 Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-03-18
*/
@Repository
public interface ClassVodFaceCheckMapper extends BaseMapper<ClassVodFaceCheckDO> {
List<Long> faceVodIds(Long classId);
}
...@@ -2,8 +2,11 @@ package com.subsidy.mapper; ...@@ -2,8 +2,11 @@ package com.subsidy.mapper;
import com.subsidy.model.ContentVodMappingDO; import com.subsidy.model.ContentVodMappingDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.model.CourseDictDO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* <p> * <p>
* 目录视频关系表 Mapper 接口 * 目录视频关系表 Mapper 接口
...@@ -12,7 +15,17 @@ import org.springframework.stereotype.Repository; ...@@ -12,7 +15,17 @@ import org.springframework.stereotype.Repository;
* @author DengMin * @author DengMin
* @since 2022-07-19 * @since 2022-07-19
*/ */
@Repository @Repository
public interface ContentVodMappingMapper extends BaseMapper<ContentVodMappingDO> { public interface ContentVodMappingMapper extends BaseMapper<ContentVodMappingDO> {
/**
* 查看章节属于哪个课程,返回课程的详细信息
*/
CourseDictDO getCourseByContentId(Long contentId);
/**
* 查看某个课程之前视频的ids
*/
List<Long> oldVodIds(Long contentId);
} }
...@@ -36,5 +36,8 @@ public interface CourseContentMapper extends BaseMapper<CourseContentDO> { ...@@ -36,5 +36,8 @@ public interface CourseContentMapper extends BaseMapper<CourseContentDO> {
*/ */
List<FileDictDO> contentFiles(Long courseId); List<FileDictDO> contentFiles(Long courseId);
/**
* 课程最大的orderNo
*/
Integer selectMaxOrderNo(Long courseId); Integer selectMaxOrderNo(Long courseId);
} }
...@@ -27,7 +27,7 @@ public interface CourseDictMapper extends BaseMapper<CourseDictDO> { ...@@ -27,7 +27,7 @@ public interface CourseDictMapper extends BaseMapper<CourseDictDO> {
* courseName fieldId categoryId jobId courseRank courseType * courseName fieldId categoryId jobId courseRank courseType
* @return * @return
*/ */
IPage<QueryCoursesVO > queryCourses(IPage page, String courseName, Long fieldId,Long categoryId,Long jobId,Long rankId, String courseType,Long companyId,String openStatus,Long businessId); IPage<QueryCoursesVO > queryCourses(IPage page, String courseName, Long fieldId,Long categoryId,Long jobId,Long rankId, String courseType,Long companyId,String openStatus,Long businessId,Integer courseDataType);
/** /**
* 通过课程id查询课程下的学生-----弃用 * 通过课程id查询课程下的学生-----弃用
......
package com.subsidy.mapper; package com.subsidy.mapper;
import com.subsidy.dto.renshe.ChapterList2; import com.subsidy.dto.dudao.ChapterList2;
import com.subsidy.dto.renshe.ChapterList3; import com.subsidy.dto.dudao.ChapterList3;
import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.model.OprMemDictDO; import com.subsidy.model.OprMemDictDO;
import com.subsidy.vo.renshe.*; import com.subsidy.vo.dudao.*;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -111,7 +111,7 @@ public interface DudaoMapper { ...@@ -111,7 +111,7 @@ public interface DudaoMapper {
/** /**
* 考试活跃度检测--人脸 * 考试活跃度检测--人脸
*/ */
List<ExamActivitiesVO> examActivities(Long classId,Long memberId); List<ExamActivitiesVO> examActivities(Long classId, Long memberId);
/** /**
* 找到某人某个时间段内的测评记录 * 找到某人某个时间段内的测评记录
......
...@@ -93,6 +93,15 @@ public interface MemberMapper extends BaseMapper<MemberDO> { ...@@ -93,6 +93,15 @@ public interface MemberMapper extends BaseMapper<MemberDO> {
*/ */
List<MemberLivesVO> memberLives(Long memberId); List<MemberLivesVO> memberLives(Long memberId);
/**
* 查看某个人某个课程的视频是否已经学完
*/
Integer checkClassVodPlayStatus(Long memberId,Long classId,Long vodId);
/**
* 查看某个人某个课程的视频是否已经学完
*/
Integer checkClassPaperPassStatus(Long memberId,Long classId,Long paperId);
} }
package com.subsidy.mapper; package com.subsidy.mapper;
import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.PaperDictDO; import com.subsidy.model.PaperDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.paper.MemberMaxScoreVO;
import com.subsidy.vo.paper.QueryPapersVO; import com.subsidy.vo.paper.QueryPapersVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -34,4 +36,15 @@ public interface PaperDictMapper extends BaseMapper<PaperDictDO> { ...@@ -34,4 +36,15 @@ public interface PaperDictMapper extends BaseMapper<PaperDictDO> {
*/ */
Integer queryCoursePapersCnt(Long courseId); Integer queryCoursePapersCnt(Long courseId);
/**
* 某学员某个班级某个视频获得的最高分数
*/
MemberMaxScoreVO memberMaxScore(Long memberId, Long classId, Long vodId);
/**
* 通过 courseId paperId 查看卷子
* 倒序查询课程对应的卷子
*/
List<Long> lastPaper(Long courseId);
} }
...@@ -116,7 +116,7 @@ public interface RenSheJuMapper { ...@@ -116,7 +116,7 @@ public interface RenSheJuMapper {
List<ClassImageChecksVO> passExamCheck(Long classId); List<ClassImageChecksVO> passExamCheck(Long classId);
/** /**
* 进入到课程第二次做人脸识别 弃用 * 进入到课程第二次做人脸识别
*/ */
List<ClassImageChecksVO> studyCheck(Long classId); List<ClassImageChecksVO> studyCheck(Long classId);
...@@ -145,5 +145,9 @@ public interface RenSheJuMapper { ...@@ -145,5 +145,9 @@ public interface RenSheJuMapper {
*/ */
List<Long> imageClassIds(String classType); List<Long> imageClassIds(String classType);
/**
* 补推人脸识别数据
*/
List<ClassImageChecksVO> post6plus(Long classId);
} }
...@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.model.VodDictDO; import com.subsidy.model.VodDictDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.subsidy.vo.vod.ClassVodCompleteInfoVO; import com.subsidy.vo.vod.*;
import com.subsidy.vo.vod.GetContendVodsVO;
import com.subsidy.vo.vod.QueryVodPageVO;
import com.subsidy.vo.vod.VodPlayStateVO;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -51,4 +48,6 @@ public interface VodDictMapper extends BaseMapper<VodDictDO> { ...@@ -51,4 +48,6 @@ public interface VodDictMapper extends BaseMapper<VodDictDO> {
List<VodDictDO> getCompanyVod(Long contentId); List<VodDictDO> getCompanyVod(Long contentId);
IPage<QueryVodPageVO> queryVodPage(Page page, Long labelId, String vodName); IPage<QueryVodPageVO> queryVodPage(Page page, Long labelId, String vodName);
List<VodInfoVO> vodInfo(Long labelId);
} }
...@@ -48,7 +48,10 @@ public class ClassDictDO extends BaseModel { ...@@ -48,7 +48,10 @@ public class ClassDictDO extends BaseModel {
*/ */
private String classTypeId; private String classTypeId;
private String classType; /**
* 班级类型:0:企业线上培训 1:企业内训 2:学徒制
*/
private Integer classType;
/** /**
* 课程id * 课程id
...@@ -145,4 +148,19 @@ public class ClassDictDO extends BaseModel { ...@@ -145,4 +148,19 @@ public class ClassDictDO extends BaseModel {
*/ */
private Integer checkFlag; private Integer checkFlag;
/**
* 考试时间限制 为空的时候不限制
*/
private Integer paperTimeLimit;
/**
* 人脸识别开关
*/
private Integer faceCheck;
/**
* 考试时长开关
*/
private Integer paperTime;
} }
...@@ -50,4 +50,9 @@ public class ClassMemberMappingDO extends BaseModel { ...@@ -50,4 +50,9 @@ public class ClassMemberMappingDO extends BaseModel {
*/ */
private String photo; private String photo;
/**
*
*/
private Integer submitFlag;
} }
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;
/**
* <p>
* 百分比认证视频表
* </p>
*
* @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;
}
...@@ -43,6 +43,12 @@ public class CourseDictDO extends BaseModel { ...@@ -43,6 +43,12 @@ public class CourseDictDO extends BaseModel {
*/ */
private String courseType; private String courseType;
/**
* 0:企业线上培训 1:学徒制
*/
private Integer courseDataType;
/** /**
* 课程封面 * 课程封面
*/ */
......
...@@ -104,5 +104,39 @@ public class MemberDO extends BaseModel { ...@@ -104,5 +104,39 @@ public class MemberDO extends BaseModel {
*/ */
private String status; 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;
} }
...@@ -40,5 +40,10 @@ public class PaperDictDO extends BaseModel { ...@@ -40,5 +40,10 @@ public class PaperDictDO extends BaseModel {
*/ */
private Integer paperStatus; private Integer paperStatus;
/**
* 视频id
*/
private Long vodId;
} }
...@@ -6,11 +6,13 @@ import com.subsidy.dto.administer.*; ...@@ -6,11 +6,13 @@ import com.subsidy.dto.administer.*;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.vo.administer.*; import com.subsidy.vo.administer.*;
import com.subsidy.vo.classdict.ClassDetailVO; 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.image.GetMemberCheckDetailVO;
import com.subsidy.vo.member.ClassSignVO; import com.subsidy.vo.member.ClassSignVO;
import com.subsidy.vo.member.DownloadFailMembersDTO; import com.subsidy.vo.member.DownloadFailMembersDTO;
import com.subsidy.vo.member.ImportMemberResultVO; import com.subsidy.vo.member.ImportMemberResultVO;
import com.subsidy.vo.member.ImportMemberVO;
import com.subsidy.vo.sign.AnswerRecordVO; import com.subsidy.vo.sign.AnswerRecordVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -55,6 +57,14 @@ public interface AdministerService extends IService<AdministerDO> { ...@@ -55,6 +57,14 @@ public interface AdministerService extends IService<AdministerDO> {
List<ExerciseTestVO> exportExerciseTest(ClassDetailDTO classDetailDTO)throws Exception; List<ExerciseTestVO> exportExerciseTest(ClassDetailDTO classDetailDTO)throws Exception;
IPage<ExerciseTestVO> socialExerciseTest(ClassDetailDTO classDetailDTO);
List<SocialTestDetailVO> socialTestDetail(SocialTestDetailDTO socialTestDetailDTO);
List<SocialTestRecordVO> socialTestRecord(SocialTestDetailDTO socialTestDetailDTO);
List<ExportSocialExerciseTestVO> exportSocialExerciseTest(ClassDetailDTO classDetailDTO)throws Exception;
List<GetMemberPapersVO> getMemberPapers(ExerciseDoneResultDO exerciseDoneResultDO); List<GetMemberPapersVO> getMemberPapers(ExerciseDoneResultDO exerciseDoneResultDO);
List<GetPaperDetailVO> getPaperDetail(ExerciseDoneHistoryDO exerciseDoneHistoryDO); List<GetPaperDetailVO> getPaperDetail(ExerciseDoneHistoryDO exerciseDoneHistoryDO);
......
...@@ -8,10 +8,12 @@ import com.subsidy.dto.classDict.GetSpareMembersDTO; ...@@ -8,10 +8,12 @@ import com.subsidy.dto.classDict.GetSpareMembersDTO;
import com.subsidy.model.ClassDictDO; import com.subsidy.model.ClassDictDO;
import com.subsidy.model.ClassMemberMappingDO; import com.subsidy.model.ClassMemberMappingDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.vo.classdict.ClassDetail;
import com.subsidy.vo.classdict.GetAllClassesVO; import com.subsidy.vo.classdict.GetAllClassesVO;
import com.subsidy.vo.classdict.GetClassBaseInfoVO; import com.subsidy.vo.classdict.GetClassBaseInfoVO;
import com.subsidy.vo.member.DownloadFailClassMembers; import com.subsidy.vo.member.DownloadFailClassMembers;
import com.subsidy.vo.member.ImportClassMembersVO; import com.subsidy.vo.member.ImportClassMembersVO;
import com.subsidy.vo.vod.VodInfoVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
...@@ -33,9 +35,9 @@ public interface ClassDictService extends IService<ClassDictDO> { ...@@ -33,9 +35,9 @@ public interface ClassDictService extends IService<ClassDictDO> {
Long addClass(AddClassDTO addClassDTO); Long addClass(AddClassDTO addClassDTO);
String updateClass(ClassDictDO classDictDO); String updateClass(AddClassDTO addClassDTO);
ClassDictDO classDetail(ClassDictDO classDictDO); ClassDetail classDetail(ClassDictDO classDictDO);
String removeMember(ClassMemberMappingDO classMemberMappingDO); String removeMember(ClassMemberMappingDO classMemberMappingDO);
...@@ -55,4 +57,6 @@ public interface ClassDictService extends IService<ClassDictDO> { ...@@ -55,4 +57,6 @@ public interface ClassDictService extends IService<ClassDictDO> {
void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers); void downloadFailClassMembers(DownloadFailClassMembers downloadFailClassMembers);
List<VodInfoVO> classVods(ClassDictDO classDictDO);
} }
package com.subsidy.service; package com.subsidy.service;
import com.subsidy.dto.classDict.ClassTypeDTO; import com.subsidy.dto.classDict.ClassTypeDTO;
import com.subsidy.mapper.ClassTypeDictMapper;
import com.subsidy.model.ClassTypeDictDO; import com.subsidy.model.ClassTypeDictDO;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
...@@ -24,4 +25,7 @@ public interface ClassTypeDictService extends IService<ClassTypeDictDO> { ...@@ -24,4 +25,7 @@ public interface ClassTypeDictService extends IService<ClassTypeDictDO> {
List<ClassTypeDictDO> queryClassTypes(ClassTypeDTO classTypeDTO); List<ClassTypeDictDO> queryClassTypes(ClassTypeDTO classTypeDTO);
List<ClassTypeDictDO> queryOnlineClassTypes(ClassTypeDictDO classTypeDictDO);
ClassTypeDictDO querySocialClassTypes(ClassTypeDictDO classTypeDictDO);
} }
package com.subsidy.service;
import com.subsidy.model.ClassVodFaceCheckDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 百分比认证视频表 服务类
* </p>
*
* @author Tuyp
* @since 2024-03-18
*/
public interface ClassVodFaceCheckService extends IService<ClassVodFaceCheckDO> {
}
package com.subsidy.service; package com.subsidy.service;
import com.subsidy.dto.renshe.*; import com.subsidy.vo.dudao.RensheResponseVO;
import com.subsidy.vo.renshe.RensheResponseVO;
import java.io.IOException; import java.io.IOException;
......
...@@ -3,10 +3,8 @@ package com.subsidy.service; ...@@ -3,10 +3,8 @@ package com.subsidy.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.subsidy.dto.administer.VerifyCodeDTO; import com.subsidy.dto.administer.VerifyCodeDTO;
import com.subsidy.dto.live.PolyvInfoDTO;
import com.subsidy.dto.member.*; import com.subsidy.dto.member.*;
import com.subsidy.model.ExerciseDoneResultDO; import com.subsidy.model.ExerciseDoneResultDO;
import com.subsidy.model.FileDictDO;
import com.subsidy.model.MemberDO; import com.subsidy.model.MemberDO;
import com.subsidy.vo.administer.UserRoleVO; import com.subsidy.vo.administer.UserRoleVO;
import com.subsidy.vo.live.MemberLivesVO; import com.subsidy.vo.live.MemberLivesVO;
...@@ -59,12 +57,18 @@ public interface MemberService extends IService<MemberDO> { ...@@ -59,12 +57,18 @@ public interface MemberService extends IService<MemberDO> {
ContentVodNewVO contentVod(ContentMemberDTO contentVodDTO); ContentVodNewVO contentVod(ContentMemberDTO contentVodDTO);
SocialContentVodNewVO socialContentVod(ContentMemberDTO contentMemberDTO);
CheckItemVO checkItem(CheckItemDTO checkItemDTO);
List<ContentFilesVO> contentFiles(ContentMemberDTO contentMemberDTO); List<ContentFilesVO> contentFiles(ContentMemberDTO contentMemberDTO);
IPage studyHistory(StudyHistoryDTO studyHistoryDTO); IPage studyHistory(StudyHistoryDTO studyHistoryDTO);
List<QueryPapersVO> getCourseTest(ContentMemberDTO contentMemberDTO); List<QueryPapersVO> getCourseTest(ContentMemberDTO contentMemberDTO);
List<SocialCourseTestVO> socialCourseTest(ContentMemberDTO contentMemberDTO);
List<ExerciseDoneResultDO> getPaperDoneDetail(ExerciseDoneResultDO exerciseDoneResultDO); List<ExerciseDoneResultDO> getPaperDoneDetail(ExerciseDoneResultDO exerciseDoneResultDO);
GetStudyInfoVO getStudyInfo(MemberDO memberDO); GetStudyInfoVO getStudyInfo(MemberDO memberDO);
......
...@@ -26,4 +26,6 @@ public interface RenSheJuService { ...@@ -26,4 +26,6 @@ public interface RenSheJuService {
void test(); void test();
RensheResponseVO post6plus() throws Exception ;
} }
...@@ -11,17 +11,9 @@ import com.subsidy.dto.classDict.AddClassDTO; ...@@ -11,17 +11,9 @@ import com.subsidy.dto.classDict.AddClassDTO;
import com.subsidy.dto.classDict.AddMemberToClassDTO; import com.subsidy.dto.classDict.AddMemberToClassDTO;
import com.subsidy.dto.classDict.GetClassBaseInfoDTO; import com.subsidy.dto.classDict.GetClassBaseInfoDTO;
import com.subsidy.dto.classDict.GetSpareMembersDTO; import com.subsidy.dto.classDict.GetSpareMembersDTO;
import com.subsidy.dto.member.ImportMemberDTO;
import com.subsidy.jobs.CourseNotificationJob; import com.subsidy.jobs.CourseNotificationJob;
import com.subsidy.mapper.*; import com.subsidy.mapper.*;
import com.subsidy.model.AnsweringQuestionDO; import com.subsidy.model.*;
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.service.ClassDictService; import com.subsidy.service.ClassDictService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.util.DateFormatUtil; import com.subsidy.util.DateFormatUtil;
...@@ -29,14 +21,12 @@ import com.subsidy.util.QuartzUtil; ...@@ -29,14 +21,12 @@ import com.subsidy.util.QuartzUtil;
import com.subsidy.util.SMSUtils; import com.subsidy.util.SMSUtils;
import com.subsidy.util.excel.ExcelUtil; import com.subsidy.util.excel.ExcelUtil;
import com.subsidy.util.websocket.WebSocketUtil; import com.subsidy.util.websocket.WebSocketUtil;
import com.subsidy.vo.classdict.ClassSettingsVO; import com.subsidy.vo.classdict.*;
import com.subsidy.vo.classdict.GetAllClassesVO;
import com.subsidy.vo.classdict.GetClassBaseInfoVO;
import com.subsidy.vo.classdict.SystemSettings;
import com.subsidy.vo.member.DownloadFailClassMembers; import com.subsidy.vo.member.DownloadFailClassMembers;
import com.subsidy.vo.member.DownloadFailClassMembersDTO; 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.member.ImportClassMembersVO;
import com.subsidy.vo.vod.VodInfoVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -49,6 +39,7 @@ import org.springframework.web.socket.WebSocketSession; ...@@ -49,6 +39,7 @@ import org.springframework.web.socket.WebSocketSession;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/** /**
* <p> * <p>
...@@ -88,10 +79,13 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -88,10 +79,13 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
@Autowired @Autowired
private CompanyMemberMappingMapper companyMemberMappingMapper; private CompanyMemberMappingMapper companyMemberMappingMapper;
@Autowired
private ClassVodFaceCheckMapper classVodFaceCheckMapper;
public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception { public List<GetAllClassesVO> getAllClasses(ClassDictDO classDictDO) throws Exception {
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
List<GetAllClassesVO> getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO); List<GetAllClassesVO> getAllClassesVOS = this.baseMapper.getAllClasses(classDictDO.getCompanyId(),classDictDO.getClassName(),classDictDO.getStartDate(),classDictDO.getEndDate(),classDictDO.getOpenStatus(),classDictDO.getClassType());
for (GetAllClassesVO getAllClassesVO : getAllClassesVOS) { for (GetAllClassesVO getAllClassesVO : getAllClassesVOS) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(fmt.parse(getAllClassesVO.getEndDate())); calendar.setTime(fmt.parse(getAllClassesVO.getEndDate()));
...@@ -99,9 +93,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -99,9 +93,9 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
if (new Date().before(fmt.parse(getAllClassesVO.getStartDate()))) { if (new Date().before(fmt.parse(getAllClassesVO.getStartDate()))) {
getAllClassesVO.setOpenStatus("1"); //待开始 getAllClassesVO.setOpenStatus("1"); //待开始
} else if (new Date().after(calendar.getTime())) { } else if (new Date().after(calendar.getTime())) {
getAllClassesVO.setOpenStatus("2"); getAllClassesVO.setOpenStatus("2"); //已结束
} else { } else {
getAllClassesVO.setOpenStatus("0"); getAllClassesVO.setOpenStatus("0"); //开课中
} }
} }
return getAllClassesVOS; return getAllClassesVOS;
...@@ -137,6 +131,17 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -137,6 +131,17 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
classMemberMappingMapper.insert(classMemberMappingDO); classMemberMappingMapper.insert(classMemberMappingDO);
} }
//添加视频人脸认证
List<Long> 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()) { if (null != addClassDTO.getClassNoticeDOS()) {
List<ClassNoticeDO> classNoticeDOS = addClassDTO.getClassNoticeDOS(); List<ClassNoticeDO> classNoticeDOS = addClassDTO.getClassNoticeDOS();
...@@ -158,9 +163,45 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -158,9 +163,45 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return classDictDO.getId(); return classDictDO.getId();
} }
public String updateClass(ClassDictDO classDictDO) { public String updateClass(AddClassDTO addClassDTO) {
ClassDictDO classDictDO = new ClassDictDO();
BeanUtils.copyProperties(addClassDTO, classDictDO);
this.baseMapper.updateById(classDictDO); this.baseMapper.updateById(classDictDO);
List<Long> vodIds = addClassDTO.getVodIds();
if (null != vodIds && vodIds.size() > 0) {
//
List<Long> oldIds = classVodFaceCheckMapper.faceVodIds(addClassDTO.getId());
List<Long> newIds = addClassDTO.getVodIds();
List<Long> 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<ClassVodFaceCheckDO>()
.lambda()
.eq(ClassVodFaceCheckDO::getClassId, addClassDTO.getId())
.eq(ClassVodFaceCheckDO::getVodId, lg));
}
}
}
//班级所在公司 //班级所在公司
SystemSettings systemSettings = this.baseMapper.getCompanySettings(classDictDO.getId()); SystemSettings systemSettings = this.baseMapper.getCompanySettings(classDictDO.getId());
...@@ -177,6 +218,11 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -177,6 +218,11 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
systemSettings.setClassSettingsVOS(classSettings); systemSettings.setClassSettingsVOS(classSettings);
String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue); String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue);
webSocketSession.sendMessage(new TextMessage(data)); webSocketSession.sendMessage(new TextMessage(data));
// ConcurrentHashMap<Long, WebSocketSession> webSocketMap = WebSocketUtil.webSocketMap;
// for (Map.Entry<Long, WebSocketSession> entry : webSocketMap.entrySet()) {
// webSocketMap.get(entry.getKey()).sendMessage(new TextMessage(data));
// }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -186,8 +232,18 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -186,8 +232,18 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
public ClassDictDO classDetail(ClassDictDO classDictDO) { public ClassDetail classDetail(ClassDictDO classDictDO) {
return this.baseMapper.selectById(classDictDO.getId());
ClassDetail classDetail = new ClassDetail();
ClassDictDO classDictDO1 = this.baseMapper.selectById(classDictDO.getId());
BeanUtils.copyProperties(classDictDO1,classDetail);
//视频id
List<Long> longs = classVodFaceCheckMapper.faceVodIds(classDictDO.getId());
classDetail.setVodIds(longs);
return classDetail;
} }
public String removeMember(ClassMemberMappingDO classMemberMappingDO) { public String removeMember(ClassMemberMappingDO classMemberMappingDO) {
...@@ -302,7 +358,6 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -302,7 +358,6 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
return getAllClassesVOS; return getAllClassesVOS;
} }
public ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId) { public ImportClassMembersVO importClassMembers(MultipartFile multipartFile, Long companyId) {
ImportClassMembersVO importClassMembersVO = new ImportClassMembersVO(); ImportClassMembersVO importClassMembersVO = new ImportClassMembersVO();
...@@ -340,5 +395,8 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict ...@@ -340,5 +395,8 @@ public class ClassDictServiceImpl extends ServiceImpl<ClassDictMapper, ClassDict
ExcelUtil.writeExcel(downloadFailClassMembersDTOS, DownloadFailClassMembersDTO.class); ExcelUtil.writeExcel(downloadFailClassMembersDTOS, DownloadFailClassMembersDTO.class);
} }
public List<VodInfoVO> classVods(ClassDictDO classDictDO) {
return this.baseMapper.classVods(classDictDO.getId());
}
} }
package com.subsidy.service.impl; package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.common.exception.HttpException;
import com.subsidy.dto.classDict.ClassTypeDTO; import com.subsidy.dto.classDict.ClassTypeDTO;
import com.subsidy.mapper.RoleAdministerMappingMapper; import com.subsidy.mapper.RoleAdministerMappingMapper;
import com.subsidy.model.ClassDictDO; import com.subsidy.model.ClassDictDO;
...@@ -32,11 +33,33 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C ...@@ -32,11 +33,33 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C
private RoleAdministerMappingMapper roleAdministerMappingMapper; private RoleAdministerMappingMapper roleAdministerMappingMapper;
public String addClassType(ClassTypeDictDO classTypeDictDO) { public String addClassType(ClassTypeDictDO classTypeDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<ClassTypeDictDO>()
.lambda()
.eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId())
.eq(ClassTypeDictDO::getClassType, classTypeDictDO.getClassType()));
if (count > 0) {
throw new HttpException(40002);
}
this.baseMapper.insert(classTypeDictDO); this.baseMapper.insert(classTypeDictDO);
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public String updateClassType(ClassTypeDictDO classTypeDictDO) { public String updateClassType(ClassTypeDictDO classTypeDictDO) {
int count = this.baseMapper.selectCount(new QueryWrapper<ClassTypeDictDO>()
.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); this.baseMapper.updateById(classTypeDictDO);
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
...@@ -53,10 +76,10 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C ...@@ -53,10 +76,10 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C
//查看当前登录人的角色 角色映射表 //查看当前登录人的角色 角色映射表
int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>() int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda() .lambda()
.eq(RoleAdministerMappingDO::getAdministerId,classTypeDTO.getUserId()) .eq(RoleAdministerMappingDO::getAdministerId, classTypeDTO.getUserId())
.eq(RoleAdministerMappingDO::getRoleId,1)); .eq(RoleAdministerMappingDO::getRoleId, 1));
if (count>0){ if (count > 0) {
//平台支持 //平台支持
ClassTypeDictDO classTypeDictDO = this.baseMapper.selectById(1); ClassTypeDictDO classTypeDictDO = this.baseMapper.selectById(1);
classTypeDictDOS.add(classTypeDictDO); classTypeDictDOS.add(classTypeDictDO);
...@@ -65,10 +88,24 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C ...@@ -65,10 +88,24 @@ public class ClassTypeDictServiceImpl extends ServiceImpl<ClassTypeDictMapper, C
//企业自己的班级类型 //企业自己的班级类型
List<ClassTypeDictDO> classTypeDictDOList = this.baseMapper.selectList(new QueryWrapper<ClassTypeDictDO>() List<ClassTypeDictDO> classTypeDictDOList = this.baseMapper.selectList(new QueryWrapper<ClassTypeDictDO>()
.lambda() .lambda()
.eq(ClassTypeDictDO::getCompanyId,classTypeDTO.getCompanyId())); .eq(ClassTypeDictDO::getCompanyId, classTypeDTO.getCompanyId()));
classTypeDictDOS.addAll(classTypeDictDOList); classTypeDictDOS.addAll(classTypeDictDOList);
return classTypeDictDOS; return classTypeDictDOS;
} }
public List<ClassTypeDictDO> queryOnlineClassTypes(ClassTypeDictDO classTypeDictDO) {
return this.baseMapper.selectList(new QueryWrapper<ClassTypeDictDO>()
.lambda()
.eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId())
.ne(ClassTypeDictDO::getClassType, "社会化、学徒制"));
}
public ClassTypeDictDO querySocialClassTypes(ClassTypeDictDO classTypeDictDO) {
return this.baseMapper.selectOne(new QueryWrapper<ClassTypeDictDO>()
.lambda()
.eq(ClassTypeDictDO::getCompanyId, classTypeDictDO.getCompanyId())
.eq(ClassTypeDictDO::getClassType, "社会化、学徒制"));
}
} }
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;
/**
* <p>
* 百分比认证视频表 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-03-18
*/
@Service
public class ClassVodFaceCheckServiceImpl extends ServiceImpl<ClassVodFaceCheckMapper, ClassVodFaceCheckDO> implements ClassVodFaceCheckService {
}
...@@ -6,9 +6,8 @@ import com.subsidy.dto.content.GetContendVodsDTO; ...@@ -6,9 +6,8 @@ import com.subsidy.dto.content.GetContendVodsDTO;
import com.subsidy.dto.contentVod.AddContentVodDTO; import com.subsidy.dto.contentVod.AddContentVodDTO;
import com.subsidy.dto.contentVod.ContentVodDTO; import com.subsidy.dto.contentVod.ContentVodDTO;
import com.subsidy.dto.vod.ChangeOrdersDTO; import com.subsidy.dto.vod.ChangeOrdersDTO;
import com.subsidy.mapper.VodDictMapper; import com.subsidy.mapper.*;
import com.subsidy.model.ContentVodMappingDO; import com.subsidy.model.*;
import com.subsidy.mapper.ContentVodMappingMapper;
import com.subsidy.service.ContentVodMappingService; import com.subsidy.service.ContentVodMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.vod.GetContendVodsVO; import com.subsidy.vo.vod.GetContendVodsVO;
...@@ -16,6 +15,8 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -16,6 +15,8 @@ import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -33,6 +34,12 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -33,6 +34,12 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
@Autowired @Autowired
private VodDictMapper vodDictMapper; private VodDictMapper vodDictMapper;
@Autowired
private PaperDictMapper paperDictMapper;
@Autowired
private CourseContentMapper courseContentMapper;
@Override @Override
public List<GetContendVodsVO> getContendVods(GetContendVodsDTO getContendVodsDTO) { public List<GetContendVodsVO> getContendVods(GetContendVodsDTO getContendVodsDTO) {
List<GetContendVodsVO> contendVods = vodDictMapper.getContendVods(getContendVodsDTO.getVodName(), getContendVodsDTO.getContentId()); List<GetContendVodsVO> contendVods = vodDictMapper.getContendVods(getContendVodsDTO.getVodName(), getContendVodsDTO.getContentId());
...@@ -40,15 +47,15 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -40,15 +47,15 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
} }
@Override @Override
public void changeContentVodOrders(ChangeOrdersDTO changeOrdersDTO){ public void changeContentVodOrders(ChangeOrdersDTO changeOrdersDTO) {
if(CollectionUtils.isNotEmpty(changeOrdersDTO.getVodIds())) { if (CollectionUtils.isNotEmpty(changeOrdersDTO.getVodIds())) {
for (int i = 0; i < changeOrdersDTO.getVodIds().size(); i++) { for (int i = 0; i < changeOrdersDTO.getVodIds().size(); i++) {
ContentVodMappingDO contentVodMappingDO = this.baseMapper.selectOne(new QueryWrapper<ContentVodMappingDO>().lambda() ContentVodMappingDO contentVodMappingDO = this.baseMapper.selectOne(new QueryWrapper<ContentVodMappingDO>().lambda()
.eq(ContentVodMappingDO::getContentId, changeOrdersDTO.getContentId()) .eq(ContentVodMappingDO::getContentId, changeOrdersDTO.getContentId())
.eq(ContentVodMappingDO::getVodId, changeOrdersDTO.getVodIds().get(i))); .eq(ContentVodMappingDO::getVodId, changeOrdersDTO.getVodIds().get(i)));
ContentVodMappingDO contentVodMapping = new ContentVodMappingDO(); ContentVodMappingDO contentVodMapping = new ContentVodMappingDO();
contentVodMapping.setId(contentVodMappingDO.getId()); contentVodMapping.setId(contentVodMappingDO.getId());
contentVodMapping.setOrderNo(i+1); contentVodMapping.setOrderNo(i + 1);
this.baseMapper.updateById(contentVodMapping); this.baseMapper.updateById(contentVodMapping);
} }
} }
...@@ -60,20 +67,24 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -60,20 +67,24 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
.lambda() .lambda()
.eq(ContentVodMappingDO::getContentId, contentVodDTO.getContentId()) .eq(ContentVodMappingDO::getContentId, contentVodDTO.getContentId())
.eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId())); .eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId()));
if(contentVodMappingDO == null) { if (contentVodMappingDO == null) {
throw new HttpException(18001); throw new HttpException(18001);
} }
paperDictMapper.delete(new QueryWrapper<PaperDictDO>()
.lambda()
.eq(PaperDictDO::getVodId, contentVodDTO.getVodId()));
this.baseMapper.deleteById(contentVodMappingDO.getId()); this.baseMapper.deleteById(contentVodMappingDO.getId());
} }
@Override @Override
public void addContentVod(AddContentVodDTO addContentVod) { public void addContentVod(AddContentVodDTO addContentVod) {
if(CollectionUtils.isNotEmpty(addContentVod.getVodIds())) { if (CollectionUtils.isNotEmpty(addContentVod.getVodIds())) {
List<ContentVodMappingDO> list = this.baseMapper.selectList(new QueryWrapper<ContentVodMappingDO>() List<ContentVodMappingDO> list = this.baseMapper.selectList(new QueryWrapper<ContentVodMappingDO>()
.lambda() .lambda()
.eq(ContentVodMappingDO::getContentId, addContentVod.getContentId())); .eq(ContentVodMappingDO::getContentId, addContentVod.getContentId()));
if(CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
this.baseMapper.deleteBatchIds(list.stream().map(ContentVodMappingDO::getId).collect(Collectors.toList())); this.baseMapper.deleteBatchIds(list.stream().map(ContentVodMappingDO::getId).collect(Collectors.toList()));
} }
...@@ -82,7 +93,7 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -82,7 +93,7 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
.eq(ContentVodMappingDO::getContentId, addContentVod.getContentId()) .eq(ContentVodMappingDO::getContentId, addContentVod.getContentId())
.orderByDesc(ContentVodMappingDO::getOrderNo)); .orderByDesc(ContentVodMappingDO::getOrderNo));
int orderNo = 0; int orderNo = 0;
if(CollectionUtils.isNotEmpty(contentVodMappingList)) { if (CollectionUtils.isNotEmpty(contentVodMappingList)) {
orderNo = contentVodMappingList.get(0).getOrderNo(); orderNo = contentVodMappingList.get(0).getOrderNo();
} }
...@@ -90,16 +101,60 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -90,16 +101,60 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
ContentVodMappingDO cvm = this.baseMapper.selectOne(new QueryWrapper<ContentVodMappingDO>().lambda() ContentVodMappingDO cvm = this.baseMapper.selectOne(new QueryWrapper<ContentVodMappingDO>().lambda()
.eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId()) .eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId())
.eq(ContentVodMappingDO::getContentId, addContentVod.getContentId())); .eq(ContentVodMappingDO::getContentId, addContentVod.getContentId()));
if(cvm == null) { if (cvm == null) {
ContentVodMappingDO contentVodMappingDO = new ContentVodMappingDO(); ContentVodMappingDO contentVodMappingDO = new ContentVodMappingDO();
contentVodMappingDO.setContentId(addContentVod.getContentId()); contentVodMappingDO.setContentId(addContentVod.getContentId());
contentVodMappingDO.setVodId(contentVodDTO.getVodId()); contentVodMappingDO.setVodId(contentVodDTO.getVodId());
contentVodMappingDO.setVodAliasName(contentVodDTO.getVodAliasName()); contentVodMappingDO.setVodAliasName(contentVodDTO.getVodAliasName());
contentVodMappingDO.setOrderNo(++ orderNo); contentVodMappingDO.setOrderNo(++orderNo);
this.baseMapper.insert(contentVodMappingDO); this.baseMapper.insert(contentVodMappingDO);
} }
} }
} }
//查看该章节的课程是社会化还是学徒制
CourseDictDO courseDictDO = this.baseMapper.getCourseByContentId(addContentVod.getContentId());
if (1 == courseDictDO.getCourseDataType()) {
//找到之前存在的卷子的视频ids
List<Long> oldVodIds = this.baseMapper.oldVodIds(addContentVod.getContentId());
//新视频的ids
List<ContentVodDTO> contentVodDTOS = addContentVod.getVodIds();
List<Long> newIds = new ArrayList<>();
HashMap<Long, String> hashMap = new HashMap<>();
for (ContentVodDTO contentVodDTO : contentVodDTOS) {
newIds.add(contentVodDTO.getVodId());
hashMap.put(contentVodDTO.getVodId(),contentVodDTO.getVodAliasName());
}
List<Long> 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<PaperDictDO>()
.lambda()
.eq(PaperDictDO::getCourseId, courseDictDO.getId())
.in(PaperDictDO::getVodId, oldVodIds));
}
}
} }
@Override @Override
...@@ -108,7 +163,7 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM ...@@ -108,7 +163,7 @@ public class ContentVodMappingServiceImpl extends ServiceImpl<ContentVodMappingM
.lambda() .lambda()
.eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId()) .eq(ContentVodMappingDO::getVodId, contentVodDTO.getVodId())
.eq(ContentVodMappingDO::getContentId, contentVodDTO.getContentId())); .eq(ContentVodMappingDO::getContentId, contentVodDTO.getContentId()));
if(contentVodMappingDO != null) { if (contentVodMappingDO != null) {
ContentVodMappingDO cvm = new ContentVodMappingDO(); ContentVodMappingDO cvm = new ContentVodMappingDO();
cvm.setId(contentVodMappingDO.getId()); cvm.setId(contentVodMappingDO.getId());
cvm.setVodAliasName(contentVodDTO.getVodAliasName()); cvm.setVodAliasName(contentVodDTO.getVodAliasName());
......
...@@ -123,7 +123,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -123,7 +123,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
} }
} }
if (null != addCourseDTO.getFieldDictDOS()) { if (null != addCourseDTO.getFieldDictDOS()) {
List<Long> fieldDictDOS = addCourseDTO.getFieldDictDOS(); List<Long> fieldDictDOS = addCourseDTO.getFieldDictDOS();
for (Long lg : fieldDictDOS) { for (Long lg : fieldDictDOS) {
...@@ -144,7 +143,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -144,7 +143,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
} }
} }
//经营范围 //经营范围
if (null != addCourseDTO.getBusinessIds()) { if (null != addCourseDTO.getBusinessIds()) {
List<Long> businessId = addCourseDTO.getBusinessIds(); List<Long> businessId = addCourseDTO.getBusinessIds();
...@@ -187,7 +185,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -187,7 +185,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
public IPage<QueryCoursesVO> queryCourses(QueryCoursesDTO queryCoursesDTO) { public IPage<QueryCoursesVO> queryCourses(QueryCoursesDTO queryCoursesDTO) {
Page pager = new Page(queryCoursesDTO.getPageNum(), queryCoursesDTO.getPageSize()); Page pager = new Page(queryCoursesDTO.getPageNum(), queryCoursesDTO.getPageSize());
IPage<QueryCoursesVO> iPage = this.baseMapper.queryCourses(pager, queryCoursesDTO.getCourseName(), queryCoursesDTO.getFieldId(), queryCoursesDTO.getCategoryId(), queryCoursesDTO.getJobId(), queryCoursesDTO.getRankId(), queryCoursesDTO.getCourseType(), null, queryCoursesDTO.getOpenStatus(), queryCoursesDTO.getBusinessId()); IPage<QueryCoursesVO> 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<QueryCoursesVO> queryCoursesVOS = iPage.getRecords(); List<QueryCoursesVO> queryCoursesVOS = iPage.getRecords();
for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) { for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) {
...@@ -243,8 +241,14 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -243,8 +241,14 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
queryCoursesVO.setVodLength(vodPlayLength); queryCoursesVO.setVodLength(vodPlayLength);
//测试数 //测试数
if (0 == queryCoursesDTO.getCourseDataType()){
//企业线上培训
Integer paperCnt = paperDictMapper.queryCoursePapersCnt(queryCoursesVO.getId()); Integer paperCnt = paperDictMapper.queryCoursePapersCnt(queryCoursesVO.getId());
queryCoursesVO.setPaperCount(paperCnt); queryCoursesVO.setPaperCount(paperCnt);
}else {
//学徒制 视频数量即是考试数量
queryCoursesVO.setPaperCount(vodCnt);
}
} }
return iPage; return iPage;
...@@ -355,7 +359,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -355,7 +359,7 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
public IPage queryCompanyCourse(QueryCoursesDTO queryCoursesDTO) { public IPage queryCompanyCourse(QueryCoursesDTO queryCoursesDTO) {
Page pager = new Page(queryCoursesDTO.getPageNum(), queryCoursesDTO.getPageSize()); Page pager = new Page(queryCoursesDTO.getPageNum(), queryCoursesDTO.getPageSize());
IPage<QueryCoursesVO> iPage = this.baseMapper.queryCourses(pager, queryCoursesDTO.getCourseName(), null, queryCoursesDTO.getCategoryId(), queryCoursesDTO.getJobId(), queryCoursesDTO.getRankId(), null, queryCoursesDTO.getCompanyId(), queryCoursesDTO.getOpenStatus(), IPage<QueryCoursesVO> 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<QueryCoursesVO> queryCoursesVOS = iPage.getRecords(); List<QueryCoursesVO> queryCoursesVOS = iPage.getRecords();
for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) { for (QueryCoursesVO queryCoursesVO : queryCoursesVOS) {
...@@ -388,7 +392,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -388,7 +392,6 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
queryCoursesVO.setRankDictDOS(rankDictDOS); queryCoursesVO.setRankDictDOS(rankDictDOS);
//经营范围 //经营范围
//经营范围
List<BusinessScopeDictDO> businessScopeDictDOS = businessScopeDictMapper.getBusinessScope(queryCoursesVO.getId()); List<BusinessScopeDictDO> businessScopeDictDOS = businessScopeDictMapper.getBusinessScope(queryCoursesVO.getId());
List<BusinessVO> businessVOS = new ArrayList<>(); List<BusinessVO> businessVOS = new ArrayList<>();
...@@ -410,9 +413,14 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD ...@@ -410,9 +413,14 @@ public class CourseDictServiceImpl extends ServiceImpl<CourseDictMapper, CourseD
Integer vodPlayLength = courseDictMapper.queryCoursePlayLength(queryCoursesVO.getId()); Integer vodPlayLength = courseDictMapper.queryCoursePlayLength(queryCoursesVO.getId());
queryCoursesVO.setVodLength(vodPlayLength); queryCoursesVO.setVodLength(vodPlayLength);
//测试数 if (0 == queryCoursesDTO.getCourseDataType()){
//企业线上培训 测试数量
Integer paperCnt = paperDictMapper.queryCoursePapersCnt(queryCoursesVO.getId()); Integer paperCnt = paperDictMapper.queryCoursePapersCnt(queryCoursesVO.getId());
queryCoursesVO.setPaperCount(paperCnt); queryCoursesVO.setPaperCount(paperCnt);
}else {
//学徒制 视频数量即是考试数量
queryCoursesVO.setPaperCount(vodCnt);
}
} }
return iPage; return iPage;
} }
......
...@@ -2,15 +2,14 @@ package com.subsidy.service.impl; ...@@ -2,15 +2,14 @@ package com.subsidy.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.subsidy.common.configure.RenSheConfig; import com.subsidy.common.configure.RenSheConfig;
import com.subsidy.dto.renshe.*; import com.subsidy.dto.dudao.*;
import com.subsidy.mapper.ClassDictMapper; import com.subsidy.mapper.ClassDictMapper;
import com.subsidy.mapper.DudaoMapper; import com.subsidy.mapper.DudaoMapper;
import com.subsidy.mapper.RenSheJuMapper;
import com.subsidy.mapper.RenshejuHistoryMapper; import com.subsidy.mapper.RenshejuHistoryMapper;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.service.DudaoService; import com.subsidy.service.DudaoService;
import com.subsidy.util.DudaoConstant; import com.subsidy.util.DudaoConstant;
import com.subsidy.vo.renshe.*; import com.subsidy.vo.dudao.*;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import okhttp3.*; import okhttp3.*;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -46,9 +45,6 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -46,9 +45,6 @@ public class DudaoServiceImpl implements DudaoService {
@Autowired @Autowired
private DudaoMapper dudaoMapper; private DudaoMapper dudaoMapper;
// @Autowired
// private RenSheJuMapper renSheJuMapper;
public RensheResponseVO all()throws IOException{ public RensheResponseVO all()throws IOException{
classBaseInfo(); classBaseInfo();
...@@ -87,6 +83,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -87,6 +83,7 @@ public class DudaoServiceImpl implements DudaoService {
List<Long> imageClassIds = dudaoMapper.imageClassIds("0"); List<Long> imageClassIds = dudaoMapper.imageClassIds("0");
Set<Long> classIds = new HashSet<>(); Set<Long> classIds = new HashSet<>();
// classIds.add(424L);
vodClassIds.stream().forEach(x->classIds.add(x)); vodClassIds.stream().forEach(x->classIds.add(x));
examClassIds.stream().forEach(x->classIds.add(x)); examClassIds.stream().forEach(x->classIds.add(x));
...@@ -100,11 +97,11 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -100,11 +97,11 @@ public class DudaoServiceImpl implements DudaoService {
//班级基本信息 //班级基本信息
ClassBaseInfoVO classBaseInfoVO = dudaoMapper.classBaseInfo(classId); ClassBaseInfoVO classBaseInfoVO = dudaoMapper.classBaseInfo(classId);
BeanUtils.copyProperties(classBaseInfoVO, epidemicSituationClassBasic); BeanUtils.copyProperties(classBaseInfoVO, epidemicSituationClassBasic);
epidemicSituationClassBasic.setClassCode(classBaseInfoVO.getDownCode()); epidemicSituationClassBasic.setDownCode(classBaseInfoVO.getDownCode());
//章节 //章节
List<ChapterList2> chapterLists = dudaoMapper.classChapters(classId); List<ChapterList2> 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); chapterList2.setIsExam(1);
epidemicSituationClassBasic.setChapterList(chapterLists); epidemicSituationClassBasic.setChapterList(chapterLists);
...@@ -178,6 +175,9 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -178,6 +175,9 @@ public class DudaoServiceImpl implements DudaoService {
//产生视频学习数据的班级 //产生视频学习数据的班级
List<Long> vodClassIds = dudaoMapper.vodClassIds("0"); List<Long> vodClassIds = dudaoMapper.vodClassIds("0");
// List<Long> vodClassIds = new ArrayList<>();
// vodClassIds.add(424L);
List<DailyStudyInfoVO> result = new ArrayList<>(); List<DailyStudyInfoVO> result = new ArrayList<>();
for (Long classId : vodClassIds){ for (Long classId : vodClassIds){
...@@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -189,7 +189,7 @@ public class DudaoServiceImpl implements DudaoService {
for (DailyStudyInfoVO dailyStudyInfoVO : result) { for (DailyStudyInfoVO dailyStudyInfoVO : result) {
ClassHourBasic classHourBasic = new ClassHourBasic(); ClassHourBasic classHourBasic = new ClassHourBasic();
BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic); BeanUtils.copyProperties(dailyStudyInfoVO, classHourBasic);
classHourBasic.setClassCode(dailyStudyInfoVO.getClassCode()); classHourBasic.setDownCode(String.valueOf(dailyStudyInfoVO.getClassId()));
//上线时间列表 //上线时间列表
//找到当天每次上线下线时间 //找到当天每次上线下线时间
...@@ -306,6 +306,9 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -306,6 +306,9 @@ public class DudaoServiceImpl implements DudaoService {
//找出前一天产生考试数据的班级 //找出前一天产生考试数据的班级
List<Long> classIds = dudaoMapper.dailyExamBasic("0"); List<Long> classIds = dudaoMapper.dailyExamBasic("0");
// List<Long>classIds = new ArrayList<>();
// classIds.add(424L);
try { try {
if (classIds.size() > 0) { if (classIds.size() > 0) {
for (Long classId : classIds) { for (Long classId : classIds) {
...@@ -319,7 +322,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -319,7 +322,7 @@ public class DudaoServiceImpl implements DudaoService {
//章节课程考试时间列表 //章节课程考试时间列表
ChapterExamBasic chapterExamBasic = new ChapterExamBasic(); ChapterExamBasic chapterExamBasic = new ChapterExamBasic();
chapterExamBasic.setClassCode(classDictDO.getClassCode()); chapterExamBasic.setDownCode(String.valueOf(classDictDO.getId()));
//最后一节课作为chapterCode //最后一节课作为chapterCode
String vodId = dudaoMapper.classVodName(classId); String vodId = dudaoMapper.classVodName(classId);
...@@ -358,7 +361,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -358,7 +361,7 @@ public class DudaoServiceImpl implements DudaoService {
//下线时间 //下线时间
List<OprMemDictDO> loginOutRecords = dudaoMapper.loginOutRecords(memberDO.getId()); List<OprMemDictDO> loginOutRecords = dudaoMapper.loginOutRecords(memberDO.getId());
// boolean flag = false; boolean flag = false;
for (int i = 0; i < loginRecords.size(); i++) { for (int i = 0; i < loginRecords.size(); i++) {
//找到该时间段内的测评 //找到该时间段内的测评
...@@ -368,17 +371,17 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -368,17 +371,17 @@ public class DudaoServiceImpl implements DudaoService {
examList.setStartTime(Timestamp.valueOf(exerciseDoneResultDO.getStartDate()).getTime()); examList.setStartTime(Timestamp.valueOf(exerciseDoneResultDO.getStartDate()).getTime());
examList.setEndTime(Timestamp.valueOf(exerciseDoneResultDO.getCreateDate()).getTime()); examList.setEndTime(Timestamp.valueOf(exerciseDoneResultDO.getCreateDate()).getTime());
examList.setIp(loginRecords.get(i).getIpAddress()); examList.setIp(loginRecords.get(i).getIpAddress());
// if ("合格".equals(exerciseDoneResultDO.getResult())) { if ("合格".equals(exerciseDoneResultDO.getResult())) {
// flag = true; flag = true;
// } }
examLists.add(examList); examLists.add(examList);
} }
} }
// if (flag == true) { if (flag == true) {
// chapterExamBasic.setAccess(0L); chapterExamBasic.setAccess(0L);
// } else { } else {
// chapterExamBasic.setAccess(1L); chapterExamBasic.setAccess(1L);
// } }
chapterExamBasic.setExamList(examLists); chapterExamBasic.setExamList(examLists);
chapterExamBasics.add(chapterExamBasic); chapterExamBasics.add(chapterExamBasic);
} }
...@@ -423,6 +426,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -423,6 +426,7 @@ public class DudaoServiceImpl implements DudaoService {
return null; return null;
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(DudaoConstant.POST_3); renshejuHistoryDO.setInterfaceName(DudaoConstant.POST_3);
renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString()); renshejuHistoryDO.setInputParam(JSONObject.fromObject(uploadChapterBehaviorDTO).toString());
...@@ -473,7 +477,7 @@ public class DudaoServiceImpl implements DudaoService { ...@@ -473,7 +477,7 @@ public class DudaoServiceImpl implements DudaoService {
AnswerBasic answerBasic = new AnswerBasic(); AnswerBasic answerBasic = new AnswerBasic();
String downCode = key.split(":")[0]; String downCode = key.split(":")[0];
String identity = key.split(":")[1]; String identity = key.split(":")[1];
answerBasic.setClassCode(downCode); answerBasic.setDownCode(downCode);
answerBasic.setIdentity(identity); answerBasic.setIdentity(identity);
answerBasic.setAnswerAndQuestionList(hashMap.get(key)); answerBasic.setAnswerAndQuestionList(hashMap.get(key));
answerBasics.add(answerBasic); answerBasics.add(answerBasic);
......
...@@ -10,9 +10,7 @@ import com.subsidy.dto.exercise.JudgeDTO; ...@@ -10,9 +10,7 @@ import com.subsidy.dto.exercise.JudgeDTO;
import com.subsidy.dto.exercise.SelectDTO; import com.subsidy.dto.exercise.SelectDTO;
import com.subsidy.dto.exercise.SubmitDTO; import com.subsidy.dto.exercise.SubmitDTO;
import com.subsidy.dto.member.ImportMemberDTO; import com.subsidy.dto.member.ImportMemberDTO;
import com.subsidy.mapper.ExerciseDictMapper; import com.subsidy.mapper.*;
import com.subsidy.mapper.ExerciseDoneHistoryMapper;
import com.subsidy.mapper.ExerciseDoneResultMapper;
import com.subsidy.model.*; import com.subsidy.model.*;
import com.subsidy.service.ExerciseDictService; import com.subsidy.service.ExerciseDictService;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
...@@ -55,6 +53,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -55,6 +53,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
@Autowired @Autowired
private ExerciseDoneHistoryMapper exerciseDoneHistoryMapper; private ExerciseDoneHistoryMapper exerciseDoneHistoryMapper;
@Autowired
private ClassDictMapper classDictMapper;
@Autowired
private ClassMemberMappingMapper classMemberMappingMapper;
@Autowired
private PaperDictMapper paperDictMapper;
public String addExercise(ExerciseDictDO exerciseDictDO) { public String addExercise(ExerciseDictDO exerciseDictDO) {
Integer orderNoTmp = this.baseMapper.getMaximumNo(exerciseDictDO.getPaperId()); Integer orderNoTmp = this.baseMapper.getMaximumNo(exerciseDictDO.getPaperId());
...@@ -88,23 +96,34 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -88,23 +96,34 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
SimpleDateFormat startDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat startDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ClassDictDO classDictDO = classDictMapper.selectById(submitDTO.getClassId());
//判断数据库里是否有一样开始时间的记录,有的话就不插入 //判断数据库里是否有一样开始时间的记录,有的话就不插入
Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>() Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>()
.lambda() .lambda()
.eq(ExerciseDoneResultDO::getMemberId,submitDTO.getMemberId()) .eq(ExerciseDoneResultDO::getMemberId, submitDTO.getMemberId())
.eq(ExerciseDoneResultDO::getClassId,submitDTO.getClassId()) .eq(ExerciseDoneResultDO::getClassId, submitDTO.getClassId())
.eq(ExerciseDoneResultDO::getPaperId,submitDTO.getPaperId()) .eq(ExerciseDoneResultDO::getPaperId, submitDTO.getPaperId())
.eq(ExerciseDoneResultDO::getStartDate,submitDTO.getStartDate())); .eq(ExerciseDoneResultDO::getStartDate, submitDTO.getStartDate()));
if (count == 0){ if (count == 0) {
try { try {
Date startDate = startDateFormat1.parse(submitDTO.getStartDate()); 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);
}
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); throw new HttpException(20003);
} }
} catch (ParseException e) {
} catch (ParseException e) {
e.printStackTrace();
} }
int rightCounts = 0; int rightCounts = 0;
...@@ -146,6 +165,27 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -146,6 +165,27 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
} }
} }
//提交状态
if (0 == classDictDO.getClassType()) {
//企业线上化 只要提交过,就将状态置为1,之后视频数据不在写入
ClassMemberMappingDO classMemberMappingDO = classMemberMappingMapper.selectOne(new QueryWrapper<ClassMemberMappingDO>()
.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<Long> paperIds = paperDictMapper.lastPaper(classDictDO.getCourseId());
if (submitDTO.getPaperId() .equals( paperIds.get(0))){
//企业线上化 只要提交过,就将状态置为1,之后视频数据不在写入
ClassMemberMappingDO classMemberMappingDO = classMemberMappingMapper.selectOne(new QueryWrapper<ClassMemberMappingDO>()
.lambda()
.eq(ClassMemberMappingDO::getMemberId, submitDTO.getMemberId())
.eq(ClassMemberMappingDO::getClassId, submitDTO.getClassId()));
classMemberMappingDO.setSubmitFlag(1);
classMemberMappingMapper.updateById(classMemberMappingDO);
}
}
return exerciseDoneResultDO.getId(); return exerciseDoneResultDO.getId();
} }
...@@ -154,12 +194,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -154,12 +194,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
return this.baseMapper.getPaperExercise(pager, getPaperExerciseDTO.getPaperId(), getPaperExerciseDTO.getDifficulty(), getPaperExerciseDTO.getExerciseType(), getPaperExerciseDTO.getTitle()); return this.baseMapper.getPaperExercise(pager, getPaperExerciseDTO.getPaperId(), getPaperExerciseDTO.getDifficulty(), getPaperExerciseDTO.getExerciseType(), getPaperExerciseDTO.getTitle());
} }
public String judge(MultipartFile multipartFile,Long paperId,Long courseId){ public String judge(MultipartFile multipartFile, Long paperId, Long courseId) {
try { try {
ExcelUtil.readExcel(null, JudgeDTO.class, multipartFile).forEach(s -> { ExcelUtil.readExcel(null, JudgeDTO.class, multipartFile).forEach(s -> {
ExerciseDictDO exerciseDictDO = new ExerciseDictDO(); ExerciseDictDO exerciseDictDO = new ExerciseDictDO();
exerciseDictDO.setTitle("<p>"+s.getTitle()+"</p>"); exerciseDictDO.setTitle("<p>" + s.getTitle() + "</p>");
exerciseDictDO.setRightAnswer(s.getAnswer()); exerciseDictDO.setRightAnswer(s.getAnswer());
exerciseDictDO.setExerciseType(s.getExerciseType()); exerciseDictDO.setExerciseType(s.getExerciseType());
exerciseDictDO.setDifficulty("适中"); exerciseDictDO.setDifficulty("适中");
...@@ -175,12 +215,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -175,12 +215,12 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
public String select(MultipartFile multipartFile,Long paperId,Long courseId){ public String select(MultipartFile multipartFile, Long paperId, Long courseId) {
try { try {
ExcelUtil.readExcel(null, SelectDTO.class, multipartFile).forEach(s -> { ExcelUtil.readExcel(null, SelectDTO.class, multipartFile).forEach(s -> {
ExerciseDictDO exerciseDictDO = new ExerciseDictDO(); ExerciseDictDO exerciseDictDO = new ExerciseDictDO();
exerciseDictDO.setTitle("<p>"+s.getTitle()+"<p>"); exerciseDictDO.setTitle("<p>" + s.getTitle() + "<p>");
exerciseDictDO.setOrderNo(s.getId()); exerciseDictDO.setOrderNo(s.getId());
exerciseDictDO.setExerciseType(s.getExerciseType()); exerciseDictDO.setExerciseType(s.getExerciseType());
//选项 //选项
...@@ -192,16 +232,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe ...@@ -192,16 +232,16 @@ public class ExerciseDictServiceImpl extends ServiceImpl<ExerciseDictMapper, Exe
items.append("{\"label\":\"<p>").append(s.getAnswerD()).append("</p>\",\"value\":\"D\"}]"); items.append("{\"label\":\"<p>").append(s.getAnswerD()).append("</p>\",\"value\":\"D\"}]");
exerciseDictDO.setItems(items.toString()); exerciseDictDO.setItems(items.toString());
if ("单选题".equals(s.getExerciseType())){ if ("单选题".equals(s.getExerciseType())) {
exerciseDictDO.setRightAnswer(s.getRightAnswer()); exerciseDictDO.setRightAnswer(s.getRightAnswer());
}else { } else {
String[] answers = s.getRightAnswer().split(","); String[] answers = s.getRightAnswer().split(",");
StringBuffer answer = new StringBuffer(); StringBuffer answer = new StringBuffer();
answer.append("["); answer.append("[");
int i = 0; int i = 0;
for (String split : answers){ for (String split : answers) {
answer.append("\"").append(split).append("\""); answer.append("\"").append(split).append("\"");
if(i!=answers.length-1){ if (i != answers.length - 1) {
answer.append(","); answer.append(",");
} }
i++; i++;
......
...@@ -71,19 +71,19 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -71,19 +71,19 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
} }
public SendIdCardInfoVO imageCheck(ImageCheckDTO imageCheckDTO) throws Exception { public SendIdCardInfoVO imageCheck(ImageCheckDTO imageCheckDTO) throws Exception {
return PCCheckIdCard(imageCheckDTO.getId(), imageCheckDTO.getClassId(), 0, imageCheckDTO.getClassPlace(), imageCheckDTO.getPaperId()); return PCCheckIdCard(imageCheckDTO.getId(), imageCheckDTO.getClassId(), 0, imageCheckDTO.getClassPlace(), imageCheckDTO.getPaperId(),imageCheckDTO.getVodId());
} }
public SendIdCardInfoVO h5CheckResult(ImageCheckDTO imageCheckDTO) throws Exception { public SendIdCardInfoVO h5CheckResult(ImageCheckDTO imageCheckDTO) throws Exception {
return H5IdCheckCard(imageCheckDTO.getId(), imageCheckDTO.getClassId(), 0, imageCheckDTO.getClassPlace(), imageCheckDTO.getPaperId()); return H5IdCheckCard(imageCheckDTO.getId(), imageCheckDTO.getClassId(), 0, imageCheckDTO.getClassPlace(), imageCheckDTO.getPaperId(),imageCheckDTO.getVodId());
} }
public SendIdCardInfoVO loginCheck(ImageCheckDTO imageCheckDTO) throws Exception { public SendIdCardInfoVO loginCheck(ImageCheckDTO imageCheckDTO) throws Exception {
return PCCheckIdCard(imageCheckDTO.getId(), null, 1, null, null); return PCCheckIdCard(imageCheckDTO.getId(), null, 1, null, null,imageCheckDTO.getVodId());
} }
public SendIdCardInfoVO h5LoginCheck(ImageCheckDTO imageCheckDTO) throws Exception { public SendIdCardInfoVO h5LoginCheck(ImageCheckDTO imageCheckDTO) throws Exception {
return H5IdCheckCard(imageCheckDTO.getId(), null, 1, null, null); return H5IdCheckCard(imageCheckDTO.getId(), null, 1, null, null,imageCheckDTO.getVodId());
} }
/** /**
...@@ -103,7 +103,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -103,7 +103,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
* H5端调取权威库(身份证)验证 权威库 * H5端调取权威库(身份证)验证 权威库
* 1,签到页 0 班级内 * 1,签到页 0 班级内
*/ */
public SendIdCardInfoVO H5IdCheckCard(Long id, Long classId, Integer checkPlace, Integer classPlace, Long paperId) { public SendIdCardInfoVO H5IdCheckCard(Long id, Long classId, Integer checkPlace, Integer classPlace, Long paperId,Long vodId) {
getDailyCheckCnt(id); getDailyCheckCnt(id);
//获取这个学生的基本信息 //获取这个学生的基本信息
MemberDO memberDO = memberMapper.selectById(id); MemberDO memberDO = memberMapper.selectById(id);
...@@ -132,6 +132,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -132,6 +132,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
} }
activityDetectionDO.setMemberId(memberDO.getId()); activityDetectionDO.setMemberId(memberDO.getId());
activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId()); activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId());
activityDetectionDO.setVodId(vodId);
activityDetectionMapper.insert(activityDetectionDO); activityDetectionMapper.insert(activityDetectionDO);
//获取signTicket //获取signTicket
...@@ -187,7 +188,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -187,7 +188,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
* PC端调取权威库(身份证)验证 权威库 * PC端调取权威库(身份证)验证 权威库
* 1,签到页 0 班级内 * 1,签到页 0 班级内
*/ */
public SendIdCardInfoVO PCCheckIdCard(Long id, Long classId, Integer checkPlace, Integer classPlace, Long paperId) { public SendIdCardInfoVO PCCheckIdCard(Long id, Long classId, Integer checkPlace, Integer classPlace, Long paperId,Long vodId) {
getDailyCheckCnt(id); getDailyCheckCnt(id);
//获取这个学生的基本信息 //获取这个学生的基本信息
...@@ -216,6 +217,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -216,6 +217,7 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
} }
activityDetectionDO.setMemberId(memberDO.getId()); activityDetectionDO.setMemberId(memberDO.getId());
activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId()); activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId());
activityDetectionDO.setVodId(vodId);
activityDetectionMapper.insert(activityDetectionDO); activityDetectionMapper.insert(activityDetectionDO);
//获取signTicket //获取signTicket
...@@ -293,11 +295,6 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -293,11 +295,6 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
.eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId())); .eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId()));
if (!StringUtils.isEmpty(resultVO.getSimilarity())) { if (!StringUtils.isEmpty(resultVO.getSimilarity())) {
BeanUtils.copyProperties(resultVO, imageCheckRecordDO); BeanUtils.copyProperties(resultVO, imageCheckRecordDO);
// ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
// activityDetectionDO.setClassId(imageCheckRecordDO.getClassId());
// activityDetectionDO.setMemberId(imageCheckRecordDO.getMemberId());
// activityDetectionDO.setCheckType(1);
// activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId());
ActivityDetectionDO activityDetectionDO = activityDetectionMapper.selectOne(new QueryWrapper<ActivityDetectionDO>() ActivityDetectionDO activityDetectionDO = activityDetectionMapper.selectOne(new QueryWrapper<ActivityDetectionDO>()
.lambda() .lambda()
.eq(ActivityDetectionDO::getFaceCheckId,imageCheckRecordDO.getId())); .eq(ActivityDetectionDO::getFaceCheckId,imageCheckRecordDO.getId()));
...@@ -328,12 +325,8 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -328,12 +325,8 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
e.printStackTrace(); e.printStackTrace();
} }
// if (null != imageCheckRecordDO.getPaperId()) {
// activityDetectionDO.setCheckType(2);
// }
imageCheckRecordMapper.updateById(imageCheckRecordDO); imageCheckRecordMapper.updateById(imageCheckRecordDO);
activityDetectionMapper.updateImageCheckCreateDate(activityDetectionDO.getId(),activityDetectionDO.getStatus(),imageCheckRecordDO.getCreateDate(),imageCheckRecordDO.getUpdateDate()); activityDetectionMapper.updateImageCheckCreateDate(activityDetectionDO.getId(),activityDetectionDO.getStatus(),imageCheckRecordDO.getCreateDate(),imageCheckRecordDO.getUpdateDate());
// activityDetectionMapper.updateById(activityDetectionDO);
} }
return imageCheckRecordDO; return imageCheckRecordDO;
} }
......
...@@ -2,12 +2,17 @@ package com.subsidy.service.impl; ...@@ -2,12 +2,17 @@ package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.common.exception.HttpException; 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.model.PaperDictDO;
import com.subsidy.mapper.PaperDictMapper; import com.subsidy.mapper.PaperDictMapper;
import com.subsidy.service.PaperDictService; import com.subsidy.service.PaperDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils; import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.paper.QueryPapersVO; import com.subsidy.vo.paper.QueryPapersVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -24,28 +29,47 @@ import java.util.List; ...@@ -24,28 +29,47 @@ import java.util.List;
@Service @Service
public class PaperDictServiceImpl extends ServiceImpl<PaperDictMapper, PaperDictDO> implements PaperDictService { public class PaperDictServiceImpl extends ServiceImpl<PaperDictMapper, PaperDictDO> implements PaperDictService {
public List<QueryPapersVO> queryPapers(PaperDictDO paperDictDO){ @Autowired
return this.baseMapper.queryPapers(paperDictDO.getCourseId(),paperDictDO.getPaperName(),null); private CourseDictMapper courseDictMapper;
@Autowired
private ExerciseDictMapper exerciseDictMapper;
public List<QueryPapersVO> queryPapers(PaperDictDO paperDictDO) {
CourseDictDO courseDictDO = courseDictMapper.selectById(paperDictDO.getCourseId());
List<QueryPapersVO> queryPapersVOS = this.baseMapper.queryPapers(paperDictDO.getCourseId(), paperDictDO.getPaperName(), null);
//学徒制要查看题目数量
if (1 == courseDictDO.getCourseDataType()) {
for (QueryPapersVO queryPapers : queryPapersVOS) {
//题目个数
int count = exerciseDictMapper.selectCount(new QueryWrapper<ExerciseDictDO>()
.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()); this.baseMapper.deleteById(paperDictDO.getId());
return ConstantUtils.DELETE_SUCCESS; return ConstantUtils.DELETE_SUCCESS;
} }
public String updateStatus(PaperDictDO paperDictDO){ public String updateStatus(PaperDictDO paperDictDO) {
this.baseMapper.updateById(paperDictDO); this.baseMapper.updateById(paperDictDO);
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
public String addPaper(PaperDictDO paperDictDO){ public String addPaper(PaperDictDO paperDictDO) {
Integer count = this.baseMapper.selectCount(new QueryWrapper<PaperDictDO>() Integer count = this.baseMapper.selectCount(new QueryWrapper<PaperDictDO>()
.lambda() .lambda()
.eq(PaperDictDO::getCourseId,paperDictDO.getCourseId()) .eq(PaperDictDO::getCourseId, paperDictDO.getCourseId())
.eq(PaperDictDO::getPaperName,paperDictDO.getPaperName())); .eq(PaperDictDO::getPaperName, paperDictDO.getPaperName()));
if (count>0){ if (count > 0) {
throw new HttpException(50001); throw new HttpException(50001);
} }
paperDictDO.setPaperStatus(0); paperDictDO.setPaperStatus(0);
......
...@@ -12,7 +12,6 @@ import com.subsidy.model.*; ...@@ -12,7 +12,6 @@ import com.subsidy.model.*;
import com.subsidy.service.RenSheJuService; import com.subsidy.service.RenSheJuService;
import com.subsidy.util.OSSUtils; import com.subsidy.util.OSSUtils;
import com.subsidy.util.RenSheJuConstant; import com.subsidy.util.RenSheJuConstant;
import com.subsidy.util.SMSUtils;
import com.subsidy.vo.renshe.*; import com.subsidy.vo.renshe.*;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import okhttp3.*; import okhttp3.*;
...@@ -70,6 +69,7 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -70,6 +69,7 @@ public class RenSheJuServiceImpl implements RenSheJuService {
List<Long> imageClassIds = renSheJuMapper.imageClassIds("0"); List<Long> imageClassIds = renSheJuMapper.imageClassIds("0");
Set<Long> classIds = new HashSet<>(); Set<Long> classIds = new HashSet<>();
// classIds.add(490L);
vodClassIds.stream().forEach(x -> classIds.add(x)); vodClassIds.stream().forEach(x -> classIds.add(x));
examClassIds.stream().forEach(x -> classIds.add(x)); examClassIds.stream().forEach(x -> classIds.add(x));
...@@ -161,6 +161,9 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -161,6 +161,9 @@ public class RenSheJuServiceImpl implements RenSheJuService {
// 产生视频学习数据的班级 // 产生视频学习数据的班级
List<Long> vodClassIds = renSheJuMapper.vodClassIds("0"); List<Long> vodClassIds = renSheJuMapper.vodClassIds("0");
// List<Long> vodClassIds = new ArrayList<>();
// vodClassIds.add(490L);
List<DailyStudyInfoVO> result = new ArrayList<>(); List<DailyStudyInfoVO> result = new ArrayList<>();
try { try {
...@@ -279,6 +282,9 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -279,6 +282,9 @@ public class RenSheJuServiceImpl implements RenSheJuService {
//找出前一天产生考试数据的班级 //找出前一天产生考试数据的班级
List<Long> classIds = renSheJuMapper.dailyExamBasic("0"); List<Long> classIds = renSheJuMapper.dailyExamBasic("0");
// List<Long> classIds = new ArrayList<>();
// classIds.add(490L);
try { try {
if (classIds.size() > 0) { if (classIds.size() > 0) {
for (Long classId : classIds) { for (Long classId : classIds) {
...@@ -670,6 +676,86 @@ public class RenSheJuServiceImpl implements RenSheJuService { ...@@ -670,6 +676,86 @@ public class RenSheJuServiceImpl implements RenSheJuService {
return null; return null;
} }
public RensheResponseVO post6plus() throws Exception {
List<RensheResponseVO> rensheResponseVOS = new ArrayList<>();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
List<Long> 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<ImageDetailList> imageDetailLists = new ArrayList<>();
try {
List<ClassImageChecksVO> 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 { public RensheStringVO clear() throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder() OkHttpClient client = new OkHttpClient().newBuilder()
......
...@@ -10,6 +10,7 @@ import com.subsidy.model.VodLabelDictDO; ...@@ -10,6 +10,7 @@ import com.subsidy.model.VodLabelDictDO;
import com.subsidy.mapper.VodLabelDictMapper; import com.subsidy.mapper.VodLabelDictMapper;
import com.subsidy.service.VodLabelDictService; import com.subsidy.service.VodLabelDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.vo.vod.VodInfoVO;
import com.subsidy.vo.vodLabel.VodLabelTreeVO; import com.subsidy.vo.vodLabel.VodLabelTreeVO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -43,10 +44,7 @@ public class VodLabelDictServiceImpl extends ServiceImpl<VodLabelDictMapper, Vod ...@@ -43,10 +44,7 @@ public class VodLabelDictServiceImpl extends ServiceImpl<VodLabelDictMapper, Vod
public List<VodLabelTreeVO> queryVodLabelTree() { public List<VodLabelTreeVO> queryVodLabelTree() {
List<VodLabelTreeVO> list = this.baseMapper.queryVodLabel(); List<VodLabelTreeVO> list = this.baseMapper.queryVodLabel();
for (VodLabelTreeVO vodLabelTreeVO : list) { for (VodLabelTreeVO vodLabelTreeVO : list) {
List<VodDictDO> vodDictDOList = vodDictMapper.selectList(new QueryWrapper<VodDictDO>() List<VodInfoVO> vodDictDOList = vodDictMapper.vodInfo(vodLabelTreeVO.getId());
.lambda()
.eq(VodDictDO::getLabelId, vodLabelTreeVO.getId())
.orderByDesc(VodDictDO::getOrderNo));
vodLabelTreeVO.setVods(vodDictDOList); vodLabelTreeVO.setVods(vodDictDOList);
} }
return list; return list;
......
...@@ -61,16 +61,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -61,16 +61,14 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
@Autowired @Autowired
private SMSUtils smsUtils; private SMSUtils smsUtils;
@Autowired
private ExerciseDoneResultMapper exerciseDoneResultMapper;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String insertHistory(VodPlayHistoryDO vodPlayHistoryDO, HttpServletRequest request) throws Exception { public String insertHistory(VodPlayHistoryDO vodPlayHistoryDO, HttpServletRequest request) throws Exception {
Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>() Integer count = classMemberMappingMapper.selectCount(new QueryWrapper<ClassMemberMappingDO>()
.lambda() .lambda()
.eq(ExerciseDoneResultDO::getClassId, vodPlayHistoryDO.getClassId()) .eq(ClassMemberMappingDO::getClassId, vodPlayHistoryDO.getClassId())
.eq(ExerciseDoneResultDO::getMemberId, vodPlayHistoryDO.getMemberId())); .eq(ClassMemberMappingDO::getMemberId, vodPlayHistoryDO.getMemberId())
.eq(ClassMemberMappingDO::getSubmitFlag, 1));
//只有开始学习时间晚于签到时间的数据才会插进去 //只有开始学习时间晚于签到时间的数据才会插进去
Date date = new Date(); Date date = new Date();
...@@ -138,10 +136,11 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -138,10 +136,11 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public String insertHistoryNew(InsertHistoryNewDTO insertHistoryNewDTO, HttpServletRequest request) throws Exception { public String insertHistoryNew(InsertHistoryNewDTO insertHistoryNewDTO, HttpServletRequest request) throws Exception {
Integer count = exerciseDoneResultMapper.selectCount(new QueryWrapper<ExerciseDoneResultDO>() Integer count = classMemberMappingMapper.selectCount(new QueryWrapper<ClassMemberMappingDO>()
.lambda() .lambda()
.eq(ExerciseDoneResultDO::getClassId, insertHistoryNewDTO.getClassId()) .eq(ClassMemberMappingDO::getClassId, insertHistoryNewDTO.getClassId())
.eq(ExerciseDoneResultDO::getMemberId, insertHistoryNewDTO.getMemberId())); .eq(ClassMemberMappingDO::getMemberId, insertHistoryNewDTO.getMemberId())
.eq(ClassMemberMappingDO::getSubmitFlag, 1));
//只有开始学习时间晚于签到时间的数据才会插进去 //只有开始学习时间晚于签到时间的数据才会插进去
Date date = new Date(); Date date = new Date();
......
...@@ -12,6 +12,8 @@ public class ExcelFormatUtils { ...@@ -12,6 +12,8 @@ public class ExcelFormatUtils {
public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间","测评时间", "总评价"); public static final List<String> scoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "测试成绩", "测试次数","开始时间","结束时间","测评时间", "总评价");
public static final List<String> socialScoreList = Arrays.asList("序号", "成员名称", "身份证号码", "联系方式", "课节名称", "测试成绩","开始时间","结束时间", "总评价");
public static final List<String> answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间"); public static final List<String> answersList = Arrays.asList("序号", "提问", "答疑", "提问时间", "提问成员", "答疑时间");
public static final List<String> studyLogList = Arrays.asList("开始时间","结束时间","课程","类型","学习时长","累计有效时长"); public static final List<String> studyLogList = Arrays.asList("开始时间","结束时间","课程","类型","学习时长","累计有效时长");
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
import com.subsidy.common.ResponseData; import com.subsidy.common.ResponseData;
import com.subsidy.common.exception.HttpException; import com.subsidy.common.exception.HttpException;
import com.subsidy.mapper.ClassDictMapper; import com.subsidy.mapper.ClassDictMapper;
import com.subsidy.mapper.ClassVodFaceCheckMapper;
import com.subsidy.mapper.MemberMapper; import com.subsidy.mapper.MemberMapper;
import com.subsidy.mapper.OprMemDictMapper; import com.subsidy.mapper.OprMemDictMapper;
import com.subsidy.model.OprMemDictDO; import com.subsidy.model.OprMemDictDO;
...@@ -33,7 +34,7 @@ import java.util.concurrent.*; ...@@ -33,7 +34,7 @@ import java.util.concurrent.*;
public class WebSocketUtil implements WebSocketHandler { public class WebSocketUtil implements WebSocketHandler {
@Autowired @Autowired
private OprMemDictMapper oprMemDictMapper; private ClassVodFaceCheckMapper classVodFaceCheckMapper;
@Autowired @Autowired
private ClassDictMapper classDictMapper; private ClassDictMapper classDictMapper;
...@@ -46,7 +47,7 @@ public class WebSocketUtil implements WebSocketHandler { ...@@ -46,7 +47,7 @@ public class WebSocketUtil implements WebSocketHandler {
private int reconnectionSeconds = 30; //每次断连间隔重新连接秒 private int reconnectionSeconds = 30; //每次断连间隔重新连接秒
/** /**
selfExport * selfExport
* 存放建立连接webSocket对象 Map<memberId,session> * 存放建立连接webSocket对象 Map<memberId,session>
*/ */
public static ConcurrentHashMap<Long, WebSocketSession> webSocketMap = new ConcurrentHashMap(); public static ConcurrentHashMap<Long, WebSocketSession> webSocketMap = new ConcurrentHashMap();
...@@ -86,6 +87,12 @@ public class WebSocketUtil implements WebSocketHandler { ...@@ -86,6 +87,12 @@ public class WebSocketUtil implements WebSocketHandler {
// 数据操作 // 数据操作
SystemSettings systemSettings = memberMapper.companySettings(id); //公司配置 SystemSettings systemSettings = memberMapper.companySettings(id); //公司配置
List<ClassSettingsVO> classSettings = classDictMapper.getClassSettings(id); List<ClassSettingsVO> classSettings = classDictMapper.getClassSettings(id);
for (ClassSettingsVO csv : classSettings) {
//配置的视频id
List<Long> longs = classVodFaceCheckMapper.faceVodIds(csv.getId());
csv.setVodIds(longs);
}
systemSettings.setClassSettingsVOS(classSettings); systemSettings.setClassSettingsVOS(classSettings);
if (CollectionUtils.isNotEmpty(classSettings)) { if (CollectionUtils.isNotEmpty(classSettings)) {
String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue); String data = JSONObject.toJSONString(ResponseData.generateCreatedResponse(0, systemSettings), SerializerFeature.WriteMapNullValue);
......
...@@ -36,4 +36,8 @@ public class ExerciseTestVO { ...@@ -36,4 +36,8 @@ public class ExerciseTestVO {
private String companyName; private String companyName;
private Integer ttl;
private Integer ps;
} }
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;
}
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<Long> vodIds;
}
...@@ -2,6 +2,8 @@ package com.subsidy.vo.classdict; ...@@ -2,6 +2,8 @@ package com.subsidy.vo.classdict;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class ClassSettingsVO { public class ClassSettingsVO {
...@@ -69,4 +71,13 @@ public class ClassSettingsVO { ...@@ -69,4 +71,13 @@ public class ClassSettingsVO {
private Integer timeLimit; private Integer timeLimit;
private Integer activityFlag; private Integer activityFlag;
private List<Long> vodIds;
private Integer paperTime;
private Integer faceCheck;
private Integer paperTimeLimit;
} }
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;
}
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;
}
package com.subsidy.vo.classdict;
import lombok.Data;
@Data
public class VodPassRateVO {
private Integer ttl;
private Integer ps;
}
...@@ -58,6 +58,11 @@ public class QueryCoursesVO { ...@@ -58,6 +58,11 @@ public class QueryCoursesVO {
private Integer paperCount; private Integer paperCount;
/** /**
* 企业线上培训/学徒制
*/
private Integer courseDataType;
/**
* 开放状态 * 开放状态
*/ */
private Integer openStatus; private Integer openStatus;
......
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;
}
package com.subsidy.vo.dudao;
import lombok.Data;
@Data
public class DailyActivitiesVO {
private Integer access;
private Long activityTime;
private Integer checkType;
}
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;
}
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;
}
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<ChapterList2> chapterList;
private Long courseHour;
private String downCode;
private Long endDate;
private Long learnHour;
private String shortName;
private Long startDate;
private List<MemberVO> studentList;
private String trainingCode;
private String trainingName;
}
package com.subsidy.vo.dudao;
import lombok.Data;
@Data
public class ExamActivitiesVO {
private Integer access;
private Long activityTime;
}
package com.subsidy.vo.dudao;
import lombok.Data;
@Data
public class MemberVO {
private String name;
private String phone;
private String identity;
}
package com.subsidy.vo.dudao;
import lombok.Data;
@Data
public class RensheResponseVO {
/**
* 响应码
*/
private long c;
/**
* 响应体
*/
private Object ctt;
/**
* 响应信息
*/
private String msg;
}
package com.subsidy.vo.member;
import lombok.Data;
@Data
public class CheckItemVO {
/**
* 1 通过 0 不通过
*/
private Integer nextFlag;
}
package com.subsidy.vo.member; package com.subsidy.vo.member;
import com.subsidy.dto.member.ImportClassMemberDTO;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
......
...@@ -9,10 +9,10 @@ public class MemberVodVO { ...@@ -9,10 +9,10 @@ public class MemberVodVO {
private Integer vodLength; private Integer vodLength;
private String percent; private Integer percent;
/** /**
* 解锁状态 * 解锁状态 true:已解锁 false:未解锁
*/ */
private Boolean status; private Boolean status;
......
...@@ -20,6 +20,8 @@ public class MyCoursesVO { ...@@ -20,6 +20,8 @@ public class MyCoursesVO {
private String endDate; private String endDate;
private String classType;
private Integer totalCnt; private Integer totalCnt;
private Integer studyCnt; private Integer studyCnt;
......
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<SocialContentVodVO> socialContentVodVOS;
}
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<SocialVodTestVO> socialVodTestVOS;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!