|
@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
|
|
* @author CaoZixuan
|
|
* @author CaoZixuan
|
|
* @since 2024-02-22
|
|
* @since 2024-02-22
|
|
*/
|
|
*/
|
|
-@Api(tags = "考生字典管理controller")
|
|
|
|
|
|
+@Api(tags = "考生管理controller")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_BASIC + "/exam_student")
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_BASIC + "/exam_student")
|
|
public class BasicExamStudentController {
|
|
public class BasicExamStudentController {
|
|
@@ -50,28 +50,28 @@ public class BasicExamStudentController {
|
|
@Resource
|
|
@Resource
|
|
private SyncBasicExamStudentImportService syncBasicExamStudentImportService;
|
|
private SyncBasicExamStudentImportService syncBasicExamStudentImportService;
|
|
|
|
|
|
- @ApiOperation(value = "考生字典管理-分页查询")
|
|
|
|
|
|
+ @ApiOperation(value = "分页查询")
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = BasicExamStudentResult.class) })
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = BasicExamStudentResult.class)})
|
|
public Result findBasicExamStudentPage(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
|
|
public Result findBasicExamStudentPage(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
|
|
- @ApiParam(value = "学期id") @RequestParam(required = false) String examId,
|
|
|
|
- @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
|
|
|
|
- @ApiParam(value = "学院") @RequestParam(required = false) String college,
|
|
|
|
- @ApiParam(value = "专业") @RequestParam(required = false) String major,
|
|
|
|
- @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
|
|
|
|
- @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo,
|
|
|
|
- @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
|
- @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
|
|
|
+ @ApiParam(value = "学期id") @RequestParam(required = false) String examId,
|
|
|
|
+ @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
|
|
|
|
+ @ApiParam(value = "学院") @RequestParam(required = false) String college,
|
|
|
|
+ @ApiParam(value = "专业") @RequestParam(required = false) String major,
|
|
|
|
+ @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
|
|
|
|
+ @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo,
|
|
|
|
+ @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
|
+ @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
return ResultUtil.ok(basicExamStudentService.page(requestUser, SystemConstant.convertIdToLong(semesterId),
|
|
return ResultUtil.ok(basicExamStudentService.page(requestUser, SystemConstant.convertIdToLong(semesterId),
|
|
SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
|
|
SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
|
|
examStudentInfo, pageNumber, pageSize));
|
|
examStudentInfo, pageNumber, pageSize));
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "考生字典管理-新增/编辑")
|
|
|
|
|
|
+ @ApiOperation(value = "新增/编辑")
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "更新成功", response = Result.class) })
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "更新成功", response = Result.class)})
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.EDIT)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.EDIT)
|
|
public Result saveBasicExamStudent(@Valid @RequestBody BasicExamStudentParam basicExamStudentParam, BindingResult bindingResult) {
|
|
public Result saveBasicExamStudent(@Valid @RequestBody BasicExamStudentParam basicExamStudentParam, BindingResult bindingResult) {
|
|
if (bindingResult.hasErrors()) {
|
|
if (bindingResult.hasErrors()) {
|
|
@@ -81,13 +81,13 @@ public class BasicExamStudentController {
|
|
return ResultUtil.ok(basicExamStudentService.save(basicExamStudentParam, sysUser));
|
|
return ResultUtil.ok(basicExamStudentService.save(basicExamStudentParam, sysUser));
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "考生字典管理-批量导入(同步)")
|
|
|
|
|
|
+ @ApiOperation(value = "批量导入(同步)")
|
|
@RequestMapping(value = "/import", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/import", method = RequestMethod.POST)
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "返回信息", response = Result.class) })
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Result.class)})
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.IMPORT)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.IMPORT)
|
|
public Result basicExamStudentImportSync(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
|
|
public Result basicExamStudentImportSync(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
|
|
- @ApiParam(value = "考试id", required = true) @RequestParam String examId) throws Exception {
|
|
|
|
- Map<String, Object> map = printCommonService.saveTask(file,SystemConstant.convertIdToLong(examId), TaskTypeEnum.BASIC_EXAM_STUDENT_IMPORT);
|
|
|
|
|
|
+ @ApiParam(value = "考试id", required = true) @RequestParam String examId) throws Exception {
|
|
|
|
+ Map<String, Object> map = printCommonService.saveTask(file, SystemConstant.convertIdToLong(examId), TaskTypeEnum.BASIC_EXAM_STUDENT_IMPORT);
|
|
map.put("examId", SystemConstant.convertIdToLong(examId));
|
|
map.put("examId", SystemConstant.convertIdToLong(examId));
|
|
return syncBasicExamStudentImportService.importTask(map);
|
|
return syncBasicExamStudentImportService.importTask(map);
|
|
|
|
|
|
@@ -95,26 +95,26 @@ public class BasicExamStudentController {
|
|
// return ResultUtil.ok();
|
|
// return ResultUtil.ok();
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "考生字典管理-导出")
|
|
|
|
|
|
+ @ApiOperation(value = "导出")
|
|
@RequestMapping(value = "/export", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/export", method = RequestMethod.POST)
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "返回信息", response = Result.class) })
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = Result.class)})
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.EXPORT)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.EXPORT)
|
|
public void export(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
|
|
public void export(@ApiParam(value = "学期id") @RequestParam(required = false) String semesterId,
|
|
- @ApiParam(value = "学期id") @RequestParam(required = false) String examId,
|
|
|
|
- @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode,
|
|
|
|
- @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
|
|
|
|
- @ApiParam(value = "学院") @RequestParam(required = false) String college,
|
|
|
|
- @ApiParam(value = "专业") @RequestParam(required = false) String major,
|
|
|
|
- @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
|
|
|
|
- @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo, HttpServletResponse response) throws Exception {
|
|
|
|
|
|
+ @ApiParam(value = "学期id") @RequestParam(required = false) String examId,
|
|
|
|
+ @ApiParam(value = "考试id") @RequestParam(required = false) String courseCode,
|
|
|
|
+ @ApiParam(value = "教师(工号/姓名)") @RequestParam(required = false) String teacher,
|
|
|
|
+ @ApiParam(value = "学院") @RequestParam(required = false) String college,
|
|
|
|
+ @ApiParam(value = "专业") @RequestParam(required = false) String major,
|
|
|
|
+ @ApiParam(value = "教学班(模糊查询)") @RequestParam(required = false) String teachClazz,
|
|
|
|
+ @ApiParam(value = "考生信息(姓名/学号)") @RequestParam(required = false) String examStudentInfo, HttpServletResponse response) throws Exception {
|
|
basicExamStudentService.exportLogic(response, SystemConstant.convertIdToLong(semesterId),
|
|
basicExamStudentService.exportLogic(response, SystemConstant.convertIdToLong(semesterId),
|
|
SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
|
|
SystemConstant.convertIdToLong(examId), courseCode, teacher, college, major, teachClazz,
|
|
examStudentInfo);
|
|
examStudentInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "考生字典管理-删除")
|
|
|
|
|
|
+ @ApiOperation(value = "删除")
|
|
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
- @ApiResponses({ @ApiResponse(code = 200, message = "删除成功", response = Result.class) })
|
|
|
|
|
|
+ @ApiResponses({@ApiResponse(code = 200, message = "删除成功", response = Result.class)})
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.DELETE)
|
|
@OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.DELETE)
|
|
public Result deleteBasicExamStudent(@ApiParam(value = "选择要删除的考生id集合", required = true) @RequestParam List<String> idList) {
|
|
public Result deleteBasicExamStudent(@ApiParam(value = "选择要删除的考生id集合", required = true) @RequestParam List<String> idList) {
|
|
basicExamStudentService.deleteBatch(
|
|
basicExamStudentService.deleteBatch(
|