Răsfoiți Sursa

format code style

deason 3 ani în urmă
părinte
comite
129dfeded8
26 a modificat fișierele cu 526 adăugiri și 556 ștergeri
  1. 31 34
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/BaseInfoController.java
  2. 55 66
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamAuditController.java
  3. 2 0
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamCaptureController.java
  4. 3 1
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamControlController.java
  5. 14 20
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordController.java
  6. 5 4
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordDataController.java
  7. 22 24
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordPaperStructController.java
  8. 24 26
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordQuestionsController.java
  9. 9 16
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamScoreController.java
  10. 32 47
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamStudentController.java
  11. 1 1
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExportTaskController.java
  12. 6 7
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/IllegallyTypeController.java
  13. 40 46
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/OfflineExamController.java
  14. 20 18
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/PracticeController.java
  15. 6 6
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordCloudServiceProvider.java
  16. 5 1
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordForMarkingCloudServiceProvider.java
  17. 24 23
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordPaperStructProvider.java
  18. 1 0
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordQuestionsCloudServiceProvider.java
  19. 45 46
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreCloudServiceProvider.java
  20. 15 14
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreNoticeQueueCloudServiceProvider.java
  21. 13 14
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreObtainQueueCloudServiceProvider.java
  22. 2 0
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamStudentCloudServiceProvider.java
  23. 24 19
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamStudentDataCloudServiceProvider.java
  24. 22 23
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/OeAdminScorePushCloudServiceProvider.java
  25. 78 93
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncCloudServiceProvider.java
  26. 27 7
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncExamDataCloudServiceProvider.java

+ 31 - 34
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/BaseInfoController.java

@@ -1,55 +1,52 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
 import cn.com.qmth.examcloud.core.basic.api.bean.OrgBean;
 import cn.com.qmth.examcloud.core.basic.api.request.GetOrgsReq;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgsResp;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
- * 
  * @author chenken
- *
  */
 @Api(tags = "考试记录审核相关接口")
 @RestController
 @RequestMapping("${$rmp.ctr.oe}/baseInfo")
 public class BaseInfoController extends ControllerSupport {
-	
-	@Autowired
-	private OrgCloudService orgCloudService;
 
-	@GetMapping("/org/list")
-	public List<OrgBean> queryOrg(){
-		List<OrgBean> orgBeanList = new ArrayList<OrgBean>();
-		Long start = 1l;
+    @Autowired
+    private OrgCloudService orgCloudService;
+
+    @GetMapping("/org/list")
+    public List<OrgBean> queryOrg() {
+        List<OrgBean> orgBeanList = new ArrayList<OrgBean>();
+        Long start = 1l;
         GetOrgsReq req = new GetOrgsReq();
         req.setRootOrgId(this.getRootOrgId());
-        while(true){
-        	req.setStart(start);
-     		GetOrgsResp getOrgsResp = orgCloudService.getOrgs(req);
-     		List<OrgBean> subOrgBeanList = getOrgsResp.getOrgBeanList();
-     		for(OrgBean orgBean:subOrgBeanList){
- 				if(orgBean.getEnable()){
- 					orgBeanList.add(orgBean);
- 				}
-     		}
-     		if(start.equals(getOrgsResp.getNext())){
-             	break;
-            }else {
-             	start = getOrgsResp.getNext();
- 			}
+        while (true) {
+            req.setStart(start);
+            GetOrgsResp getOrgsResp = orgCloudService.getOrgs(req);
+            List<OrgBean> subOrgBeanList = getOrgsResp.getOrgBeanList();
+            for (OrgBean orgBean : subOrgBeanList) {
+                if (orgBean.getEnable()) {
+                    orgBeanList.add(orgBean);
+                }
+            }
+            if (start.equals(getOrgsResp.getNext())) {
+                break;
+            } else {
+                start = getOrgsResp.getNext();
+            }
         }
-		return orgBeanList;
-	}
-	
+        return orgBeanList;
+    }
+
 }

+ 55 - 66
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamAuditController.java

@@ -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()));
     }
 
 }

+ 2 - 0
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamCaptureController.java

