wangliang 1 rok temu
rodzic
commit
933071bf3e

+ 9 - 0
themis-admin/src/main/java/com/qmth/themis/admin/api/TBExamInvigilateUserController.java

@@ -86,6 +86,15 @@ public class TBExamInvigilateUserController {
                         tbUser.getOrgId()));
     }
 
+    @ApiOperation(value = "监考员编辑接口")
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "监考员信息", response = Objects.class)})
+    public Result edit(@ApiParam(value = "考试批次id", required = true) @RequestParam Long examId) {
+        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
+        List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(new QueryWrapper<TBExamInvigilateUser>().lambda().eq(TBExamInvigilateUser::getExamId, examId).eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId()).isNotNull(TBExamInvigilateUser::getUserId));
+        return ResultUtil.ok(tbExamInvigilateUserList.stream().map(s -> String.valueOf(s.getUserId())).collect(Collectors.toSet()));
+    }
+
     @ApiOperation(value = "监考员修改接口")
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @Transactional

+ 0 - 11
themis-business/src/main/java/com/qmth/themis/business/dto/response/TBExamInvigilateUserDto.java

@@ -28,9 +28,6 @@ public class TBExamInvigilateUserDto implements Serializable {
     @ApiModelProperty(name = "虚拟考场名称")
     private String roomName;//考场名称
 
-    @ApiModelProperty(name = "用户id")
-    private String userId;//用户id
-
     @ApiModelProperty(name = "用户姓名")
     private String name;//用户姓名
 
@@ -66,14 +63,6 @@ public class TBExamInvigilateUserDto implements Serializable {
         this.roomName = roomName;
     }
 
-    public String getUserId() {
-        return userId;
-    }
-
-    public void setUserId(String userId) {
-        this.userId = userId;
-    }
-
     public String getName() {
         return name;
     }

+ 10 - 2
themis-business/src/main/resources/db/log/1.2.8.log

@@ -105,8 +105,8 @@ CREATE TABLE `t_e_region_summary` (
   KEY `t_e_region_summary_country_IDX` (`country`,`province`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地区统计表';
 
-ALTER TABLE t_e_exam_student1 DROP INDEX roomcode_examid;
-ALTER TABLE t_e_exam_student1 DROP INDEX student_id;
+ALTER TABLE t_e_exam_student DROP INDEX roomcode_examid;
+ALTER TABLE t_e_exam_student DROP INDEX student_id;
 
 CREATE INDEX t_e_exam_student_exam_id_IDX USING BTREE ON t_e_exam_student (exam_id,exam_activity_id,room_code);
 CREATE INDEX t_e_exam_student_student_id_IDX USING BTREE ON t_e_exam_student (student_id,exam_activity_id,enable);
@@ -123,6 +123,14 @@ INSERT INTO sys_config
 (id, org_id, config_key, config_name, config_value, enable, create_id, create_time, update_id, update_time, remark, sort, editor)
 VALUES(33, NULL, 'waiting.exam.day', '待考列表天数', '3', 1, 1, NULL, NULL, NULL, NULL, 1, 0);
 
+INSERT INTO t_b_privilege
+(id, name, url, `type`, parent_id, `sequence`, remark, create_time)
+VALUES(209, '监考编辑接口', '/api/admin/invigilateUser/edit', 'LINK', 9, 2, NULL, 1600932652000);
+
+INSERT INTO t_b_role_privilege
+(id, role_code, privilege_id)
+VALUES(259, 'ADMIN', 209);
+
 /*删除进度查询菜单*/
 INSERT INTO t_b_role_privilege
 (id, role_code, privilege_id)

+ 0 - 1
themis-business/src/main/resources/mapper/TBExamInvigilateUserMapper.xml

@@ -8,7 +8,6 @@
         tbeiu.room_name as roomName,
         tee.id as examId,
         tee.name as examName,
-        GROUP_CONCAT(tbeiu.user_id) as userId,
         GROUP_CONCAT(tbu.name) as name
         from
         t_b_exam_invigilate_user tbeiu