wangliang 4 anos atrás
pai
commit
255dd9924c

+ 3 - 2
themis-backend/src/main/java/com/qmth/themis/backend/api/TEExamController.java

@@ -7,6 +7,7 @@ import com.qmth.themis.business.annotation.ApiJsonObject;
 import com.qmth.themis.business.annotation.ApiJsonProperty;
 import com.qmth.themis.business.base.BasePage;
 import com.qmth.themis.business.constant.SystemConstant;
+import com.qmth.themis.business.dto.response.TEExamQueryDto;
 import com.qmth.themis.business.entity.TBOrg;
 import com.qmth.themis.business.entity.TBUser;
 import com.qmth.themis.business.entity.TEExam;
@@ -169,8 +170,8 @@ public class TEExamController {
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "考试批次信息", response = TEExam.class)})
     public Result query(@ApiParam(value = "考试批次id", required = false) @RequestParam(required = false) Long id, @ApiParam(value = "考试批次编码", required = false) @RequestParam(required = false) String code, @ApiParam(value = "考试批次名称", required = false) @RequestParam(required = false) String name, @ApiParam(value = "考试批次模式", required = false) @RequestParam(required = false) Integer mode, @ApiParam(value = "是否启用", required = false) @RequestParam(required = false) Integer enable, @ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber, @ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
-        IPage<TEExam> teExamIPage = teExamService.examQuery(new Page<>(pageNumber, pageSize), id, code, name, mode, enable);
-        BasePage basePage = new BasePage(teExamIPage.getRecords(), teExamIPage.getCurrent(), teExamIPage.getSize(), teExamIPage.getTotal());
+        IPage<TEExamQueryDto> teExamQueryDtoIPage = teExamService.examQuery(new Page<>(pageNumber, pageSize), id, code, name, mode, enable);
+        BasePage basePage = new BasePage(teExamQueryDtoIPage.getRecords(), teExamQueryDtoIPage.getCurrent(), teExamQueryDtoIPage.getSize(), teExamQueryDtoIPage.getTotal());
         Map map = new HashMap<>();
         map.put(SystemConstant.RECORDS, basePage);
         return ResultUtil.ok(map);

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamMapper.java

@@ -3,6 +3,7 @@ package com.qmth.themis.business.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.themis.business.dto.response.TEExamDto;
+import com.qmth.themis.business.dto.response.TEExamQueryDto;
 import com.qmth.themis.business.entity.TEExam;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -31,7 +32,7 @@ public interface TEExamMapper extends BaseMapper<TEExam> {
      * @param enable
      * @return
      */
-    public IPage<TEExam> examQuery(IPage<Map> iPage, @Param("id") Long id, @Param("code") String code, @Param("name") String name, @Param("mode") Integer mode, @Param("enable") Integer enable);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, @Param("id") Long id, @Param("code") String code, @Param("name") String name, @Param("mode") Integer mode, @Param("enable") Integer enable);
 
     /**
      * 获取考试待考列表

+ 17 - 0
themis-business/src/main/java/com/qmth/themis/business/dao/TIeExamInvigilateCallMapper.java

@@ -0,0 +1,17 @@
+package com.qmth.themis.business.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.themis.business.entity.TIeExamInvigilateCall;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @Description: 监考 监控通话申请 Mapper 接口
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/6/25
+ */
+@Mapper
+public interface TIeExamInvigilateCallMapper extends BaseMapper<TIeExamInvigilateCall> {
+
+}

+ 115 - 0
themis-business/src/main/java/com/qmth/themis/business/dto/response/TEExamQueryDto.java

@@ -0,0 +1,115 @@
+package com.qmth.themis.business.dto.response;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 考试dto
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/8/3
+ */
+public class TEExamQueryDto implements Serializable {
+
+    private Long id;//考试id
+    private String code;//考试场次id
+    private String name;//考试名称
+    private String mode;//考试模式
+    private String tag;//考试tag
+    private Integer enable;//是否启用
+    private Date startTime;//开始时间
+    private Date endTime;//结束时间
+    private Double progress;//算分进度
+    private Date updateTime;//更新时间
+    private String updateName;//更新人
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getMode() {
+        return mode;
+    }
+
+    public void setMode(String mode) {
+        this.mode = mode;
+    }
+
+    public String getTag() {
+        return tag;
+    }
+
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
+
+    public Integer getEnable() {
+        return enable;
+    }
+
+    public void setEnable(Integer enable) {
+        this.enable = enable;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Double getProgress() {
+        return progress;
+    }
+
+    public void setProgress(Double progress) {
+        this.progress = progress;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+}

+ 12 - 0
themis-business/src/main/java/com/qmth/themis/business/entity/TEExam.java

@@ -200,6 +200,18 @@ public class TEExam extends BaseEntity {
     @TableField(value = "monitor_record")
     private Integer monitorRecord;
 
+    @ApiModelProperty(value = "算分进度")
+    @TableField(value = "progress")
+    private Double progress;
+
+    public Double getProgress() {
+        return progress;
+    }
+
+    public void setProgress(Double progress) {
+        this.progress = progress;
+    }
+
     public String getMonitorVideoSource() {
         return monitorVideoSource;
     }

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/entity/TIeExamInvigilateCall.java

@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
-* @Description: 监考监考通话申请
+* @Description: 监考 监控通话申请
 * @Param:
 * @return:
 * @Author: wangliang

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/TEExamService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.qmth.themis.business.dto.response.TEExamDto;
+import com.qmth.themis.business.dto.response.TEExamQueryDto;
 import org.springframework.web.multipart.MultipartFile;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -37,7 +38,7 @@ public interface TEExamService extends IService<TEExam> {
      * @param enable
      * @return
      */
-    public IPage<TEExam> examQuery(IPage<Map> iPage, Long id, String code, String name, Integer mode, Integer enable);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long id, String code, String name, Integer mode, Integer enable);
 
     /**
      * 获取考试待考列表

+ 16 - 0
themis-business/src/main/java/com/qmth/themis/business/service/TIeExamInvigilateCallService.java

@@ -0,0 +1,16 @@
+package com.qmth.themis.business.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.themis.business.entity.TIeExamInvigilateCall;
+import com.qmth.themis.business.entity.TIeExamInvigilateNotice;
+
+/**
+ * @Description: 监考监控通话申请 服务类
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/6/25
+ */
+public interface TIeExamInvigilateCallService extends IService<TIeExamInvigilateCall> {
+
+}

+ 2 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -12,6 +12,7 @@ import com.qmth.themis.business.dao.TEExamMapper;
 import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.dto.response.TEExamActivityDto;
 import com.qmth.themis.business.dto.response.TEExamDto;
+import com.qmth.themis.business.dto.response.TEExamQueryDto;
 import com.qmth.themis.business.entity.TEExam;
 import com.qmth.themis.business.entity.TOeExamRecord;
 import com.qmth.themis.business.enums.ExamRecordStatusEnum;
@@ -84,7 +85,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
      * @return
      */
     @Override
-    public IPage<TEExam> examQuery(IPage<Map> iPage, Long id, String code, String name, Integer mode, Integer enable) {
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long id, String code, String name, Integer mode, Integer enable) {
         return teExamMapper.examQuery(iPage, id, code, name, mode, enable);
     }
 

+ 19 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeExamInvigilateCallServiceImpl.java

@@ -0,0 +1,19 @@
+package com.qmth.themis.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.themis.business.dao.TIeExamInvigilateCallMapper;
+import com.qmth.themis.business.entity.TIeExamInvigilateCall;
+import com.qmth.themis.business.service.TIeExamInvigilateCallService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 监考通知消息记录 服务实现类
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2020/6/25
+ */
+@Service
+public class TIeExamInvigilateCallServiceImpl extends ServiceImpl<TIeExamInvigilateCallMapper, TIeExamInvigilateCall> implements TIeExamInvigilateCallService {
+
+}

+ 3 - 0
themis-business/src/main/resources/db/init.sql

@@ -477,6 +477,7 @@ INSERT INTO `t_b_privilege` VALUES (80, '查询交卷结果', '/api/oe/exam/resu
 INSERT INTO `t_b_privilege` VALUES (81, '监考强制/手动交卷接', '/api/admin/invigilate/finish', 'LINK', NULL, 1, NULL, '2020-08-01 12:08:31');
 INSERT INTO `t_b_privilege` VALUES (82, '考场导出', '/api/admin/invigilateUser/export', 'LINK', 9, 4, NULL, '2020-08-01 12:08:31');
 INSERT INTO `t_b_privilege` VALUES (83, '任务查询', '/api/admin/task/query', 'LINK', 6, 6, NULL, '2020-08-01 12:08:31');
+INSERT INTO `t_b_privilege` VALUES (84, '考试批次详情', '/api/admin/exam/detail', 'LINK', 5, 8, NULL, '2020-08-01 12:08:31');
 COMMIT;
 
 -- ----------------------------
@@ -592,6 +593,7 @@ INSERT INTO `t_b_role_privilege` VALUES (71, 'ADMIN', 50);
 INSERT INTO `t_b_role_privilege` VALUES (72, 'INVIGILATE', 81);
 INSERT INTO `t_b_role_privilege` VALUES (73, 'ADMIN', 82);
 INSERT INTO `t_b_role_privilege` VALUES (74, 'ADMIN', 83);
+INSERT INTO `t_b_role_privilege` VALUES (75, 'ADMIN', 84);
 COMMIT;
 
 -- ----------------------------
@@ -790,6 +792,7 @@ CREATE TABLE `t_e_exam` (
   `objective_score_policy` varchar(30) DEFAULT NULL COMMENT '客观题给分策略,equal: 全对给分,partial: 漏选给一半分',
   `monitor_video_source` varchar(300) DEFAULT NULL COMMENT '开启监控的视频源',
   `monitor_record` tinyint DEFAULT NULL COMMENT '是否开始监控转录,0:开启,1:不开启',
+  `progress` double DEFAULT NULL COMMENT '算分进度',
   PRIMARY KEY (`id`),
   UNIQUE KEY `t_e_exam_orgId_code_Idx` (`org_id`,`code`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试批次';

+ 40 - 3
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -2,8 +2,45 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.themis.business.dao.TEExamMapper">
 
-    <select id="examQuery" resultType="com.qmth.themis.business.entity.TEExam">
-        select * from t_e_exam t
+    <select id="examQuery" resultType="com.qmth.themis.business.dto.response.TEExamQueryDto">
+        select
+        t.id,
+        t.code,
+        t.name,
+        t.tag,
+        t.mode,
+        t.enable,
+        t.startTime,
+        t.endTime,
+        t.progress,
+        if(t.updateName is not null, t.updateName, t.createName) as updateName,
+        if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime
+        from
+        (select t.id,
+        t.code,
+        t.name,
+        t.tag,
+        t.mode,
+        t.enable,
+        t.start_time as startTime,
+        t.end_time as endTime,
+        t.create_time as createTime,
+        t.update_time as updateTime,
+        t.progress,
+        (
+        select
+        t1.name
+        from
+        t_b_user t1
+        where
+        t1.id = t.create_id) as createName, (
+        select
+        t1.name
+        from
+        t_b_user t1
+        where
+        t1.id = t.update_id) as updateName
+        from t_e_exam t
         <where>
             <if test="id != null and id != ''">
                 and t.id = #{id}
@@ -20,7 +57,7 @@
             <if test="enable != null and enable != '' or enable == 0">
                 and t.enable = #{enable}
             </if>
-        </where>
+        </where> ) t order by t.code
     </select>
 
     <select id="getWaitingExam" resultType="com.qmth.themis.business.dto.response.TEExamDto">

+ 5 - 0
themis-business/src/main/resources/mapper/TIeExamInvigilateCallMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qmth.themis.business.dao.TIeExamInvigilateCallMapper">
+
+</mapper>