Kaynağa Gözat

我的作业代码提交

pans 6 ay önce
ebeveyn
işleme
6a914b4b79

+ 19 - 1
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/domain/CourseStudentBurialpoint.java

@@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.annotation.*;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
-import java.math.BigDecimal;
+
 import java.util.Date;
 
 /**
@@ -92,4 +92,22 @@ public class CourseStudentBurialpoint {
     /** 本次停留时间 */
     @ApiModelProperty(value = "本次停留时间", position = 5)
     private String stayTime;
+
+    /** 课时名称 */
+    private String hourName;
+    /** 章节名称 */
+    private String chapterName;
+    /** 课程名称 */
+    private String courseName;
+
+    /** 文件名称 */
+    private String fileName;
+
+    /** 文件路经 */
+    private String filePath;
+
+    /** 文件id */
+    private String fileId;
+
+
 }

+ 30 - 7
snowy-plugin/snowy-plugin-disk/snowy-plugin-disk-func/src/main/java/vip/xiaonuo/disk/param/coursestudentprogress/CourseStudentProgressAddParam.java

@@ -17,9 +17,6 @@ import lombok.Getter;
 import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 课程学生-学习进度表添加参数
@@ -35,10 +32,7 @@ public class CourseStudentProgressAddParam {
     @ApiModelProperty(value = "人员id", position = 2)
     private String userId;
 
-    /** 课时id */
-    @ApiModelProperty(value = "课时id", position = 3)
-    @NotBlank(message = "课时id不能为空")
-    private String hourId;
+
 
     /** 当前学习进度 */
     @ApiModelProperty(value = "当前学习进度", position = 4)
@@ -69,4 +63,33 @@ public class CourseStudentProgressAddParam {
     private String stayTime;
 
 
+    /** 课程id */
+    private String courseId;
+
+    /** 课程名称 */
+    private String courseName;
+
+    /** 章节id */
+    private String chapterId;
+    /** 章节名称 */
+    private String chapterName;
+
+    /** 课时id */
+    @ApiModelProperty(value = "课时id", position = 3)
+    @NotBlank(message = "课时id不能为空")
+    private String hourId;
+
+    /** 课时名称 */
+    private String hourName;
+
+    /** 文件名称 */
+    private String fileName;
+
+    /** 文件路经 */
+    private String filePath;
+
+    /** 文件id */
+    private String fileId;
+
+
 }

+ 4 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/domain/exam/TExamAddParam.java

@@ -82,4 +82,8 @@ public class TExamAddParam {
     @ApiModelProperty(value = "学期id", position = 15)
     private String semesterId;
 
+
+
+
+
 }

+ 5 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/domain/exam/TExamEditParam.java

@@ -81,4 +81,9 @@ public class TExamEditParam {
 
     @ApiModelProperty(value = "学期id", position = 15)
     private String semesterId;
+
+    private String examType;
+
+
+
 }

+ 27 - 26
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/impl/TExamServiceImpl.java

@@ -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){