xiatian 7 月之前
父节点
当前提交
953578e10f

+ 63 - 43
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamStudentController.java

@@ -116,8 +116,7 @@ public class ExamStudentController extends ControllerSupport {
         if (!accessUser.getUserType().equals(UserType.STUDENT)) {
             throw new StatusException("005002", "用户类型错误");
         }
-        List<String> querySpecialtyNameList = examStudentRepo
-                .querySpecialtyNameList(accessUser.getUserId());
+        List<String> querySpecialtyNameList = examStudentRepo.querySpecialtyNameList(accessUser.getUserId());
         querySpecialtyNameList.removeAll(Collections.singleton(null));
         return querySpecialtyNameList;
     }
@@ -162,28 +161,19 @@ public class ExamStudentController extends ControllerSupport {
      * @return
      * @author WANGWEI
      */
-    @DataRule(type = {DataRuleType.ORG, DataRuleType.COURSE})
+    @DataRule(type = { DataRuleType.ORG, DataRuleType.COURSE })
     @ApiOperation(value = "查询考试学生带条件和分页", notes = "带条件带分页")
     @GetMapping("examStudentPage/{curPage}/{pageSize}")
-    public PageInfo<ExamStudentDomain> getExamStudentPage(
-            @PathVariable Integer curPage,
-            @PathVariable Integer pageSize,
-            @RequestParam(required = false) Long orgId,
-            @RequestParam(required = false) Long examId,
-            @RequestParam(required = false) Long examStageId,
-            @RequestParam(required = false) String studentName,
-            @RequestParam(required = false) String studentCode,
-            @RequestParam(required = false) Long courseId,
-            @RequestParam(required = false) String courseCode,
-            @RequestParam(required = false) String courseLevel,
-            @RequestParam(required = false) String courseName,
-            @RequestParam(required = false) String examSite,
+    public PageInfo<ExamStudentDomain> getExamStudentPage(@PathVariable Integer curPage, @PathVariable Integer pageSize,
+            @RequestParam(required = false) Long orgId, @RequestParam(required = false) Long examId,
+            @RequestParam(required = false) Long examStageId, @RequestParam(required = false) String studentName,
+            @RequestParam(required = false) String studentCode, @RequestParam(required = false) Long courseId,
+            @RequestParam(required = false) String courseCode, @RequestParam(required = false) String courseLevel,
+            @RequestParam(required = false) String courseName, @RequestParam(required = false) String examSite,
             @RequestParam(required = false) String identityNumber,
             @RequestParam(required = false) Boolean identityNumberLike,
-            @RequestParam(required = false) String specialtyName,
-            @RequestParam(required = false) String infoCollector,
-            @RequestParam(required = false) BooleanSelect enable,
-            @RequestParam(required = false) Boolean withStarted,
+            @RequestParam(required = false) String specialtyName, @RequestParam(required = false) String infoCollector,
+            @RequestParam(required = false) BooleanSelect enable, @RequestParam(required = false) Boolean withStarted,
             @RequestParam(required = false, defaultValue = "false") Boolean skipRule) {
 
         User accessUser = getAccessUser();
@@ -279,7 +269,8 @@ public class ExamStudentController extends ControllerSupport {
             return PageUtils.toPageInfo(Page.empty());
         }
 
-        Set<Long> orgIds = new HashSet<>(), examIds = new HashSet<>(), examStageIds = new HashSet<>(), studentIds = new HashSet<>();
+        Set<Long> orgIds = new HashSet<>(), examIds = new HashSet<>(), examStageIds = new HashSet<>(),
+                studentIds = new HashSet<>();
         for (ExamStudentEntity entity : page.getContent()) {
             orgIds.add(entity.getOrgId());
             examIds.add(entity.getExamId());
@@ -305,10 +296,12 @@ public class ExamStudentController extends ControllerSupport {
         studentMapsReq.setStudentIds(studentIds);
         Map<Long, StudentBean> studentMaps = studentCloudService.getStudentMaps(studentMapsReq).getStudentMaps();
 
-        ExamPropertyCacheBean isFaceEnableProperty = CacheHelper.getExamProperty(examId, ExamProperties.IS_FACE_ENABLE.name());
+        ExamPropertyCacheBean isFaceEnableProperty = CacheHelper.getExamProperty(examId,
+                ExamProperties.IS_FACE_ENABLE.name());
         boolean isFaceEnable = isFaceEnableProperty != null && StringUtil.isTrue(isFaceEnableProperty.getValue());
 
-        ExamPropertyCacheBean isFaceCheckProperty = CacheHelper.getExamProperty(examId, ExamProperties.IS_FACE_CHECK.name());
+        ExamPropertyCacheBean isFaceCheckProperty = CacheHelper.getExamProperty(examId,
+                ExamProperties.IS_FACE_CHECK.name());
         boolean isFaceCheck = isFaceCheckProperty != null && StringUtil.isTrue(isFaceCheckProperty.getValue());
 
         boolean hidden = IdentityNumberHelper.identityNumbeConceal(accessUser.getRootOrgId());
@@ -357,7 +350,7 @@ public class ExamStudentController extends ControllerSupport {
             bean.setExt1(cur.getExt1());
             // 特殊处理:把ext2当作隐私模式下的身份证号
             bean.setExt2(cur.getIdentityNumber());
-            if(hidden) {
+            if (hidden) {
                 bean.setExt2(IdentityNumberHelper.conceal(cur.getIdentityNumber()));
             }
 
@@ -429,9 +422,9 @@ public class ExamStudentController extends ControllerSupport {
         examStudent.setRootOrgId(rootOrgId);
         examStudent.setInfoCollector(examStudent.getInfoCollector());
         ExamStudentDomain ret = saveExamStudent(examStudent);
-        //操作日志
-        ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(), ret.getStudentId(), ret.getId(), UserType.COMMON,
-                OperateContent.EXAM_STUDENT_ADD.getDesc()));
+        // 操作日志
+        ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(),
+                ret.getStudentId(), ret.getId(), UserType.COMMON, OperateContent.EXAM_STUDENT_ADD.getDesc()));
         return ret;
     }
 
@@ -451,13 +444,13 @@ public class ExamStudentController extends ControllerSupport {
         examStudent.setRootOrgId(rootOrgId);
         examStudent.setInfoCollector(examStudent.getInfoCollector());
         ExamStudentDomain ret = saveExamStudent(examStudent);
-        //操作日志
+        // 操作日志
         if (examStudent.getId() != null) {
-            ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(), ret.getStudentId(), ret.getId(), UserType.COMMON,
-                    OperateContent.EXAM_STUDENT_UPDATE.getDesc()));
+            ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(),
+                    ret.getStudentId(), ret.getId(), UserType.COMMON, OperateContent.EXAM_STUDENT_UPDATE.getDesc()));
         } else {
-            ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(), ret.getStudentId(), ret.getId(), UserType.COMMON,
-                    OperateContent.EXAM_STUDENT_ADD.getDesc()));
+            ReportsUtil.report(new OperateReport(examStudent.getRootOrgId(), getAccessUser().getUserId(),
+                    ret.getStudentId(), ret.getId(), UserType.COMMON, OperateContent.EXAM_STUDENT_ADD.getDesc()));
         }
         return ret;
     }