@@ -31,8 +31,10 @@ import java.util.List;
 @Api(tags = "考试抓拍检测相关接口")
 @RequestMapping("${$rmp.ctr.oe}/exam/capture")
 public class ExamCaptureController extends ControllerSupport {
+
     @Autowired
     private ExamCaptureService examCaptureService;
+
     @Autowired
     private ExamProcessRecordService examProcessRecordService;
 

+ 3 - 1
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamControlController.java

@@ -32,8 +32,10 @@ public class ExamControlController extends ControllerSupport {
 
     @Autowired
     private ExamStudentService examStudentService;
+
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
+
     @Autowired
     private ExamRecordDataCloudService examRecordDataCloudService;
 
@@ -70,7 +72,7 @@ public class ExamControlController extends ControllerSupport {
     @GetMapping("/queryHomeworkList")
     public List<OnHandExamInfo> queryHomeworkList() {
         User user = getAccessUser();
-        return examStudentService.queryOnlineExamList(user.getUserId(),ExamType.ONLINE_HOMEWORK);
+        return examStudentService.queryOnlineExamList(user.getUserId(), ExamType.ONLINE_HOMEWORK);
     }
 
     /**

+ 14 - 20
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordController.java

@@ -7,23 +7,6 @@
 
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-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.enums.ExamType;
 import cn.com.qmth.examcloud.api.commons.security.bean.User;
 import cn.com.qmth.examcloud.commons.util.JsonMapper;
@@ -49,6 +32,16 @@ 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.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 考试记录相关接口
@@ -182,10 +175,10 @@ public class ExamRecordController extends ControllerSupport {
     @GetMapping("/detail/list/export/async")
     @ApiOperation(value = "导出“考试明细”列表(异步)", notes = "参数示例:query={\"rootOrgId\":0,\"examId\":1}")
     public void exportExamRecordDetails(@RequestParam String query) {
-    	User user=getAccessUser();
-        asyncExportService.exportExamRecordDetails(query,user);
+        User user = getAccessUser();
+        asyncExportService.exportExamRecordDetails(query, user);
         AsyncExportConcurrentUtil.checkOrStartJob();
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试明细-导出","导出条件:"+query));
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试明细-导出", "导出条件:" + query));
     }
 
     @PostMapping(value = "/refresh/capture/statistic")
@@ -220,4 +213,5 @@ public class ExamRecordController extends ControllerSupport {
                 examRecordService.getExamStudentQuestionScoreList(examId, courseCode);
         ExportUtils.exportEXCEL("考试明细列表", ExamStudentQuestionScoreInfo.class, examRecordInfoList, response);
     }
+
 }

+ 5 - 4
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordDataController.java

@@ -25,15 +25,15 @@ public class ExamRecordDataController {
 
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
-    
+
     @Autowired
     private ExamRecordDataSyncService examRecordDataSyncService;
 
     @GetMapping("/findExamRecordDataEntity")
-    public ExamRecordDataDomain findExamRecordDataEntity(@RequestParam Long examRecordDataId,@RequestParam(required = false) String fromCache) {
-        if(fromCache!=null) {
+    public ExamRecordDataDomain findExamRecordDataEntity(@RequestParam Long examRecordDataId, @RequestParam(required = false) String fromCache) {
+        if (fromCache != null) {
             examRecordDataId = examRecordDataSyncService.getExamRecordDataIdByCacheId(examRecordDataId);
-            if(examRecordDataId==null) {
+            if (examRecordDataId == null) {
                 throw new StatusException("1001", "未找到数据");
             }
         }
@@ -54,4 +54,5 @@ public class ExamRecordDataController {
         }
         return examRecordDataList;
     }
+
 }

+ 22 - 24
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordPaperStructController.java

@@ -1,11 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-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.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordPaperStructEntity;
@@ -14,36 +8,40 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordPaperStructService;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * 
- * @author  	chenken
- * @date    	2018年9月5日 下午4:02:15
- * @company 	QMTH
+ * @author chenken
+ * @date 2018年9月5日 下午4:02:15
+ * @company QMTH
  * @description 考试记录-试卷结构controller
  */
 @Api(tags = "考试记录-试卷结构")
 @RestController
 @RequestMapping("${$rmp.ctr.oe}/examRecordPaperStruct")
-public class ExamRecordPaperStructController extends ControllerSupport{
+public class ExamRecordPaperStructController extends ControllerSupport {
+
+    @Autowired
+    private ExamRecordPaperStructService examRecordPaperStructService;
 
-	@Autowired
-	private ExamRecordPaperStructService examRecordPaperStructService;
-	
     @Autowired
     private ExamRecordDataSyncService examRecordDataSyncService;
-	
-	@ApiOperation(value = "获取考试记录试卷结构")
-	@GetMapping("/getExamRecordPaperStruct")
-	public ExamRecordPaperStructEntity getExamRecordPaperStruct(@RequestParam Long examRecordDataId,@RequestParam(required = false) String fromCache){
-		Check.isNull(examRecordDataId, "examRecordDataId不能为空");
-		if(fromCache!=null) {
+
+    @ApiOperation(value = "获取考试记录试卷结构")
+    @GetMapping("/getExamRecordPaperStruct")
+    public ExamRecordPaperStructEntity getExamRecordPaperStruct(@RequestParam Long examRecordDataId, @RequestParam(required = false) String fromCache) {
+        Check.isNull(examRecordDataId, "examRecordDataId不能为空");
+        if (fromCache != null) {
             examRecordDataId = examRecordDataSyncService.getExamRecordDataIdByCacheId(examRecordDataId);
-            if(examRecordDataId==null) {
+            if (examRecordDataId == null) {
                 throw new StatusException("1001", "未找到数据");
             }
         }
-		return examRecordPaperStructService.getExamRecordPaperStruct(examRecordDataId);
-	}
-	
+        return examRecordPaperStructService.getExamRecordPaperStruct(examRecordDataId);
+    }
+
 }

+ 24 - 26
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordQuestionsController.java

@@ -1,55 +1,53 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-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.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordQuestionsRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordQuestionsEntity;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataSyncService;
+import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 
 /**
- * 
- * @author  	chenken
- * @date    	2018年10月12日 上午9:48:47
- * @company 	QMTH
+ * @author chenken
+ * @date 2018年10月12日 上午9:48:47
+ * @company QMTH
  * @description ExamRecordQuestionsController.java
  */
 @Api(tags = "考试结束后-作答记录接口")
 @RestController
 @RequestMapping("${$rmp.ctr.oe}/examRecordQuestions")
-public class ExamRecordQuestionsController extends ControllerSupport{
+public class ExamRecordQuestionsController extends ControllerSupport {
 
-	@Autowired
-	private ExamRecordQuestionsRepo examRecordQuestionsRepo;
+    @Autowired
+    private ExamRecordQuestionsRepo examRecordQuestionsRepo;
 
-	@Autowired
-	private ExamRecordQuestionsService examRecordQuestionsService;
+    @Autowired
+    private ExamRecordQuestionsService examRecordQuestionsService;
 
     @Autowired
     private ExamRecordDataSyncService examRecordDataSyncService;
-	
-	@ApiOperation(value = "获取交卷之后的所有试题作答信息")
-	@GetMapping("/getExamRecordQuestions")
-	public ExamRecordQuestionsEntity getExamRecordQuestions(@RequestParam Long examRecordDataId,@RequestParam(required = false) String fromCache){
-		Check.isNull(examRecordDataId, "examRecordDataId不能为空");
-		if(fromCache!=null) {
+
+    @ApiOperation(value = "获取交卷之后的所有试题作答信息")
+    @GetMapping("/getExamRecordQuestions")
+    public ExamRecordQuestionsEntity getExamRecordQuestions(@RequestParam Long examRecordDataId, @RequestParam(required = false) String fromCache) {
+        Check.isNull(examRecordDataId, "examRecordDataId不能为空");
+        if (fromCache != null) {
             examRecordDataId = examRecordDataSyncService.getExamRecordDataIdByCacheId(examRecordDataId);
-            if(examRecordDataId==null) {
+            if (examRecordDataId == null) {
                 throw new StatusException("1001", "未找到数据");
             }
         }
 
-		return examRecordQuestionsService.getExamRecordQuestionsAndFixExamRecordDataIfNecessary(examRecordDataId);
-	}
-	
+        return examRecordQuestionsService.getExamRecordQuestionsAndFixExamRecordDataIfNecessary(examRecordDataId);
+    }
+
 }

+ 9 - 16
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamScoreController.java

@@ -7,19 +7,6 @@
 
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.util.List;
-
-import javax.servlet.http.HttpServletResponse;
-
-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;
@@ -45,6 +32,12 @@ 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.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.List;
 
 /**
  * 考试分数相关接口
@@ -92,10 +85,10 @@ public class ExamScoreController extends ControllerSupport {
     @ApiOperation(value = "导出“成绩统计”列表(异步)",
             notes = "参数示例:query={\"rootOrgId\":0,\"examId\":1,\"startLimit\":1,\"endLimit\":1}")
     public void exportExamScores(@RequestParam String query) {
-    	User user=getAccessUser();
-        asyncExportService.exportExamScoreStatistics(query,user);
+        User user = getAccessUser();
+        asyncExportService.exportExamScoreStatistics(query, user);
         AsyncExportConcurrentUtil.checkOrStartJob();
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "成绩统计-导出","导出条件:"+query));
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "成绩统计-导出", "导出条件:" + query));
     }
 
     @ApiOperation(value = "根据examStudentId获取客观分信息")

+ 32 - 47
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamStudentController.java

@@ -7,25 +7,6 @@
 
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.servlet.http.HttpServletResponse;
-
-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.util.JsonMapper;
 import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
@@ -35,16 +16,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.IllegallyTypeRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.IllegallyTypeEntity;
 import cn.com.qmth.examcloud.core.oe.admin.service.AsyncExportService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.CourseCompleteProgressExcel;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.CourseProgressInfo;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentEntityConvert;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentExcel;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentFinishedStatistic;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentInfo;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentOrgStatistic;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentQuery;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentUnFinishedExcel;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.OrgCompleteProgressExcel;
+import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.*;
 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;
@@ -55,6 +27,14 @@ 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.*;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * 考生信息接口
@@ -66,13 +46,16 @@ import io.swagger.annotations.ApiOperation;
 @Api(tags = "考生信息相关接口")
 @RequestMapping("${$rmp.ctr.oe}/exam/student")
 public class ExamStudentController extends ControllerSupport {
+
     @Autowired
     private ExamStudentService examStudentService;
+
     @Autowired
     private AsyncExportService asyncExportService;
-    
+
     @Autowired
     private IllegallyTypeRepo illegallyTypeRepo;
+
     /**
      * 查询课程本地缓存
      */
@@ -86,10 +69,12 @@ public class ExamStudentController extends ControllerSupport {
     }
 
     class CleanCourseBeanCacheTask extends TimerTask {
+
         @Override
         public void run() {
             courseBeanLocalCache.clear();
         }
+
     }
 
     public ExamStudentController() {
@@ -120,16 +105,16 @@ public class ExamStudentController extends ControllerSupport {
         List<ExamStudentInfo> examStudentInfoList = examStudentService.getExamStudentInfoList(newQuery);
         List<ExamStudentExcel> list = ExamStudentEntityConvert.ofExcel(examStudentInfoList);
         ExportUtils.exportEXCEL("考试详情列表", ExamStudentExcel.class, list, response);
-//        ExcelExportUtil.exportExcel("考试详情列表", ExamStudentExcel.class, list, response);
+        //        ExcelExportUtil.exportExcel("考试详情列表", ExamStudentExcel.class, list, response);
     }
-    
+
     @GetMapping("/examScheduling/list/export/async")
     @ApiOperation(value = "导出“考试进度详情”列表(异步)", notes = "参数示例:query={\"pageNo\":1,\"pageSize\":10,\"examId\":123, ...}")
     public void exportExamSchedulingAsync(@RequestParam String query) {
-    	User user = getAccessUser();
-        asyncExportService.exportExamScheduling(query,user);
+        User user = getAccessUser();
+        asyncExportService.exportExamScheduling(query, user);
         AsyncExportConcurrentUtil.checkOrStartJob();
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-导出","导出条件:"+query));
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-导出", "导出条件:" + query));
     }
 
     @PostMapping("/unfinished/list")
@@ -180,18 +165,18 @@ public class ExamStudentController extends ControllerSupport {
         }
         examStudentService.setReexamine(examStudentId, reexamineType, reexamineDetail);
         User user = getAccessUser();
-        StringBuilder sb=new StringBuilder();
-        sb.append("考生ID:"+examStudentId);
-        if(StringUtils.isNotEmpty(reexamineType)) {
-        	IllegallyTypeEntity it=illegallyTypeRepo.findByRootOrgIdAndCode(-1L, reexamineType);
-        	if(it!=null) {
-        		sb.append(" 重考理由:"+it.getName());
-        	}
+        StringBuilder sb = new StringBuilder();
+        sb.append("考生ID:" + examStudentId);
+        if (StringUtils.isNotEmpty(reexamineType)) {
+            IllegallyTypeEntity it = illegallyTypeRepo.findByRootOrgIdAndCode(-1L, reexamineType);
+            if (it != null) {
+                sb.append(" 重考理由:" + it.getName());
+            }
         }
-        if(StringUtils.isNotEmpty(reexamineDetail)) {
-        	sb.append(" 详情描述:"+reexamineDetail);
+        if (StringUtils.isNotEmpty(reexamineDetail)) {
+            sb.append(" 详情描述:" + reexamineDetail);
         }
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "设置重考-设置重考",sb.toString()));
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "设置重考-设置重考", sb.toString()));
     }
 
     @PostMapping("/statistic/by/finished")
@@ -239,8 +224,8 @@ public class ExamStudentController extends ControllerSupport {
     @GetMapping("/findCoursesByExamIdAndOrgId")
     @ApiOperation(value = "查询课程")
     public List<CourseCacheBean> findCoursesByExamIdAndOrgId(@RequestParam Long examId,
-                                                        @RequestParam(required = false) Long examStageId,
-                                                        @RequestParam(required = false) Long orgId) {
+                                                             @RequestParam(required = false) Long examStageId,
+                                                             @RequestParam(required = false) Long orgId) {
         if (examId == null) {
             return null;
         }

+ 1 - 1
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExportTaskController.java

@@ -30,7 +30,7 @@ public class ExportTaskController extends ControllerSupport {
         User user = getAccessUser();
         req.setRootOrgId(user.getRootOrgId());
 
-        return exportTaskService.getExportTaskList(req,user.getUserId());
+        return exportTaskService.getExportTaskList(req, user.getUserId());
     }
 
     @PostMapping("/delete")

+ 6 - 7
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/IllegallyTypeController.java

@@ -8,7 +8,6 @@ import cn.com.qmth.examcloud.commons.util.PathUtil;
 import cn.com.qmth.examcloud.core.oe.admin.api.bean.IllegallyTypeDomain;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamAuditRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.IllegallyTypeRepo;
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamAuditEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.IllegallyTypeEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.DisciplineType;
 import cn.com.qmth.examcloud.core.oe.admin.service.IllegallyTypeService;
@@ -19,7 +18,6 @@ import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections.CollectionUtils;
@@ -27,7 +25,6 @@ import org.apache.commons.fileupload.disk.DiskFileItem;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.ClassPathResource;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.data.domain.Sort;
@@ -40,8 +37,10 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile;
 import javax.persistence.criteria.Predicate;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
-import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -150,7 +149,6 @@ public class IllegallyTypeController extends ControllerSupport {
     }
 
     /**
-     *
      * @param name
      * @param code
      * @param enable
@@ -162,7 +160,7 @@ public class IllegallyTypeController extends ControllerSupport {
     public List<IllegallyTypeEntity> query(@RequestParam(required = false) String name,
                                            @RequestParam(required = false) String code,
                                            @RequestParam(required = false) Boolean enable,
-                                           @RequestParam(required = false,defaultValue = "all") String queryScope) {
+                                           @RequestParam(required = false, defaultValue = "all") String queryScope) {
 
         User accessUser = getAccessUser();
         Long rootOrgId = accessUser.getRootOrgId();
@@ -382,4 +380,5 @@ public class IllegallyTypeController extends ControllerSupport {
 
         FileUtils.deleteQuietly(file);
     }
+
 }

+ 40 - 46
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/OfflineExamController.java

@@ -1,26 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
 import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.api.commons.security.bean.User;
 import cn.com.qmth.examcloud.commons.exception.StatusException;
@@ -28,6 +7,7 @@ import cn.com.qmth.examcloud.commons.util.MD5;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.Check;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
+import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
 import cn.com.qmth.examcloud.core.oe.admin.service.OfflineExamService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.OfflineExamCourseInfo;
 import cn.com.qmth.examcloud.reports.commons.bean.AdminOperateReport;
@@ -40,6 +20,17 @@ import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -52,7 +43,9 @@ import io.swagger.annotations.ApiParam;
 @RestController
 @RequestMapping("${$rmp.ctr.oe}/offlineExam")
 public class OfflineExamController extends ControllerSupport {
-	private static final Logger log = LoggerFactory.getLogger(OfflineExamController.class);
+
+    private static final Logger log = LoggerFactory.getLogger(OfflineExamController.class);
+
     @Autowired
     private OfflineExamService offlineExamService;
 
@@ -64,6 +57,7 @@ public class OfflineExamController extends ControllerSupport {
 
     @Autowired
     SystemProperties systemConfig;
+
     /**
      * 答案文件最大限制
      * 单位:M
@@ -97,7 +91,7 @@ public class OfflineExamController extends ControllerSupport {
         Check.isNull(examStudentId, "examStudentId不能为空");
 
         boolean isEnable = examStudentService.isEnableExamStudent(examStudentId);
-        if(!isEnable){
+        if (!isEnable) {
             throw new StatusException("000500", "当前考生已禁用!");
         }
 
@@ -120,7 +114,7 @@ public class OfflineExamController extends ControllerSupport {
         }
 
         boolean isEnable = examStudentService.isEnableExamStudent(examRecordData.getExamStudentId());
-        if(!isEnable){
+        if (!isEnable) {
             throw new StatusException("000500", "当前考生已禁用!");
         }
 
@@ -151,18 +145,18 @@ public class OfflineExamController extends ControllerSupport {
 
         File f = getUploadFile(file);
 
-        offlineExamService.submitPaper(examRecordDataId, f,fileSuffix);
+        offlineExamService.submitPaper(examRecordDataId, f, fileSuffix);
 
-        User user=getAccessUser();
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-上传作答","考试记录ID:"+examRecordDataId+" 考生ID:"+examRecordData.getExamStudentId()));
+        User user = getAccessUser();
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-上传作答", "考试记录ID:" + examRecordDataId + " 考生ID:" + examRecordData.getExamStudentId()));
     }
 
     /**
      * 交卷
      *
-     * @param fileArray            文件数组
+     * @param fileArray        文件数组
      * @param examRecordDataId 考试记录id
-     * @param fileMd5Array        文件摘要信息
+     * @param fileMd5Array     文件摘要信息
      * @throws Exception
      */
     @ApiOperation(value = "离线考试:多文件交卷")
@@ -183,7 +177,7 @@ public class OfflineExamController extends ControllerSupport {
         }
 
         boolean isEnable = examStudentService.isEnableExamStudent(examRecordData.getExamStudentId());
-        if(!isEnable){
+        if (!isEnable) {
             throw new StatusException("000500", "当前考生已禁用!");
         }
 
@@ -194,20 +188,20 @@ public class OfflineExamController extends ControllerSupport {
             throw new StatusException("OfflineExamController-submitPaper-003", "当前考试设置不允许上传附件");
         }
 
-        String upperFileType=fileType.toUpperCase();
-        if (("PDF".equals(upperFileType) || "ZIP".equals(upperFileType))&&fileArray.length>1){
-        	StringBuilder sb=new StringBuilder();
-        	for (int i = 0; i < fileArray.length; i++) {
+        String upperFileType = fileType.toUpperCase();
+        if (("PDF".equals(upperFileType) || "ZIP".equals(upperFileType)) && fileArray.length > 1) {
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < fileArray.length; i++) {
                 MultipartFile file = fileArray[i];
                 String fileName = file.getOriginalFilename();
                 sb.append(fileName).append(",");
-        	}
-        	sb.deleteCharAt(sb.length()-1);
-        	log.error("batchSubmitPaper-duplicate:"+examRecordDataId+":"+sb);
-        	throw new StatusException("000500", "上传"+upperFileType+"类型文件时只能传一个文件");
+            }
+            sb.deleteCharAt(sb.length() - 1);
+            log.error("batchSubmitPaper-duplicate:" + examRecordDataId + ":" + sb);
+            throw new StatusException("000500", "上传" + upperFileType + "类型文件时只能传一个文件");
         }
-        
-        List<File> resultFiles=new ArrayList<>();
+
+        List<File> resultFiles = new ArrayList<>();
         for (int i = 0; i < fileArray.length; i++) {
             MultipartFile file = fileArray[i];
             String fileName = file.getOriginalFilename();
@@ -225,13 +219,12 @@ public class OfflineExamController extends ControllerSupport {
             }
 
 
-
             //图片类型特殊处理
             if (fileSuffix.equals("JPG") || fileSuffix.equals("JPEG") || fileSuffix.equals("PNG")) {
-                if (offlineUploadFileType.indexOf("IMAGE")<0) {
+                if (offlineUploadFileType.indexOf("IMAGE") < 0) {
                     throw new StatusException("100004", "当前考试允许上传文件格式为:" + offlineUploadFileType);
                 }
-            }else{
+            } else {
                 if (offlineUploadFileType.indexOf(fileSuffix) < 0) {
                     throw new StatusException("OfflineExamController-submitPaper-004", "当前考试允许上传文件格式为:" + offlineUploadFileType);
                 }
@@ -254,14 +247,14 @@ public class OfflineExamController extends ControllerSupport {
             resultFiles.add(f);
         }
 
-        offlineExamService.batchSubmitPaper(examRecordDataId,resultFiles,fileType);
+        offlineExamService.batchSubmitPaper(examRecordDataId, resultFiles, fileType);
 
         //最后删除临时文件
         for (File tempFile : resultFiles) {
             tempFile.delete();
         }
-        User user=getAccessUser();
-        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-上传作答","考试记录ID:"+examRecordDataId+" 考生ID:"+examRecordData.getExamStudentId()));
+        User user = getAccessUser();
+        ReportsUtil.report(new AdminOperateReport(user.getRootOrgId(), user.getUserId(), "考试进度详情-上传作答", "考试记录ID:" + examRecordDataId + " 考生ID:" + examRecordData.getExamStudentId()));
     }
 
     private File getUploadFile(MultipartFile file) {
@@ -285,4 +278,5 @@ public class OfflineExamController extends ControllerSupport {
         }
         return tempFile;
     }
+
 }

+ 20 - 18
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/PracticeController.java

@@ -1,13 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-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.core.oe.admin.base.utils.Check;
@@ -19,32 +11,40 @@ import cn.com.qmth.examcloud.core.oe.admin.service.bean.PracticeRecordInfo;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
 
 /**
- *
- * @author      chenken
- * @date        2018年9月7日 上午11:12:28
- * @company     QMTH
+ * @author chenken
+ * @date 2018年9月7日 上午11:12:28
+ * @company QMTH
  * @description PracticeController.java
  */
 @Api(tags = "练习相关接口")
 @RestController
 @RequestMapping("${$rmp.ctr.oe}/practice")
-public class PracticeController extends ControllerSupport{
+public class PracticeController extends ControllerSupport {
 
     @Autowired
     private PracticeService practiceService;
 
     @Autowired
     private ExamRecordDataSyncService examRecordDataSyncService;
+
     /**
      * 练习课程列表
+     *
      * @param examId
      * @return
      */
     @ApiOperation(value = "练习课程列表")
     @GetMapping("/queryPracticeCourseList")
-    public List<PracticeCourseInfo> queryPracticeCourseList(@RequestParam Long examId){
+    public List<PracticeCourseInfo> queryPracticeCourseList(@RequestParam Long examId) {
         Check.isNull(examId, "examId不能为空");
         User user = getAccessUser();
         return practiceService.queryPracticeCourseList(examId, user.getUserId());
@@ -52,27 +52,29 @@ public class PracticeController extends ControllerSupport{
 
     /**
      * 课程练习记录详情
+     *
      * @param examStudentId
      * @return
      */
     @ApiOperation(value = "课程练习记录详情")
     @GetMapping("/queryPracticeRecordList")
-    public List<PracticeRecordInfo> queryPracticeRecordList(@RequestParam Long examStudentId){
+    public List<PracticeRecordInfo> queryPracticeRecordList(@RequestParam Long examStudentId) {
         Check.isNull(examStudentId, "examStudentId不能为空");
         return practiceService.queryPracticeRecordList(examStudentId);
     }
 
     /**
      * 单次练习答题情况统计
+     *
      * @return
      */
     @ApiOperation(value = "单次练习答题情况统计")
     @GetMapping("/getPracticeDetailInfo")
-    public PracticeDetailInfo getPracticeDetailInfo(@RequestParam Long examRecordDataId,@RequestParam(required = false) String fromCache){
+    public PracticeDetailInfo getPracticeDetailInfo(@RequestParam Long examRecordDataId, @RequestParam(required = false) String fromCache) {
         Check.isNull(examRecordDataId, "examRecordDataId不能为空");
-        if(fromCache!=null) {
+        if (fromCache != null) {
             examRecordDataId = examRecordDataSyncService.getExamRecordDataIdByCacheId(examRecordDataId);
-            if(examRecordDataId==null) {
+            if (examRecordDataId == null) {
                 throw new StatusException("1001", "未找到数据");
             }
         }

+ 6 - 6
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordCloudServiceProvider.java

@@ -642,14 +642,14 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
         return res;
     }
 
-	@Override
-	@ApiOperation(value = "检查试卷是否已使用")
+    @Override
+    @ApiOperation(value = "检查试卷是否已使用")
     @PostMapping("/checkPaperInExam")
-	public CheckPaperInExamResp checkPaperInExam(@RequestBody CheckPaperInExamReq req) {
-		if (org.apache.commons.lang3.StringUtils.isBlank(req.getBasePaperId())) {
+    public CheckPaperInExamResp checkPaperInExam(@RequestBody CheckPaperInExamReq req) {
+        if (org.apache.commons.lang3.StringUtils.isBlank(req.getBasePaperId())) {
             throw new StatusException("500", "basePaperId不允许为空");
         }
-		return examRecordDataService.checkPaperInExam(req);
-	}
+        return examRecordDataService.checkPaperInExam(req);
+    }
 
 }

+ 5 - 1
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordForMarkingCloudServiceProvider.java

@@ -61,15 +61,19 @@ public class ExamRecordForMarkingCloudServiceProvider extends ControllerSupport
 
     @Autowired
     private ExamRecordForMarkingService examRecordForMarkingService;
+
     @Autowired
     private ExamStudentRepo examStudentRepo;
+
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
+
     @Autowired
     private ExamRecordForMarkingRepo examRecordForMarkingRepo;
 
     @Autowired
     private ExamRecordQuestionsService examRecordQuestionsService;
+
     @Autowired
     private ExamRecordFileAnswerRepo examRecordFileAnswerRepo;
 
@@ -95,7 +99,7 @@ public class ExamRecordForMarkingCloudServiceProvider extends ControllerSupport
             examRecordForMarkingBean.setPaperType(entity.getPaperType());
             examRecordForMarkingBean.setCourseId(entity.getCourseId());
 
-            if(entity.getExamRecordDataId() == null){
+            if (entity.getExamRecordDataId() == null) {
                 throw new StatusException("500101", "阅卷信息错误,考试记录ID存在空值!");
             }
 

+ 24 - 23
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordPaperStructProvider.java

@@ -1,11 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamPaperStructCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.GetExamRecordPaperStructReq;
 import cn.com.qmth.examcloud.core.oe.admin.api.response.GetExamRecordPaperStructResp;
@@ -15,30 +9,37 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordPaperStructService;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
 
 @Api(tags = "考试记录-试卷结构")
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/examRecordPaperStruct")
 public class ExamRecordPaperStructProvider extends ControllerSupport implements ExamPaperStructCloudService {
 
-	/**
-     * 
+    /**
+     *
      */
     private static final long serialVersionUID = 9057798814755020949L;
+
     @Autowired
-	private ExamRecordPaperStructService examRecordPaperStructService;
-	
-	@ApiOperation(value = "获取考试记录试卷结构")
-	@PostMapping("/getExamRecordPaperStruct")
-	@Override
-	public GetExamRecordPaperStructResp getExamRecordPaperStruct(@RequestBody GetExamRecordPaperStructReq req) {
-		Check.isNull(req.getExamRecordDataId(), "考试记录id不能为空");
-		ExamRecordPaperStructEntity examRecordPaperStructEntity = examRecordPaperStructService.getExamRecordPaperStruct(req.getExamRecordDataId());
-		GetExamRecordPaperStructResp resp = new GetExamRecordPaperStructResp();
-		if (null == examRecordPaperStructEntity){
-			return null;
-		}
-		resp.setDefaultPaper(examRecordPaperStructEntity.getDefaultPaper());
-		return resp;
-	}
+    private ExamRecordPaperStructService examRecordPaperStructService;
+
+    @ApiOperation(value = "获取考试记录试卷结构")
+    @PostMapping("/getExamRecordPaperStruct")
+    @Override
+    public GetExamRecordPaperStructResp getExamRecordPaperStruct(@RequestBody GetExamRecordPaperStructReq req) {
+        Check.isNull(req.getExamRecordDataId(), "考试记录id不能为空");
+        ExamRecordPaperStructEntity examRecordPaperStructEntity = examRecordPaperStructService.getExamRecordPaperStruct(req.getExamRecordDataId());
+        GetExamRecordPaperStructResp resp = new GetExamRecordPaperStructResp();
+        if (null == examRecordPaperStructEntity) {
+            return null;
+        }
+        resp.setDefaultPaper(examRecordPaperStructEntity.getDefaultPaper());
+        return resp;
+    }
+
 }

+ 1 - 0
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordQuestionsCloudServiceProvider.java

@@ -287,4 +287,5 @@ public class ExamRecordQuestionsCloudServiceProvider extends ControllerSupport i
 
         return studentAnswer;
     }
+
 }

+ 45 - 46
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreCloudServiceProvider.java

@@ -1,14 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamScoreBean;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.QueryExamScoreReq;
@@ -18,48 +9,56 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
 
 
 @Api(tags = "考试分数信息相关接口")
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/examScore")
-public class ExamScoreCloudServiceProvider extends ControllerSupport implements ExamScoreCloudService{
+public class ExamScoreCloudServiceProvider extends ControllerSupport implements ExamScoreCloudService {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -1957765271029136836L;
+
+    @Autowired
+    private ExamScoreRepo examScoreRepo;
+
+    @Override
+    @ApiOperation(value = "分数查询")
+    @PostMapping("/queryExamScore")
+    public QueryExamScoreResp queryExamScore(@RequestBody QueryExamScoreReq req) {
+        List<Long> examRecordDataIds = req.getExamRecordDataIds();
+
+        if (examRecordDataIds == null || examRecordDataIds.size() == 0) {
+            return null;
+        }
+
+        List<ExamScoreEntity> examScoreList = examScoreRepo.findByExamRecordDataIdIn(req.getExamRecordDataIds());
 
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -1957765271029136836L;
-	
-	@Autowired
-	private ExamScoreRepo examScoreRepo;
-	
-	@Override
-	@ApiOperation(value = "分数查询")
-	@PostMapping("/queryExamScore")
-	public QueryExamScoreResp queryExamScore(@RequestBody QueryExamScoreReq req) {
-		List<Long> examRecordDataIds = req.getExamRecordDataIds();
-		
-		if(examRecordDataIds == null || examRecordDataIds.size() == 0){
-			return null;
-		}
-		
-		List<ExamScoreEntity> examScoreList = examScoreRepo.findByExamRecordDataIdIn(req.getExamRecordDataIds());
-		
-		List<ExamScoreBean> examScoreBeans = new ArrayList<ExamScoreBean>();
-		for(ExamScoreEntity examScore:examScoreList){
-			ExamScoreBean examScoreBean = new ExamScoreBean();
-			examScoreBean.setId(examScore.getId());
-			examScoreBean.setExamRecordDataId(examScore.getExamRecordDataId());
-			examScoreBean.setObjectiveAccuracy(examScore.getObjectiveAccuracy());
-			examScoreBean.setObjectiveScore(examScore.getObjectiveScore());
-			examScoreBean.setSubjectiveScore(examScore.getSubjectiveScore());
-			examScoreBean.setSuccPercent(examScore.getSuccPercent());
-			examScoreBean.setTotalScore(examScore.getTotalScore());
-			examScoreBeans.add(examScoreBean);
-		}
-		QueryExamScoreResp queryExamScoreResp = new QueryExamScoreResp();
-		queryExamScoreResp.setExamScoreBeans(examScoreBeans);
-		return queryExamScoreResp;
-	}
+        List<ExamScoreBean> examScoreBeans = new ArrayList<ExamScoreBean>();
+        for (ExamScoreEntity examScore : examScoreList) {
+            ExamScoreBean examScoreBean = new ExamScoreBean();
+            examScoreBean.setId(examScore.getId());
+            examScoreBean.setExamRecordDataId(examScore.getExamRecordDataId());
+            examScoreBean.setObjectiveAccuracy(examScore.getObjectiveAccuracy());
+            examScoreBean.setObjectiveScore(examScore.getObjectiveScore());
+            examScoreBean.setSubjectiveScore(examScore.getSubjectiveScore());
+            examScoreBean.setSuccPercent(examScore.getSuccPercent());
+            examScoreBean.setTotalScore(examScore.getTotalScore());
+            examScoreBeans.add(examScoreBean);
+        }
+        QueryExamScoreResp queryExamScoreResp = new QueryExamScoreResp();
+        queryExamScoreResp.setExamScoreBeans(examScoreBeans);
+        return queryExamScoreResp;
+    }
 
 }

+ 15 - 14
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreNoticeQueueCloudServiceProvider.java

@@ -1,13 +1,17 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Date;
-import java.util.List;
-
+import cn.com.qmth.examcloud.commons.util.OKHttpUtil;
+import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreNoticeQueueCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.AddExamScoreNoticeQueueReq;
 import cn.com.qmth.examcloud.core.oe.admin.api.response.AddExamScoreNoticeQueueResp;
+import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreNoticeQueueRepo;
+import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreNoticeQueueEntity;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreNoticeQueueService;
+import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreObtainQueueService;
+import cn.com.qmth.examcloud.core.oe.admin.service.bean.NotifyUrlInfo;
+import cn.com.qmth.examcloud.web.support.ControllerSupport;
+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.web.bind.annotation.PostMapping;
@@ -15,15 +19,10 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import cn.com.qmth.examcloud.commons.util.OKHttpUtil;
-import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreNoticeQueueCloudService;
-import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreNoticeQueueRepo;
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreNoticeQueueEntity;
-import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreObtainQueueService;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.NotifyUrlInfo;
-import cn.com.qmth.examcloud.web.support.ControllerSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.util.Date;
+import java.util.List;
 
 @Api(tags = "定时发送获取分数通知接口")
 @RestController
@@ -38,8 +37,10 @@ public class ExamScoreNoticeQueueCloudServiceProvider extends ControllerSupport
 
     @Autowired
     private ExamScoreNoticeQueueRepo examScoreNoticeQueueRepo;
+
     @Autowired
     private ExamScoreObtainQueueService examScoreObtainQueueService;
+
     @Autowired
     private ExamScoreNoticeQueueService examScoreNoticeQueueService;
 

+ 13 - 14
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreObtainQueueCloudServiceProvider.java

@@ -1,16 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreObtainQueueCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.DeleteExamScoreQueueReq;
 import cn.com.qmth.examcloud.core.oe.admin.api.request.GetTopExamScoreQueueReq;
@@ -25,6 +14,16 @@ import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Api(tags = "考试分数队列接口")
 @RestController
@@ -33,7 +32,7 @@ public class ExamScoreObtainQueueCloudServiceProvider extends ControllerSupport
         implements ExamScoreObtainQueueCloudService {
 
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = 9204539038969246524L;
 
@@ -77,7 +76,6 @@ public class ExamScoreObtainQueueCloudServiceProvider extends ControllerSupport
 
     /**
      * 定时更新获取分数通知队列
-     * 
      */
     @ApiOperation(value = "定时更新获取分数通知队列")
     @PostMapping("/updateObtainScoreNodifyQueue")
@@ -94,7 +92,7 @@ public class ExamScoreObtainQueueCloudServiceProvider extends ControllerSupport
         }
         // 1.2如果存在,则创建相应组织机构的通知队列
         List<Long> rootOrgList = toObtainQueueList.stream().map(ExamScoreObtainQueueEntity::getRootOrgId).distinct()
-                .collect(Collectors.<Long> toList());
+                .collect(Collectors.<Long>toList());
         List<ExamScoreNoticeQueueEntity> noticeQueueEntityList = new ArrayList<ExamScoreNoticeQueueEntity>();
         rootOrgList.forEach(ro -> {
             ExamScoreNoticeQueueEntity noticeQueueEntity = new ExamScoreNoticeQueueEntity();
@@ -105,4 +103,5 @@ public class ExamScoreObtainQueueCloudServiceProvider extends ControllerSupport
         // 批量插入通知队列
         examScoreNoticeQueueRepo.saveAll(noticeQueueEntityList);
     }
+
 }

+ 2 - 0
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamStudentCloudServiceProvider.java

@@ -43,6 +43,7 @@ import java.util.stream.Collectors;
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/exam/student")
 public class ExamStudentCloudServiceProvider extends ControllerSupport implements OeExamStudentCloudService {
+
     /**
      *
      */
@@ -209,4 +210,5 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport implement
         }
         return examStudentBeans;
     }
+
 }

+ 24 - 19
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamStudentDataCloudServiceProvider.java

@@ -1,18 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import java.util.ArrayList;
-import java.util.DoubleSummaryStatistics;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
-import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamStudentDataCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamStudentDataBean;
@@ -27,10 +14,22 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
 import cn.com.qmth.examcloud.core.oe.admin.service.GainBaseDataService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.ExamStudentEffectiveScoreInfo;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentInfo;
+import cn.com.qmth.examcloud.support.enums.ExamProperties;
+import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
 import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+import java.util.ArrayList;
+import java.util.DoubleSummaryStatistics;
+import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @Description 获取考生考试相关数据接口
@@ -42,16 +41,21 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/examStudentData")
 public class ExamStudentDataCloudServiceProvider extends ControllerSupport implements ExamStudentDataCloudService {
+
     /**
      *
      */
     private static final long serialVersionUID = 4538819077863159166L;
+
     @Autowired
     ExamRecordQuestionsRepo examRecordQuestionsRepo;
+
     @Autowired
     private ExamStudentService examStudentService;
+
     @Autowired
     private GainBaseDataService gainBaseDataService;
+
     @Autowired
     private ExamRecordService examRecordService;
 
@@ -131,12 +135,12 @@ public class ExamStudentDataCloudServiceProvider extends ControllerSupport imple
                     //试卷总分
                     List<ExamRecordQuestionsEntity> curQuestionList = questionList.stream().
                             filter(p -> p.getExamRecordDataId().equals(finalScore.getExamRecordDataId())).collect(Collectors.toList());
-//                    if (curQuestionList==null || curQuestionList.isEmpty()){
-//                        //正常的数据不会出现这种情况con,暂时先记日志
-//                        log.error("[GETEXAMSTUDENTDATA]200106考试作答记录数据异常,examRecordDataId:"+finalScore.getExamRecordDataId());
-////                        throw new StatusException("200106","考试作答记录数据异常");
-//                        continue;
-//                    }
+                    //                    if (curQuestionList==null || curQuestionList.isEmpty()){
+                    //                        //正常的数据不会出现这种情况con,暂时先记日志
+                    //                        log.error("[GETEXAMSTUDENTDATA]200106考试作答记录数据异常,examRecordDataId:"+finalScore.getExamRecordDataId());
+                    ////                        throw new StatusException("200106","考试作答记录数据异常");
+                    //                        continue;
+                    //                    }
                     ExamRecordQuestionsEntity examRecordQuestionsEntity = curQuestionList.get(0);
                     List<ExamQuestionEntity> examQuestionList = examRecordQuestionsEntity.getExamQuestionEntities();
                     DoubleSummaryStatistics questionScoreStatistics = examQuestionList.stream().
@@ -177,4 +181,5 @@ public class ExamStudentDataCloudServiceProvider extends ControllerSupport imple
             throw new StatusException("200104", "该接口一次最多只能返回" + maxSize + "条数据");
         }
     }
+
 }

+ 22 - 23
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/OeAdminScorePushCloudServiceProvider.java

@@ -1,39 +1,38 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import cn.com.qmth.examcloud.core.oe.admin.api.OeAdminScorePushCloudService;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScorePushQueueRepo;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreQueueService;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 
 @Api(tags = "推送成绩接口")
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/oeAdminScorePush")
-public class OeAdminScorePushCloudServiceProvider extends ControllerSupport implements OeAdminScorePushCloudService{
-
-	private static final long serialVersionUID = -113490665725775879L;
-
-	@Autowired
-	private ExamScoreQueueService examScoreQueueService;
-	
-	@Autowired
-	private ExamScorePushQueueRepo examScorePushQueueRepo;
-	
-	@Autowired
-	private ExamRecordDataRepo examRecordDataRepo;
-	
-	@Override
-	@PostMapping("/disposeScoreQueue")
-	public void disposeScoreQueue() {
-		examScoreQueueService.disposeScoreQueue();
-	}
+public class OeAdminScorePushCloudServiceProvider extends ControllerSupport implements OeAdminScorePushCloudService {
+
+    private static final long serialVersionUID = -113490665725775879L;
+
+    @Autowired
+    private ExamScoreQueueService examScoreQueueService;
+
+    @Autowired
+    private ExamScorePushQueueRepo examScorePushQueueRepo;
+
+    @Autowired
+    private ExamRecordDataRepo examRecordDataRepo;
+
+    @Override
+    @PostMapping("/disposeScoreQueue")
+    public void disposeScoreQueue() {
+        examScoreQueueService.disposeScoreQueue();
+    }
 
 }

+ 78 - 93
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncCloudServiceProvider.java

@@ -1,17 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import java.util.List;
-
-import cn.com.qmth.examcloud.support.Constants;
-import cn.com.qmth.examcloud.web.helpers.SequenceLockHelper;
-import org.springframework.beans.factory.annotation.Autowired;
-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.RestController;
-
-import com.google.common.collect.Lists;
-
 import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamStudentBeanConvert;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamStudentRepo;
@@ -20,109 +8,107 @@ import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentInfo;
 import cn.com.qmth.examcloud.core.oe.admin.service.cache.ExamStudentCache;
 import cn.com.qmth.examcloud.global.api.HandleSyncCloudService;
-import cn.com.qmth.examcloud.global.api.request.SyncCourseReq;
-import cn.com.qmth.examcloud.global.api.request.SyncExamReq;
-import cn.com.qmth.examcloud.global.api.request.SyncExamStudentReq;
-import cn.com.qmth.examcloud.global.api.request.SyncOrgReq;
-import cn.com.qmth.examcloud.global.api.request.SyncSpecialtyReq;
-import cn.com.qmth.examcloud.global.api.request.SyncStudentReq;
-import cn.com.qmth.examcloud.global.api.request.SyncUserReq;
-import cn.com.qmth.examcloud.global.api.response.SyncCourseResp;
-import cn.com.qmth.examcloud.global.api.response.SyncExamResp;
-import cn.com.qmth.examcloud.global.api.response.SyncExamStudentResp;
-import cn.com.qmth.examcloud.global.api.response.SyncOrgResp;
-import cn.com.qmth.examcloud.global.api.response.SyncSpecialtyResp;
-import cn.com.qmth.examcloud.global.api.response.SyncStudentResp;
-import cn.com.qmth.examcloud.global.api.response.SyncUserResp;
+import cn.com.qmth.examcloud.global.api.request.*;
+import cn.com.qmth.examcloud.global.api.response.*;
+import cn.com.qmth.examcloud.support.Constants;
+import cn.com.qmth.examcloud.web.helpers.SequenceLockHelper;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
+import com.google.common.collect.Lists;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+import java.util.List;
 
 /**
- * 
- * @author  	chenken
- * @date    	2018年10月29日 下午4:39:24
- * @company 	QMTH
+ * @author chenken
+ * @date 2018年10月29日 下午4:39:24
+ * @company QMTH
  * @description 数据同步相关接口
  */
 @Api(tags = "数据同步相关接口")
 @RestController
 @RequestMapping("${$rmp.cloud.oe}/exam/dataSync")
-public class SyncCloudServiceProvider  extends ControllerSupport implements HandleSyncCloudService {
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -4093980356473146740L;
-
-	@Autowired
+public class SyncCloudServiceProvider extends ControllerSupport implements HandleSyncCloudService {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -4093980356473146740L;
+
+    @Autowired
     private ExamStudentService examStudentService;
-	
+
     @Autowired
     private ExamStudentRepo examStudentRepo;
+
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
-    
+
     @Autowired
     private ExamStudentCache examStudentCache;
 
-	@ApiOperation(value = "同步考生")
+    @ApiOperation(value = "同步考生")
     @PostMapping("/syncExamStudent")
     public SyncExamStudentResp syncExamStudent(@RequestBody SyncExamStudentReq req) {
-		//此锁是为了保证同步考生和交卷后更新考生信息不冲突
-		String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + req.getStudentId();
-
-		try {
-			//添加考试控制全局锁
-			SequenceLockHelper.getLockSimple(sequenceLockKey);
-
-			if("delete".equals(req.getSyncType())){
-				ExamStudentEntity examStudent = examStudentRepo.findByExamStudentId(req.getId());
-				if(examStudent != null && (examStudent.getFinished() == null || !examStudent.getFinished())){
-					examStudentRepo.delete(examStudent);
-					examStudentCache.remove(examStudent.getId());
-				}
-			}else if("update".equals(req.getSyncType())){
-				ExamStudentInfo examStudent = ExamStudentBeanConvert.of(req);
-				List<Long> examStudentIdList = examStudentService.saveExamStudentList(Lists.newArrayList(examStudent));
-				for (Long cur : examStudentIdList) {
-					examStudentCache.refresh(cur);
-				}
-			}
-
-			SyncExamStudentResp resp = new SyncExamStudentResp();
-			return resp;
-		} finally {
-			SequenceLockHelper.releaseLockSimple(sequenceLockKey);
-		}
-	}
+        //此锁是为了保证同步考生和交卷后更新考生信息不冲突
+        String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + req.getStudentId();
+
+        try {
+            //添加考试控制全局锁
+            SequenceLockHelper.getLockSimple(sequenceLockKey);
+
+            if ("delete".equals(req.getSyncType())) {
+                ExamStudentEntity examStudent = examStudentRepo.findByExamStudentId(req.getId());
+                if (examStudent != null && (examStudent.getFinished() == null || !examStudent.getFinished())) {
+                    examStudentRepo.delete(examStudent);
+                    examStudentCache.remove(examStudent.getId());
+                }
+            } else if ("update".equals(req.getSyncType())) {
+                ExamStudentInfo examStudent = ExamStudentBeanConvert.of(req);
+                List<Long> examStudentIdList = examStudentService.saveExamStudentList(Lists.newArrayList(examStudent));
+                for (Long cur : examStudentIdList) {
+                    examStudentCache.refresh(cur);
+                }
+            }
+
+            SyncExamStudentResp resp = new SyncExamStudentResp();
+            return resp;
+        } finally {
+            SequenceLockHelper.releaseLockSimple(sequenceLockKey);
+        }
+    }
 
     @ApiOperation(value = "同步课程")
     @PostMapping("/syncCourse")
     public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
-    	Long courseId = req.getId();
-    	String courseLevel = req.getLevel();
-    	examStudentRepo.updateCourse(courseId, courseLevel);
-		examRecordDataRepo.updateCourse(courseId, courseLevel);
+        Long courseId = req.getId();
+        String courseLevel = req.getLevel();
+        examStudentRepo.updateCourse(courseId, courseLevel);
+        examRecordDataRepo.updateCourse(courseId, courseLevel);
         return null;
     }
 
     @ApiOperation(value = "同步学生")
     @PostMapping("/syncStudent")
     public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
-    	//考生表和考试记录表
-    	long studentId = req.getId();
-    	String studentName = req.getName();
-
-//		examStudentRepo.updateStudentNameAndStudentCode(studentId, studentName, studentCode);
-//    	examRecordRepo.updateStudentNameAndStudentCode(studentId, studentName, studentCode);
-		examStudentRepo.updateStudentName(studentId,studentName);
-		examRecordDataRepo.updateStudentName(studentId, studentName);
-		//如果有需要解绑的学号信息,需要对学号进行解绑
-		if (null != req.getUnboundStudentCodeList() && !req.getUnboundStudentCodeList().isEmpty()) {
-			examStudentRepo.updateExamStudentCode(req.getIdentityNumber(), req.getUnboundStudentCodeList());
-		}
-    	return null;
+        //考生表和考试记录表
+        long studentId = req.getId();
+        String studentName = req.getName();
+
+        //		examStudentRepo.updateStudentNameAndStudentCode(studentId, studentName, studentCode);
+        //    	examRecordRepo.updateStudentNameAndStudentCode(studentId, studentName, studentCode);
+        examStudentRepo.updateStudentName(studentId, studentName);
+        examRecordDataRepo.updateStudentName(studentId, studentName);
+        //如果有需要解绑的学号信息,需要对学号进行解绑
+        if (null != req.getUnboundStudentCodeList() && !req.getUnboundStudentCodeList().isEmpty()) {
+            examStudentRepo.updateExamStudentCode(req.getIdentityNumber(), req.getUnboundStudentCodeList());
+        }
+        return null;
     }
 
     @ApiOperation(value = "同步机构")
@@ -130,7 +116,7 @@ public class SyncCloudServiceProvider  extends ControllerSupport implements Hand
     public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
         return null;
     }
-    
+
     @ApiOperation(value = "同步专业")
     @PostMapping("syncSpecialty")
     public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
@@ -143,12 +129,11 @@ public class SyncCloudServiceProvider  extends ControllerSupport implements Hand
         return null;
     }
 
-	@Override
-	public SyncUserResp syncUser(SyncUserReq req) {
-		// TODO Auto-generated method stub
-		return null;
-	}
+    @Override
+    public SyncUserResp syncUser(SyncUserReq req) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 
-	
-	
 }

+ 27 - 7
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncExamDataCloudServiceProvider.java

@@ -53,44 +53,64 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
 
     @Autowired
     private ExamRecordForMarkingService examRecordForMarkingService;
+
     @Autowired
     private ExamScorePushQueueService examScorePushQueueService;
+
     @Autowired
     private ExamScoreObtainQueueService examScoreObtainQueueService;
+
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
+
     @Autowired
     private ExamStudentRepo examStudentRepo;
+
     @Autowired
     private ExamSyncCaptureRepo examSyncCaptureRepo;
+
     @Autowired
     private ExamCaptureRepo examCaptureRepo;
+
     @Autowired
     private ExamFaceLivenessVerifyRepo examFaceLivenessVerifyRepo;
+
     @Autowired
     private ExamRecordPaperStructRepo examRecordPaperStructRepo;
+
     @Autowired
     private ExamRecordQuestionsRepo examRecordQuestionsRepo;
+
     @Autowired
     private FaceBiopsyRepo faceBiopsyRepo;
+
     @Autowired
     private FaceBiopsyItemRepo faceBiopsyItemRepo;
+
     @Autowired
     private FaceBiopsyItemStepRepo faceBiopsyItemStepRepo;
+
     @Autowired
     private ExamAuditService examAuditService;
+
     @Autowired
     private ExamRecordDataSyncRepo examRecordDataSyncRepo;
+
     @Autowired
     private ExamScoreRepo examScoreRepo;
+
     @Autowired
     private ExamStudentCache examStudentCache;
+
     @Autowired
     private ExamStudentFinalScoreService examStudentFinalScoreService;
+
     @Autowired
     private ExamContinuedRecordRepo examContinuedRecordRepo;
+
     @Autowired
     private ExamProcessRecordRepo examProcessRecordRepo;
+
     @Autowired
     private RedisClient redisClient;
 
@@ -132,8 +152,8 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
         Long realExamRecordDataId = syncExamRecordData(transitionExamRecordData);
 
         //header校验错误
-        Boolean hasWarn = redisClient.get("OE_SESSION_WARN_"+transitionExamRecordDataId, Boolean.class);
-        if(hasWarn !=null && hasWarn){
+        Boolean hasWarn = redisClient.get("OE_SESSION_WARN_" + transitionExamRecordDataId, Boolean.class);
+        if (hasWarn != null && hasWarn) {
             examAuditService.saveHeaderWarnAudit(realExamRecordDataId);
         }
 
@@ -173,8 +193,8 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
             syncExamSyncCapture(req.getExamSyncCapture(), realExamRecordDataId);
         } else {
             //且开启摄像头
-            if(FaceBiopsyHelper.isFaceEnable(transitionExamRecordData.getRootOrgId()
-                    , transitionExamRecordData.getExamId(), transitionExamRecordData.getStudentId())){
+            if (FaceBiopsyHelper.isFaceEnable(transitionExamRecordData.getRootOrgId()
+                    , transitionExamRecordData.getExamId(), transitionExamRecordData.getStudentId())) {
                 examAuditService.saveHeaderWarnAudit(realExamRecordDataId);
             }
         }
@@ -362,7 +382,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
         result.setRootOrgId(examRecordData.getRootOrgId());
         result.setBasePaperId(examRecordData.getBasePaperId());
 
-//        result.setPaperStructId(examRecordData.getPaperStructId());
+        //        result.setPaperStructId(examRecordData.getPaperStructId());
         result.setPaperType(examRecordData.getPaperType());
 
         CourseCacheBean course = CacheHelper.getCourse(examRecordData.getCourseId());
@@ -685,7 +705,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
         return entity;
     }
 
-    private ExamContinuedRecordEntity copyExamContinuedRecordFrom(ExamContinuedRecordBean bean,Long examRecordDataId){
+    private ExamContinuedRecordEntity copyExamContinuedRecordFrom(ExamContinuedRecordBean bean, Long examRecordDataId) {
         ExamContinuedRecordEntity entity = new ExamContinuedRecordEntity();
         entity.setExamRecordDataId(examRecordDataId);
         entity.setContinuedTime(bean.getContinuedTime());
@@ -695,7 +715,7 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
         return entity;
     }
 
-    private ExamProcessRecordEntity copyExamProcessRecordFrom(ExamProcessRecordBean bean,Long examRecordDataId){
+    private ExamProcessRecordEntity copyExamProcessRecordFrom(ExamProcessRecordBean bean, Long examRecordDataId) {
         ExamProcessRecordEntity entity = new ExamProcessRecordEntity();
         entity.setExamRecordDataId(examRecordDataId);
         entity.setProcessName(bean.getProcessName());