|
@@ -6,9 +6,12 @@ import com.keao.edu.common.controller.BaseController;
|
|
import com.keao.edu.common.entity.HttpResponseResult;
|
|
import com.keao.edu.common.entity.HttpResponseResult;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
import com.keao.edu.common.page.PageInfo;
|
|
import com.keao.edu.thirdparty.ocr.Ocr;
|
|
import com.keao.edu.thirdparty.ocr.Ocr;
|
|
|
|
+import com.keao.edu.user.dto.ExamRecordDto;
|
|
|
|
+import com.keao.edu.user.dto.ExamRegistrationDto;
|
|
import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
|
|
import com.keao.edu.user.dto.ExamRegistrationStatisticsDto;
|
|
import com.keao.edu.user.entity.Employee;
|
|
import com.keao.edu.user.entity.Employee;
|
|
import com.keao.edu.user.entity.ExamRegistration;
|
|
import com.keao.edu.user.entity.ExamRegistration;
|
|
|
|
+import com.keao.edu.user.page.ExamRecordQueryInfo;
|
|
import com.keao.edu.user.page.ExamRegistrationQueryInfo;
|
|
import com.keao.edu.user.page.ExamRegistrationQueryInfo;
|
|
import com.keao.edu.user.service.EmployeeService;
|
|
import com.keao.edu.user.service.EmployeeService;
|
|
import com.keao.edu.user.service.ExamRegistrationService;
|
|
import com.keao.edu.user.service.ExamRegistrationService;
|
|
@@ -41,7 +44,7 @@ public class ExamRegistrationController extends BaseController {
|
|
private EmployeeService employeeService;
|
|
private EmployeeService employeeService;
|
|
|
|
|
|
@ApiOperation(value = "学员报名记录查询")
|
|
@ApiOperation(value = "学员报名记录查询")
|
|
- @GetMapping(value = "list")
|
|
|
|
|
|
+ @PostMapping(value = "list")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/list')")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/list')")
|
|
public HttpResponseResult<PageInfo<ExamRegistration>> list(ExamRegistrationQueryInfo queryInfo) {
|
|
public HttpResponseResult<PageInfo<ExamRegistration>> list(ExamRegistrationQueryInfo queryInfo) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
@@ -54,6 +57,22 @@ public class ExamRegistrationController extends BaseController {
|
|
return succeed(examRegistrationService.queryExamRegistrationStudents(queryInfo));
|
|
return succeed(examRegistrationService.queryExamRegistrationStudents(queryInfo));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "学生端学员报名记录查询")
|
|
|
|
+ @PostMapping(value = "applyList")
|
|
|
|
+ public HttpResponseResult<PageInfo<ExamRegistrationDto>> applyList(ExamRegistrationQueryInfo queryInfo) {
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+ queryInfo.setStudentId(sysUser.getId());
|
|
|
|
+ return succeed(examRegistrationService.applyList(queryInfo));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "学生端获取学员考试记录")
|
|
|
|
+ @PostMapping(value = "examList")
|
|
|
|
+ public HttpResponseResult<PageInfo<ExamRecordDto>> examList(ExamRecordQueryInfo queryInfo) {
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+ queryInfo.setStudentId(sysUser.getId());
|
|
|
|
+ return succeed(examRegistrationService.examList(queryInfo));
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation(value = "修改学员报名信息")
|
|
@ApiOperation(value = "修改学员报名信息")
|
|
@PostMapping(value = "update")
|
|
@PostMapping(value = "update")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/update')")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/update')")
|
|
@@ -66,7 +85,7 @@ public class ExamRegistrationController extends BaseController {
|
|
@ApiOperation(value = "报名")
|
|
@ApiOperation(value = "报名")
|
|
@PostMapping(value = "add")
|
|
@PostMapping(value = "add")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/add')")
|
|
@PreAuthorize("@pcs.hasPermissions('examRegistration/add')")
|
|
- public HttpResponseResult add(ExamRegistration examRegistration) throws Exception {
|
|
|
|
|
|
+ public HttpResponseResult add(@RequestBody ExamRegistration examRegistration) throws Exception {
|
|
SysUser student = sysUserFeignService.queryUserInfo();
|
|
SysUser student = sysUserFeignService.queryUserInfo();
|
|
examRegistration.setStudentId(student.getId());
|
|
examRegistration.setStudentId(student.getId());
|
|
return succeed(examRegistrationService.addRegistration(examRegistration));
|
|
return succeed(examRegistrationService.addRegistration(examRegistration));
|
|
@@ -88,6 +107,4 @@ public class ExamRegistrationController extends BaseController {
|
|
public HttpResponseResult ocr(@RequestParam("file") MultipartFile file,String idCardSide) throws IOException {
|
|
public HttpResponseResult ocr(@RequestParam("file") MultipartFile file,String idCardSide) throws IOException {
|
|
return succeed(Ocr.idcard(file,idCardSide));
|
|
return succeed(Ocr.idcard(file,idCardSide));
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|