|
@@ -134,9 +134,8 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
examCard.setMakeMethod(examCardParams.getMakeMethod());
|
|
examCard.setMakeMethod(examCardParams.getMakeMethod());
|
|
examCard.setStatus(examCardParams.getStatus());
|
|
examCard.setStatus(examCardParams.getStatus());
|
|
examCard.setType(examCardParams.getType());
|
|
examCard.setType(examCardParams.getType());
|
|
- if (StringUtils.isNotBlank(examCardParams.getAttachmentId())) {
|
|
|
|
- examCard.setAttachmentId(Long.valueOf(examCardParams.getAttachmentId()));
|
|
|
|
- }
|
|
|
|
|
|
+ examCard.setAttachmentId(examCardParams.getAttachmentId());
|
|
|
|
+ examCard.setCardRuleId(examCardParams.getCardRuleId());
|
|
examCard.insertInfo(user.getId());
|
|
examCard.insertInfo(user.getId());
|
|
this.save(examCard);
|
|
this.save(examCard);
|
|
|
|
|
|
@@ -149,7 +148,9 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
examCardDetail.setJpgAttachmentInfo(JSON.toJSONString(convertJpgStorageList));
|
|
examCardDetail.setJpgAttachmentInfo(JSON.toJSONString(convertJpgStorageList));
|
|
}
|
|
}
|
|
examCardDetail.setHtmlContent(htmlContent);
|
|
examCardDetail.setHtmlContent(htmlContent);
|
|
- examCardDetail.setAttachmentId(examCardParams.getAttachmentId());
|
|
|
|
|
|
+ if (examCardParams.getAttachmentId() != null) {
|
|
|
|
+ examCardDetail.setAttachmentId(String.valueOf(examCardParams.getAttachmentId()));
|
|
|
|
+ }
|
|
examCardDetail.insertInfo(user.getId());
|
|
examCardDetail.insertInfo(user.getId());
|
|
examCardDetailService.save(examCardDetail);
|
|
examCardDetailService.save(examCardDetail);
|
|
}
|
|
}
|
|
@@ -167,12 +168,6 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
|
|
|
|
examCard = this.getById(examCardParams.getId());
|
|
examCard = this.getById(examCardParams.getId());
|
|
examCard.setTitle(examCardParams.getTitle());
|
|
examCard.setTitle(examCardParams.getTitle());
|
|
-// if (CardTypeEnum.CUSTOM.equals(examCard.getType()) && !examCardParams.getCourseCode().equals(examCard.getCourseCode())) {
|
|
|
|
-// 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());
|
|
@@ -189,14 +184,13 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
examCardDetail.setJpgAttachmentInfo(JSON.toJSONString(convertJpgStorageList));
|
|
examCardDetail.setJpgAttachmentInfo(JSON.toJSONString(convertJpgStorageList));
|
|
}
|
|
}
|
|
examCardDetail.setHtmlContent(htmlContent);
|
|
examCardDetail.setHtmlContent(htmlContent);
|
|
- examCardDetail.setAttachmentId(examCardParams.getAttachmentId());
|
|
|
|
|
|
+ if (examCardParams.getAttachmentId() != null) {
|
|
|
|
+ examCardDetail.setAttachmentId(String.valueOf(examCardParams.getAttachmentId()));
|
|
|
|
+ }
|
|
examCardDetail.updateInfo(user.getId());
|
|
examCardDetail.updateInfo(user.getId());
|
|
examCardDetailService.updateById(examCardDetail);
|
|
examCardDetailService.updateById(examCardDetail);
|
|
}
|
|
}
|
|
|
|
|
|
- // 绑定命题任务
|
|
|
|
-// examTaskDetailService.bindCardId(examCardParams.getExamTaskId(), examCard);
|
|
|
|
-
|
|
|
|
return String.valueOf(examCard.getId());
|
|
return String.valueOf(examCard.getId());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -279,7 +273,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
// 专卡
|
|
// 专卡
|
|
if (SystemConstant.ALL_CARD != cardRuleId) {
|
|
if (SystemConstant.ALL_CARD != cardRuleId) {
|
|
// 只查自己创建的专卡(20230405已改为查询课程下所有题卡,允许复制,不能选择)
|
|
// 只查自己创建的专卡(20230405已改为查询课程下所有题卡,允许复制,不能选择)
|
|
- List<ExamCard> customCards = this.baseMapper.listCustom(schoolId, courseCode, CardTypeEnum.CUSTOM.name());
|
|
|
|
|
|
+ List<ExamCard> customCards = this.baseMapper.listCustom(schoolId, courseCode, CardTypeEnum.CUSTOM.name(), cardRuleId);
|
|
if (!customCards.isEmpty()) {
|
|
if (!customCards.isEmpty()) {
|
|
list.addAll(customCards);
|
|
list.addAll(customCards);
|
|
}
|
|
}
|