|
@@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
import com.qmth.distributed.print.business.entity.ExamTaskDetail;
|
|
import com.qmth.distributed.print.business.entity.ExamTaskDetail;
|
|
import com.qmth.distributed.print.business.service.ExamTaskDetailService;
|
|
import com.qmth.distributed.print.business.service.ExamTaskDetailService;
|
|
|
|
+import com.qmth.distributed.print.business.service.PrintCommonService;
|
|
|
|
+import com.qmth.distributed.print.business.templete.execute.SyncMarkStudentImportService;
|
|
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
import com.qmth.teachcloud.common.annotation.OperationLogDetail;
|
|
import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
|
|
import com.qmth.teachcloud.common.bean.vo.PaperInfoVo;
|
|
|
|
+import com.qmth.teachcloud.common.enums.TaskTypeEnum;
|
|
import com.qmth.teachcloud.common.util.ExamTaskUtil;
|
|
import com.qmth.teachcloud.common.util.ExamTaskUtil;
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
import com.qmth.teachcloud.mark.dto.mark.manage.MarkManageDto;
|
|
import com.qmth.teachcloud.mark.dto.mark.manage.MarkManageDto;
|
|
@@ -19,17 +22,17 @@ import com.qmth.teachcloud.mark.service.MarkPaperService;
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.Result;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import com.qmth.teachcloud.common.util.ResultUtil;
|
|
import com.qmth.teachcloud.mark.service.MarkTaskService;
|
|
import com.qmth.teachcloud.mark.service.MarkTaskService;
|
|
-import io.swagger.annotations.Api;
|
|
+import io.swagger.annotations.*;
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
-import io.swagger.annotations.ApiParam;
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.constraints.Max;
|
|
import javax.validation.constraints.Max;
|
|
import javax.validation.constraints.Min;
|
|
import javax.validation.constraints.Min;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
|
|
* <p>
|
|
* <p>
|
|
@@ -46,24 +49,30 @@ public class MarkSettingController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
private MarkPaperService markPaperService;
|
|
private MarkPaperService markPaperService;
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private MarkTaskService markTaskService;
|
|
private MarkTaskService markTaskService;
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private ExamTaskDetailService examTaskDetailService;
|
|
private ExamTaskDetailService examTaskDetailService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private PrintCommonService printCommonService;
|
|
|
|
+
|
|
|
|
+ @Resource
|
|
|
|
+ private SyncMarkStudentImportService syncMarkStudentImportService;
|
|
|
|
+
|
|
|
|
|
|
* 评卷设置数据列表
|
|
* 评卷设置数据列表
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "评卷设置数据列表")
|
|
@ApiOperation(value = "评卷设置数据列表")
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list", method = RequestMethod.POST)
|
|
- public Result list(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
+ public Result list(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
- @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, @ApiParam(value = "提交状态") @RequestParam(required = false) Boolean groupStatus,
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
+ @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber, @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
- @ApiParam(value = "提交状态") @RequestParam(required = false) Boolean groupStatus,
|
|
|
|
- @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
|
|
- @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
|
Long schoolId = Long.parseLong(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
Long schoolId = Long.parseLong(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
- IPage<MarkSettingDto> markSettingDtoIPage = markPaperService.listPaperSetting(examId, courseCode, paperNumber, groupStatus, pageNumber, pageSize);
|
|
+ IPage<MarkSettingDto> markSettingDtoIPage = markPaperService.listPaperSetting(examId, courseCode, paperNumber,
|
|
|
|
+ groupStatus, pageNumber, pageSize);
|
|
for (MarkSettingDto record : markSettingDtoIPage.getRecords()) {
|
|
for (MarkSettingDto record : markSettingDtoIPage.getRecords()) {
|
|
ExamTaskDetail examTaskDetail = examTaskDetailService.findByExamIdAndCourseCodeAndPaperNumber(record.getExamId(), record.getCourseCode(), record.getPaperNumber());
|
|
ExamTaskDetail examTaskDetail = examTaskDetailService.findByExamIdAndCourseCodeAndPaperNumber(record.getExamId(), record.getCourseCode(), record.getPaperNumber());
|
|
List<PaperInfoVo> paperInfoVos = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds(), record.getPaperType());
|
|
List<PaperInfoVo> paperInfoVos = ExamTaskUtil.parsePaperAttachmentPath(examTaskDetail.getPaperAttachmentIds(), record.getPaperType());
|
|
@@ -79,8 +88,7 @@ public class MarkSettingController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "评卷设置数据获取")
|
|
@ApiOperation(value = "评卷设置数据获取")
|
|
@RequestMapping(value = "/paper/get", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/paper/get", method = RequestMethod.POST)
|
|
- public Result paperGet(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
+ public Result paperGet(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) {
|
|
- @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber) {
|
|
|
|
return ResultUtil.ok(markPaperService.getByExamIdAndPaperNumber(examId, paperNumber));
|
|
return ResultUtil.ok(markPaperService.getByExamIdAndPaperNumber(examId, paperNumber));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -100,13 +108,11 @@ public class MarkSettingController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "评卷管理数据列表")
|
|
@ApiOperation(value = "评卷管理数据列表")
|
|
@RequestMapping(value = "/summary", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/summary", method = RequestMethod.POST)
|
|
- public Result summary(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
+ public Result summary(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
- @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, @ApiParam(value = "完成进度") @RequestParam(required = false) Boolean progressStatus,
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
+ @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber, @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
- @ApiParam(value = "完成进度") @RequestParam(required = false) Boolean progressStatus,
|
|
+ IPage<MarkManageDto> markManageDtoIPage = markTaskService.listPaperManage(examId, courseCode, paperNumber,
|
|
- @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
+ progressStatus, pageNumber, pageSize);
|
|
- @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
|
|
- IPage<MarkManageDto> markManageDtoIPage = markTaskService.listPaperManage(examId, courseCode, paperNumber, progressStatus, pageNumber, pageSize);
|
|
|
|
return ResultUtil.ok(markManageDtoIPage);
|
|
return ResultUtil.ok(markManageDtoIPage);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -115,10 +121,8 @@ public class MarkSettingController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "导出评卷员工作量")
|
|
@ApiOperation(value = "导出评卷员工作量")
|
|
@RequestMapping(value = "/export_marker", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/export_marker", method = RequestMethod.POST)
|
|
- public void exportMarker(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
+ public void exportMarker(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
- @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, HttpServletResponse response) {
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
|
|
- HttpServletResponse response) {
|
|
|
|
markTaskService.exportMarker(examId, courseCode, paperNumber, response);
|
|
markTaskService.exportMarker(examId, courseCode, paperNumber, response);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -127,12 +131,22 @@ public class MarkSettingController {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "成绩检查数据列表")
|
|
@ApiOperation(value = "成绩检查数据列表")
|
|
@RequestMapping(value = "/scoreList", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/scoreList", method = RequestMethod.POST)
|
|
- public Result scoreList(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId,
|
|
+ public Result scoreList(@ApiParam(value = "考试ID", required = true) @RequestParam Long examId, @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
- @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
|
|
+ @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber, @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
- @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
|
|
+ @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
- @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
|
|
+ IPage<CheckScoreListDto> scoreListDtoIPage = markPaperService.listStudentScoreList(examId, courseCode,
|
|
- @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
|
|
+ paperNumber, pageNumber, pageSize);
|
|
- IPage<CheckScoreListDto> scoreListDtoIPage = markPaperService.listStudentScoreList(examId, courseCode, paperNumber, pageNumber, pageSize);
|
|
|
|
return ResultUtil.ok(scoreListDtoIPage);
|
|
return ResultUtil.ok(scoreListDtoIPage);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "阅卷数据批量导入(同步)")
|
|
|
|
+ @RequestMapping(value = "/mark_student_import", method = RequestMethod.POST)
|
|
|
|
+ @ApiResponses({ @ApiResponse(code = 200, message = "返回信息", response = Result.class) })
|
|
|
|
+ @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.IMPORT)
|
|
|
|
+ public Result markStudentImport(@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.MARK_STUDENT_IMPORT);
|
|
|
|
+ map.put("examId", SystemConstant.convertIdToLong(examId));
|
|
|
|
+ return syncMarkStudentImportService.importTask(map);
|
|
|
|
+ }
|
|
}
|
|
}
|