|
@@ -154,9 +154,9 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
if (CardTypeEnum.CUSTOM.equals(examCard.getType()) && !examCardParams.getCourseCode().equals(examCard.getCourseCode())) {
|
|
if (CardTypeEnum.CUSTOM.equals(examCard.getType()) && !examCardParams.getCourseCode().equals(examCard.getCourseCode())) {
|
|
throw ExceptionResultEnum.ERROR.exception("课程不能更改");
|
|
throw ExceptionResultEnum.ERROR.exception("课程不能更改");
|
|
}
|
|
}
|
|
- if (!examCardParams.getMakeMethod().name().equals(examCard.getMakeMethod().name())) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("题卡制作方式不能更改");
|
|
|
|
- }
|
|
|
|
|
|
+// if (!examCardParams.getMakeMethod().name().equals(examCard.getMakeMethod().name())) {
|
|
|
|
+// throw ExceptionResultEnum.ERROR.exception("题卡制作方式不能更改");
|
|
|
|
+// }
|
|
examCard.setStatus(examCardParams.getStatus());
|
|
examCard.setStatus(examCardParams.getStatus());
|
|
examCard.setUpdateId(user.getId());
|
|
examCard.setUpdateId(user.getId());
|
|
examCard.setUpdateTime(System.currentTimeMillis());
|
|
examCard.setUpdateTime(System.currentTimeMillis());
|
|
@@ -179,7 +179,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
}
|
|
}
|
|
|
|
|
|
// 绑定命题任务
|
|
// 绑定命题任务
|
|
- examTaskDetailService.bindCardId(examCardParams.getExamTaskId(), examCard);
|
|
|
|
|
|
+// examTaskDetailService.bindCardId(examCardParams.getExamTaskId(), examCard);
|
|
|
|
|
|
return String.valueOf(examCard.getId());
|
|
return String.valueOf(examCard.getId());
|
|
}
|
|
}
|
|
@@ -505,15 +505,15 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
* @param examCard 题卡对象
|
|
* @param examCard 题卡对象
|
|
*/
|
|
*/
|
|
private String checkTitle(ExamCard examCard, String courseCode) {
|
|
private String checkTitle(ExamCard examCard, String courseCode) {
|
|
- QueryWrapper<ExamCard> queryWrapper = new QueryWrapper<>();
|
|
|
|
- queryWrapper.lambda().eq(ExamCard::getSchoolId, examCard.getSchoolId())
|
|
|
|
- .eq(ExamCard::getCourseCode, courseCode);
|
|
|
|
String title;
|
|
String title;
|
|
int i = 1;
|
|
int i = 1;
|
|
ExamCard newExamCard;
|
|
ExamCard newExamCard;
|
|
do {
|
|
do {
|
|
title = examCard.getTitle() + "副本" + i;
|
|
title = examCard.getTitle() + "副本" + i;
|
|
- queryWrapper.lambda().eq(ExamCard::getTitle, title);
|
|
|
|
|
|
+ QueryWrapper<ExamCard> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.lambda().eq(ExamCard::getSchoolId, examCard.getSchoolId())
|
|
|
|
+ .eq(ExamCard::getCourseCode, courseCode)
|
|
|
|
+ .eq(ExamCard::getTitle, title);
|
|
newExamCard = this.getOne(queryWrapper);
|
|
newExamCard = this.getOne(queryWrapper);
|
|
i++;
|
|
i++;
|
|
} while (newExamCard != null);
|
|
} while (newExamCard != null);
|