|
@@ -16,10 +16,12 @@ import com.qmth.exam.reserve.service.ApplyTaskService;
|
|
|
import com.qmth.exam.reserve.service.CategoryService;
|
|
|
import com.qmth.exam.reserve.service.ExamSiteService;
|
|
|
import com.qmth.exam.reserve.service.StudentApplyService;
|
|
|
+import com.qmth.exam.reserve.util.DateUtil;
|
|
|
import com.qmth.exam.reserve.util.ResourceUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.apache.commons.codec.digest.DigestUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -133,7 +135,7 @@ public class StudentApplyController extends BaseController {
|
|
|
@PostMapping(value = "/std/auto/sign/in/print")
|
|
|
public void printSignIn(@ApiParam("教学点ID") @RequestParam(required = false) Long teachingId,
|
|
|
@ApiParam("考点ID") @RequestParam(required = false) Long agentId,
|
|
|
- @ApiParam("考试日期") @RequestParam(required = true) Long examDate) {
|
|
|
+ @ApiParam("考试日期") @RequestParam Long examDate) {
|
|
|
LoginUser user = this.curLoginUser();
|
|
|
if (Role.ADMIN.equals(user.getRole()) && teachingId == null) {
|
|
|
throw new StatusException("请选择教学点");
|
|
@@ -149,7 +151,13 @@ public class StudentApplyController extends BaseController {
|
|
|
@Aac(strict = false, auth = false)
|
|
|
@ApiOperation(value = "自动排考")
|
|
|
@PostMapping(value = "/std/auto/layout")
|
|
|
- public void autoLayout(@ApiParam("教学点ID") @RequestParam(required = false) Long teachingId) {
|
|
|
+ public void autoLayout(@ApiParam("教学点ID") @RequestParam(required = false) Long teachingId,
|
|
|
+ @ApiParam("验证密码") @RequestParam String password) {
|
|
|
+ String now = DateUtil.getShortDateWithoutSplitByLongTime(System.currentTimeMillis());
|
|
|
+ String verifyPassword = DigestUtils.md5Hex(now);
|
|
|
+ if (!password.equals(verifyPassword)) {
|
|
|
+ throw new StatusException("验证失败");
|
|
|
+ }
|
|
|
studentApplyService.autoLayout(teachingId);
|
|
|
}
|
|
|
|