|
@@ -16,6 +16,7 @@ import com.keao.edu.user.service.ExamRoomStudentRelationService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -44,6 +45,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("签到")
|
|
|
@PostMapping(value = "/signIn")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/signIn')")
|
|
|
public HttpResponseResult signIn(Long examRegistrationId) {
|
|
|
examRoomStudentRelationService.signIn(examRegistrationId);
|
|
|
return succeed();
|
|
@@ -51,6 +53,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("下一位")
|
|
|
@PostMapping(value = "/nextBit")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/nextBit')")
|
|
|
public HttpResponseResult nextBit(Integer examStatus,Long roomId) {
|
|
|
examRoomStudentRelationService.nextBit(examStatus,roomId);
|
|
|
return succeed();
|
|
@@ -58,6 +61,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("开始考试")
|
|
|
@PostMapping(value = "/actionExam")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/actionExam')")
|
|
|
public HttpResponseResult actionExam(Long roomId) {
|
|
|
examRoomStudentRelationService.actionExam(roomId);
|
|
|
return succeed();
|
|
@@ -65,6 +69,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("监考端选择去录播")
|
|
|
@PostMapping(value = "/webRecorded")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/webRecorded')")
|
|
|
public HttpResponseResult webRecorded(Long roomId) {
|
|
|
examRoomStudentRelationService.recorded(roomId);
|
|
|
return succeed();
|
|
@@ -78,12 +83,14 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("学生端录播详情页面")
|
|
|
@GetMapping(value = "/stuRecordDetail")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/stuRecordDetail')")
|
|
|
public HttpResponseResult<StuRecordDetailDto> stuRecordDetail(Long examRegistrationId) {
|
|
|
return succeed(examRoomStudentRelationService.stuRecordDetail(examRegistrationId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("学生端完成录播")
|
|
|
@PostMapping(value = "/stuEndRecord")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/stuEndRecord')")
|
|
|
public HttpResponseResult stuEndRecord(Long examRegistrationId,String videoUrl) {
|
|
|
examRoomStudentRelationService.stuEndRecord(examRegistrationId,videoUrl);
|
|
|
return succeed();
|
|
@@ -97,24 +104,28 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("获取后台考场待考队列")
|
|
|
@PostMapping(value = "/queryNeedCheckingList")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/queryNeedCheckingList')")
|
|
|
public HttpResponseResult queryNeedCheckingList(Long roomId) {
|
|
|
return succeed(examRoomStudentRelationService.queryNeedCheckingList(roomId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("获取推送消息内容")
|
|
|
@PostMapping(value = "api/getPublishMessage")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/api/getPublishMessage')")
|
|
|
public PublishMessageDto getPublishMessage(Long examRegistrationId) {
|
|
|
return examRoomStudentRelationService.getPublishMessage(examRegistrationId);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("获取教室学员关联")
|
|
|
@PostMapping(value = "api/getExamRoomStudentRelation")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/api/getExamRoomStudentRelation')")
|
|
|
public ExamRoomStudentRelation getExamRoomStudentRelation(Long registrationId) {
|
|
|
return examRoomStudentRelationService.getExamRoomStudentRelation(registrationId);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("给教室分配学员")
|
|
|
@PostMapping(value = "/addStudentForRoom")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/addStudentForRoom')")
|
|
|
public HttpResponseResult addStudentForRoom(Long examRoomId, String registIds){
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
Integer organId=null;
|
|
@@ -131,6 +142,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("自动分配学员到考场")
|
|
|
@PostMapping(value = "/autoSplitStudentToRoom")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/autoSplitStudentToRoom')")
|
|
|
public HttpResponseResult autoSplitStudentToRoom(Long examId){
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
Integer organId=null;
|
|
@@ -147,6 +159,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("更换学员考场")
|
|
|
@PostMapping(value = "/changeStudentExamRoom")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/changeStudentExamRoom')")
|
|
|
public HttpResponseResult changeStudentExamRoom(Long registId, Long examRoomId){
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
Integer organId=null;
|
|
@@ -163,6 +176,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("获取教室学员")
|
|
|
@GetMapping(value = "/findExamRoomStudents")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/findExamRoomStudents')")
|
|
|
public HttpResponseResult<PageInfo<ExamRoomStudentRelationDto>> findExamRoomStudents(ExamRoomStudentRelationQueryInfo queryInfo){
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
if(!sysUser.getIsSuperAdmin()){
|
|
@@ -176,6 +190,7 @@ public class ExamRoomStudentRelationController extends BaseController {
|
|
|
|
|
|
@ApiOperation("删除指定教室学员")
|
|
|
@PostMapping(value = "/deleteStudentFromRoom")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('examRoomStudentRelation/deleteStudentFromRoom')")
|
|
|
public HttpResponseResult deleteStudentFromRoom(Long examRoomId, String registIds){
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
Integer organId=null;
|