|
@@ -7,24 +7,6 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.core.oe.admin.api.controller;
|
|
|
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Set;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.AsyncExportService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.util.AsyncExportConcurrentUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.Page;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
import cn.com.qmth.examcloud.api.commons.security.bean.User;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.util.JsonMapper;
|
|
@@ -37,12 +19,10 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.IllegallyTypeEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.enums.AuditStatus;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.enums.SelectType;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.service.AsyncExportService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamAuditService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.ExamAuditEntityConvert;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.ExamAuditExcel;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.ExamAuditInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.ExamAuditQuery;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.RedoAuditInfo;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.*;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.service.util.AsyncExportConcurrentUtil;
|
|
|
import cn.com.qmth.examcloud.reports.commons.bean.AdminOperateReport;
|
|
|
import cn.com.qmth.examcloud.reports.commons.util.ReportsUtil;
|
|
|
import cn.com.qmth.examcloud.support.enums.ExamProperties;
|
|
@@ -53,6 +33,15 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.web.support.Naked;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* 考试记录审核相关接口
|
|
@@ -70,7 +59,7 @@ public class ExamAuditController extends ControllerSupport {
|
|
|
|
|
|
@Autowired
|
|
|
private ExamRecordDataRepo examRecordDataRepo;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private IllegallyTypeRepo illegallyTypeRepo;
|
|
|
|
|
@@ -93,10 +82,10 @@ public class ExamAuditController extends ControllerSupport {
|
|
|
@GetMapping("export/async")
|
|
|
@ApiOperation(value = "导出“监考已审”(异步)")
|
|
|
public void exportExamAuditList(@RequestParam String query) {
|
|
|
- User user=getAccessUser();
|
|
|
+ User user = getAccessUser();
|
|
|
asyncExportService.exportExamAuditList(query, user);
|
|
|
AsyncExportConcurrentUtil.checkOrStartJob();
|
|
|
- ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考已审-导出","导出条件:"+query));
|
|
|
+ ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考已审-导出", "导出条件:" + query));
|
|
|
}
|
|
|
|
|
|
@PostMapping("/discipline/list")
|
|
@@ -143,22 +132,22 @@ public class ExamAuditController extends ControllerSupport {
|
|
|
}
|
|
|
User user = getAccessUser();
|
|
|
examAuditService.singleAudit(examRecordDataId, isPass, disciplineDetail, disciplineType, user, illegallyTypeId);
|
|
|
- StringBuilder sb=new StringBuilder();
|
|
|
- sb.append("考试记录ID:"+examRecordDataId);
|
|
|
- if(isPass) {
|
|
|
- sb.append(" 审核状态:通过");
|
|
|
- }else {
|
|
|
- sb.append(" 审核状态:不通过");
|
|
|
- }
|
|
|
- if(illegallyTypeId!=null) {
|
|
|
- IllegallyTypeEntity illegallyType =
|
|
|
- GlobalHelper.getEntity(illegallyTypeRepo, illegallyTypeId, IllegallyTypeEntity.class);
|
|
|
- sb.append(" 违纪类型:"+illegallyType.getName());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(disciplineDetail)) {
|
|
|
- sb.append(" 详情描述:"+disciplineDetail);
|
|
|
- }
|
|
|
- ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考待审-审核",sb.toString()));
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append("考试记录ID:" + examRecordDataId);
|
|
|
+ if (isPass) {
|
|
|
+ sb.append(" 审核状态:通过");
|
|
|
+ } else {
|
|
|
+ sb.append(" 审核状态:不通过");
|
|
|
+ }
|
|
|
+ if (illegallyTypeId != null) {
|
|
|
+ IllegallyTypeEntity illegallyType =
|
|
|
+ GlobalHelper.getEntity(illegallyTypeRepo, illegallyTypeId, IllegallyTypeEntity.class);
|
|
|
+ sb.append(" 违纪类型:" + illegallyType.getName());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(disciplineDetail)) {
|
|
|
+ sb.append(" 详情描述:" + disciplineDetail);
|
|
|
+ }
|
|
|
+ ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考待审-审核", sb.toString()));
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/batch/audit")
|
|
@@ -178,14 +167,14 @@ public class ExamAuditController extends ControllerSupport {
|
|
|
for (Long examRecordDataId : examRecordDataIds) {
|
|
|
examAuditService.singleAudit(examRecordDataId, isPass, disciplineDetail, disciplineType, user, illegallyTypeId);
|
|
|
}
|
|
|
- StringBuilder sb=new StringBuilder();
|
|
|
- if(isPass) {
|
|
|
- sb.append("审核状态:通过");
|
|
|
- }else {
|
|
|
- sb.append("审核状态:不通过");
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ if (isPass) {
|
|
|
+ sb.append("审核状态:通过");
|
|
|
+ } else {
|
|
|
+ sb.append("审核状态:不通过");
|
|
|
}
|
|
|
- sb.append(" 审核条数:"+examRecordDataIds.size());
|
|
|
- ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考待审-批量审核",sb.toString()));
|
|
|
+ sb.append(" 审核条数:" + examRecordDataIds.size());
|
|
|
+ ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "监考待审-批量审核", sb.toString()));
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/redoAudit")
|
|
@@ -218,26 +207,26 @@ public class ExamAuditController extends ControllerSupport {
|
|
|
ExamCacheTransferHelper.getDefaultCachedExamProperty(examId, ExamProperties.MARKING_TASK_BUILDED.name()).getValue();
|
|
|
if (StringUtils.isNotBlank(markingTaskBuilt) && Constants.isTrue.equals(markingTaskBuilt)) {
|
|
|
if (!redoAuditInfo.getIsPass()) {
|
|
|
- throw new StatusException("redoAudit-005", "该考试评卷任务已生成,不允许重审");
|
|
|
+ throw new StatusException("redoAudit-005", "该考试评卷任务已生成,不允许重审");
|
|
|
}
|
|
|
}
|
|
|
examAuditService.redoAudit(redoAuditInfo, user);
|
|
|
- StringBuilder sb=new StringBuilder();
|
|
|
- sb.append("考试记录ID:"+redoAuditInfo.getExamRecordDataIds().get(0));
|
|
|
- if(redoAuditInfo.getIsPass()) {
|
|
|
- sb.append(" 审核状态:通过");
|
|
|
- }else {
|
|
|
- sb.append(" 审核状态:不通过");
|
|
|
- }
|
|
|
- if(redoAuditInfo.getIllegallyTypeId()!=null) {
|
|
|
- IllegallyTypeEntity illegallyType =
|
|
|
- GlobalHelper.getEntity(illegallyTypeRepo, redoAuditInfo.getIllegallyTypeId(), IllegallyTypeEntity.class);
|
|
|
- sb.append(" 违纪类型:"+illegallyType.getName());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(redoAuditInfo.getDisciplineDetail())) {
|
|
|
- sb.append(" 详情描述:"+redoAuditInfo.getDisciplineDetail());
|
|
|
- }
|
|
|
- ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试明细-重审",sb.toString()));
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ sb.append("考试记录ID:" + redoAuditInfo.getExamRecordDataIds().get(0));
|
|
|
+ if (redoAuditInfo.getIsPass()) {
|
|
|
+ sb.append(" 审核状态:通过");
|
|
|
+ } else {
|
|
|
+ sb.append(" 审核状态:不通过");
|
|
|
+ }
|
|
|
+ if (redoAuditInfo.getIllegallyTypeId() != null) {
|
|
|
+ IllegallyTypeEntity illegallyType =
|
|
|
+ GlobalHelper.getEntity(illegallyTypeRepo, redoAuditInfo.getIllegallyTypeId(), IllegallyTypeEntity.class);
|
|
|
+ sb.append(" 违纪类型:" + illegallyType.getName());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(redoAuditInfo.getDisciplineDetail())) {
|
|
|
+ sb.append(" 详情描述:" + redoAuditInfo.getDisciplineDetail());
|
|
|
+ }
|
|
|
+ ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试明细-重审", sb.toString()));
|
|
|
}
|
|
|
|
|
|
}
|