考试记录列表与详情
This commit is contained in:
parent
8d9960cdee
commit
e70f27a7a1
|
|
@ -286,8 +286,15 @@ public class ApiExaminationController extends BaseController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/v1/examination/userexamination/detail/{id}")
|
||||||
|
public AjaxResult detail(@PathVariable Integer id) {
|
||||||
|
ExamUserExaminationVO data = examUserExaminationService.selectDetailById(id);
|
||||||
|
|
||||||
|
AjaxResult success = success("考试完成");
|
||||||
|
success.put("data", data);
|
||||||
|
return success;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
package com.ruoyi.exam.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.exam.domain.ExamUserExamination;
|
||||||
|
import com.ruoyi.exam.service.IExamUserExaminationService;
|
||||||
|
import com.ruoyi.framework.web.base.BaseController;
|
||||||
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的考试记录 信息操作处理
|
||||||
|
*
|
||||||
|
* @author zhujj
|
||||||
|
* @date 2019-01-12
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/exam/examUserExamination")
|
||||||
|
public class ExamUserExaminationController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "exam/examUserExamination";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamUserExaminationService examUserExaminationService;
|
||||||
|
|
||||||
|
@RequiresPermissions("exam:examUserExamination:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String examUserExamination()
|
||||||
|
{
|
||||||
|
return prefix + "/examUserExamination";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我的考试记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("exam:examUserExamination:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(@RequestParam Map<String,Object> map)
|
||||||
|
{
|
||||||
|
List<ExamUserExaminationVO> list = examUserExaminationService.selectMyExamUserExamination(map);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出我的考试记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("exam:examUserExamination:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(ExamUserExamination examUserExamination)
|
||||||
|
{
|
||||||
|
List<ExamUserExamination> list = examUserExaminationService.selectExamUserExaminationList(examUserExamination);
|
||||||
|
ExcelUtil<ExamUserExamination> util = new ExcelUtil<ExamUserExamination>(ExamUserExamination.class);
|
||||||
|
return util.exportExcel(list, "examUserExamination");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增我的考试记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存我的考试记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("exam:examUserExamination:add")
|
||||||
|
@Log(title = "我的考试记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(ExamUserExamination examUserExamination)
|
||||||
|
{
|
||||||
|
return toAjax(examUserExaminationService.insert(examUserExamination));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改我的考试记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
ExamUserExamination examUserExamination = examUserExaminationService.selectById(id);
|
||||||
|
mmap.put("examUserExamination", examUserExamination);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存我的考试记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("exam:examUserExamination:edit")
|
||||||
|
@Log(title = "我的考试记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(ExamUserExamination examUserExamination)
|
||||||
|
{
|
||||||
|
return toAjax(examUserExaminationService.updateById(examUserExamination));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除我的考试记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("exam:examUserExamination:remove")
|
||||||
|
@Log(title = "我的考试记录", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(examUserExaminationService.deleteByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.ruoyi.exam.domain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by flower on 2019/1/16.
|
||||||
|
*/
|
||||||
|
public class ExamUserExaminationQuestionVO extends ExamUserExaminationQuestion{
|
||||||
|
|
||||||
|
|
||||||
|
private String answer;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private List<ExamQuestionItem> questionItems;
|
||||||
|
|
||||||
|
public String getAnswer() {
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnswer(String answer) {
|
||||||
|
this.answer = answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExamQuestionItem> getQuestionItems() {
|
||||||
|
return questionItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuestionItems(List<ExamQuestionItem> questionItems) {
|
||||||
|
this.questionItems = questionItems;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ruoyi.exam.domain;
|
package com.ruoyi.exam.domain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by flower on 2019/1/14.
|
* Created by flower on 2019/1/14.
|
||||||
*/
|
*/
|
||||||
|
|
@ -7,6 +9,30 @@ public class ExamUserExaminationVO extends ExamUserExamination{
|
||||||
|
|
||||||
private ExamExaminationVO examExaminationVO;
|
private ExamExaminationVO examExaminationVO;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String examPaperName;
|
||||||
|
|
||||||
|
private List<ExamUserExaminationQuestionVO> examUserExaminationQuestions;
|
||||||
|
|
||||||
|
public String getExamPaperName() {
|
||||||
|
return examPaperName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperName(String examPaperName) {
|
||||||
|
this.examPaperName = examPaperName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ExamExaminationVO getExamExaminationVO() {
|
public ExamExaminationVO getExamExaminationVO() {
|
||||||
return examExaminationVO;
|
return examExaminationVO;
|
||||||
}
|
}
|
||||||
|
|
@ -14,4 +40,12 @@ public class ExamUserExaminationVO extends ExamUserExamination{
|
||||||
public void setExamExaminationVO(ExamExaminationVO examExaminationVO) {
|
public void setExamExaminationVO(ExamExaminationVO examExaminationVO) {
|
||||||
this.examExaminationVO = examExaminationVO;
|
this.examExaminationVO = examExaminationVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ExamUserExaminationQuestionVO> getExamUserExaminationQuestions() {
|
||||||
|
return examUserExaminationQuestions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamUserExaminationQuestions(List<ExamUserExaminationQuestionVO> examUserExaminationQuestions) {
|
||||||
|
this.examUserExaminationQuestions = examUserExaminationQuestions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,40 @@
|
||||||
package com.ruoyi.exam.mapper;
|
package com.ruoyi.exam.mapper;
|
||||||
|
|
||||||
import com.ruoyi.exam.domain.ExamUserExamination;
|
import com.ruoyi.exam.domain.ExamUserExamination;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
||||||
import com.ruoyi.framework.web.base.MyMapper;
|
import com.ruoyi.framework.web.base.MyMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 我的考试记录 数据层
|
* 我的考试记录 数据层
|
||||||
*
|
*
|
||||||
* @author zhujj
|
* @author zhujj
|
||||||
* @date 2019-01-12
|
* @date 2019-01-12
|
||||||
*/
|
*/
|
||||||
public interface ExamUserExaminationMapper extends MyMapper<ExamUserExamination>
|
public interface ExamUserExaminationMapper extends MyMapper<ExamUserExamination> {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询我的考试记录列表
|
* 查询我的考试记录列表
|
||||||
*
|
*
|
||||||
* @param examUserExamination 我的考试记录信息
|
* @param examUserExamination 我的考试记录信息
|
||||||
* @return 我的考试记录集合
|
* @return 我的考试记录集合
|
||||||
*/
|
*/
|
||||||
public List<ExamUserExamination> selectExamUserExaminationList(ExamUserExamination examUserExamination);
|
public List<ExamUserExamination> selectExamUserExaminationList(ExamUserExamination examUserExamination);
|
||||||
|
|
||||||
List<ExamUserExamination> selectLastOne(ExamUserExamination examUserExamination);
|
List<ExamUserExamination> selectLastOne(ExamUserExamination examUserExamination);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询我的考试记录
|
* 查询我的考试记录
|
||||||
|
*
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ExamUserExaminationVO> selectMyExamUserExamination(ExamUserExaminationVO bean);
|
List<ExamUserExaminationVO> selectMyExamUserExamination(ExamUserExaminationVO bean);
|
||||||
|
|
||||||
|
List<ExamUserExaminationVO> selectMyExamUserExamination(Map<String, Object> map);
|
||||||
|
|
||||||
|
ExamUserExaminationVO selectDetailById(Integer id);
|
||||||
}
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.ruoyi.exam.service;
|
||||||
|
|
||||||
import com.ruoyi.exam.domain.ExamUserExamination;
|
import com.ruoyi.exam.domain.ExamUserExamination;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
||||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||||
|
|
@ -40,4 +41,9 @@ public interface IExamUserExaminationService extends AbstractBaseService<ExamUse
|
||||||
int updateOneSelectiveById(ExamUserExamination examUserExamination);
|
int updateOneSelectiveById(ExamUserExamination examUserExamination);
|
||||||
|
|
||||||
List<ExamUserExaminationVO> selectMyExamUserExamination(ExamUserExaminationVO bean);
|
List<ExamUserExaminationVO> selectMyExamUserExamination(ExamUserExaminationVO bean);
|
||||||
|
|
||||||
|
List<ExamUserExaminationVO> selectMyExamUserExamination(Map<String,Object> map);
|
||||||
|
|
||||||
|
//查询考试记录详情
|
||||||
|
ExamUserExaminationVO selectDetailById(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ruoyi.exam.service.impl;
|
package com.ruoyi.exam.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
import com.ruoyi.exam.domain.ExamUserExaminationVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -56,6 +57,18 @@ public class ExamUserExaminationServiceImpl extends AbstractBaseServiceImpl<Exam
|
||||||
return examUserExaminationMapper.selectMyExamUserExamination(bean);
|
return examUserExaminationMapper.selectMyExamUserExamination(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ExamUserExaminationVO> selectMyExamUserExamination(Map<String,Object> map) {
|
||||||
|
startPage();
|
||||||
|
return examUserExaminationMapper.selectMyExamUserExamination(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExamUserExaminationVO selectDetailById(Integer id) {
|
||||||
|
|
||||||
|
return examUserExaminationMapper.selectDetailById(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询我的考试记录分页列表
|
* 查询我的考试记录分页列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<resultMap type="ExamUserExaminationVO" id="ExamUserExaminationResultVO">
|
<resultMap type="ExamUserExaminationVO" id="ExamUserExaminationResultVO">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="vipUserId" column="vip_user_id" />
|
<result property="vipUserId" column="vip_user_id" />
|
||||||
|
<result property="userName" column="user_name" />
|
||||||
<result property="examExaminationId" column="exam_examination_id" />
|
<result property="examExaminationId" column="exam_examination_id" />
|
||||||
<result property="examPaperId" column="exam_paper_id" />
|
<result property="examPaperId" column="exam_paper_id" />
|
||||||
|
<result property="examPaperName" column="exam_paper_name" />
|
||||||
<result property="score" column="score" />
|
<result property="score" column="score" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createDate" column="create_date" />
|
<result property="createDate" column="create_date" jdbcType="TIMESTAMP" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateDate" column="update_date" />
|
<result property="updateDate" column="update_date" jdbcType="TIMESTAMP" />
|
||||||
<result property="remarks" column="remarks" />
|
<result property="remarks" column="remarks" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
<association property="examExaminationVO" javaType="com.ruoyi.exam.domain.ExamExaminationVO">
|
<association property="examExaminationVO" javaType="com.ruoyi.exam.domain.ExamExaminationVO">
|
||||||
|
|
@ -40,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="name" column="v_name" />
|
<result property="name" column="v_name" />
|
||||||
<result property="type" column="v_type" />
|
<result property="type" column="v_type" />
|
||||||
<result property="enableControlTime" column="v_enable_control_time" />
|
<result property="enableControlTime" column="v_enable_control_time" />
|
||||||
<result property="startTime" column="v_start_time" />
|
<result property="startTime" column="v_start_time" jdbcType="TIMESTAMP" />
|
||||||
<result property="endTime" column="v_end_time" />
|
<result property="endTime" column="v_end_time" jdbcType="TIMESTAMP" />
|
||||||
<result property="timeLength" column="v_time_length" />
|
<result property="timeLength" column="v_time_length" />
|
||||||
<result property="examNumber" column="v_exam_number" />
|
<result property="examNumber" column="v_exam_number" />
|
||||||
<result property="passMark" column="v_pass_mark" />
|
<result property="passMark" column="v_pass_mark" />
|
||||||
|
|
@ -50,9 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="examEnd" column="v_exam_end" />
|
<result property="examEnd" column="v_exam_end" />
|
||||||
<result property="examinationUserLimit" column="v_examination_user_limit" />
|
<result property="examinationUserLimit" column="v_examination_user_limit" />
|
||||||
<result property="createBy" column="v_create_by" />
|
<result property="createBy" column="v_create_by" />
|
||||||
<result property="createDate" column="v_create_date" />
|
<result property="createDate" column="v_create_date" jdbcType="TIMESTAMP" />
|
||||||
<result property="updateBy" column="v_update_by" />
|
<result property="updateBy" column="v_update_by" />
|
||||||
<result property="updateDate" column="v_update_date" />
|
<result property="updateDate" column="v_update_date" jdbcType="TIMESTAMP" />
|
||||||
<result property="remarks" column="v_remarks" />
|
<result property="remarks" column="v_remarks" />
|
||||||
<result property="delFlag" column="v_del_flag" />
|
<result property="delFlag" column="v_del_flag" />
|
||||||
</association>
|
</association>
|
||||||
|
|
@ -63,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
exam_user_examination.id,
|
exam_user_examination.id,
|
||||||
exam_user_examination.vip_user_id,
|
exam_user_examination.vip_user_id,
|
||||||
exam_user_examination.exam_examination_id,
|
exam_user_examination.exam_examination_id,
|
||||||
exam_user_examination.exam_paper_id, score,
|
exam_user_examination.exam_paper_id,
|
||||||
|
exam_user_examination.score,
|
||||||
exam_user_examination.create_by,
|
exam_user_examination.create_by,
|
||||||
exam_user_examination.create_date,
|
exam_user_examination.create_date,
|
||||||
exam_user_examination.update_by,
|
exam_user_examination.update_by,
|
||||||
|
|
@ -118,10 +121,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ee.type as v_type,
|
ee.type as v_type,
|
||||||
ee.enable_control_time as v_enable_control_time,
|
ee.enable_control_time as v_enable_control_time,
|
||||||
ee.start_time as v_start_time,
|
ee.start_time as v_start_time,
|
||||||
ee.end_time as v_end_time
|
ee.end_time as v_end_time,
|
||||||
|
su.user_name as user_name,
|
||||||
|
ep.name as exam_paper_name
|
||||||
from exam_user_examination exam_user_examination
|
from exam_user_examination exam_user_examination
|
||||||
INNER JOIN exam_examination ee ON exam_user_examination.exam_examination_id = ee.id
|
INNER JOIN exam_examination ee ON exam_user_examination.exam_examination_id = ee.id
|
||||||
INNER JOIN train_course tc ON ee.train_course_id = tc.id
|
INNER JOIN train_course tc ON ee.train_course_id = tc.id
|
||||||
|
INNER JOIN sys_user su ON exam_user_examination.vip_user_id = su.user_id
|
||||||
|
INNER JOIN exam_paper ep ON ep.id = exam_user_examination.exam_paper_id
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null "> and id = #{id}</if>
|
<if test="id != null "> and id = #{id}</if>
|
||||||
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
|
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
|
||||||
|
|
@ -134,9 +141,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||||
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
||||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<if test="userName != null and userName != '' "> and su.user_name = #{userName}</if>
|
||||||
|
<if test="trainCourseName != null and trainCourseName != '' "> and tc.name = #{trainCourseName}</if>
|
||||||
|
<if test="examPaperName != null and examPaperName != '' "> and ep.name = #{examPaperName}</if>
|
||||||
|
<if test="type != null and type != '' "> and ee.type = #{type}</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDetailById" resultMap="ExamUserExaminationQuestionVO">
|
||||||
|
select <include refid="selectExamUserExaminationVo"/>,
|
||||||
|
eq.title as eq_title,
|
||||||
|
eq.answer as eq_answer,
|
||||||
|
eueq.user_answer,
|
||||||
|
eqi.content,
|
||||||
|
eqi.number,
|
||||||
|
eqi.id as eqi_id,
|
||||||
|
eueq.id as eueq_id,
|
||||||
|
eq.id as eq_id
|
||||||
|
FROM exam_user_examination exam_user_examination
|
||||||
|
LEFT JOIN exam_user_examination_question eueq ON exam_user_examination.id = eueq.exam_user_examination_id
|
||||||
|
INNER JOIN exam_question eq on eueq.exam_question_id = eq.id
|
||||||
|
INNER JOIN exam_question_item eqi ON eq.id =eqi.exam_question_id
|
||||||
|
WHERE exam_user_examination.id = #{id}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.exam.domain.ExamUserExaminationVO" id="ExamUserExaminationQuestionVO">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="vipUserId" column="vip_user_id" />
|
||||||
|
<result property="examExaminationId" column="exam_examination_id" />
|
||||||
|
<result property="examPaperId" column="exam_paper_id" />
|
||||||
|
<result property="score" column="score" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createDate" column="create_date" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateDate" column="update_date" />
|
||||||
|
<result property="remarks" column="remarks" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
|
||||||
|
|
||||||
|
<collection property="examUserExaminationQuestions" ofType="com.ruoyi.exam.domain.ExamUserExaminationQuestionVO">
|
||||||
|
<result property="id" column="eueq_id" />
|
||||||
|
<result property="userAnswer" column="user_answer" />
|
||||||
|
<result property="answer" column="eq_answer" />
|
||||||
|
<result property="title" column="eq_title" />
|
||||||
|
<collection property="questionItems" ofType="com.ruoyi.exam.domain.ExamQuestionItem">
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<result property="number" column="number" />
|
||||||
|
<result property="id" column="eqi_id" />
|
||||||
|
</collection>
|
||||||
|
|
||||||
|
</collection>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-examUserExamination-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">会员代码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="vipUserId" name="vipUserId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">试题编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="examExaminationId" name="examExaminationId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">试卷编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="examPaperId" name="examPaperId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">考试得分:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="score" name="score" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建者:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="createBy" name="createBy" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="createDate" name="createDate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新者:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="updateBy" name="updateBy" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="updateDate" name="updateDate" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="remarks" name="remarks" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">删除标记:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="delFlag" name="delFlag" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "exam/examUserExamination"
|
||||||
|
$("#form-examUserExamination-add").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-examUserExamination-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-examUserExamination-edit" th:object="${examUserExamination}">
|
||||||
|
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">会员代码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="vipUserId" name="vipUserId" th:field="*{vipUserId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">试题编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="examExaminationId" name="examExaminationId" th:field="*{examExaminationId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">试卷编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="examPaperId" name="examPaperId" th:field="*{examPaperId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">考试得分:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="score" name="score" th:field="*{score}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建者:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="createDate" name="createDate" th:field="*{createDate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新者:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="updateDate" name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注信息:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">删除标记:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="delFlag" name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "exam/examUserExamination"
|
||||||
|
$("#form-examUserExamination-edit").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-examUserExamination-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
学员名称:<input type="text" name="userName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
课程名称:<input type="text" name="trainCourseName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
试卷名称:<input type="text" name="examPaperName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
考试类型:<select name="type" th:with="type=${@dict.getType('exam_ination_type')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<div class="btn-group-sm hidden-xs" id="toolbar" role="group">-->
|
||||||
|
<!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="exam:examUserExamination:add">-->
|
||||||
|
<!--<i class="fa fa-plus"></i> 添加-->
|
||||||
|
<!--</a>-->
|
||||||
|
<!--<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="exam:examUserExamination:edit">-->
|
||||||
|
<!--<i class="fa fa-edit"></i> 修改-->
|
||||||
|
<!--</a>-->
|
||||||
|
<!--<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="exam:examUserExamination:remove">-->
|
||||||
|
<!--<i class="fa fa-remove"></i> 删除-->
|
||||||
|
<!--</a>-->
|
||||||
|
<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="exam:examUserExamination:export">-->
|
||||||
|
<!--<i class="fa fa-download"></i> 导出-->
|
||||||
|
<!--</a>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('exam:examUserExamination:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('exam:examUserExamination:remove')}]];
|
||||||
|
var prefix = ctx + "exam/examUserExamination";
|
||||||
|
var type =[[${@dict.getType('exam_ination_type')}]];
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "我的考试记录",
|
||||||
|
search: false,
|
||||||
|
showExport: true,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '考试记录编码',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userName',
|
||||||
|
title: '用户名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'examExaminationVO.trainCourseName',
|
||||||
|
title: '课程名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'examPaperName',
|
||||||
|
title: '试卷名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'examExaminationVO.name',
|
||||||
|
title: '考试名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'examExaminationVO.type',
|
||||||
|
title: '考试类型',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function (value, item, index) {
|
||||||
|
debugger
|
||||||
|
return $.table.selectDictLabel(type, item.examExaminationVO.type);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createDate',
|
||||||
|
title: '开始时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'updateDate',
|
||||||
|
title: '结束时间',
|
||||||
|
sortable: true
|
||||||
|
},{
|
||||||
|
field: 'score',
|
||||||
|
title: '考试得分',
|
||||||
|
sortable: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue