deason 5 лет назад
Родитель
Сommit
85061543c5
48 измененных файлов с 354 добавлено и 1606 удалено
  1. 0 96
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/bean/IllegallyTypeDomain.java
  2. 2 2
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamAuditController.java
  3. 1 14
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamControlController.java
  4. 9 41
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordController.java
  5. 1 1
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/ExamRecordQuestionsController.java
  6. 0 360
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/IllegallyTypeController.java
  7. 16 16
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/controller/OfflineExamController.java
  8. 5 61
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamRecordCloudServiceProvider.java
  9. 2 3
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamScoreDataCloudServiceProvider.java
  10. 2 2
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/ExamStudentDataCloudServiceProvider.java
  11. 0 1
      examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/provider/SyncExamDataCloudServiceProvider.java
  12. 2 6
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/ExamAuditRepo.java
  13. 0 23
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/IllegallyTypeRepo.java
  14. 1 1
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamRecordDataEntity.java
  15. 1 1
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamingRecordEntity.java
  16. 0 92
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/IllegallyTypeEntity.java
  17. 68 0
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/ExamProperties.java
  18. 42 0
      examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/ExamType.java
  19. 0 7
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/ExamCaptureService.java
  20. 6 7
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/ExamStudentService.java
  21. 0 37
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/IllegallyTypeService.java
  22. 0 89
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/IllegallyTypeInfo.java
  23. 24 35
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/OnHandExamInfo.java
  24. 3 5
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditEntityConvert.java
  25. 8 28
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditExcel.java
  26. 0 13
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditInfo.java
  27. 2 43
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examcapture/ExamCaptureAuditInfo.java
  28. 1 1
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordDataBean.java
  29. 0 11
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordEntityConvert.java
  30. 1 15
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordInfo.java
  31. 0 13
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordQuery.java
  32. 33 34
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/cache/ExamStudentCache.java
  33. 1 5
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamAuditServiceImpl.java
  34. 3 18
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamCaptureServiceImpl.java
  35. 10 0
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordDataCacheServiceImpl.java
  36. 2 2
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordDataServiceImpl.java
  37. 14 10
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordForMarkingServiceImpl.java
  38. 4 3
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordQuestionsServiceImpl.java
  39. 1 11
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordServiceImpl.java
  40. 1 1
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScoreObtainQueueServiceImpl.java
  41. 1 1
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScorePushQueueServiceImpl.java
  42. 5 5
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScoreServiceImpl.java
  43. 2 1
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStudentFinalScoreServiceImpl.java
  44. 77 253
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStudentServiceImpl.java
  45. 0 235
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/IllegallyTypeServiceImpl.java
  46. 1 1
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/OfflineExamServiceImpl.java
  47. 2 2
      examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/others/ExamCacheTransferHelper.java
  48. BIN
      examcloud-core-oe-admin-starter/src/main/resources/templates/illegallyTypeImportTemplate.xlsx

+ 0 - 96
examcloud-core-oe-admin-api-provider/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/bean/IllegallyTypeDomain.java

@@ -1,96 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.api.bean;
-
-import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
-
-import java.util.Date;
-
-public class IllegallyTypeDomain implements JsonSerializable {
-
-	private static final long serialVersionUID = 239263456816448160L;
-
-	private Long id;
-
-	private String code;
-
-	private String name;
-
-	private Long rootOrgId;
-
-	private Boolean enable;
-
-	/**
-	 * 排序号
-	 */
-	private Integer sortNo;
-
-	/**
-	 * 数据分类
-	 */
-	private String dataCategory;
-
-	private Date updateTime;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public Long getRootOrgId() {
-		return rootOrgId;
-	}
-
-	public void setRootOrgId(Long rootOrgId) {
-		this.rootOrgId = rootOrgId;
-	}
-
-	public Boolean getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Boolean enable) {
-		this.enable = enable;
-	}
-
-	public Integer getSortNo() {
-		return sortNo;
-	}
-
-	public void setSortNo(Integer sortNo) {
-		this.sortNo = sortNo;
-	}
-
-	public String getDataCategory() {
-		return dataCategory;
-	}
-
-	public void setDataCategory(String dataCategory) {
-		this.dataCategory = dataCategory;
-	}
-
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-}

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

@@ -17,12 +17,12 @@ 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.dao.enums.AuditStatus;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.DisciplineType;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.SelectType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamAuditService;
 import cn.com.qmth.examcloud.core.oe.admin.service.GainBaseDataService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examaudit.*;
 import cn.com.qmth.examcloud.core.oe.admin.service.others.ExamCacheTransferHelper;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import cn.com.qmth.examcloud.support.helper.IdentityNumberHelper;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
@@ -165,4 +165,4 @@ public class ExamAuditController extends ControllerSupport {
         examAuditService.redoAudit(redoAuditInfo, user);
     }
 
-}
+}

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

@@ -1,6 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.controller;
 
