pans 6 месяцев назад
Родитель
Сommit
5d9899070f

+ 3 - 2
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/controller/student/ExamPaperAnswerController.java

@@ -26,6 +26,7 @@ import vip.xiaonuo.exam.viewmodel.admin.exam.ExamPaperEditRequestVM;
 import vip.xiaonuo.exam.viewmodel.student.exam.ExamPaperReadVM;
 import vip.xiaonuo.exam.viewmodel.student.exam.ExamPaperSubmitVM;
 import vip.xiaonuo.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
+import vip.xiaonuo.exam.vo.ExamPaperAnswerVo;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
@@ -53,11 +54,11 @@ public class ExamPaperAnswerController extends BaseApiController {
 
 
     @RequestMapping(value = "/pageList", method = RequestMethod.POST)
-    public CommonResult<Page<ExamPaperAnswer>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {
+    public CommonResult<Page<ExamPaperAnswerVo>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {
         //根据老师id查询对应的学生
         List<String> studentIds=examPaperAnswerService.studentIds(StpLoginUserUtil.getLoginUser().getId());
         //查出对应学生的试卷
-        Page<ExamPaperAnswer> pageInfo = examPaperAnswerService.studentPage(model,studentIds);
+        Page<ExamPaperAnswerVo> pageInfo = examPaperAnswerService.studentPage(model,studentIds);
         pageInfo.getRecords().forEach(vm -> {
             if(ObjectUtil.isNotEmpty(vm.getSubjectId()))
             {

+ 2 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/ExamPaperAnswerMapper.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
 import vip.xiaonuo.exam.domain.ExamPaperAnswer;
 import vip.xiaonuo.exam.domain.other.KeyValue;
 import vip.xiaonuo.exam.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
+import vip.xiaonuo.exam.vo.ExamPaperAnswerVo;
 
 import java.util.Date;
 import java.util.List;
@@ -14,7 +15,7 @@ import java.util.Map;
 @Mapper
 public interface ExamPaperAnswerMapper extends BaseMapper<ExamPaperAnswer> {
 
-    Page<ExamPaperAnswer> studentPage(@Param("studentIds") List<String> studentIds , @Param("page") Page<ExamPaperAnswer> page);
+    Page<ExamPaperAnswerVo> studentPage(@Param("studentIds") List<String> studentIds , @Param("page") Page<ExamPaperAnswerVo> page);
 
     Integer selectAllCount();
 

+ 27 - 5
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/mapper/mapping/ExamPaperAnswerMapper.xml

@@ -17,6 +17,10 @@
     <result column="create_user" jdbcType="INTEGER" property="createUser" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="task_exam_id" jdbcType="INTEGER" property="taskExamId" />
+
+
+
+
   </resultMap>
   <sql id="Base_Column_List">
     id, exam_paper_id, paper_name, paper_type, subject_id, system_score, user_score,
@@ -215,17 +219,35 @@
 
 
 
-  <select id="studentPage" resultMap="BaseResultMap" parameterType="vip.xiaonuo.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM">
+  <select id="studentPage" resultType="vip.xiaonuo.exam.vo.ExamPaperAnswerVo" parameterType="vip.xiaonuo.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM">
     SELECT
-    <include refid="Base_Column_List"/>
-    FROM t_exam_paper_answer
+      a.id id,
+      a.exam_paper_id examPaperId,
+      a.paper_name paperName,
+      a.paper_type paperType,
+      a.system_score systemScore,
+      a.user_score userScore,
+      a.paper_score paperScore,
+      a.question_correct questionCorrect,
+      a.question_count questionCount,
+      a.do_time doTime,
+      a.status status,
+      a.create_user createUser,
+      a.create_time createTime,
+      su.NAME name,
+      su.GRADES_ID gradesId,
+      c.grades_name gradesName
+    FROM
+    t_exam_paper_answer a LEFT JOIN SYS_USER su ON a.create_user=su.ID
+    LEFT JOIN grades c ON su.GRADES_ID=c.grades_id
     <where>
-        and create_user in
+        and a.create_user in
         <foreach item="item" collection="studentIds" open="(" separator="," close=")">
             #{item}
         </foreach>
+        and a.paper_type!=5
     </where>
-    ORDER BY create_time DESC
+    ORDER BY a.create_time DESC
   </select>
 
 

+ 2 - 1
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/ExamPaperAnswerService.java

@@ -7,6 +7,7 @@ import vip.xiaonuo.exam.domain.ExamPaperAnswerInfo;
 import vip.xiaonuo.exam.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
 import vip.xiaonuo.exam.viewmodel.student.exam.ExamPaperSubmitVM;
 import vip.xiaonuo.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
+import vip.xiaonuo.exam.vo.ExamPaperAnswerVo;
 
 import java.util.List;
 import java.util.Map;
@@ -19,7 +20,7 @@ public interface ExamPaperAnswerService extends BaseService<ExamPaperAnswer> {
      * @param requestVM 过滤条件
      * @return PageInfo<ExamPaperAnswer>
      */
-    Page<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM model,List<String> studentIds);
+    Page<ExamPaperAnswerVo> studentPage(ExamPaperAnswerPageVM model, List<String> studentIds);
 
     /**
      * 计算试卷提交结果

+ 3 - 2
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/service/impl/ExamPaperAnswerServiceImpl.java

@@ -29,6 +29,7 @@ import vip.xiaonuo.exam.viewmodel.admin.paper.ExamPaperAnswerPageRequestVM;
 import vip.xiaonuo.exam.viewmodel.student.exam.ExamPaperSubmitItemVM;
 import vip.xiaonuo.exam.viewmodel.student.exam.ExamPaperSubmitVM;
 import vip.xiaonuo.exam.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
+import vip.xiaonuo.exam.vo.ExamPaperAnswerVo;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -60,8 +61,8 @@ public class ExamPaperAnswerServiceImpl extends BaseServiceImpl<ExamPaperAnswer>
     }
 
     @Override
-    public Page<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM,List<String> studentIds) {
-        Page<ExamPaperAnswer> page = new Page<ExamPaperAnswer>(requestVM.getCurrent(), requestVM.getSize());
+    public Page<ExamPaperAnswerVo> studentPage(ExamPaperAnswerPageVM requestVM, List<String> studentIds) {
+        Page<ExamPaperAnswerVo> page = new Page<ExamPaperAnswerVo>(requestVM.getCurrent(), requestVM.getSize());
         page.setSearchCount(true); // 设置计算总记录数
         return examPaperAnswerMapper.studentPage(studentIds,page);
     }

+ 93 - 0
snowy-plugin/snowy-plugin-exam/snowy-plugin-exam-func/src/main/java/vip/xiaonuo/exam/vo/ExamPaperAnswerVo.java

@@ -0,0 +1,93 @@
+package vip.xiaonuo.exam.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+@Data
+public class ExamPaperAnswerVo implements Serializable {
+    private static final long serialVersionUID = -2143539181805283910L;
+
+    private Integer id;
+
+    private Integer examPaperId;
+
+    /**
+     * 试卷名称
+     */
+    private String paperName;
+
+    /**
+     * 试卷类型( 1.固定试卷 2.章节作业 3.章节测验 4.时段试卷 5.调查问卷 6.任务试卷 )
+     */
+    private Integer paperType;
+
+    /**
+     * 学科
+     */
+    private Integer subjectId;
+
+    private String subjectName;
+
+    /**
+     * 系统判定得分
+     */
+    private Integer systemScore;
+
+    private String systemScoreStr;
+
+    /**
+     * 最终得分(千分制)
+     */
+    private Integer userScore;
+
+    private String userScoreStr;
+    /**
+     * 试卷总分
+     */
+    private Integer paperScore;
+
+    private String paperScoreStr;
+    /**
+     * 做对题目数量
+     */
+    private Integer questionCorrect;
+
+    /**
+     * 题目总数量
+     */
+    private Integer questionCount;
+
+    /**
+     * 做题时间(秒)
+     */
+    private Integer doTime;
+
+    private String doTimeStr;
+    /**
+     * 试卷状态(1待判分 2完成)
+     */
+    private Integer status;
+
+    /**
+     * 学生
+     */
+    private String createUser;
+
+    /**
+     * 提交时间
+     */
+    private Date createTime;
+
+    private String createTimeStr;
+
+    private Integer taskExamId;
+
+    private String name;
+
+    private String gradesId;
+
+    private String gradesName;
+
+
+}