|
@@ -1,5 +1,6 @@
|
|
|
package cn.com.qmth.examcloud.service.examwork.api;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.service.examwork.dao.ExamStudentRepo;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -17,15 +18,7 @@ import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.domain.Sort.Direction;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
@@ -47,6 +40,9 @@ public class ExamApi {
|
|
|
@Autowired
|
|
|
ExamService examService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ExamStudentRepo examStudentRepo;
|
|
|
+
|
|
|
@ApiOperation(value="查询所有考试批次",notes = "分页带查询")
|
|
|
@GetMapping("/exam/all/{curPage}/{pageSize}")
|
|
|
public ResponseEntity getAllExam(HttpServletRequest request,
|
|
@@ -167,4 +163,12 @@ public class ExamApi {
|
|
|
examRepo.canNotDel(id);
|
|
|
return new ResponseEntity(HttpStatus.OK);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "网考初始化更新考务信息", notes = "网考初始化更新考务信息")
|
|
|
+ @PutMapping("/exam/updateExamInfo")
|
|
|
+ public ResponseEntity disableUser(@RequestParam Long examId,@RequestParam Long examStuId) {
|
|
|
+ examRepo.canNotDel(examId);
|
|
|
+ examStudentRepo.updateForFinished(examStuId,true);
|
|
|
+ return new ResponseEntity(HttpStatus.OK);
|
|
|
+ }
|
|
|
}
|