|
@@ -30,6 +30,7 @@ import com.qmth.themis.common.util.HexUtils;
|
|
import org.apache.commons.io.FilenameUtils;
|
|
import org.apache.commons.io.FilenameUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -206,6 +207,19 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
|
|
teExamStudentLogQueryWrapper.lambda().eq(TEExamStudentLog::getExamStudentId, examStudentCacheBean.getId())
|
|
teExamStudentLogQueryWrapper.lambda().eq(TEExamStudentLog::getExamStudentId, examStudentCacheBean.getId())
|
|
.eq(TEExamStudentLog::getExamRecordId, examRecordId)
|
|
.eq(TEExamStudentLog::getExamRecordId, examRecordId)
|
|
.orderByAsc(TEExamStudentLog::getCreateTime);
|
|
.orderByAsc(TEExamStudentLog::getCreateTime);
|
|
|
|
+ if (!CollectionUtils.isEmpty(teExamStudentLogList)) {
|
|
|
|
+ String currentIp = teExamStudentLogList.get(0).getIp();
|
|
|
|
+ for (int i = 1; i < teExamStudentLogList.size(); i++) {
|
|
|
|
+ String ip = teExamStudentLogList.get(i).getIp();
|
|
|
|
+ if (Objects.isNull(currentIp) || Objects.equals(currentIp.trim(), "")) {
|
|
|
|
+ currentIp = ip;
|
|
|
|
+ continue;
|
|
|
|
+ } else if (Objects.nonNull(currentIp) && !Objects.equals(currentIp.trim(), "") && !Objects.equals(currentIp, ip)) {
|
|
|
|
+ teExamStudentLogList.get(i).setIpChange(true);
|
|
|
|
+ currentIp = ip;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
teExamStudentLogList = teExamStudentLogService.list(teExamStudentLogQueryWrapper);
|
|
teExamStudentLogList = teExamStudentLogService.list(teExamStudentLogQueryWrapper);
|
|
}
|
|
}
|
|
|
|
|