|
|
@@ -33,7 +33,6 @@ import vip.xiaonuo.disk.api.NetDiskApi;
|
|
|
import vip.xiaonuo.disk.mapper.CourseOpenMapper;
|
|
|
import vip.xiaonuo.exam.domain.ExamPaper;
|
|
|
import vip.xiaonuo.exam.domain.TExam;
|
|
|
-import vip.xiaonuo.exam.domain.enums.ExamPaperTypeEnum;
|
|
|
import vip.xiaonuo.exam.domain.exam.TExamAddParam;
|
|
|
import vip.xiaonuo.exam.domain.exam.TExamEditParam;
|
|
|
import vip.xiaonuo.exam.domain.exam.TExamIdParam;
|
|
|
@@ -118,10 +117,10 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
newExamPaper.setIsSelect(1);
|
|
|
examPaperMapper.updateByPrimaryKeySelective(newExamPaper);
|
|
|
|
|
|
- if(ExamPaperTypeEnum.TimeLimit.getCode() == examPaper.getPaperType()){
|
|
|
- tExamAddParam.setStartTime(examPaper.getLimitStartTime());
|
|
|
- tExamAddParam.setEndTime(examPaper.getLimitEndTime());
|
|
|
- }
|
|
|
+// if(ExamPaperTypeEnum.TimeLimit.getCode() == examPaper.getPaperType()){
|
|
|
+// tExamAddParam.setStartTime(examPaper.getLimitStartTime());
|
|
|
+// tExamAddParam.setEndTime(examPaper.getLimitEndTime());
|
|
|
+// }
|
|
|
TExam tExam = BeanUtil.toBean(tExamAddParam, TExam.class);
|
|
|
|
|
|
boolean query = false;
|
|
|
@@ -140,15 +139,17 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(tExam.getExamType() == null){
|
|
|
- if(examPaper.getPaperType() == ExamPaperTypeEnum.Survey.getCode()){
|
|
|
- tExam.setExamType("3"); // 调查问卷
|
|
|
- }else if(tExamAddParam.getChapterId() != null){
|
|
|
- tExam.setExamType("2"); // 章节测验
|
|
|
- }else{
|
|
|
- tExam.setExamType("1"); // 普通考试
|
|
|
- }
|
|
|
- }
|
|
|
+// if(tExam.getExamType() == null){
|
|
|
+// if(examPaper.getPaperType() == ExamPaperTypeEnum.Survey.getCode()){
|
|
|
+// tExam.setExamType("3"); // 调查问卷
|
|
|
+// }else if(tExamAddParam.getChapterId() != null){
|
|
|
+// tExam.setExamType("2"); // 章节测验
|
|
|
+// }else{
|
|
|
+// tExam.setExamType("1"); // 普通考试
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ tExam.setExamType(tExamAddParam.getExamType());
|
|
|
this.save(tExam);
|
|
|
if(tExamAddParam.getStartTime() != null && tExamAddParam.getEndTime() != null){
|
|
|
Date currentTime = new Date(System.currentTimeMillis());
|
|
|
@@ -211,18 +212,18 @@ public class TExamServiceImpl extends ServiceImpl<TExamMapper, TExam> implements
|
|
|
|
|
|
|
|
|
|
|
|
- if(tExamEditParam.getPaperId() != null && !tExamEditParam.getPaperId().isEmpty()){
|
|
|
- ExamPaper examPaper = examPaperService.selectById(Integer.parseInt(tExamEditParam.getPaperId()));
|
|
|
- if(ExamPaperTypeEnum.TimeLimit.getCode() == examPaper.getPaperType()){
|
|
|
- tExamEditParam.setStartTime(examPaper.getLimitStartTime());
|
|
|
- tExamEditParam.setEndTime(examPaper.getLimitEndTime());
|
|
|
- updateJob = true;
|
|
|
- }
|
|
|
- if(ExamPaperTypeEnum.Survey.getCode() == examPaper.getPaperType()){
|
|
|
- tExam.setExamType("3"); // 3 调查问卷
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+// if(tExamEditParam.getPaperId() != null && !tExamEditParam.getPaperId().isEmpty()){
|
|
|
+// ExamPaper examPaper = examPaperService.selectById(Integer.parseInt(tExamEditParam.getPaperId()));
|
|
|
+// if(ExamPaperTypeEnum.TimeLimit.getCode() == examPaper.getPaperType()){
|
|
|
+// tExamEditParam.setStartTime(examPaper.getLimitStartTime());
|
|
|
+// tExamEditParam.setEndTime(examPaper.getLimitEndTime());
|
|
|
+// updateJob = true;
|
|
|
+// }
|
|
|
+// if(ExamPaperTypeEnum.Survey.getCode() == examPaper.getPaperType()){
|
|
|
+// tExam.setExamType("3"); // 3 调查问卷
|
|
|
+// }
|
|
|
+// }
|
|
|
+ tExam.setExamType(tExamEditParam.getExamType());
|
|
|
|
|
|
|
|
|
if(updateJob){
|