-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;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
@@ -46,19 +45,7 @@ public class ExamControlController extends ControllerSupport {
     @GetMapping("/queryExamList")
     public List<OnHandExamInfo> queryExamList() {
         User user = getAccessUser();
-        return examStudentService.queryOnlineExamList(user.getUserId(), ExamType.ONLINE);
-    }
-
-    /**
-     * 获取在线作业待考列表
-     *
-     * @return
-     */
-    @ApiOperation(value = "获取在线作业待考列表")
-    @GetMapping("/queryHomeworkList")
-    public List<OnHandExamInfo> queryHomeworkList() {
-        User user = getAccessUser();
-        return examStudentService.queryOnlineExamList(user.getUserId(),ExamType.ONLINE_HOMEWORK);
+        return examStudentService.queryOnlineExamList(user.getUserId());
     }
 
     /**

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

@@ -7,21 +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.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.core.oe.admin.base.utils.Check;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.JsonMapper;
@@ -30,7 +15,6 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordForMarkingRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordForMarkingEntity;
-import cn.com.qmth.examcloud.core.oe.admin.service.ExamCaptureService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordInfo;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord.ExamRecordQuery;
@@ -41,6 +25,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.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.List;
 
 /**
  * 考试记录相关接口
@@ -57,9 +49,7 @@ public class ExamRecordController extends ControllerSupport {
 
     @Autowired
     private ExamRecordDataRepo examRecordDataRepo;
-    @Autowired
-    private ExamCaptureService examCaptureService;
-    
+
     @Autowired
     private ExamRecordForMarkingRepo examRecordForMarkingRepo;
 
@@ -71,16 +61,6 @@ public class ExamRecordController extends ControllerSupport {
         examRecordWaitingAuditList.getContent().forEach(p -> {
             p.setIdentityNumber(IdentityNumberHelper.conceal(p.getRootOrgId(), p.getIdentityNumber()));
         });
-        List<ExamRecordInfo> examRecordInfoList=examRecordWaitingAuditList.getContent();
-        if (examRecordInfoList != null && examRecordInfoList.size() > 0) {
-            String examType = examRecordInfoList.get(0).getExamType();
-
-            for (ExamRecordInfo examRecordInfo : examRecordInfoList) {
-                if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
-                    examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
-                }
-            }
-        }
         return examRecordWaitingAuditList;
     }
 
@@ -110,9 +90,6 @@ public class ExamRecordController extends ControllerSupport {
                                 FileStorageUtil.realPath(examRecordForMarkingEntity.getOfflineFileUrl()));
                     }
                 }
-                if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
-                    examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
-                }
             }
         }
         return examRecordInfoPage;
@@ -126,15 +103,6 @@ public class ExamRecordController extends ControllerSupport {
         Check.isNull(newQuery, "请求参数不能为空!");
         Check.isNull(newQuery.getExamId(), "请先选择考试批次!");
         List<ExamRecordInfo> examRecordInfoList = examRecordService.getExamRecordDetailList(newQuery);
-        if (examRecordInfoList != null && examRecordInfoList.size() > 0) {
-            String examType = examRecordInfoList.get(0).getExamType();
-
-            for (ExamRecordInfo examRecordInfo : examRecordInfoList) {
-                if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
-                    examRecordInfo.setVirtualCameraNames(examCaptureService.getVirtualCameraNames(examRecordInfo.getDataId()));
-                }
-            }
-        }
         ExportUtils.exportEXCEL("考试明细列表", ExamRecordInfo.class, examRecordInfoList, response);
     }
 

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

@@ -34,7 +34,7 @@ public class ExamRecordQuestionsController extends ControllerSupport{
 
 	@Autowired
 	private ExamRecordQuestionsService examRecordQuestionsService;
-
+	
     @Autowired
     private ExamRecordDataSyncService examRecordDataSyncService;
 	

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

@@ -1,360 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.api.controller;
-
-import cn.com.qmth.examcloud.api.commons.exchange.PageInfo;
-import cn.com.qmth.examcloud.api.commons.security.bean.User;
-import cn.com.qmth.examcloud.commons.exception.StatusException;
-import cn.com.qmth.examcloud.commons.helpers.poi.ExcelWriter;
-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.service.IllegallyTypeService;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.IllegallyTypeInfo;
-import cn.com.qmth.examcloud.support.enums.DataCategory;
-import cn.com.qmth.examcloud.web.config.SystemProperties;
-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 io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.CollectionUtils;
-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.data.domain.Example;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
-import org.springframework.data.domain.Sort.Direction;
-import org.springframework.data.jpa.domain.Specification;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
-
-import javax.persistence.criteria.Predicate;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * @Description 违纪类型
- * @Author lideyin
- * @Date 2020/2/20 18:56
- * @Version 1.0
- */
-@RestController
-@RequestMapping("${$rmp.ctr.oe}/illegallyType")
-public class IllegallyTypeController extends ControllerSupport {
-
-    @Autowired
-    IllegallyTypeService illegallyTypeService;
-
-    @Autowired
-    SystemProperties systemConfig;
-
-    @Autowired
-    IllegallyTypeRepo illegallyTypeRepo;
-
-    @Autowired
-    ExamAuditRepo examAuditRepo;
-
-    private static final String[] EXCEL_HEADER = new String[]{"违纪类型名称", "违纪类型代码", "排序号"};
-
-    /**
-     * 方法注释
-     *
-     * @param curPage
-     * @param pageSize
-     * @param name
-     * @param code
-     * @param enable
-     * @return
-     * @author WANGWEI
-     */
-    @ApiOperation(value = "分页查询违纪类型")
-    @GetMapping("illegallyTypePage/{curPage}/{pageSize}")
-    public PageInfo<IllegallyTypeDomain> illegallyTypePage(@PathVariable Integer curPage,
-                                                           @PathVariable Integer pageSize,
-                                                           @RequestParam(required = false) String name,
-                                                           @RequestParam(required = false) String code,
-                                                           @RequestParam(required = false) Boolean enable) {
-        User accessUser = getAccessUser();
-
-        Specification<IllegallyTypeEntity> specification = (root, query, cb) -> {
-            List<Predicate> predicates = new ArrayList<>();
-
-            List<Long> rootOrgIdList = new ArrayList<>();
-            rootOrgIdList.add(accessUser.getRootOrgId());
-            rootOrgIdList.add(-1L);//系统级别的数据默认rootOrgId为-1
-
-            predicates.add(root.get("rootOrgId").in(rootOrgIdList));
-
-            if (StringUtils.isNotBlank(name)) {
-                predicates.add(cb.like(root.get("name"), toSqlSearchPattern(name)));
-            }
-            if (StringUtils.isNotBlank(code)) {
-                predicates.add(cb.like(root.get("code"), toSqlSearchPattern(code)));
-            }
-            if (null != enable) {
-                predicates.add(cb.equal(root.get("enable"), enable));
-            }
-
-
-            return cb.and(predicates.toArray(new Predicate[predicates.size()]));
-        };
-
-        PageRequest pageRequest = PageRequest.of(curPage, pageSize,
-                new Sort(Direction.DESC, "id"));
-
-
-        Page<IllegallyTypeEntity> page = illegallyTypeRepo.findAll(specification, pageRequest);
-
-        List<IllegallyTypeEntity> entityList = page.getContent();
-
-        List<IllegallyTypeDomain> domainList = new ArrayList<>();
-
-        for (IllegallyTypeEntity entity : entityList) {
-            IllegallyTypeDomain domain = new IllegallyTypeDomain();
-            domain.setRootOrgId(entity.getRootOrgId());
-            domain.setCode(entity.getCode());
-            domain.setEnable(entity.getEnable());
-            domain.setId(entity.getId());
-            domain.setName(entity.getName());
-            domain.setEnable(entity.getEnable());
-            domain.setSortNo(entity.getSortNo());
-            domain.setDataCategory(entity.getDataCategory() == null ? DataCategory.CUSTOM.name() : entity.getDataCategory().name());
-            domain.setUpdateTime(entity.getUpdateTime());
-            domainList.add(domain);
-        }
-
-        PageInfo<IllegallyTypeDomain> pageInfo = new PageInfo<>();
-        pageInfo.setList(domainList);
-        pageInfo.setTotal(page.getTotalElements());
-
-        return pageInfo;
-    }
-
-    @ApiOperation(value = "查询违纪类型")
-    @GetMapping("queryByNameLike")
-    public List<IllegallyTypeEntity> query(@RequestParam(required = false) String name,
-                                           @RequestParam(required = false) String code,
-                                           @RequestParam(required = false) Boolean enable) {
-
-        User accessUser = getAccessUser();
-        Long rootOrgId = accessUser.getRootOrgId();
-
-        Specification<IllegallyTypeEntity> specification = (root, query, cb) -> {
-            List<Predicate> predicates = new ArrayList<>();
-
-            List<Long> rootOrgIdList = new ArrayList<>();
-            rootOrgIdList.add(rootOrgId);
-            rootOrgIdList.add(-1L);//系统级别的数据默认rootOrgId为-1
-
-            predicates.add(root.get("rootOrgId").in(rootOrgIdList));
-
-            if (StringUtils.isNotBlank(name)) {
-                predicates.add(cb.like(root.get("name"), toSqlSearchPattern(name)));
-            }
-            if (StringUtils.isNotBlank(code)) {
-                predicates.add(cb.like(root.get("code"), toSqlSearchPattern(code)));
-            }
-            if (null != enable) {
-                predicates.add(cb.equal(root.get("enable"), enable));
-            }
-
-            return cb.and(predicates.toArray(new Predicate[predicates.size()]));
-        };
-
-        // 过载保护
-        long total = illegallyTypeRepo.count(specification);
-        if (total > 1000) {
-            List<IllegallyTypeEntity> list = Lists.newArrayList();
-            return list;
-        }
-
-        List<Sort.Order> orderList=new ArrayList<>();
-        orderList.add(new Sort.Order(Direction.DESC,"dataCategory"));
-        orderList.add(new Sort.Order(Direction.ASC,"id"));
-
-        List<IllegallyTypeEntity> list = illegallyTypeRepo.findAll(specification,
-                new Sort(orderList));
-        return list;
-    }
-
-    /**
-     * 修正
-     *
-     * @param domain
-     * @return
-     * @author WANGWEI
-     */
-    @ApiOperation(value = "新增违纪类型", notes = "新增")
-    @PostMapping
-    @Transactional
-    public Long addIllegallyType(@RequestBody IllegallyTypeDomain domain) {
-        trim(domain, true);
-
-        User accessUser = getAccessUser();
-        Long rootOrgId = accessUser.getRootOrgId();
-
-        String code = domain.getCode();
-        if (StringUtils.isBlank(code)) {
-            throw new StatusException("620001", "code is blank");
-        }
-        IllegallyTypeEntity course = illegallyTypeRepo.findByRootOrgIdAndCode(rootOrgId, code);
-        if (null != course) {
-            throw new StatusException("620002", "违纪类型编码已被占用");
-        }
-
-        IllegallyTypeInfo info = new IllegallyTypeInfo();
-        info.setRootOrgId(rootOrgId);
-        info.setCode(domain.getCode());
-        info.setEnable(true);
-        info.setName(domain.getName());
-        info.setSortNo(domain.getSortNo());
-        info.setDataCategory(info.getDataCategory() == null ? DataCategory.CUSTOM.name() : info.getDataCategory());
-
-        IllegallyTypeEntity saved = illegallyTypeService.saveIllegallyType(info);
-        return saved.getId();
-    }
-
-    /**
-     * 修正
-     *
-     * @param domain
-     * @return
-     * @author WANGWEI
-     */
-    @ApiOperation(value = "修改违纪类型", notes = "修改")
-    @PutMapping
-    @Transactional
-    public Long updateIllegallyType(@RequestBody IllegallyTypeDomain domain) {
-        trim(domain, true);
-
-        User accessUser = getAccessUser();
-        Long rootOrgId = accessUser.getRootOrgId();
-
-        IllegallyTypeInfo info = new IllegallyTypeInfo();
-        info.setId(info.getId());
-        info.setRootOrgId(rootOrgId);
-        info.setCode(domain.getCode());
-        info.setId(domain.getId());
-        info.setName(domain.getName());
-        info.setSortNo(domain.getSortNo());
-        info.setDataCategory(info.getDataCategory() == null ? DataCategory.CUSTOM.name() : info.getDataCategory());
-
-        IllegallyTypeEntity saved = illegallyTypeService.saveIllegallyType(info);
-        return saved.getId();
-    }
-
-    /**
-     * 方法注释
-     *
-     * @param ids
-     * @author WANGWEI
-     */
-    @ApiOperation(value = "删除违纪类型")
-    @DeleteMapping("{ids}")
-    @Transactional
-    public void delete(@PathVariable String ids) {
-        List<Long> typeIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
-        for (Long typeId : typeIds) {
-            IllegallyTypeEntity one = GlobalHelper.getEntity(illegallyTypeRepo, typeId,
-                    IllegallyTypeEntity.class);
-            if (null == one) {
-                continue;
-            }
-
-            //判断审核表中是否存在当前类型的违纪类型
-            ExamAuditEntity examAudit =
-                    examAuditRepo.findFirstByDisciplineTypeAndCreationTimeGreaterThan(one.getCode(), one.getCreationTime());
-            boolean isIllegallyTypeInUse = (null != examAudit);
-            if (isIllegallyTypeInUse) {
-                throw new StatusException("100001","违纪类型已使用不允许删除");
-            }
-
-            validateRootOrgIsolation(one.getRootOrgId());
-            illegallyTypeRepo.delete(one);
-
-        }
-    }
-
-    @ApiOperation(value = "下载导入模板", notes = "下载导入模板")
-    @GetMapping("importTemplate")
-    public void getDownloadTemplate(HttpServletResponse response) {
-        String resoucePath = PathUtil.getResoucePath("templates/illegallyTypeImportTemplate.xlsx");
-        exportFile("违纪类型导入模板.xlsx", new File(resoucePath));
-    }
-
-    @ApiOperation(value = "导入", notes = "导入")
-    @PostMapping("import")
-    @Transactional
-    public Map<String, Object> importIllegallyType(@RequestParam CommonsMultipartFile file) {
-        DiskFileItem item = (DiskFileItem) file.getFileItem();
-        File storeLocation = item.getStoreLocation();
-        List<Map<String, Object>> failRecords = illegallyTypeService.importIllegallyType(getRootOrgId(),
-                storeLocation);
-        Map<String, Object> map = Maps.newHashMap();
-        map.put("hasError", CollectionUtils.isNotEmpty(failRecords));
-        map.put("failRecords", failRecords);
-        return map;
-    }
-
-    @ApiOperation(value = "导出违纪类型")
-    @GetMapping("export")
-    public void export(@RequestParam(required = false) String name,
-                       @RequestParam(required = false) String code,
-                       @RequestParam(required = false) Boolean enable) {
-        User accessUser = getAccessUser();
-
-        Specification<IllegallyTypeEntity> specification = (root, query, cb) -> {
-            List<Predicate> predicates = new ArrayList<>();
-
-            predicates.add(cb.equal(root.get("rootOrgId"), accessUser.getRootOrgId()));
-
-            if (StringUtils.isNotBlank(name)) {
-                predicates.add(cb.like(root.get("name"), toSqlSearchPattern(name)));
-            }
-            if (StringUtils.isNotBlank(code)) {
-                predicates.add(cb.like(root.get("code"), toSqlSearchPattern(code)));
-            }
-            if (null != enable) {
-                predicates.add(cb.equal(root.get("enable"), enable));
-            }
-
-            return cb.and(predicates.toArray(new Predicate[predicates.size()]));
-        };
-
-        long count = illegallyTypeRepo.count(specification);
-        if (100000 < count) {
-            throw new StatusException("620200", "数据量过大,无法导出");
-        }
-
-        List<IllegallyTypeEntity> list = illegallyTypeRepo.findAll(specification);
-
-        List<Object[]> datas = Lists.newArrayList();
-
-        for (IllegallyTypeEntity cur : list) {
-            datas.add(new Object[]{cur.getName(), cur.getCode(), cur.getSortNo()});
-        }
-
-        String filePath = systemConfig.getTempDataDir() + File.separator
-                + System.currentTimeMillis() + ".xlsx";
-        File file = new File(filePath);
-
-        ExcelWriter.write(EXCEL_HEADER, new Class[]{String.class, String.class}, datas,
-                new File(filePath));
-
-        exportFile("违纪类型列表-" + getRootOrgId() + ".xlsx", file);
-
-        FileUtils.deleteQuietly(file);
-    }
-}

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

@@ -7,8 +7,6 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.util.List;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -24,6 +22,8 @@ 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.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 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.core.oe.admin.service.others.ExamCacheTransferHelper;
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
 
 
 /**
- *
+ * 
  * @author  	chenken
  * @date    	2018年9月5日 下午3:33:26
  * @company 	QMTH
@@ -55,11 +55,11 @@ public class OfflineExamController extends ControllerSupport{
 	 * 单位:M
 	 */
 	private static int answerMaxsize = 30;
-
-
+	
+	
 	public static final String TEMP_FILE_EXP = "offlineExam/";
-
-
+	
+	
 	/**
 	 * 获取离线考试列表
 	 * @return
@@ -71,7 +71,7 @@ public class OfflineExamController extends ControllerSupport{
 		List<OfflineExamCourseInfo> offlineExamCourseInfos = offlineExamService.getOfflineCourse(user.getUserId());
 		return offlineExamCourseInfos;
 	}
-
+	
 	/**
 	 * 开始考试
 	 * @param examStudentId
@@ -82,7 +82,7 @@ public class OfflineExamController extends ControllerSupport{
 		Check.isNull(examStudentId, "examStudentId不能为空");
 		offlineExamService.startOfflineExam(examStudentId);
 	}
-
+	
 	/**
 	 * 交卷
 	 */
@@ -96,30 +96,30 @@ public class OfflineExamController extends ControllerSupport{
 		int index = fileName.lastIndexOf(".");
 		String fileSuffix = fileName.substring(index+1, fileName.length()).toUpperCase();
 		if(!"PDF".equals(fileSuffix) && !"ZIP".equals(fileSuffix)){
-			throw new StatusException("OfflineExamController-submitPaper-001","文件格式不正确");
+			throw new StatusException("OfflineExamController-submitPaper-001","文件格式不正确"); 
 		}
-
+		
 		ExamRecordDataEntity examRecordData = GlobalHelper.getEntity(examRecordDataRepo,examRecordDataId,ExamRecordDataEntity.class);
 		if(examRecordData.getExamType() != ExamType.OFFLINE){
-			throw new StatusException("OfflineExamController-submitPaper-002","非离线考试");
+			throw new StatusException("OfflineExamController-submitPaper-002","非离线考试"); 
 		}
 		String offlineUploadFileType = ExamCacheTransferHelper.getCachedExamProperty(examRecordData.getExamId(),
 				examRecordData.getStudentId(),
 				ExamProperties.OFFLINE_UPLOAD_FILE_TYPE.name()).getValue();
 		if(StringUtils.isBlank(offlineUploadFileType) || "[]".equals(offlineUploadFileType)){
-			throw new StatusException("OfflineExamController-submitPaper-003","当前考试设置不允许上传附件");
+			throw new StatusException("OfflineExamController-submitPaper-003","当前考试设置不允许上传附件"); 
 		}
 		if(offlineUploadFileType.indexOf(fileSuffix)<0){
-			throw new StatusException("OfflineExamController-submitPaper-004","当前考试允许上传文件格式为:" + offlineUploadFileType);
+			throw new StatusException("OfflineExamController-submitPaper-004","当前考试允许上传文件格式为:" + offlineUploadFileType); 
 		}
 		//判断文件大小
 		long fileSize = file.getSize();
 		if(fileSize > answerMaxsize * 1048576){
-			throw new StatusException("OfflineExamController-submitPaper-005","文件大小不能超过"+answerMaxsize+"M");
+			throw new StatusException("OfflineExamController-submitPaper-005","文件大小不能超过"+answerMaxsize+"M"); 
 		}
 		offlineExamService.submitPaper(examRecordDataId,getUploadFile(file));
 	}
-
+	
 	private File getUploadFile(MultipartFile file){
         //建临时文件夹
 		File dirFile = new File(TEMP_FILE_EXP);

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

@@ -268,8 +268,6 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
     @ApiOperation(value = "分页获取待阅卷的考试记录")
     @PostMapping("/getPagedToBeMarkExamRecord")
     public GetPagedToBeMarkExamRecordResp getPagedToBeMarkExamRecord(@RequestBody GetPagedToBeMarkExamRecordReq req) {
-        Long st = System.currentTimeMillis();
-
         Long examId = req.getExamId();
         String courseCode = req.getSubjectCode();
         Long startId = req.getStartId();
@@ -277,65 +275,31 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
 
         validateToBeMarkData(examId, courseCode, startId, size);
 
-        Long startTime = System.currentTimeMillis();
-
         List<ExamStudentEntity> limitedExamStuList =
                 examStudentRepo.getLimitExamStudentList(examId, courseCode, startId, size);
 
-        if (log.isDebugEnabled()) {
-            log.debug("1.[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + startId + "]" +
-                    "获取考生耗时:" + (System.currentTimeMillis() - startTime) + " ms");
-        }
-
-        startTime = System.currentTimeMillis();
-
         GetPagedToBeMarkExamRecordResp resp = new GetPagedToBeMarkExamRecordResp();
         Long nextId = startId;
 
         if (null == limitedExamStuList || limitedExamStuList.isEmpty()) {
             resp.setNextId(nextId);
             resp.setToBeMarkExamRecordBeanList(null);
-
-            if (log.isDebugEnabled()) {
-                log.debug("999.[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + startId + "]end..." +
-                        "未找到对应的考生数据,合计耗时:" + (System.currentTimeMillis() - st) + " ms");
-            }
-
             return resp;
         }
 
         List<PagedToBeMarkExamRecordBean> pagedToBeMarkList = new ArrayList<>();
 
         CourseCacheBean course = CacheHelper.getCourse(limitedExamStuList.get(0).getCourseId());
-
-        int si = 0;//考生索引
         for (ExamStudentEntity examStu : limitedExamStuList) {
-            si++;
-
-            Long st1 = System.currentTimeMillis();
-
             //当前考生待阅卷的考试记录
             List<ExamRecordForMarkingEntity> examRecordForMarkingList =
                     examRecordForMarkingService.queryValidExamRecordList(examStu.getExamStudentId());
 
-            if (log.isDebugEnabled()) {
-                log.debug("1-2." + si + "[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + examStu.getExamStudentId() + "]" +
-                        "获取考生待阅卷的考试记录耗时:" + (System.currentTimeMillis() - st1) + " ms");
-            }
-
-            //如果考生找不到待阅卷的数据,直接跳过
-            if (null == examRecordForMarkingList || examRecordForMarkingList.isEmpty()) {
-                continue;
-            }
-
-            st1=System.currentTimeMillis();
-
             for (ExamRecordForMarkingEntity record : examRecordForMarkingList) {
                 PagedToBeMarkExamRecordBean pagedBean = new PagedToBeMarkExamRecordBean();
                 pagedBean.setExamId(examId);
                 pagedBean.setStudentName(examStu.getStudentName());
                 pagedBean.setStudentCode(examStu.getStudentCode());
-                pagedBean.setIdentityNumber(examStu.getIdentityNumber());
                 pagedBean.setCourseCode(courseCode);
                 pagedBean.setCourseName(course.getName());
                 pagedBean.setPaperType(examStu.getPaperType());
@@ -348,26 +312,11 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
 
                 pagedToBeMarkList.add(pagedBean);
             }
-
-            if (log.isDebugEnabled()) {
-                log.debug("1-2." + si + "[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + examStu.getExamStudentId() + "]" +
-                        "构建带作答记录的待阅卷的考试记录耗时:" + (System.currentTimeMillis() - st1) + " ms");
-            }
         }
 
