|
@@ -36,6 +36,7 @@ public class AfterHandInExamExecutor implements NodeExecuter<Long, ExamRecordDat
|
|
|
|
|
|
@Autowired
|
|
|
private ExamRecordDataService examRecordDataService;
|
|
|
+ private static Long DEFAULT_MAX_PROCESS_SECONDS = 30L;
|
|
|
|
|
|
@Override
|
|
|
public List<KeyValuePair<Long, ExamRecordData>> execute(Long key, ExamRecordData examRecordData, TaskContext context) throws Exception {
|
|
@@ -48,21 +49,25 @@ public class AfterHandInExamExecutor implements NodeExecuter<Long, ExamRecordDat
|
|
|
examRecordData.getExamRecordStatus() == ExamRecordStatus.EXAM_AUTO_HAND_IN) {
|
|
|
|
|
|
SysPropertyCacheBean maxProcessSecondsProperty = CacheHelper.getSysProperty("oe.task.maxProcessSeconds");
|
|
|
+ //本节点最大处理时长
|
|
|
+ Long maxProcessSeconds;
|
|
|
if (maxProcessSecondsProperty.getHasValue()) {
|
|
|
- //本节点最大处理时长
|
|
|
- Long maxProcessSeconds = Long.valueOf(maxProcessSecondsProperty.getValue().toString());
|
|
|
- //交卷时间戳
|
|
|
- Long handInTime = (examRecordData.getEndTime() == null ? examRecordData.getCleanTime() : examRecordData.getEndTime()).getTime();
|
|
|
- Long times = System.currentTimeMillis() - handInTime;
|
|
|
+ maxProcessSeconds = Long.valueOf(maxProcessSecondsProperty.getValue().toString());
|
|
|
+ } else {
|
|
|
+ maxProcessSeconds = DEFAULT_MAX_PROCESS_SECONDS;
|
|
|
+ }
|
|
|
+
|
|
|
+ //交卷时间戳
|
|
|
+ Long handInTime = (examRecordData.getEndTime() == null ? examRecordData.getCleanTime() : examRecordData.getEndTime()).getTime();
|
|
|
+ Long times = System.currentTimeMillis() - handInTime;
|
|
|
|
|
|
- //如果交卷后超过指定时长内仍未处理完成,则交给下一节点进行处理
|
|
|
- if (times > maxProcessSeconds * 1000) {
|
|
|
- resultList.add(keyValuePair);
|
|
|
- return resultList;
|
|
|
- }
|
|
|
+ //如果交卷后超过指定时长内仍未处理完成,则交给下一节点进行处理
|
|
|
+ if (times > maxProcessSeconds * 1000) {
|
|
|
+ resultList.add(keyValuePair);
|
|
|
+ return resultList;
|
|
|
}
|
|
|
|
|
|
- examRecordData=examRecordDataService.processAfterHandInExam(examRecordData.getId());
|
|
|
+ examRecordData = examRecordDataService.processAfterHandInExam(examRecordData.getId());
|
|
|
|
|
|
keyValuePair.setValue(examRecordData);
|
|
|
resultList.add(keyValuePair);
|