Преглед на файлове

初始化部分字段值

lideyin преди 5 години
родител
ревизия
b30f36e256

+ 14 - 14
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/pipeline/SyncExamDataExecutor.java

@@ -80,19 +80,19 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
         String sequenceLockKey = Constants.EXAM_CONTROL_LOCK_PREFIX + studentId;
 
         try {
-            debugLog("enter executor...",examRecordData.getId());
+            debugLog("enter executor...", examRecordData.getId());
 
             //添加考试控制全局锁
             SequenceLockHelper.getLockSimple(sequenceLockKey);
 
-            debugLog("get locker success...",examRecordData.getId());
+            debugLog("get locker success...", examRecordData.getId());
 
             //如果已同步,直接交给下一节点
             if (SyncStatus.SYNCED == examRecordData.getSyncStatus()) {
 
                 outList.add(new KeyValuePair<>(key, examRecordData));
 
-                this.debugLog("already synced,will go to next node...",examRecordData.getId());
+                this.debugLog("already synced,will go to next node...", examRecordData.getId());
 
                 return;
             }
@@ -101,18 +101,18 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
             Long examRecordDataId = examRecordData.getId();
             if (ExamRecordStatus.EXAM_HAND_IN == examRecordData.getExamRecordStatus() ||
                     ExamRecordStatus.EXAM_AUTO_HAND_IN == examRecordData.getExamRecordStatus()) {
-                this.debugLog("prepare to execute last node's hand in data...",examRecordDataId);
+                this.debugLog("prepare to execute last node's hand in data...", examRecordDataId);
 
                 examRecordDataService.processAfterHandInExam(examRecordDataId);
 
-                this.debugLog("execute last node's hand in data success...",examRecordDataId);
+                this.debugLog("execute last node's hand in data success...", examRecordDataId);
             }
 
             //如果考试记录状态为完结状态,则开始同步数据到正式库
             if (ExamRecordStatus.EXAM_END == examRecordData.getExamRecordStatus() ||
                     ExamRecordStatus.EXAM_OVERDUE == examRecordData.getExamRecordStatus()) {
 
-                this.debugLog("prepare to sync data...",examRecordDataId);
+                this.debugLog("prepare to sync data...", examRecordDataId);
 
                 //同步数据
                 SyncExamDataReq syncReq = new SyncExamDataReq();
@@ -135,7 +135,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
 
                 syncExamDataCloudService.syncExamData(syncReq);
 
-                this.debugLog("sync data success,and to be change status...",examRecordDataId);
+                this.debugLog("sync data success,and to be change status...", examRecordDataId);
 
                 //考试完结次数加1
                 ExamBoss examBoss = examBossService.getExamBoss(examRecordData.getExamStudentId());
@@ -149,7 +149,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
 
                 outList.add(new KeyValuePair<>(key, examRecordData));
 
-                this.debugLog("sync data and change status success...",examRecordDataId);
+                this.debugLog("sync data and change status success...", examRecordDataId);
 
                 return;
             }
@@ -368,13 +368,13 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
         data.setStartTime(examRecordData.getStartTime());
         data.setEndTime(examRecordData.getEndTime());
         data.setCleanTime(examRecordData.getCleanTime());
-        data.setWarn(examRecordData.getIsWarn());
+        data.setWarn(examRecordData.getIsWarn() == null ? false : examRecordData.getIsWarn());
         data.setAudit(examRecordData.getIsAudit());
-        data.setIllegality(examRecordData.getIsIllegality());
+        data.setIllegality(examRecordData.getIsIllegality() == null ? false : examRecordData.getIsIllegality());
         data.setUsedExamTime(examRecordData.getUsedExamTime());
-        data.setContinued(examRecordData.getIsContinued());
+        data.setContinued(examRecordData.getIsContinued() == null ? false : examRecordData.getIsContinued());
         data.setContinuedCount(examRecordData.getContinuedCount());
-        data.setExceed(examRecordData.getIsExceed());
+        data.setExceed(examRecordData.getIsExceed() == null ? false : examRecordData.getIsExceed());
         data.setFaceSuccessCount(examRecordData.getFaceSuccessCount());
         data.setFaceFailedCount(examRecordData.getFaceFailedCount());
         data.setFaceStrangerCount(examRecordData.getFaceStrangerCount());
@@ -407,9 +407,9 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
         examRecordDataService.saveExamRecordDataCache(examRecordDataId, examRecordData);
     }
 
-    private void debugLog(String msg,Long examRecordDataId) {
+    private void debugLog(String msg, Long examRecordDataId) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("[SYNC-EXAM-DATA-EXECUTOR-" + examRecordDataId + "]:"+msg);
+            LOG.debug("[SYNC-EXAM-DATA-EXECUTOR-" + examRecordDataId + "]:" + msg);
         }
     }
 }