@@ -470,6 +463,7 @@ public class ExamStudentController extends ControllerSupport {
      * @author WANGWEI
      */
     private ExamStudentDomain saveExamStudent(ExamStudentDomain examStudent) {
+        checkExamArchived(examStudent.getExamId());
         SaveStudentReq saveStudentReq = new SaveStudentReq();
         saveStudentReq.setIdentityNumber(examStudent.getIdentityNumber().toUpperCase(Locale.US));
         saveStudentReq.setName(examStudent.getStudentName());
@@ -509,7 +503,8 @@ public class ExamStudentController extends ControllerSupport {
 
         info.setExamStageId(examStudent.getExamStageId());
         if (null != examStudent.getExamStageId()) {
-            ExamStageEntity examStageEntity = GlobalHelper.getEntity(examStageRepo, examStudent.getExamStageId(), ExamStageEntity.class);
+            ExamStageEntity examStageEntity = GlobalHelper.getEntity(examStageRepo, examStudent.getExamStageId(),
+                    ExamStageEntity.class);
             if (null == examStageEntity) {
                 throw new StatusException("005001", "场次id不正确");
             }
@@ -533,6 +528,29 @@ public class ExamStudentController extends ControllerSupport {
         return ret;
     }
 
+    private void checkExamArchived(Long examId) {
+        ExamEntity exam = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
+        if (exam.getArchived()) {
+            throw new StatusException("考试已归档");
+        }
+    }
+
+    private void checkExamArchived(Map<Long, Boolean> status, Long examId) {
+        Boolean archived = null;
+        archived = status.get(examId);
+        if (archived == null) {
+            ExamEntity exam = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
+            if (exam == null) {
+                throw new StatusException("未找到考试信息");
+            }
+            archived = exam.getArchived();
+            status.put(examId, archived);
+        }
+        if (archived) {
+            throw new StatusException("考试已归档");
+        }
+    }
+
     /**
      * 方法注释
      *
@@ -544,8 +562,7 @@ public class ExamStudentController extends ControllerSupport {
     @DeleteMapping("/{ids}")
     @Transactional
     public List<Long> deleteExamStudent(@PathVariable String ids) {
-        List<Long> idList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
+        List<Long> idList = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim())).collect(Collectors.toList());
         examStudentService.deleteExamStudentsByStudentIds(idList);
         return idList;
     }
@@ -561,6 +578,7 @@ public class ExamStudentController extends ControllerSupport {
     @DeleteMapping("exam/{examId}")
     @Transactional
     public Long deleteExamStudents(@PathVariable Long examId) {
+        checkExamArchived(examId);
         examStudentService.deleteExamStudentsByExamId(examId);
         return examId;
     }
@@ -579,17 +597,18 @@ public class ExamStudentController extends ControllerSupport {
         List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
                 .collect(Collectors.toList());
         List<String> ret = Lists.newArrayList();
+        Map<Long, Boolean> status = new HashMap<>();
         for (Long cur : examStuIds) {
             ExamStudentEntity s = GlobalHelper.getEntity(examStudentRepo, cur, ExamStudentEntity.class);
             if (s == null) {
                 continue;
             }
-
+            checkExamArchived(status, s.getExamId());
             s.setEnable(true);
             examStudentRepo.save(s);
-            //操作日志
-            ReportsUtil.report(new OperateReport(s.getRootOrgId(), getAccessUser().getUserId(), s.getStudentId(), s.getId(), UserType.COMMON,
-                    OperateContent.EXAM_STUDENT_ENABLE.getDesc()));
+            // 操作日志
+            ReportsUtil.report(new OperateReport(s.getRootOrgId(), getAccessUser().getUserId(), s.getStudentId(),
+                    s.getId(), UserType.COMMON, OperateContent.EXAM_STUDENT_ENABLE.getDesc()));
             ret.add(s.getId() + ":" + s.getName());
         }
 
@@ -614,17 +633,18 @@ public class ExamStudentController extends ControllerSupport {
         List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
                 .collect(Collectors.toList());
         List<String> ret = Lists.newArrayList();
+        Map<Long, Boolean> status = new HashMap<>();
         for (Long cur : examStuIds) {
             ExamStudentEntity s = GlobalHelper.getEntity(examStudentRepo, cur, ExamStudentEntity.class);
             if (s == null) {
                 continue;
             }
-
+            checkExamArchived(status, s.getExamId());
             s.setEnable(false);
             examStudentRepo.save(s);
-            //操作日志
-            ReportsUtil.report(new OperateReport(s.getRootOrgId(), getAccessUser().getUserId(), s.getStudentId(), s.getId(), UserType.COMMON,
-                    OperateContent.EXAM_STUDENT_DISABLE.getDesc()));
+            // 操作日志
+            ReportsUtil.report(new OperateReport(s.getRootOrgId(), getAccessUser().getUserId(), s.getStudentId(),
+                    s.getId(), UserType.COMMON, OperateContent.EXAM_STUDENT_DISABLE.getDesc()));
             ret.add(s.getId() + ":" + s.getName());
         }
 

+ 1 - 0
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamCloudServiceProvider.java

@@ -411,6 +411,7 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
         bean.setRemark(exam.getRemark());
         bean.setRootOrgId(exam.getRootOrgId());
         bean.setExamLimit(exam.getExamLimit());
+        bean.setArchived(exam.getArchived());
 
         return examResp;
     }

+ 70 - 40
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamStudentServiceImpl.java

@@ -1,5 +1,20 @@
 package cn.com.qmth.examcloud.core.examwork.service.impl;
 
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.data.domain.Example;
+import org.springframework.stereotype.Service;
+
 import cn.com.qmth.examcloud.commons.exception.StatusException;
 import cn.com.qmth.examcloud.commons.util.DateUtil;
 import cn.com.qmth.examcloud.commons.util.DateUtil.DatePatterns;
@@ -17,8 +32,16 @@ import cn.com.qmth.examcloud.core.basic.api.response.GetCourseResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
 import cn.com.qmth.examcloud.core.basic.api.response.SaveCourseResp;
-import cn.com.qmth.examcloud.core.examwork.dao.*;
-import cn.com.qmth.examcloud.core.examwork.dao.entity.*;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamCourseRelationRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamPaperTypeRelationRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamStageRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamCourseRelationEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamPaperTypeRelationEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStageEntity;
+import cn.com.qmth.examcloud.core.examwork.dao.entity.ExamStudentEntity;
 import cn.com.qmth.examcloud.core.examwork.service.ExamStudentService;
 import cn.com.qmth.examcloud.core.examwork.service.bean.ExamStudentInfo;
 import cn.com.qmth.examcloud.core.oe.admin.api.ExamRecordCloudService;
@@ -28,18 +51,6 @@ import cn.com.qmth.examcloud.support.Constants;
 import cn.com.qmth.examcloud.task.api.DataSyncCloudService;
 import cn.com.qmth.examcloud.task.api.request.SyncExamStudentReq;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.dao.DataIntegrityViolationException;
-import org.springframework.data.domain.Example;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 考试学生服务类 Created by songyue on 17/1/14.
@@ -101,6 +112,22 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         return checkExamIsStartedResp.getIsStarted();
     }
 
+    private void checkExamArchived(Map<Long, Boolean> status, Long examId) {
+        Boolean archived = null;
+        archived = status.get(examId);
+        if (archived == null) {
+            ExamEntity exam = GlobalHelper.getEntity(examRepo, examId, ExamEntity.class);
+            if (exam == null) {
+                throw new StatusException("未找到考试信息");
+            }
+            archived = exam.getArchived();
+            status.put(examId, archived);
+        }
+        if (archived) {
+            throw new StatusException("考试已归档");
+        }
+    }
+
     /**
      * 方法注释
      *
@@ -114,8 +141,9 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         }
 
         List<ExamStudentEntity> examStudents = examStudentRepo.findByIdIn(ids);
-
+        Map<Long, Boolean> status = new HashMap<>();
         for (ExamStudentEntity examStudent : examStudents) {
+            checkExamArchived(status, examStudent.getExamId());
             // 网考判断
             if (isStarted(examStudent.getExamId(), examStudent.getStudentId(), examStudent.getCourseId())) {
                 throw new StatusException("150112", examStudent.getName() + "已开始考试,不能删除");
@@ -127,8 +155,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             // 再删除考务模块考生
             examStudentRepo.delete(examStudent);
 
-            List<ExamStudentEntity> list1 = examStudentRepo.findTop2ByExamIdAndCourseId(
-                    examStudent.getExamId(), examStudent.getCourseId());
+            List<ExamStudentEntity> list1 = examStudentRepo.findTop2ByExamIdAndCourseId(examStudent.getExamId(),
+                    examStudent.getCourseId());
             if (list1.isEmpty()) {
                 examCourseRelationRepo.deleteByExamIdAndCourseId(examStudent.getExamId(), examStudent.getCourseId());
             }
@@ -136,12 +164,13 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             List<ExamStudentEntity> list2 = examStudentRepo.findTop2ByExamIdAndCourseIdAndPaperType(
                     examStudent.getExamId(), examStudent.getCourseId(), examStudent.getPaperType());
             if (list2.isEmpty()) {
-                examPaperTypeRelationRepo.deleteByExamIdAndCourseIdAndPaperType(
-                        examStudent.getExamId(), examStudent.getCourseId(), examStudent.getPaperType());
+                examPaperTypeRelationRepo.deleteByExamIdAndCourseIdAndPaperType(examStudent.getExamId(),
+                        examStudent.getCourseId(), examStudent.getPaperType());
             }
 
             log.warn("删除考生成功!studentId:{} studentCode:{} identityNumber:{} ew-examStudentId:{}",
-                    examStudent.getStudentId(), examStudent.getStudentCode(), examStudent.getIdentityNumber(), examStudent.getId());
+                    examStudent.getStudentId(), examStudent.getStudentCode(), examStudent.getIdentityNumber(),
+                    examStudent.getId());
         }
     }
 
@@ -188,8 +217,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
 
         List<ExamStudentEntity> list = examStudentRepo.findAll(example);
 
-        List<Long> IdList = list.stream().map(ExamStudentEntity::getId)
-                .collect(Collectors.toList());
+        List<Long> IdList = list.stream().map(ExamStudentEntity::getId).collect(Collectors.toList());
 
         deleteExamStudentsByStudentIds(IdList);
     }
@@ -316,21 +344,19 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         SaveCourseResp saveCourseResp = courseCloudService.saveCourse(saveCourseReq);
         CourseBean courseBean = saveCourseResp.getCourseBean();
 
-        ExamStudentEntity examStudent = examStudentRepo.findByExamIdAndStudentIdAndCourseId(
-                exam.getId(), studentInfo.getId(), courseBean.getId());
+        ExamStudentEntity examStudent = examStudentRepo.findByExamIdAndStudentIdAndCourseId(exam.getId(),
+                studentInfo.getId(), courseBean.getId());
 
         if (null == examStudent) {
             examStudent = new ExamStudentEntity();
             examStudent.setEnable(true);
         } else {
             if (!paperType.equals(examStudent.getPaperType())) {
-                List<ExamStudentEntity> top2 = examStudentRepo
-                        .findTop2ByExamIdAndCourseIdAndPaperType(examStudent.getExamId(),
-                                examStudent.getCourseId(), examStudent.getPaperType());
+                List<ExamStudentEntity> top2 = examStudentRepo.findTop2ByExamIdAndCourseIdAndPaperType(
+                        examStudent.getExamId(), examStudent.getCourseId(), examStudent.getPaperType());
                 if (2 > top2.size()) {
-                    examPaperTypeRelationRepo.deleteByExamIdAndCourseIdAndPaperType(
-                            examStudent.getExamId(), examStudent.getCourseId(),
-                            examStudent.getPaperType());
+                    examPaperTypeRelationRepo.deleteByExamIdAndCourseIdAndPaperType(examStudent.getExamId(),
+                            examStudent.getCourseId(), examStudent.getPaperType());
                 }
             }
         }
@@ -394,7 +420,8 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         try {
             saved = examStudentRepo.save(examStudent);
 
-            ExamCourseRelationEntity relation = examCourseRelationRepo.findByExamIdAndCourseCode(saved.getExamId(), courseBean.getCode());
+            ExamCourseRelationEntity relation = examCourseRelationRepo.findByExamIdAndCourseCode(saved.getExamId(),
+                    courseBean.getCode());
             if (relation == null) {
                 relation = new ExamCourseRelationEntity();
                 relation.setExamId(saved.getExamId());
@@ -421,13 +448,15 @@ public class ExamStudentServiceImpl implements ExamStudentService {
             examPaperTypeRelationRepo.save(pt);
         } catch (DataIntegrityViolationException ee) {
             // 存在数据库唯一约束等异常
-            log.error("[saveExamStudent] examId:{} courseCode:{} studentId:{} examStudentId:{} studentCode:{} identityNumber:{} err:{}",
-                    examStudent.getExamId(), examStudent.getCourseCode(), examStudent.getStudentId(), examStudent.getId(),
-                    examStudent.getStudentCode(), examStudent.getIdentityNumber(), ee.getMessage());
+            log.error(
+                    "[saveExamStudent] examId:{} courseCode:{} studentId:{} examStudentId:{} studentCode:{} identityNumber:{} err:{}",
+                    examStudent.getExamId(), examStudent.getCourseCode(), examStudent.getStudentId(),
+                    examStudent.getId(), examStudent.getStudentCode(), examStudent.getIdentityNumber(),
+                    ee.getMessage());
             throw new StatusException("5005XX", "保存考生相关信息异常,数据唯一性错误!");
         } catch (Exception e) {
-            log.error("[saveExamStudent] studentCode:{} identityNumber:{} err:{}",
-                    examStudent.getStudentCode(), examStudent.getIdentityNumber(), e.getMessage());
+            log.error("[saveExamStudent] studentCode:{} identityNumber:{} err:{}", examStudent.getStudentCode(),
+                    examStudent.getIdentityNumber(), e.getMessage());
             throw new StatusException("500500", "保存考生相关信息异常!", e);
         }
 
@@ -470,8 +499,10 @@ public class ExamStudentServiceImpl implements ExamStudentService {
         req.setExt4(saved.getExt4());
         req.setExt5(saved.getExt5());
 
-        log.warn("[syncExamStudent] examId:{} courseCode:{} studentId:{} examStudentId:{} studentCode:{} identityNumber:{}",
-                req.getExamId(), req.getCourseCode(), req.getStudentId(), req.getId(), req.getStudentCode(), req.getIdentityNumber());
+        log.warn(
+                "[syncExamStudent] examId:{} courseCode:{} studentId:{} examStudentId:{} studentCode:{} identityNumber:{}",
+                req.getExamId(), req.getCourseCode(), req.getStudentId(), req.getId(), req.getStudentCode(),
+                req.getIdentityNumber());
         dataSyncCloudService.syncExamStudent(req);
 
         ExamStudentInfo ret = new ExamStudentInfo();
@@ -505,8 +536,7 @@ public class ExamStudentServiceImpl implements ExamStudentService {
     @Override
     public void syncExamStudent(Long studentId) {
 
-        ExamStudentEntity saved = GlobalHelper.getPresentEntity(examStudentRepo, studentId,
-                ExamStudentEntity.class);
+        ExamStudentEntity saved = GlobalHelper.getPresentEntity(examStudentRepo, studentId, ExamStudentEntity.class);
 
         GetCourseReq gcReq = new GetCourseReq();
         gcReq.setRootOrgId(saved.getRootOrgId());