|
@@ -2,6 +2,7 @@ package com.qmth.themis.business.templete.service.impl;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.qmth.themis.business.config.SystemConfig;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
@@ -149,6 +150,11 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
|
|
|
teStudent = new TEStudent(orgId, examStudentImportDto.getIdentity(), examStudentImportDto.getName(), createId);
|
|
|
teStudentService.save(teStudent);
|
|
|
teStudentList.add(teStudent);
|
|
|
+ }else{
|
|
|
+ UpdateWrapper<TEStudent> teStudentUpdateWrapper = new UpdateWrapper<>();
|
|
|
+ teStudentUpdateWrapper.lambda().set(TEStudent::getName, teExamStudent.getName())
|
|
|
+ .eq(TEStudent::getIdentity, teExamStudent.getIdentity());
|
|
|
+ teStudentService.update(teStudentUpdateWrapper);
|
|
|
}
|
|
|
teExamStudent = gson.fromJson(gson.toJson(examStudentImportDto), TEExamStudent.class);
|
|
|
teExamStudent.setExamId(examId);
|
|
@@ -170,6 +176,11 @@ public class TempleteLogicServiceImpl implements TempleteLogicService {
|
|
|
teExamStudent.setCourseName(examStudentImportDto.getCourseName());
|
|
|
teExamStudent.setExamActivityId(teExamActivity.getId());
|
|
|
teExamStudent.setLeftExamCount(examCount);
|
|
|
+
|
|
|
+ UpdateWrapper<TEStudent> teStudentUpdateWrapper = new UpdateWrapper<>();
|
|
|
+ teStudentUpdateWrapper.lambda().set(TEStudent::getName, teExamStudent.getName())
|
|
|
+ .eq(TEStudent::getIdentity, teExamStudent.getIdentity());
|
|
|
+ teStudentService.update(teStudentUpdateWrapper);
|
|
|
}
|
|
|
teExamStudentService.saveOrUpdate(teExamStudent);
|
|
|
roomCodeAndNameSet.add(teExamStudent.getRoomCode() + ":" + teExamStudent.getRoomName());
|