|
@@ -8,15 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.qmth.distributed.print.business.bean.dto.TemplateDto;
|
|
|
-import com.qmth.distributed.print.business.bean.params.ExamCardParams;
|
|
|
import com.qmth.distributed.print.business.bean.result.TemplatePrintInfoResult;
|
|
|
import com.qmth.distributed.print.business.entity.BasicTemplate;
|
|
|
-import com.qmth.distributed.print.business.entity.ExamCard;
|
|
|
-import com.qmth.distributed.print.business.entity.ExamCardDetail;
|
|
|
-import com.qmth.distributed.print.business.enums.CardStatusEnum;
|
|
|
-import com.qmth.distributed.print.business.enums.CardTypeEnum;
|
|
|
-import com.qmth.distributed.print.business.enums.MakeMethodEnum;
|
|
|
-import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
|
|
|
import com.qmth.distributed.print.business.mapper.BasicTemplateMapper;
|
|
|
import com.qmth.distributed.print.business.service.BasicTemplateService;
|
|
|
import com.qmth.distributed.print.business.service.ExamCardDetailService;
|
|
@@ -129,32 +122,32 @@ public class BasicTemplateServiceImpl extends ServiceImpl<BasicTemplateMapper, B
|
|
|
// 新增权限
|
|
|
// basicTemplateOrgService.saveBatch(schoolId, template.getType(), template.getId(), template.getOrgIds(), template.getCreateId());
|
|
|
|
|
|
- if (TemplateTypeEnum.GENERIC.name().equals(template.getType().name())) {
|
|
|
- // 通用题卡,同步更新exam_card
|
|
|
- BasicAttachment attachment = basicAttachmentService.getById(template.getAttachmentId());
|
|
|
-
|
|
|
- ExamCard examCard1 = examCardService.getOneByTemplateId(template.getId());
|
|
|
- if (examCard1 == null) {
|
|
|
- ExamCard examCard = examCardService.getOneByTemplateId(template.getId());
|
|
|
- ExamCardParams examCardParams = new ExamCardParams();
|
|
|
- examCardParams.setId(examCard == null ? null : examCard.getId());
|
|
|
- examCardParams.setOrgId(sysUser.getOrgId());
|
|
|
- examCardParams.setTitle(template.getName());
|
|
|
- examCardParams.setMakeMethod(MakeMethodEnum.SELECT);// 默认SELECT
|
|
|
- examCardParams.setType(CardTypeEnum.GENERIC); // 默认GENERIC
|
|
|
- examCardParams.setTemplateId(template.getId());
|
|
|
- examCardParams.setStatus(CardStatusEnum.SUBMIT); // 默认SUBMIT
|
|
|
- examCardParams.setHtmlContent(teachcloudCommonService.readFileContent(attachment.getPath()));
|
|
|
- examCardService.saveExamCard(examCardParams);
|
|
|
- } else {
|
|
|
- examCard1.setTitle(template.getName());
|
|
|
- examCardService.updateById(examCard1);
|
|
|
-
|
|
|
- ExamCardDetail examCardDetail = examCardDetailService.getByCardId(examCard1.getId());
|
|
|
- examCardDetail.setHtmlContent(teachcloudCommonService.readFileContent(attachment.getPath()));
|
|
|
- examCardDetailService.updateById(examCardDetail);
|
|
|
- }
|
|
|
- }
|
|
|
+// if (TemplateTypeEnum.GENERIC.name().equals(template.getType().name())) {
|
|
|
+// // 通用题卡,同步更新exam_card
|
|
|
+// BasicAttachment attachment = basicAttachmentService.getById(template.getAttachmentId());
|
|
|
+//
|
|
|
+// ExamCard examCard1 = examCardService.getOneByTemplateId(template.getId());
|
|
|
+// if (examCard1 == null) {
|
|
|
+// ExamCard examCard = examCardService.getOneByTemplateId(template.getId());
|
|
|
+// ExamCardParams examCardParams = new ExamCardParams();
|
|
|
+// examCardParams.setId(examCard == null ? null : examCard.getId());
|
|
|
+// examCardParams.setOrgId(sysUser.getOrgId());
|
|
|
+// examCardParams.setTitle(template.getName());
|
|
|
+// examCardParams.setMakeMethod(MakeMethodEnum.SELECT);// 默认SELECT
|
|
|
+// examCardParams.setType(CardTypeEnum.GENERIC); // 默认GENERIC
|
|
|
+// examCardParams.setTemplateId(template.getId());
|
|
|
+// examCardParams.setStatus(CardStatusEnum.SUBMIT); // 默认SUBMIT
|
|
|
+// examCardParams.setHtmlContent(teachcloudCommonService.readFileContent(attachment.getPath()));
|
|
|
+// examCardService.saveExamCard(examCardParams);
|
|
|
+// } else {
|
|
|
+// examCard1.setTitle(template.getName());
|
|
|
+// examCardService.updateById(examCard1);
|
|
|
+//
|
|
|
+// ExamCardDetail examCardDetail = examCardDetailService.getByCardId(examCard1.getId());
|
|
|
+// examCardDetail.setHtmlContent(teachcloudCommonService.readFileContent(attachment.getPath()));
|
|
|
+// examCardDetailService.updateById(examCardDetail);
|
|
|
+// }
|
|
|
+// }
|
|
|
return isSuccess;
|
|
|
}
|
|
|
|