|
|
@@ -1,5 +1,8 @@
|
|
|
package com.lc.ibps.platform.service;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
+import java.time.format.DateTimeParseException;
|
|
|
import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
@@ -252,6 +255,23 @@ public class DesktopFacadeService {
|
|
|
Object limitDateObj =record.get("limitDate");
|
|
|
String examState = (String) record.get("examState");
|
|
|
String paperState = (String) record.get("paperState");
|
|
|
+ if (limitDateObj != null && !limitDateObj.toString().isEmpty()) {
|
|
|
+ if("不限".equals(limitDateObj.toString().trim())){
|
|
|
+ return "不限";//非限时考试不处理
|
|
|
+ }
|
|
|
+ //获取当前时间
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
|
+ try {
|
|
|
+ LocalDateTime limitDateTime = LocalDateTime.parse(limitDateObj.toString(), formatter);
|
|
|
+ if (limitDateTime.isBefore(now)) {
|
|
|
+ //System.out.println("限时时间:"+limitDateObj.toString()+" < 当前时间:"+now+",超出考试时间不在弹框");
|
|
|
+ return "overTime";
|
|
|
+ }
|
|
|
+ } catch (DateTimeParseException e) {
|
|
|
+ // 忽略这条数据
|
|
|
+ }
|
|
|
+ }
|
|
|
// 检查条件
|
|
|
if (limitDateObj != null && !limitDateObj.toString().isEmpty() && "已发布".equals(examState) && "已完成".equals(paperState)) {
|
|
|
// 获取字段值
|
|
|
@@ -262,7 +282,6 @@ public class DesktopFacadeService {
|
|
|
// 关键字段缺失,返回未完成状态
|
|
|
return "NotExaminedStatus";
|
|
|
}
|
|
|
-
|
|
|
double totalScore = Double.parseDouble(record.get("totalScore").toString());
|
|
|
double qualifiedRadio = Double.parseDouble(record.get("qualifiedRadio").toString());
|
|
|
String scoringType = (String) record.get("scoringType");
|