-        if (log.isDebugEnabled()) {
-            log.debug("2.[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + startId + "]" +
-                    "获取" + size + "条考生的待阅卷记录共耗时:" + (System.currentTimeMillis() - startTime) + " ms");
-        }
-
-        nextId = limitedExamStuList.get(limitedExamStuList.size() - 1).getExamStudentId() + 1;
+        nextId = limitedExamStuList.get(limitedExamStuList.size() - 1).getId() + 1;
         resp.setNextId(nextId);
         resp.setToBeMarkExamRecordBeanList(pagedToBeMarkList);
-
-        if (log.isDebugEnabled()) {
-            log.debug("999.[GET_PAGED_TO_BE_MARK_EXAM_RECORD-" + examId + "-" + courseCode + "-" + startId + "]end..." +
-                    "合计耗时:" + (System.currentTimeMillis() - st) + " ms");
-        }
         return resp;
     }
 
@@ -380,10 +329,6 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
      */
     private List<PagedToBeMarkSubjectiveAnswerBean> getSubjectiveAnswerList(Long examRecordDataId,
                                                                             Long examId, String courseCode, String paperType) {
-        //全部作答集合
-        ExamRecordQuestionsEntity allEqList =
-                examRecordQuestionsService.getExamRecordQuestionsAndFixExamRecordDataIfNecessary(examRecordDataId);
-        //主观题作答集合
         List<ExamQuestionEntity> eqList = examRecordQuestionsService.querySubjectiveAnswerList(examRecordDataId);
 
         List<PagedToBeMarkSubjectiveAnswerBean> resultList = new ArrayList<>();
@@ -399,7 +344,7 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
             //获取指定小题的题干相关信息
             QuestionCacheBean cachedQues = CacheHelper.getQuestion(examId, courseCode, paperType, eq.getQuestionId());
 
-            bean.setAnswer(getCorrectAnswer(eq.getOrder(), eq.getQuestionId(), cachedQues, allEqList.getExamQuestionEntities()));
+            bean.setAnswer(getCorrectAnswer(eq.getOrder(), eq.getQuestionId(), cachedQues, eqList));
 
             bean.setParentBody(getParentBody(cachedQues));
             bean.setBody(getBody(eq.getOrder(), eq.getQuestionId(), cachedQues, eqList));
@@ -467,11 +412,11 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
      * @param curSubNumber       当前小题号
      * @param questionId         原小题id
      * @param cachedQues         带题干的试卷结构
-     * @param allEqList 所有作答集合
+     * @param subjectiveQuesList 主观题集合
      * @return
      */
     private String getCorrectAnswer(Integer curSubNumber, String questionId,
-                                    QuestionCacheBean cachedQues, List<ExamQuestionEntity> allEqList) {
+                                    QuestionCacheBean cachedQues, List<ExamQuestionEntity> subjectiveQuesList) {
         QuestionAnswerCacheBean questionAnswerCache = CacheHelper.getQuestionAnswer(questionId);
         List<String> rightAnswerList = questionAnswerCache.getRightAnswers();
         DefaultQuestionStructure questionStructure = cachedQues.getDefaultQuestion().getMasterVersion();
@@ -482,9 +427,8 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
             return rightAnswerList.get(0);
         }
 
-
         //同一questionId的主观题集合(不带题干,有小题号)
-        List<ExamQuestionEntity> noBodySubjectiveQuesList = allEqList.stream().
+        List<ExamQuestionEntity> noBodySubjectiveQuesList = subjectiveQuesList.stream().
                 filter(p -> p.getQuestionId().equals(questionId)).collect(Collectors.toList());
 
         for (int i = 0; i < noBodySubjectiveQuesList.size(); i++) {

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

@@ -3,7 +3,6 @@ package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 import java.util.ArrayList;
 import java.util.List;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import org.apache.commons.lang3.StringUtils;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -48,6 +47,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentFinalScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.DisciplineType;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentFinalScoreService;
 import cn.com.qmth.examcloud.core.oe.admin.service.GainBaseDataService;
@@ -370,8 +370,7 @@ public class ExamScoreDataCloudServiceProvider extends ControllerSupport impleme
         //只支持离线和在线考试
         ExamBean examSettings = ExamCacheTransferHelper.getDefaultCachedExam(req.getExamId());
         if (!(ExamType.ONLINE.toString().equals(examSettings.getExamType()) ||
-                ExamType.OFFLINE.toString().equals(examSettings.getExamType()) ||
-                ExamType.ONLINE_HOMEWORK.toString().equals(examSettings.getExamType()))) {
+                ExamType.OFFLINE.toString().equals(examSettings.getExamType()))) {
             throw new StatusException("100009", "不支持的考试类型");
         }
 

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

@@ -5,7 +5,6 @@ import java.util.DoubleSummaryStatistics;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -21,6 +20,7 @@ import cn.com.qmth.examcloud.core.oe.admin.api.response.GetExamStudentDataResp;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordQuestionsRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamQuestionEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordQuestionsEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
 import cn.com.qmth.examcloud.core.oe.admin.service.GainBaseDataService;
@@ -43,7 +43,7 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping("${$rmp.cloud.oe}/examStudentData")
 public class ExamStudentDataCloudServiceProvider extends ControllerSupport implements ExamStudentDataCloudService {
     /**
-     *
+     * 
      */
     private static final long serialVersionUID = 4538819077863159166L;
     @Autowired

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

@@ -1,6 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.api.provider;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
 import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;

+ 2 - 6
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/ExamAuditRepo.java

@@ -6,8 +6,6 @@ import org.springframework.stereotype.Repository;
 
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamAuditEntity;
 
-import java.util.Date;
-
 /**
  * @author chenken
  * @date 2018/8/15 10:05
@@ -16,9 +14,7 @@ import java.util.Date;
  */
 @Repository
 public interface ExamAuditRepo extends JpaRepository<ExamAuditEntity, Long>, JpaSpecificationExecutor<ExamAuditEntity> {
-
+	
 	public ExamAuditEntity findByExamRecordDataId(Long examRecordDataId);
-
-	ExamAuditEntity findFirstByDisciplineTypeAndCreationTimeGreaterThan(String disciplineType, Date creationTime);
-
+	
 }

+ 0 - 23
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/IllegallyTypeRepo.java

@@ -1,23 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.dao;
-
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.IllegallyTypeEntity;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.repository.query.QueryByExampleExecutor;
-
-import java.util.List;
-
-public interface IllegallyTypeRepo
-		extends
-			JpaRepository<IllegallyTypeEntity, Long>,
-			QueryByExampleExecutor<IllegallyTypeEntity>,
-			JpaSpecificationExecutor<IllegallyTypeEntity> {
-
-	IllegallyTypeEntity findByRootOrgIdAndCode(Long rootOrgId, String code);
-
-	IllegallyTypeEntity findByRootOrgIdAndCodeAndDataCategory(Long rootOrgId, String code,String dataCategory);
-
-	List<IllegallyTypeEntity> findByRootOrgId(Long rootOrgId);
-
-	int countByRootOrgIdAndNameLike(Long rootOrgId, String name);
-}

+ 1 - 1
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamRecordDataEntity.java

@@ -1,7 +1,7 @@
 package cn.com.qmth.examcloud.core.oe.admin.dao.entity;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.IsSuccess;
 import cn.com.qmth.examcloud.web.jpa.JpaEntity;
 import org.hibernate.annotations.DynamicInsert;

+ 1 - 1
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/ExamingRecordEntity.java

@@ -1,6 +1,6 @@
 package cn.com.qmth.examcloud.core.oe.admin.dao.entity;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.web.jpa.JpaEntity;
 
 import javax.persistence.*;

+ 0 - 92
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/entity/IllegallyTypeEntity.java

@@ -1,92 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.dao.entity;
-
-import cn.com.qmth.examcloud.support.enums.DataCategory;
-import cn.com.qmth.examcloud.web.jpa.WithIdJpaEntity;
-
-import javax.persistence.*;
-
-/**
- * @Description 违纪类型
- * @Author lideyin
- * @Date 2020/2/20 15:06
- * @Version 1.0
- */
-@Entity
-@Table(name = "EC_OE_ILLEGALLY_TYPE", indexes = {
-        @Index(name = "IDX_E_O_I_T_001", columnList = "rootOrgId,code", unique = true)})
-public class IllegallyTypeEntity extends WithIdJpaEntity {
-    private static final long serialVersionUID = 2612362994854920896L;
-
-    @Column(nullable = false)
-    private String code;
-
-    @Column(nullable = false)
-    private String name;
-
-    @Column(nullable = false)
-    private Long rootOrgId;
-
-    @Column(nullable = false)
-    private Boolean enable;
-
-    /**
-     * 排序号
-     */
-    @Column(nullable = false)
-    private Integer sortNo;
-
-    /**
-     * 数据分类
-     */
-    @Column(nullable = false)
-    @Enumerated(EnumType.STRING)
-    private DataCategory dataCategory;
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Long getRootOrgId() {
-        return rootOrgId;
-    }
-
-    public void setRootOrgId(Long rootOrgId) {
-        this.rootOrgId = rootOrgId;
-    }
-
-    public Boolean getEnable() {
-        return enable;
-    }
-
-    public void setEnable(Boolean enable) {
-        this.enable = enable;
-    }
-
-    public DataCategory getDataCategory() {
-        return dataCategory;
-    }
-
-    public void setDataCategory(DataCategory dataCategory) {
-        this.dataCategory = dataCategory;
-    }
-
-    public Integer getSortNo() {
-        return sortNo;
-    }
-
-    public void setSortNo(Integer sortNo) {
-        this.sortNo = sortNo;
-    }
-}

+ 68 - 0
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/ExamProperties.java

@@ -0,0 +1,68 @@
+package cn.com.qmth.examcloud.core.oe.admin.dao.enums;
+
+/**
+ * 
+ * @author  	chenken
+ * @date    	2018年11月15日 下午5:37:35
+ * @company 	QMTH
+ * @description 考试属性
+ */
+public enum ExamProperties {
+
+	SCORE_PUBLISHING("发布成绩"),
+	IS_ENTRANCE_EXAM("是否入学考试"),
+	FREEZE_TIME("交卷冻结时间"),
+	EXAM_RECONNECT_TIME("断点续考时间"),
+	BEFORE_EXAM_REMARK("考前说明"),
+	AFTER_EXAM_REMARK("考后说明"),
+	SHOW_CHEATING_REMARK("是否展示作弊"),
+	CHEATING_REMARK("作弊说明"),
+	PRACTICE_TYPE("练习模式"),
+	SINGLE_EDIT("单选题补充说明是否可填"),
+	MUTIPLE_EDIT("多选题补充说明是否可填"),
+	BOOL_EDIT("判断题补充说明是否可填"),
+	FILL_BLANK_EDIT("填空题补充说明是否可填"),
+	SINGLE_ANSWER_REMARK("单选题补充说明"),
+	MUTIPLE_ANSWER_REMARK("多选题补充说明"),
+	BOOL_ANSWER_REMARK("判断题补充说明"),
+	FILL_BLANK_REMARK("填空题补充说明"),
+	TEXT_ANSWER_REMARK("问答题补充说明"),
+	nestedAnswerRemark("套题补充说明"),
+	IS_FACE_ENABLE("是否启用人脸识别"),
+	IS_FACE_CHECK("进入考试是否验证人脸识别"),
+	WARN_THRESHOLD("人脸检测预警阈值"),
+	MARKING_TYPE("阅卷方式"),
+	IS_FACE_VERIFY("是否开启人脸活体检测"),
+	FACE_VERIFY_START_MINUTE("活体检测开始分钟数"),
+	FACE_VERIFY_END_MINUTE("活体检测结束分钟数"),
+	ADD_FACE_VERIFY_OUT_FREEZE_TIME("冻结时间外新加人脸活体检测"),
+	OUT_FREEZE_TIME_FACE_VERIFY_START_MINUTE("冻结时间外活体检测开始分钟数"),
+	OUT_FREEZE_TIME_FACE_VERIFY_END_MINUTE("冻结时间外活体检测结束分钟数"),
+	IP_LIMIT("是否IP限制"),
+	IP_ADDRESSES("IP白名单"),
+	IS_OBJ_SCORE_VIEW("是否显示客观题成绩"),
+	CAN_UPLOAD_ATTACHMENT("是否允许上传附件(离线考试)"),
+	LIVING_WARN_THRESHOLD("人脸真实性阈值"),
+	MARKING_TASK_BUILDED("阅卷是否生成评卷任务"),
+	OFFLINE_UPLOAD_FILE_TYPE("离线考试上传文件类型"),
+	PUSH_SCORE("是否推送分数"),
+	MAX_INTERRUPT_NUM("最大断点续考次数"),
+	IS_STRANGER_ENABLE("是否启用陌生人检测"),
+	LIMITED_IF_NO_SPECIAL_SETTINGS("无特殊设置时禁止考试"),
+	WEIXIN_ANSWER_ENABLED("是否开放微信小程序作答");
+	
+	private ExamProperties(String desc){
+		this.desc = desc;
+	}
+	
+	private String desc;
+
+	public String getDesc() {
+		return desc;
+	}
+
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+	
+}

+ 42 - 0
examcloud-core-oe-admin-dao/src/main/java/cn/com/qmth/examcloud/core/oe/admin/dao/enums/ExamType.java

@@ -0,0 +1,42 @@
+package cn.com.qmth.examcloud.core.oe.admin.dao.enums;
+
+
+/**
+ * @author ting.yin
+ * @Description: 考试类型
+ * @date 2017年1月5日
+ */
+public enum ExamType {
+    /**
+     * 传统考试
+     */
+    TRADITION,
+    /**
+     * 在线考试
+     */
+    ONLINE,
+    /**
+     * 在线练习
+     */
+    PRACTICE,
+
+    /**
+     * 离线考试
+     */
+    OFFLINE,
+
+    /**
+     * 分布式印刷考试
+     */
+    PRINT_EXAM;
+
+    public static ExamType strToEnum(String str) {
+        for (ExamType examType : ExamType.values()) {
+            if (examType.name().equals(str)) {
+                return examType;
+            }
+        }
+        return null;
+    }
+
+}

+ 0 - 7
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/ExamCaptureService.java

@@ -36,11 +36,4 @@ public interface ExamCaptureService {
      */
     List<ExamCaptureInfo> getExamCaptureList(Long examRecordDataId);
 
-    /**
-     * 获取虚拟摄像头名称
-     * @param examRecordDataId
-     * @return
-     */
-    String getVirtualCameraNames(Long examRecordDataId);
-
 }

+ 6 - 7
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/ExamStudentService.java

@@ -9,7 +9,6 @@ package cn.com.qmth.examcloud.core.oe.admin.service;
 
 import java.util.List;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import org.springframework.data.domain.Page;
 
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.OnHandExamInfo;
@@ -125,11 +124,11 @@ public interface ExamStudentService {
 	public List<ExamStudentInfo> getLimitExamStudentList(Long examId,Long startId,Integer size);
 
 	/**
-	 * 获取在线考试待考列表
-	 * @param studentId 学生id
-	 * @param examType 考试类型
-	 * @return
-	 */
-    public List<OnHandExamInfo> queryOnlineExamList(Long studentId, ExamType examType);
+     * 获取在线考试待考列表
+     * @param studentId
+     * @return
+     */
+    public List<OnHandExamInfo> queryOnlineExamList(Long studentId);
+    
 
 }

+ 0 - 37
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/IllegallyTypeService.java

@@ -1,37 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.service;
-
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.IllegallyTypeEntity;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.IllegallyTypeInfo;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description 违纪类型
- * @Author lideyin
- * @Date 2020/2/20 15:23
- * @Version 1.0
- */
-public interface IllegallyTypeService {
-
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param info
-	 * @return
-	 */
-	IllegallyTypeEntity saveIllegallyType(IllegallyTypeInfo info);
-
-	/**
-	 * 导入专业
-	 *
-	 * @author WANGWEI
-	 * @param rootOrgId
-	 * @param file
-	 * @return
-	 */
-	List<Map<String, Object>> importIllegallyType(Long rootOrgId, File file);
-
-}

+ 0 - 89
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/IllegallyTypeInfo.java

@@ -1,89 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.service.bean;
-
-import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
-import cn.com.qmth.examcloud.support.enums.DataCategory;
-
-import javax.persistence.Column;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-
-public class IllegallyTypeInfo implements JsonSerializable {
-
-	private static final long serialVersionUID = 239263456816448160L;
-
-	private Long id;
-
-	private String code;
-
-	private String name;
-
-	private Long rootOrgId;
-
-	private Boolean enable;
-
-	/**
-	 * 排序号
-	 */
-	private Integer sortNo;
-
-	/**
-	 * 数据分类
-	 */
-	private String dataCategory;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public Long getRootOrgId() {
-		return rootOrgId;
-	}
-
-	public void setRootOrgId(Long rootOrgId) {
-		this.rootOrgId = rootOrgId;
-	}
-
-	public Boolean getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Boolean enable) {
-		this.enable = enable;
-	}
-
-	public Integer getSortNo() {
-		return sortNo;
-	}
-
-	public void setSortNo(Integer sortNo) {
-		this.sortNo = sortNo;
-	}
-
-	public String getDataCategory() {
-		return dataCategory;
-	}
-
-	public void setDataCategory(String dataCategory) {
-		this.dataCategory = dataCategory;
-	}
-}

+ 24 - 35
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/OnHandExamInfo.java

@@ -12,47 +12,47 @@ public class OnHandExamInfo implements JsonSerializable{
     private static final long serialVersionUID = 6364550318267288565L;
 
     private Long examStudentId;//考试报考ID
-
+    
     private Long examId;//网考批次ID
-
+    
     private String examName;//批次名称
-
+    
     private String studentName;//考生名称
-
+    
     private String studentCode;//考生学号
-
+    
     private String identityNumber;//身份证号码
-
+    
     private String specialtyName;//专业名称
-
+    
     private String specialtyLevel;//层次
-
+    
     private Long courseId;//课程ID
-
+    
     private String courseName;//课程名称
-
+    
     private String courseCode;//课程代码
-
+    
     private String courseLevel;//课程层次
-
+    
     private Long orgId;//学校中心ID
-
+    
     private String orgName;//学习中心名称
-
+    
     private String isPhotoUpload;//是否上传照片
-
+    
     private int paperMins;//考试时长
-
+    
     private int allowExamCount;//允许考试次数
-
+    
     private Date startTime;//考试时间范围开始时间
-
+    
     private Date endTime; //考试时间范围结束时间
-
+    
     private Long rootOrgId;//机构ID
-
+    
     private String isFinished;//是否缺考
-
+    
     /**
      * 考试状态
      */
@@ -70,16 +70,12 @@ public class OnHandExamInfo implements JsonSerializable{
      * 进入考试是否验证人脸识别(强制、非强制)
      */
     private Boolean faceCheck;
-
+    
     /**
      * 是否显示客观分
      */
     private Boolean isObjScoreView;
 
-    /**
-     * 是否允许app考试
-     */
-    private Boolean appExamEnabled;
 
     public String getStudentName() {
         return studentName;
@@ -88,7 +84,7 @@ public class OnHandExamInfo implements JsonSerializable{
     public void setStudentName(String studentName) {
         this.studentName = studentName;
     }
-
+    
     public String getStudentCode() {
         return studentCode;
     }
@@ -289,12 +285,5 @@ public class OnHandExamInfo implements JsonSerializable{
     public void setIsObjScoreView(Boolean isObjScoreView) {
         this.isObjScoreView = isObjScoreView;
     }
-
-    public Boolean getAppExamEnabled() {
-        return appExamEnabled;
-    }
-
-    public void setAppExamEnabled(Boolean appExamEnabled) {
-        this.appExamEnabled = appExamEnabled;
-    }
+    
 }

+ 3 - 5
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditEntityConvert.java

@@ -50,10 +50,10 @@ public class ExamAuditEntityConvert {
                 }
 
                 DisciplineType disciplineType = DisciplineType.tramsformByType(info.getDisciplineType());
-                if (disciplineType != null) {
-                    info.setDisciplineType(disciplineType.getName());
+                if(disciplineType!=null){
+                	info.setDisciplineType(disciplineType.getName());	
                 }
-
+                
                 list.add(info);
             } catch (Exception e) {
                 throw new ExamCloudRuntimeException(e.getMessage(), e.getCause());
@@ -86,8 +86,6 @@ public class ExamAuditEntityConvert {
             excel.setFaceStrangerCount(e.getFaceStrangerCount());
             excel.setFaceTotalCount(e.getFaceTotalCount());
             excel.setFaceSuccessPercent(e.getFaceSuccessPercent());
-            excel.setDisciplineDetail(e.getDisciplineDetail());
-            excel.setObjectiveScore(Double.valueOf(e.getObjectiveScore()));
             list.add(excel);
         });
         return list;

+ 8 - 28
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditExcel.java

@@ -25,32 +25,28 @@ public class ExamAuditExcel implements JsonSerializable {
     private Long examRecordDataId;
     @ExcelProperty(name = "学习中心", index = 2)
     private String orgName;
-    @ExcelProperty(name = "违纪类型", index = 13)
+    @ExcelProperty(name = "违纪类型", index = 12)
     private String disciplineType;
     @ExcelProperty(name = "批次名称", index = 1)
     private String examName;
-    @ExcelProperty(name = "学号", index = 7)
+    @ExcelProperty(name = "学号", index = 6)
     private String studentCode;
-    @ExcelProperty(name = "姓名", index = 8)
+    @ExcelProperty(name = "姓名", index = 7)
     private String studentName;
     @ExcelProperty(name = "科目代码", index = 4)
     private String courseCode;
     @ExcelProperty(name = "考试科目", index = 3)
     private String courseName;
-    @ExcelProperty(name = "课程层次", index = 6)
+    @ExcelProperty(name = "课程层次", index = 5)
     private String courseLevel;
-    @ExcelProperty(name = "成功次数", index = 10)
+    @ExcelProperty(name = "成功次数", index = 9)
     private Integer faceSuccessCount;
-    @ExcelProperty(name = "陌生人记录", index = 11)
+    @ExcelProperty(name = "陌生人记录", index = 10)
     private Integer faceStrangerCount;
-    @ExcelProperty(name = "校验次数", index = 9)
+    @ExcelProperty(name = "校验次数", index = 8)
     private Integer faceTotalCount;
-    @ExcelProperty(name = "成功率", index = 12)
+    @ExcelProperty(name = "成功率", index = 11)
     private Double faceSuccessPercent;
-    @ExcelProperty(name = "客观题总分", index = 5)
-    private Double objectiveScore;
-    @ExcelProperty(name = "违纪描述", index = 14)
-    private String disciplineDetail;
     
     public Long getExamRecordDataId() {
 		return examRecordDataId;
@@ -155,20 +151,4 @@ public class ExamAuditExcel implements JsonSerializable {
     public void setOrgName(String orgName) {
         this.orgName = orgName;
     }
-
-    public String getDisciplineDetail() {
-        return disciplineDetail;
-    }
-
-    public void setDisciplineDetail(String disciplineDetail) {
-        this.disciplineDetail = disciplineDetail;
-    }
-
-    public Double getObjectiveScore() {
-        return objectiveScore;
-    }
-
-    public void setObjectiveScore(Double objectiveScore) {
-        this.objectiveScore = objectiveScore;
-    }
 }

+ 0 - 13
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examaudit/ExamAuditInfo.java

@@ -163,11 +163,6 @@ public class ExamAuditInfo implements JsonSerializable {
      */
     private Double faceLandmarkVal;
 
-    /**
-     * 客观题得分总分
-     */
-    private String objectiveScore;
-
     public Long getId() {
         return id;
     }
@@ -455,12 +450,4 @@ public class ExamAuditInfo implements JsonSerializable {
     public void setOrgName(String orgName) {
         this.orgName = orgName;
     }
-
-    public String getObjectiveScore() {
-        return objectiveScore;
-    }
-
-    public void setObjectiveScore(String objectiveScore) {
-        this.objectiveScore = objectiveScore;
-    }
 }

+ 2 - 43
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examcapture/ExamCaptureAuditInfo.java

@@ -8,7 +8,6 @@
 package cn.com.qmth.examcloud.core.oe.admin.service.bean.examcapture;
 
 import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
-import cn.com.qmth.examcloud.core.oe.admin.base.utils.excel.ExcelProperty;
 
 /**
  * 考试抓拍检测信息
@@ -104,22 +103,6 @@ public class ExamCaptureAuditInfo implements JsonSerializable {
      * 同步抓拍照片URL
      */
     private String syncCaptureFileUrl;
-
-    /**
-     * 学习中心名称
-     */
-    private String orgName;
-
-    /**
-     * 年级
-     */
-    private String grade;
-
-    /**
-     * 课程层次
-     */
-    private String courseLevel;
-
     public String getStatus() {
         return status;
     }
@@ -296,36 +279,12 @@ public class ExamCaptureAuditInfo implements JsonSerializable {
 	public void setVirtualCameraNames(String virtualCameraNames) {
 		this.virtualCameraNames = virtualCameraNames;
 	}
-	
-	public String getSyncCaptureFileUrl() {
+    
+public String getSyncCaptureFileUrl() {
         return syncCaptureFileUrl;
     }
 
     public void setSyncCaptureFileUrl(String syncCaptureFileUrl) {
         this.syncCaptureFileUrl = syncCaptureFileUrl;
     }
-
-    public String getOrgName() {
-        return orgName;
-    }
-
-    public void setOrgName(String orgName) {
-        this.orgName = orgName;
-    }
-
-    public String getGrade() {
-        return grade;
-    }
-
-    public void setGrade(String grade) {
-        this.grade = grade;
-    }
-
-    public String getCourseLevel() {
-        return courseLevel;
-    }
-
-    public void setCourseLevel(String courseLevel) {
-        this.courseLevel = courseLevel;
-    }
 }

+ 1 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordDataBean.java

@@ -2,9 +2,9 @@ package cn.com.qmth.examcloud.core.oe.admin.service.bean.examrecord;
 
 import java.util.Date;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.IsSuccess;
 
 public class ExamRecordDataBean implements JsonSerializable {

+ 0 - 11
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordEntityConvert.java

@@ -12,9 +12,7 @@ import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
 import cn.com.qmth.examcloud.core.oe.admin.base.Constants;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.DateUtils;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
-import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
-import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.CourseLevel;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.IsSuccess;
@@ -50,10 +48,6 @@ public class ExamRecordEntityConvert {
 
     @Autowired
     private GainBaseDataService gainBaseDataService;
-
-    @Autowired
-    private ExamScoreRepo examScoreRepo;
-
     public  ExamRecordInfo of(ExamRecordDataEntity recordData,Map<String,Object> cahcheMap) {
         if (recordData == null) {
             return null;
@@ -143,11 +137,6 @@ public class ExamRecordEntityConvert {
             info.setFaceVerifyResult(result.getDesc());
         }
         info.setFaceLandmarkVal(recordData.getFaceLandmarkVal());
-
-        //ldy20200108需求变更:
-        ExamScoreEntity examScore = examScoreRepo.findByExamRecordDataId(recordData.getId());
-        info.setObjectiveTotalScore(String.valueOf(examScore.getObjectiveScore()));
-
         return info;
     }
 

+ 1 - 15
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordInfo.java

@@ -270,11 +270,7 @@ public class ExamRecordInfo implements JsonSerializable {
      */
     private String offlineFileUrl;
     
-    /**
-     * 虚拟摄像头名称
-     */
-    @ExcelProperty(name = "虚拟摄像头名称", width = 30, index = 31)
-    private String virtualCameraNames;
+
     public Long getId() {
         return id;
     }
@@ -707,15 +703,5 @@ public class ExamRecordInfo implements JsonSerializable {
 	public void setOfflineFileUrl(String offlineFileUrl) {
 		this.offlineFileUrl = offlineFileUrl;
 	}
-
-    
-    public String getVirtualCameraNames() {
-        return virtualCameraNames;
-    }
-
-    
-    public void setVirtualCameraNames(String virtualCameraNames) {
-        this.virtualCameraNames = virtualCameraNames;
-    }
     
 }

+ 0 - 13
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/bean/examrecord/ExamRecordQuery.java

@@ -73,8 +73,6 @@ public class ExamRecordQuery implements JsonSerializable {
     private String startTime;
     @ApiModelProperty("考试结束时间")
     private String endTime;
-    @ApiModelProperty("是否有虚拟设备")
-    private Boolean hasVirtual;
     
     public ExamRecordQuery addRecordStatus(String recordStatus) {
         if (recordStatuses == null) {
@@ -275,15 +273,4 @@ public class ExamRecordQuery implements JsonSerializable {
 		this.isWarn = isWarn;
 	}
 
-    
-    public Boolean getHasVirtual() {
-        return hasVirtual;
-    }
-
-    
-    public void setHasVirtual(Boolean hasVirtual) {
-        this.hasVirtual = hasVirtual;
-    }
-
-
 }

+ 33 - 34
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/cache/ExamStudentCache.java

@@ -12,39 +12,38 @@ import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 @Component
 public class ExamStudentCache extends RandomObjectRedisCache<ExamStudentCacheBean> {
 
-    @Autowired
-    ExamStudentRepo examStudentRepo;
-
-    @Override
-    public ExamStudentCacheBean loadFromResource(Object... keys) {
-
-        Long examStudentId = (Long) keys[0];
-
-        ExamStudentEntity e = examStudentRepo.findByExamStudentId(examStudentId);
-
-        ExamStudentCacheBean b = new ExamStudentCacheBean();
-        b.setCourseId(e.getCourseId());
-        b.setEnable(e.getEnable());
-        b.setExamId(e.getExamId());
-        b.setExamStudentId(e.getExamStudentId());
-        b.setExtraNum(e.getExtraNum());
-        b.setStudentId(e.getStudentId());
-        b.setUsedNum(e.getUsedNum());
-        b.setPaperType(e.getPaperType());
-        b.setGrade(e.getGrade());
-
-        return b;
-    }
-
-    @Override
-    protected String getKeyPrefix() {
-        return "OE_ES:";
-    }
-
-    @Override
-    protected int getTimeout() {
-        // 180天
-        return 60 * 60 * 24 * 180;
-    }
+	@Autowired
+	ExamStudentRepo examStudentRepo;
+
+	@Override
+	public ExamStudentCacheBean loadFromResource(Object... keys) {
+
+		Long examStudentId = (Long) keys[0];
+
+		ExamStudentEntity e = examStudentRepo.findByExamStudentId(examStudentId);
+
+		ExamStudentCacheBean b = new ExamStudentCacheBean();
+		b.setCourseId(e.getCourseId());
+		b.setEnable(e.getEnable());
+		b.setExamId(e.getExamId());
+		b.setExamStudentId(e.getExamStudentId());
+		b.setExtraNum(e.getExtraNum());
+		b.setStudentId(e.getStudentId());
+		b.setUsedNum(e.getUsedNum());
+		b.setPaperType(e.getPaperType());
+
+		return b;
+	}
+
+	@Override
+	protected String getKeyPrefix() {
+		return "OE_ES:";
+	}
+
+	@Override
+	protected int getTimeout() {
+		// 180天
+		return 60 * 60 * 24 * 180;
+	}
 
 }

+ 1 - 5
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamAuditServiceImpl.java

@@ -179,14 +179,10 @@ public class ExamAuditServiceImpl implements ExamAuditService {
         	examAuditInfo.setCourseCode(courseBean.getCode());
         	examAuditInfo.setCourseLevel(CourseLevel.getCourseLevel(courseBean.getLevel()).getTitle());
 
-            //考试名称
+            //获取考试名称
             ExamBean examBean = ExamCacheTransferHelper.getCachedExam(query.getExamId(),examAuditInfo.getStudentId());
             examAuditInfo.setExamName(examBean.getName());
 
-            //客观分
-            ExamScoreEntity examScore = examScoreRepo.findByExamRecordDataId(examAuditInfo.getExamRecordDataId());
-            examAuditInfo.setObjectiveScore(String.valueOf(examScore.getObjectiveScore()) );
-
         }
         return new PageImpl<ExamAuditInfo>(list, pageable, totalSize);
     }

+ 3 - 18
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamCaptureServiceImpl.java

@@ -24,9 +24,8 @@ import cn.com.qmth.examcloud.core.oe.admin.service.bean.examcapture.ExamCaptureI
 import cn.com.qmth.examcloud.core.oe.admin.service.others.ExamCacheTransferHelper;
 import cn.com.qmth.examcloud.support.Constants;
 import cn.com.qmth.examcloud.support.cache.CacheHelper;
-import cn.com.qmth.examcloud.support.cache.bean.ExamStudentCacheBean;
-import cn.com.qmth.examcloud.support.cache.bean.OrgCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
+import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -107,21 +106,8 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
         	detail.setFaceVerifyResult(recordData.getFaceVerifyResult().name());
         }
         detail.setVirtualCameraNames(getVirtualCameraNames(examRecordDataId));
-
-		//同步人脸比较时抓拍照片的url
+//同步人脸比较时抓拍照片的url
         detail.setSyncCaptureFileUrl(getSyncCaptureFileUrl(examRecordDataId));
-
-        //组织机构
-        OrgCacheBean org = CacheHelper.getOrg(recordData.getOrgId());
-        detail.setOrgName(org.getName());
-
-        //考生
-        ExamStudentCacheBean examStudent = CacheHelper.getExamStudent(recordData.getExamStudentId());
-        detail.setGrade(examStudent.getGrade());
-
-        //课程层次
-        detail.setCourseLevel(recordData.getCourseLevel());
-
         return detail;
     }
 
@@ -140,8 +126,7 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
      * @param examRecordDataId
      * @return
      */
-    @Override
-    public String getVirtualCameraNames(Long examRecordDataId){
+    private String getVirtualCameraNames(Long examRecordDataId){
     	 Set<String> virtualCameraNames = new HashSet<String>();
          List<ExamCaptureEntity> examCaptureList = examCaptureRepo.findByExamRecordDataId(examRecordDataId);
          if(examCaptureList != null && examCaptureList.size() >0){

+ 10 - 0
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordDataCacheServiceImpl.java

@@ -1,12 +1,22 @@
 package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 
+import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
+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.dao.enums.ExamRecordStatus;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataCacheService;
+import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataService;
+import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentBean;
+import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
 import cn.com.qmth.examcloud.support.examing.ExamRecordData;
 import cn.com.qmth.examcloud.support.redis.RedisKeyHelper;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+
 /**
  * @author chenken
  * @date 2018/8/15 11:16

+ 2 - 2
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordDataServiceImpl.java

@@ -2,7 +2,6 @@ package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 
 import java.util.Date;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -10,6 +9,7 @@ import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
 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.dao.enums.ExamRecordStatus;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamStudentBean;
 import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
@@ -34,7 +34,7 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
                                                             String paperStructId, Boolean fullyObjective) {
         ExamRecordDataEntity examRecordDataEntity = new ExamRecordDataEntity();
         examRecordDataEntity.setExamId(examBean.getId());
-        examRecordDataEntity.setExamType(ExamType.valueOf(examBean.getExamType()));
+        examRecordDataEntity.setExamType(ExamType.strToEnum(examBean.getExamType()));
 
         examRecordDataEntity.setExamStudentId(examStudent.getExamStudentId());
         examRecordDataEntity.setStudentId(examStudent.getStudentId());

+ 14 - 10
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordForMarkingServiceImpl.java

@@ -11,8 +11,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.stream.Collectors;
 
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
-import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.JdbcTemplate;
@@ -59,7 +57,6 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
 
     @Autowired
     private JdbcTemplate jdbcTemplate;
-
     @Override
     public List<ExamRecordForMarkingEntity> queryValidExamRecordInfoByStuIds(
             Long examId, Long courseId, List<Long> examStudentIds, String batchNum) {
@@ -72,7 +69,7 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
             examRecordForMarkingList =
                     examRecordForMarkingRepo.findByExamIdAndCourseIdAndExamStudentIds(examId, courseId, examStudentIds);
         } else {
-            if ((ExamType.ONLINE == examType || ExamType.ONLINE_HOMEWORK == examType) &&
+            if (ExamType.ONLINE == examType &&
                     (MarkingType.OBJECT_SCORE_MAX.name().equals(markingType) ||
                             MarkingType.LAST_SUBMIT.name().equals(markingType))) {
                 examRecordForMarkingList =
@@ -84,7 +81,7 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
         }
         if (examType == ExamType.OFFLINE) {
             return examRecordForMarkingList;
-        } else if (ExamType.ONLINE == examType || ExamType.ONLINE_HOMEWORK == examType) {
+        } else if (ExamType.ONLINE == examType) {
             if (markingType.equals(MarkingType.ALL.name())) {
                 return examRecordForMarkingList;
             } else if (markingType.equals(MarkingType.OBJECT_SCORE_MAX.name())) {
@@ -102,8 +99,12 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
      * @return
      */
     private String getMarkingType(Long examId) {
-        return ExamCacheTransferHelper.
-                getDefaultCachedExamProperty(examId, ExamProperties.MARKING_TYPE.name()).getValue();
+        GetExamPropertyReq getExamPropertyReq = new GetExamPropertyReq();
+        getExamPropertyReq.setExamId(examId);
+        getExamPropertyReq.setKey("MARKING_TYPE");
+        GetExamPropertyResp getExamPropertyResp = examCloudService.getExamProperty(getExamPropertyReq);
+
+        return getExamPropertyResp.getValue();
     }
 
     @Override
@@ -113,7 +114,7 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
         List<ExamRecordForMarkingEntity> examRecordForMarkingList = examRecordForMarkingRepo.findByExamIdAndCourseId(examId, courseId);
         if (examType == ExamType.OFFLINE) {
             return examRecordForMarkingList;
-        } else if (ExamType.ONLINE == examType || ExamType.ONLINE_HOMEWORK == examType) {
+        } else if (ExamType.ONLINE == examType) {
             String markingType = getMarkingType(examId);
 
             if (markingType.equals(MarkingType.ALL.name())) {
@@ -133,7 +134,10 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
      * @return
      */
     private ExamType getExamType(Long examId) {
-        return ExamType.valueOf(ExamCacheTransferHelper.getDefaultCachedExam(examId).getExamType());
+        GetExamReq getExamReq = new GetExamReq();
+        getExamReq.setId(examId);
+        GetExamResp getExamResp = examCloudService.getExam(getExamReq);
+        return ExamType.valueOf(getExamResp.getExamBean().getExamType());
     }
 
     /**
@@ -347,7 +351,7 @@ public class ExamRecordForMarkingServiceImpl implements ExamRecordForMarkingServ
 
         if (examType == ExamType.OFFLINE) {
             return examRecordForMarkingList;
-        } else if (ExamType.ONLINE == examType || ExamType.ONLINE_HOMEWORK == examType) {
+        } else if (ExamType.ONLINE == examType) {
 
             String markingType = getMarkingType(examId);
             if (markingType.equals(MarkingType.ALL.name())) {

+ 4 - 3
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordQuestionsServiceImpl.java

@@ -1,6 +1,5 @@
 package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.core.oe.admin.base.utils.QuestionTypeUtil;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
@@ -10,6 +9,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamQuestionEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordQuestionsEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentFinalScoreService;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.SubjectiveQuestionScoreInfo;
@@ -67,7 +67,7 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
     @Override
     public void saveSubjectiveQuestionScore(Long examRecordDataId, List<SubjectiveQuestionScoreInfo> subjectiveQuestionScoreInfoList) {
         ExamRecordDataEntity examRecordData = GlobalHelper.getEntity(examRecordDataRepo, examRecordDataId, ExamRecordDataEntity.class);
-        if (ExamType.ONLINE == examRecordData.getExamType() || ExamType.ONLINE_HOMEWORK == examRecordData.getExamType()) {
+        if (examRecordData.getExamType() == ExamType.ONLINE) {
             ExamRecordQuestionsEntity examRecordQuestionsEntity =
                     getExamRecordQuestionsAndFixExamRecordDataIfNecessary(examRecordDataId);
             List<ExamQuestionEntity> examRecordQuestionList = examRecordQuestionsEntity.getExamQuestionEntities();
@@ -177,7 +177,8 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
         }
         //如果考试作答记录id为空,则根据考试记录id获取考试作答记录,并将考试作答记录id保存至examRecordData表中
         else {
-            ExamRecordQuestionsEntity examRecordQuestionsEntity = examRecordQuestionsRepo.findByExamRecordDataId(examRecordDataId);
+            ExamRecordQuestionsEntity examRecordQuestionsEntity =
+                    examRecordQuestionsRepo.findByExamRecordDataId(examRecordDataId);
 
             //将考试作答记录id保存至examRecordData表中,目的:纠正历史数据
             examRecordDataRepo.updateExamRecordDataQuestionIdById(examRecordQuestionsEntity.getId(), examRecordData.getId());

+ 1 - 11
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamRecordServiceImpl.java

@@ -241,7 +241,7 @@ public class ExamRecordServiceImpl implements ExamRecordService {
             sql.append(" and record_data.student_name LIKE '%" + query.getStudentName() + "%'");
         }
         if (StringUtils.isNotBlank(query.getIdentityNumber())) {
-            sql.append(" and record_data.identity_number LIKE '" + query.getIdentityNumber() + "%'");
+            sql.append(" and record_data.identity_number LIKE '%" + query.getIdentityNumber() + "%'");
         }
         if (StringUtils.isNotBlank(query.getInfoCollector())) {
             sql.append(" and record_data.info_collector LIKE '%" + query.getInfoCollector() + "%'");
@@ -286,15 +286,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
             sql.append(" and record_data.baidu_face_liveness_success_percent >=" + query.getLivenessSuccessPercentLower());
             sql.append(" and record_data.baidu_face_liveness_success_percent <=" + query.getLivenessSuccessPercentUpper());
         }
-        
-        //是否有虚拟设备
-        if (query.getHasVirtual() != null) {
-            if (query.getHasVirtual()) {
-                sql.append(" and record_data.id in (select t1.id from ec_oe_exam_record_data t1 left join ec_oe_exam_capture t2 on t1.id=t2.exam_record_data_id where t1.exam_id =" + query.getExamId()+" and t2.has_virtual_camera=1 )");
-            } else {
-                sql.append(" and record_data.id in (select t1.id from ec_oe_exam_record_data t1 left join ec_oe_exam_capture t2 on t1.id=t2.exam_record_data_id where t1.exam_id =" + query.getExamId()+" and (t2.has_virtual_camera=0 or t2.has_virtual_camera is null) )");
-            }
-        }
         return sql;
     }
 
@@ -333,7 +324,6 @@ public class ExamRecordServiceImpl implements ExamRecordService {
         //查询总数
         long total = countExamRecordListForPage(query);
         Pageable pageable = new PageRequest(query.getPageNo() - 1, query.getPageSize());
-
         Page<ExamRecordDataEntity> page = new PageImpl<ExamRecordDataEntity>(examRecordDataList, pageable, total);
         return examRecordEntityConvert.of(page);
     }

+ 1 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScoreObtainQueueServiceImpl.java

@@ -7,12 +7,12 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamScoreObtainQueueRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreObtainQueueEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 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.core.oe.admin.service.others.ExamCacheTransferHelper;
 import cn.com.qmth.examcloud.support.cache.CacheHelper;
 import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;

+ 1 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScorePushQueueServiceImpl.java

@@ -3,7 +3,6 @@ package cn.com.qmth.examcloud.core.oe.admin.service.impl;
 import java.util.Date;
 
 import cn.com.qmth.examcloud.core.oe.admin.dao.ExamRecordDataRepo;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +14,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.OrgScoreHandleRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScorePushQueue;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.OrgScoreHandleEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamScoreQueueStatus;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamScorePushQueueService;
 import cn.com.qmth.examcloud.core.oe.admin.service.others.ExamCacheTransferHelper;

+ 5 - 5
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamScoreServiceImpl.java

@@ -14,7 +14,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
@@ -37,6 +36,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentFinalScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.CourseLevel;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamScoreService;
@@ -180,7 +180,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
             sql.append(" and student_name LIKE '%" + query.getStudentName() + "%'");
         }
         if (StringUtils.isNotBlank(query.getIdentityNumber())) {
-            sql.append(" and identity_number LIKE '" + query.getIdentityNumber() + "%'");
+            sql.append(" and identity_number LIKE '%" + query.getIdentityNumber() + "%'");
         }
         if (query.getCourseId() != null) {
             sql.append(" and course_id=" + query.getCourseId());
@@ -393,7 +393,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
         examStudentEntity.setGrade(rs.getString("grade"));
         return examStudentEntity;
     }
-
+    
     @Override
     public void createExamScoreWithOffline(Long examRecordDataId) {
         ExamScoreEntity examScoreEntity = new ExamScoreEntity();
@@ -448,7 +448,7 @@ public class ExamScoreServiceImpl implements ExamScoreService {
         }
         return objectiveScoreInfoList;
     }
-
+    
     private boolean isExamRecordEnded(ExamRecordDataEntity examRecordData) {
         //如果考试记录状态为已处理,则直接返回true.
         if (examRecordData.getExamRecordStatus() == ExamRecordStatus.EXAM_END ||
@@ -458,4 +458,4 @@ public class ExamScoreServiceImpl implements ExamScoreService {
         }
         return false;
     }
-}
+}

+ 2 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStudentFinalScoreServiceImpl.java

@@ -11,12 +11,13 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamScoreEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentFinalScoreEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.MarkingType;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentFinalScoreService;
 import cn.com.qmth.examcloud.core.oe.admin.service.others.ExamCacheTransferHelper;
 
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
+import com.mysql.cj.log.LogFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 77 - 253
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/ExamStudentServiceImpl.java

@@ -13,7 +13,6 @@ import static cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.ExamS
 import java.math.BigDecimal;
 import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -26,7 +25,6 @@ import java.util.stream.Stream;
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
 
-import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.commons.util.DateUtil;
 import cn.com.qmth.examcloud.commons.util.RegExpUtil;
 import cn.com.qmth.examcloud.core.oe.admin.service.bean.examstudent.*;
@@ -35,7 +33,6 @@ import cn.com.qmth.examcloud.examwork.api.ExamStudentCloudService;
 import cn.com.qmth.examcloud.examwork.api.request.GetExamStudentReq;
 import cn.com.qmth.examcloud.examwork.api.response.GetExamStudentResp;
 import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import cn.com.qmth.examcloud.support.filestorage.FileStorageUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.query.NativeQuery;
@@ -46,7 +43,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.Pageable;
-import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.RowMapper;
 import org.springframework.stereotype.Service;
@@ -65,7 +61,9 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordForMarkingEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.CourseLevel;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamType;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.FinishStatus;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamStudentService;
@@ -222,14 +220,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
 
 
         StringBuffer sql = new StringBuffer();
-        sql.append("select id,exam_student_id,exam_id,course_id,course_code,course_level");
-        if ((ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType()))&&query.getFinished() == null) {
-            sql.append(",case when finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+query.getExamId()+"  ) then 1 else 0 end finished");
-        }else {
-            sql.append(",finished");
-        }
-
-        sql.append(",student_id,student_code,student_name,identity_number"
+        sql.append("select id,exam_student_id,exam_id,course_id,course_code,course_level,finished,student_id,student_code,student_name,identity_number"
                 + ",info_collector,root_org_id,org_id,paper_type,used_num,extra_num"
                 + ",specialty_code,specialty_name,grade from ec_oe_exam_student t1 where 1=1 ");
         sql.append(selectExamStudentConfitionSql(query, examBean.getExamType()));
@@ -249,19 +240,6 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         for (ExamStudentEntity examStudentEntity : examStudentList) {
             ExamStudentInfo examStudentInfo = buildExamStudentInfo(examStudentEntity, cahcheMap, examBean.getExamType());
             examStudentInfoList.add(examStudentInfo);
-            if (ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType())) {
-                if (query.getFinished() != null) {
-                    if(query.getFinished().intValue()==1) {
-                        examStudentInfo.setFinished(true);
-                        examStudentInfo.setFinishedStatus(FinishStatus.已完成.name());
-                    }
-                    if(query.getFinished().intValue()==0) {
-                        examStudentInfo.setFinished(false);
-                        examStudentInfo.setFinishedStatus(FinishStatus.未完成.name());
-                    }
-                }
-                countUseExamTimes(examStudentInfo, examBean.getExamType());
-            }
         }
         cahcheMap.clear();
         Pageable pageable = SpecUtils.buildPageable(query.getPageNo(), query.getPageSize());
@@ -284,14 +262,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
 
         //查询条件
         StringBuffer sql = new StringBuffer();
-        sql.append("select id,exam_student_id,exam_id,course_id,course_code,course_level");
-        if ((ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType()))&&query.getFinished() == null) {
-            sql.append(",case when finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+query.getExamId()+"  ) then 1 else 0 end finished");
-        }else {
-            sql.append(",finished");
-        }
-
-        sql.append(",student_id,student_code,student_name,identity_number"
+        sql.append("select id,exam_student_id,exam_id,course_id,course_code,course_level,finished,student_id,student_code,student_name,identity_number"
                 + ",info_collector,root_org_id,org_id,paper_type,used_num,extra_num"
                 + ",specialty_code,specialty_name,grade from ec_oe_exam_student t1 where 1=1 ");
         sql.append(selectExamStudentConfitionSql(query, examBean.getExamType()));
@@ -309,19 +280,6 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         for (ExamStudentEntity examStudentEntity : examStudentList) {
             ExamStudentInfo examStudentInfo = buildExamStudentInfo(examStudentEntity, cahcheMap, examBean.getExamType());
             examStudentInfoList.add(examStudentInfo);
-            if (ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType())) {
-                if (query.getFinished() != null) {
-                    if(query.getFinished().intValue()==1) {
-                        examStudentInfo.setFinished(true);
-                        examStudentInfo.setFinishedStatus(FinishStatus.已完成.name());
-                    }
-                    if(query.getFinished().intValue()==0) {
-                        examStudentInfo.setFinished(false);
-                        examStudentInfo.setFinishedStatus(FinishStatus.未完成.name());
-                    }
-                }
-                countUseExamTimes(examStudentInfo, examBean.getExamType());
-            }
         }
         cahcheMap.clear();
         return examStudentInfoList;
@@ -342,7 +300,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             sql.append(" and student_name LIKE '%" + query.getStudentName() + "%'");
         }
         if (StringUtils.isNotBlank(query.getIdentityNumber())) {
-            sql.append(" and identity_number LIKE '" + query.getIdentityNumber() + "%'");
+            sql.append(" and identity_number LIKE '%" + query.getIdentityNumber() + "%'");
         }
         if (StringUtils.isNotBlank(query.getInfoCollector())) {
             sql.append(" and info_collector LIKE '%" + query.getInfoCollector() + "%'");
@@ -354,14 +312,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             sql.append(" and course_level= '" + query.getCourseLevel() + "'");
         }
         if (query.getFinished() != null) {
-            if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
-//                sql.append(" and finished = " + query.getFinished());
-                if(query.getFinished().intValue()==1) {
-                    sql.append(" AND ( finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+query.getExamId()+"  )  )");
-                }
-                if(query.getFinished().intValue()==0) {
-                    sql.append(" AND ( finished = 0 and t1.exam_student_id not in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+query.getExamId()+"  )  )");
-                }
+            if (ExamType.ONLINE.name().equals(examType)) {
+                sql.append(" and finished = " + query.getFinished());
             } else if (ExamType.OFFLINE.name().equals(examType)) {
                 //如果忽略是否上传答案时,只要是已抽题则认为已参加考试
                 if (query.getIgnoreUploadOfflineAnswer() != null && true == query.getIgnoreUploadOfflineAnswer()) {
@@ -396,7 +348,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         String photoNumber = localCacheService.getStudentPhotoNumber(cahcheMap, examStudentInfo.getStudentId());
         examStudentInfo.setPhone(photoNumber);//电话号码
 
-        if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
+        if (ExamType.ONLINE.name().equals(examType)) {
             //完成状态
             examStudentInfo.setFinishedStatus(examStudentEntity.getFinished() ? FinishStatus.已完成.name() : FinishStatus.未完成.name());
         } else if (ExamType.OFFLINE.name().equals(examType)) {
@@ -497,7 +449,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             sql.append(" and t.student_name LIKE '%" + query.getStudentName() + "%'");
         }
         if (StringUtils.isNotBlank(query.getIdentityNumber())) {
-            sql.append(" and t.identity_number LIKE '" + query.getIdentityNumber() + "%'");
+            sql.append(" and t.identity_number LIKE '%" + query.getIdentityNumber() + "%'");
         }
         if (query.getCourseId() != null && StringUtils.isNotBlank(query.getCourseId() + "")) {
             sql.append(" and t.course_id=" + query.getCourseId());
@@ -571,7 +523,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             sql.append(" and student.student_name LIKE '%" + query.getStudentName() + "%'");
         }
         if (StringUtils.isNotBlank(query.getIdentityNumber())) {
-            sql.append(" and student.identity_number LIKE '" + query.getIdentityNumber() + "%'");
+            sql.append(" and student.identity_number LIKE '%" + query.getIdentityNumber() + "%'");
         }
         if (query.getCourseId() != null && StringUtils.isNotBlank(query.getCourseId() + "")) {
             sql.append(" and student.course_id=" + query.getCourseId());
@@ -584,107 +536,51 @@ public class ExamStudentServiceImpl implements ExamStudentService {
 
     @Override
     public ExamStudentFinishedStatistic getExamStudentStatisticByFinished(Long examId) {
-        ExamBean examBean = ExamCacheTransferHelper.getDefaultCachedExam(examId);
-        if (ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType())) {
-            ExamStudentFinishedStatistic statistic = new ExamStudentFinishedStatistic();
-            StringBuffer totalsql = new StringBuffer();
-            totalsql.append("select count(t1.id) from ec_oe_exam_student t1 where 1=1 ");
-            totalsql.append(" and exam_id = " + examId);
-            Integer total=jdbcTemplate.queryForObject(totalsql.toString(), Integer.class);
-
-            StringBuffer finishsql = new StringBuffer();
-            finishsql.append("select count(t1.id) from ec_oe_exam_student t1 where 1=1 ");
-            finishsql.append(" and exam_id = " + examId);
-            finishsql.append(" AND ( finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+examId+"  )  )");
-            Integer finish=jdbcTemplate.queryForObject(finishsql.toString(), Integer.class);
-            statistic.setFinished(finish);
-            statistic.setUnFinished(total-finish);
-            return statistic;
-        }else {
-            SqlWrapper wrapper = new SqlWrapper()
-                    .select(statisticFinishedColumns())
-                    .from("ec_oe_exam_student").as("student")
-                    .where().eq("student.exam_id", examId);
-            Query dataQuery = entityManager.createNativeQuery(wrapper.build());
-            dataQuery.unwrap(NativeQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
-            Map<String, BigDecimal> map = (HashMap) dataQuery.getSingleResult();
-            ExamStudentFinishedStatistic statistic = new ExamStudentFinishedStatistic();
-            if (map != null) {
-                if (map.get("finished") == null) {
-                    statistic.setFinished(0);
-                } else {
-                    statistic.setFinished(map.get("finished").intValue());
-                }
-                if (map.get("unFinished") == null) {
-                    statistic.setUnFinished(0);
-                } else {
-                    statistic.setUnFinished(map.get("unFinished").intValue());
-                }
+        SqlWrapper wrapper = new SqlWrapper()
+                .select(statisticFinishedColumns())
+                .from("ec_oe_exam_student").as("student")
+                .where().eq("student.exam_id", examId);
+        Query dataQuery = entityManager.createNativeQuery(wrapper.build());
+//        dataQuery.unwrap(SQLQuery.class).setResultTransformer(Transformers.aliasToBean(HashMap.class));
+        dataQuery.unwrap(NativeQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+        Map<String, BigDecimal> map = (HashMap) dataQuery.getSingleResult();
+        ExamStudentFinishedStatistic statistic = new ExamStudentFinishedStatistic();
+        if (map != null) {
+            if (map.get("finished") == null) {
+                statistic.setFinished(0);
+            } else {
+                statistic.setFinished(map.get("finished").intValue());
+            }
+            if (map.get("unFinished") == null) {
+                statistic.setUnFinished(0);
+            } else {
+                statistic.setUnFinished(map.get("unFinished").intValue());
             }
-            return statistic;
         }
+        return statistic;
     }
 
     @Override
     public List<ExamStudentOrgStatistic> getExamStudentStatisticByOrg(Long examId, Long orgId) {
-        ExamBean examBean = ExamCacheTransferHelper.getDefaultCachedExam(examId);
-        if (ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType())) {
-            StringBuffer totalsql = new StringBuffer();
-            totalsql.append("select t1.org_id orgId,count(t1.id) totalCount from ec_oe_exam_student t1 where 1=1 ");
-            totalsql.append(" and exam_id = " + examId);
-            if (orgId != null) {
-                totalsql.append(" and org_id = " + orgId);
-            }
-            totalsql.append(" group by t1.org_id ");
-            List<ExamStudentOrgStatistic> totalList=jdbcTemplate.query(totalsql.toString(), new BeanPropertyRowMapper<ExamStudentOrgStatistic>(ExamStudentOrgStatistic.class));
-
-            StringBuffer finishsql = new StringBuffer();
-            finishsql.append("select t1.org_id orgId,count(t1.id) finishedCount from ec_oe_exam_student t1 where 1=1 ");
-            finishsql.append(" and exam_id = " + examId);
-            if (orgId != null) {
-                finishsql.append(" and org_id = " + orgId);
-            }
-            finishsql.append(" AND ( finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+examId+"  ) )");
-            finishsql.append(" group by t1.org_id ");
-
-            List<ExamStudentOrgStatistic> finishList=jdbcTemplate.query(finishsql.toString(), new BeanPropertyRowMapper<ExamStudentOrgStatistic>(ExamStudentOrgStatistic.class));
-
-            Map<Long,ExamStudentOrgStatistic> finishMap=finishList.stream().collect(Collectors.toMap(ExamStudentOrgStatistic::getOrgId, account -> account));
-
-            for(ExamStudentOrgStatistic statistic:totalList) {
-                ExamStudentOrgStatistic finish=finishMap.get(statistic.getOrgId());
-                statistic.setFinishedCount(finish==null?0:finish.getFinishedCount());
-                OrgCacheBean orgBean = gainBaseDataService.getOrgBean(statistic.getOrgId());
-                statistic.setOrgCode(orgBean.getCode());
-                statistic.setOrgName(orgBean.getName());
-                if (statistic.getTotalCount() == 0 || statistic.getFinishedCount() == 0) {
-                    statistic.setFinishedPercent("0");
-                } else {
-                    double percent = (double) statistic.getFinishedCount() / statistic.getTotalCount();
-                    statistic.setFinishedPercent(new DecimalFormat("#.00").format(percent * 100));
-                }
-            }
-            return totalList;
-        }else {
-            SqlWrapper wrapper = new SqlWrapper()
-                    .select(statisticOrgColumns())
-                    .from("ec_oe_exam_student").as("student")
-                    .where().eq("student.exam_id", examId);
-            if (orgId != null) {
-                wrapper.and().eq("student.org_id", orgId);
-            }
-            wrapper.groupBy("student.org_id").orderBy("student.org_id", false);
-            Query dataQuery = entityManager.createNativeQuery(wrapper.build());
-            dataQuery.unwrap(NativeQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
-            List<ExamStudentOrgStatistic> examStudentOrgStatisticList = ExamStudentEntityConvert.ofList(dataQuery.getResultList());
-            Map<String, Object> cahcheMap = new HashMap<String, Object>();
-            for (ExamStudentOrgStatistic statistic : examStudentOrgStatisticList) {
-                OrgCacheBean orgBean = gainBaseDataService.getOrgBean(statistic.getOrgId());
-                statistic.setOrgCode(orgBean.getCode());
-                statistic.setOrgName(orgBean.getName());
-            }
-            return examStudentOrgStatisticList;
+        SqlWrapper wrapper = new SqlWrapper()
+                .select(statisticOrgColumns())
+                .from("ec_oe_exam_student").as("student")
+                .where().eq("student.exam_id", examId);
+        if (orgId != null) {
+            wrapper.and().eq("student.org_id", orgId);
+        }
+        wrapper.groupBy("student.org_id").orderBy("student.org_id", false);
+        Query dataQuery = entityManager.createNativeQuery(wrapper.build());
+//        dataQuery.unwrap(SQLQuery.class).setResultTransformer(Transformers.aliasToBean(HashMap.class));
+        dataQuery.unwrap(NativeQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
+        List<ExamStudentOrgStatistic> examStudentOrgStatisticList = ExamStudentEntityConvert.ofList(dataQuery.getResultList());
+        Map<String, Object> cahcheMap = new HashMap<String, Object>();
+        for (ExamStudentOrgStatistic statistic : examStudentOrgStatisticList) {
+            OrgCacheBean orgBean = gainBaseDataService.getOrgBean(statistic.getOrgId());
+            statistic.setOrgCode(orgBean.getCode());
+            statistic.setOrgName(orgBean.getName());
         }
+        return examStudentOrgStatisticList;
     }
 
     @Override
@@ -743,73 +639,34 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         if (examId == null) {
             return null;
         }
-        ExamBean examBean = ExamCacheTransferHelper.getDefaultCachedExam(examId);
-        if (ExamType.ONLINE.name().equals(examBean.getExamType()) || ExamType.ONLINE_HOMEWORK.name().equals(examBean.getExamType())) {
-            StringBuffer totalsql = new StringBuffer();
-            totalsql.append("select t1.course_id courseId,count(t1.id) allNum from ec_oe_exam_student t1 where 1=1 ");
-            totalsql.append(" and exam_id = " + examId);
-            if (courseId != null) {
-                totalsql.append(" and course_id = " + courseId);
-            }
-            totalsql.append(" group by t1.course_id ");
-            List<CourseProgressInfo> totalList=jdbcTemplate.query(totalsql.toString(), new BeanPropertyRowMapper<CourseProgressInfo>(CourseProgressInfo.class));
-
-            StringBuffer finishsql = new StringBuffer();
-            finishsql.append("select t1.course_id courseId,count(t1.id) completedNum from ec_oe_exam_student t1 where 1=1 ");
-            finishsql.append(" and exam_id = " + examId);
-            if (courseId != null) {
-                finishsql.append(" and course_id = " + courseId);
-            }
-            finishsql.append(" AND ( finished = 1 OR t1.exam_student_id in ( SELECT t2.exam_student_id FROM ec_oes_exam_record_data t2 WHERE t2.exam_id="+examId+"  ))");
-            finishsql.append(" group by t1.course_id ");
-
-            List<CourseProgressInfo> finishList=jdbcTemplate.query(finishsql.toString(), new BeanPropertyRowMapper<CourseProgressInfo>(CourseProgressInfo.class));
-
-            Map<Long,CourseProgressInfo> finishMap=finishList.stream().collect(Collectors.toMap(CourseProgressInfo::getCourseId, account -> account));
+        if (StringUtils.isBlank(orderColumn)) {
+            orderColumn = "all_num";
+        }
+        String sql = "select *,ROUND(tb.completed_num/tb.all_num,2)*100 completed_proportion from ( " +
+                " select " +
+                " course_id, " +
+                " sum(case when finished = 1 then 1 else 0 end) completed_num, " +
+                " sum(case when finished = 0 then 1 else 0 end) no_completed_num, " +
+                " count(course_id) all_num" +
+                " from ec_oe_exam_student " +
+                " where exam_id = " + examId;
+        if (courseId != null) {
+            sql += " and course_id = " + courseId;
+        }
+        sql += " group by course_id ) tb ORDER BY " + orderColumn + " desc";
 
-            for(CourseProgressInfo statistic:totalList) {
-                CourseProgressInfo finish=finishMap.get(statistic.getCourseId());
-                statistic.setCompletedNum(finish==null?0:finish.getCompletedNum());
-                if (statistic.getAllNum() == 0 || statistic.getCompletedNum() == 0) {
-                    statistic.setCompletedProportion(0.0D);
-                    statistic.setNoCompletedNum(0);
-                } else {
-                    statistic.setNoCompletedNum(statistic.getAllNum()-statistic.getCompletedNum());
-                    double percent = (double) statistic.getCompletedNum() / statistic.getAllNum();
-                    statistic.setCompletedProportion(Double.valueOf(new DecimalFormat("#.00").format(percent * 100)));
-                }
-            }
-            return totalList;
-        }else {
-            if (StringUtils.isBlank(orderColumn)) {
-                orderColumn = "all_num";
-            }
-            String sql = "select *,ROUND(tb.completed_num/tb.all_num,2)*100 completed_proportion from ( " +
-                    " select " +
-                    " course_id, " +
-                    " sum(case when finished = 1 then 1 else 0 end) completed_num, " +
-                    " sum(case when finished = 0 then 1 else 0 end) no_completed_num, " +
-                    " count(course_id) all_num" +
-                    " from ec_oe_exam_student " +
-                    " where exam_id = " + examId;
-            if (courseId != null) {
-                sql += " and course_id = " + courseId;
+        return jdbcTemplate.query(sql, new RowMapper<CourseProgressInfo>() {
+            @Override
+            public CourseProgressInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
+                CourseProgressInfo courseProgressInfo = new CourseProgressInfo();
+                courseProgressInfo.setCourseId(rs.getLong("course_id"));
+                courseProgressInfo.setCompletedNum(rs.getInt("completed_num"));
+                courseProgressInfo.setNoCompletedNum(rs.getInt("no_completed_num"));
+                courseProgressInfo.setAllNum(rs.getInt("all_num"));
+                courseProgressInfo.setCompletedProportion(rs.getDouble("completed_proportion"));
+                return courseProgressInfo;
             }
-            sql += " group by course_id ) tb ORDER BY " + orderColumn + " desc";
-
-            return jdbcTemplate.query(sql, new RowMapper<CourseProgressInfo>() {
-                @Override
-                public CourseProgressInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
-                    CourseProgressInfo courseProgressInfo = new CourseProgressInfo();
-                    courseProgressInfo.setCourseId(rs.getLong("course_id"));
-                    courseProgressInfo.setCompletedNum(rs.getInt("completed_num"));
-                    courseProgressInfo.setNoCompletedNum(rs.getInt("no_completed_num"));
-                    courseProgressInfo.setAllNum(rs.getInt("all_num"));
-                    courseProgressInfo.setCompletedProportion(rs.getDouble("completed_proportion"));
-                    return courseProgressInfo;
-                }
-            });
-        }
+        });
     }
 
     @Override
@@ -849,12 +706,12 @@ public class ExamStudentServiceImpl implements ExamStudentService {
      * @param studentId 学生id
      */
     @Override
-    public List<OnHandExamInfo> queryOnlineExamList(Long studentId,ExamType examType) {
+    public List<OnHandExamInfo> queryOnlineExamList(Long studentId) {
         StudentCacheBean studentBean = CacheHelper.getStudent(studentId);
 
         //获取可以考的和即将考的考试Id
         GetOngoingExamListReq getOngoingExamListReq = new GetOngoingExamListReq();
-        getOngoingExamListReq.setExamType(examType.name());
+        getOngoingExamListReq.setExamType(ExamType.ONLINE.name());
         getOngoingExamListReq.setRootOrgId(studentBean.getRootOrgId());
         getOngoingExamListReq.setOrgId(studentBean.getOrgId());
         getOngoingExamListReq.setStudentId(studentId);
@@ -941,7 +798,6 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         examStudentInfo.setFaceEnable(FaceBiopsyHelper.isFaceEnable(rootOrgId, examId, studentId));
         //进入考试是否验证人脸识别(强制、非强制)
         examStudentInfo.setFaceCheck(FaceBiopsyHelper.isFaceCheck(examId, studentId));
-
         //是否显示客观分
         String isObjScoreView = ExamCacheTransferHelper.getCachedExamProperty(examId,
                 studentId, ExamProperties.IS_OBJ_SCORE_VIEW.name()).getValue();
@@ -950,16 +806,6 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         } else {
             examStudentInfo.setIsObjScoreView(Boolean.valueOf(isObjScoreView));
         }
-
-        //是否开放app考试
-        String appExamEnabled = ExamCacheTransferHelper.getCachedExamProperty(examId,
-                studentId, ExamProperties.APP_EXAM_ENABLED.name()).getValue();
-        if (StringUtils.isBlank(isObjScoreView)) {
-            examStudentInfo.setAppExamEnabled(false);
-        } else {
-            examStudentInfo.setAppExamEnabled(Boolean.valueOf(appExamEnabled));
-        }
-
         return examStudentInfo;
     }
 
@@ -989,28 +835,6 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         }
         return ret;
     }
-    private void countUseExamTimes(ExamStudentInfo examStudentInfo, String examType) {
-        if (!ExamType.ONLINE.name().equals(examType) && !ExamType.ONLINE_HOMEWORK.name().equals(examType)) {
-            return;
-        }
-        //考生已考次数
-        int usedNum = (examStudentInfo.getUsedNum() == null ? 0 : examStudentInfo.getUsedNum());
-        //缓存中开考次数
-        int startCount = 0;
-        //缓存中考试完结次数
-        int endCount = 0;
-        String key = RedisKeyHelper.getBuilder().examBossKey(examStudentInfo.getExamStudentId());
-        ExamBoss eb = redisClient.get(key, ExamBoss.class);
-        if (eb != null) {
-            startCount = eb.getStartCount();
-            endCount = eb.getEndCount();
-        }
-        Integer ret = usedNum + startCount - endCount;
-        if (ret < 0) {
-            ret = 0;
-        }
-        examStudentInfo.setUsedNum(ret);
-    }
 
     //获取考试的考生信息
     private ExamStudentBean getRemoteExamStudent(Long rootOrgId, Long examStudentId) {
@@ -1020,4 +844,4 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         GetExamStudentResp resp = examStudentCloudService.getExamStudent(req);
         return resp.getExamStudentBean();
     }
-}
+}

+ 0 - 235
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/IllegallyTypeServiceImpl.java

@@ -1,235 +0,0 @@
-package cn.com.qmth.examcloud.core.oe.admin.service.impl;
-
-import cn.com.qmth.examcloud.commons.exception.StatusException;
-import cn.com.qmth.examcloud.commons.helpers.poi.ExcelReader;
-import cn.com.qmth.examcloud.commons.util.PathUtil;
-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.IllegallyTypeService;
-import cn.com.qmth.examcloud.core.oe.admin.service.bean.IllegallyTypeInfo;
-import cn.com.qmth.examcloud.support.enums.DataCategory;
-import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class IllegallyTypeServiceImpl implements IllegallyTypeService {
-
-    @Autowired
-    IllegallyTypeRepo illegallyTypeRepo;
-
-    private static final String[] EXCEL_HEADER = new String[]{"违纪类型名称", "违纪类型代码"};
-
-    @Override
-    public IllegallyTypeEntity saveIllegallyType(IllegallyTypeInfo info) {
-        Long id = info.getId();
-        String code = info.getCode();
-        Boolean enable = info.getEnable();
-        Long rootOrgId = info.getRootOrgId();
-        String name = info.getName();
-        Integer sortNo = info.getSortNo();
-        String dataCategory = info.getDataCategory();
-
-        if (null == rootOrgId) {
-            throw new StatusException("620001", "rootOrgId is null");
-        }
-        IllegallyTypeEntity entity = null;
-
-        if (null != id) {
-            entity = GlobalHelper.getEntity(illegallyTypeRepo, id, IllegallyTypeEntity.class);
-            if (null == entity) {
-                throw new StatusException("620001", "id is wrong");
-            }
-            if (!entity.getRootOrgId().equals(rootOrgId)) {
-                throw new StatusException("620001", "rootOrgId or id is worng");
-            }
-
-        } else if (StringUtils.isNotBlank(code)) {
-            entity = illegallyTypeRepo.findByRootOrgIdAndCode(rootOrgId, code);
-            if (null == entity) {
-                if (StringUtils.isBlank(name)) {
-                    throw new StatusException("620001", "name is blank");
-                }
-                entity = new IllegallyTypeEntity();
-
-                entity.setCode(code);
-                entity.setName(name);
-                entity.setRootOrgId(rootOrgId);
-                entity.setEnable(true);
-            }
-        } else {
-            throw new StatusException("620001", "id and code can not be all null");
-        }
-
-        if (null != enable) {
-            entity.setEnable(enable);
-        }
-        if (StringUtils.isNotBlank(name)) {
-            entity.setName(name);
-        }
-
-        if (null != sortNo) {
-            entity.setSortNo(sortNo);
-        }
-
-        if (StringUtils.isNotEmpty(dataCategory)) {
-            entity.setDataCategory(DataCategory.valueOf(dataCategory));
-        }
-
-        IllegallyTypeEntity saved = illegallyTypeRepo.save(entity);
-
-        return saved;
-    }
-
-    @Override
-    public List<Map<String, Object>> importIllegallyType(Long rootOrgId, File file) {
-        List<String[]> lineList = null;
-        try {
-            lineList = ExcelReader.readSheetBySax(PathUtil.getCanonicalPath(file), 1, 2);
-        } catch (Exception e) {
-            throw new StatusException("100110", "Excel 解析失败");
-        }
-
-        if (CollectionUtils.isEmpty(lineList)) {
-            throw new StatusException("100111", "Excel无内容");
-        }
-
-        if (10001 < lineList.size()) {
-            throw new StatusException("100112", "数据行数不能超过10000");
-        }
-
-        List<Map<String, Object>> failRecords = Collections
-                .synchronizedList(new ArrayList<Map<String, Object>>());
-
-        List<IllegallyTypeEntity> illegallyTypeList = Lists.newArrayList();
-
-        for (int i = 0; i < lineList.size(); i++) {
-            String[] line = lineList.get(i);
-            if (0 == i) {
-                if (headerError(line)) {
-                    throw new StatusException("100111", "Excel表头错误");
-                }
-                continue;
-            }
-
-            boolean hasError = false;
-            StringBuilder msg = new StringBuilder();
-
-            IllegallyTypeEntity illegallyType = new IllegallyTypeEntity();
-            illegallyType.setRootOrgId(rootOrgId);
-            illegallyType.setEnable(true);
-
-            String name = trimAndNullIfBlank(line[0]);
-            if (StringUtils.isBlank(name)) {
-                msg.append("  违纪类型名称不能为空");
-                hasError = true;
-            } else if (name.length() > 30) {
-                msg.append("  违纪类型名称不能超过30个字符");
-                hasError = true;
-            }
-            illegallyType.setName(name);
-
-            String code = trimAndNullIfBlank(line[1]);
-            if (StringUtils.isBlank(code)) {
-                msg.append("  违纪类型代码不能为空");
-                hasError = true;
-            } else if (code.length() > 30) {
-                msg.append("  违纪类型代码不能超过30个字符");
-                hasError = true;
-            }
-
-            illegallyType.setCode(code);
-
-            //校验当前编码是否为系统编码
-            IllegallyTypeEntity existSysData = illegallyTypeRepo.findByRootOrgIdAndCodeAndDataCategory(
-                    rootOrgId, code, DataCategory.SYSTEM.name());
-            if (null != existSysData) {
-                msg.append("  违纪类型编码不允许存在数据类型为系统的数据");
-                hasError = true;
-            }
-
-
-            //排序号
-            String sortNo = trimAndNullIfBlank(line[2]);
-            if (StringUtils.isBlank(code)) {
-                msg.append("  排序号不能为空");
-                hasError = true;
-            } else if (StringUtils.isNumeric(sortNo)) {
-                msg.append("  排序号必须为正整数的数字");
-                hasError = true;
-            }
-
-            illegallyType.setSortNo(Integer.valueOf(sortNo));
-
-            if (hasError) {
-                failRecords.add(newError(i + 1, msg.toString()));
-            } else {
-                illegallyTypeList.add(illegallyType);
-            }
-
-
-        }
-
-        if (CollectionUtils.isNotEmpty(failRecords)) {
-            return failRecords;
-        }
-
-        for (IllegallyTypeEntity cur : illegallyTypeList) {
-            IllegallyTypeEntity existData = illegallyTypeRepo.findByRootOrgIdAndCode(cur.getRootOrgId(),
-                    cur.getCode());
-
-            if (null != existData) {
-                existData.setName(cur.getName());
-                existData.setSortNo(cur.getSortNo());
-                illegallyTypeRepo.save(existData);
-            } else {
-                illegallyTypeRepo.save(cur);
-            }
-        }
-
-        return failRecords;
-    }
-
-    private Map<String, Object> newError(int lineNum, String msg) {
-        Map<String, Object> map = Maps.newHashMap();
-        map.put("lineNum", lineNum);
-        map.put("msg", msg);
-        return map;
-    }
-
-    private String trimAndNullIfBlank(String s) {
-        if (StringUtils.isBlank(s)) {
-            return null;
-        }
-        return s.trim();
-    }
-
-    /**
-     * 方法注释
-     *
-     * @param header
-     * @author WANGWEI
-     */
-    private boolean headerError(String[] header) {
-        for (int i = 0; i < EXCEL_HEADER.length; i++) {
-            if (null == header[i]) {
-                return true;
-            }
-            if (!EXCEL_HEADER[i].equals(header[i].trim())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-}

+ 1 - 1
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/impl/OfflineExamServiceImpl.java

@@ -7,7 +7,6 @@ import java.util.List;
 
 import javax.transaction.Transactional;
 
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -22,6 +21,7 @@ import cn.com.qmth.examcloud.core.oe.admin.dao.ExamStudentRepo;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordDataEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamRecordForMarkingEntity;
 import cn.com.qmth.examcloud.core.oe.admin.dao.entity.ExamStudentEntity;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamRecordStatus;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordDataService;
 import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordForMarkingService;

+ 2 - 2
examcloud-core-oe-admin-service/src/main/java/cn/com/qmth/examcloud/core/oe/admin/service/others/ExamCacheTransferHelper.java

@@ -10,13 +10,13 @@ package cn.com.qmth.examcloud.core.oe.admin.service.others;
 import cn.com.qmth.examcloud.api.commons.enums.ExamSpecialSettingsType;
 import cn.com.qmth.examcloud.commons.util.StringUtil;
 import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
+import cn.com.qmth.examcloud.core.oe.admin.dao.enums.ExamProperties;
 import cn.com.qmth.examcloud.examwork.api.bean.ExamBean;
 import cn.com.qmth.examcloud.support.cache.CacheHelper;
 import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.ExamPropertyCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.OrgPropertyCacheBean;
-import cn.com.qmth.examcloud.support.enums.ExamProperties;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -251,4 +251,4 @@ public class ExamCacheTransferHelper {
 
         return resultBean;
     }
-}
+}

BIN
examcloud-core-oe-admin-starter/src/main/resources/templates/illegallyTypeImportTemplate.xlsx