Bladeren bron

3.0.0-bug修改

xiaof 3 jaren geleden
bovenliggende
commit
2826f2eab8

+ 0 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicTemplateServiceImpl.java

@@ -107,11 +107,6 @@ public class BasicTemplateServiceImpl extends ServiceImpl<BasicTemplateMapper, B
                 throw ExceptionResultEnum.ERROR.exception("模板名称已存在");
             }
 
-            // 校验模板是否已有绑定命题任务
-            boolean used = examCardService.usedCardByTemplateId(template.getId());
-            if (used) {
-                throw ExceptionResultEnum.ERROR.exception("通用题卡模板已绑定任务,不能修改");
-            }
             template.updateInfo(sysUser.getId());
             //删除权限
             basicTemplateOrgService.removeByRuleId(template.getId());

+ 1 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1028,17 +1028,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
             MakeMethodEnum makeMethodEnum = examCard.getMakeMethod();
             if (MakeMethodEnum.SELECT.equals(makeMethodEnum)) {
-//                Long templateId = examCard.getTemplateId();
-                // todo 修改20220222
-                Long templateId = null;
-                if (templateId == null || templateId == 0) {
-                    throw ExceptionResultEnum.ERROR.exception("找不到题卡对应的模板");
-                }
-                BasicTemplate basicTemplate = basicTemplateService.getById(templateId);
-                if (Objects.isNull(basicTemplate)) {
-                    throw ExceptionResultEnum.ERROR.exception("找不到模板信息");
-                }
-                Long attachmentId = basicTemplate.getAttachmentId();
+                Long attachmentId = examCard.getAttachmentId();
                 if (attachmentId == null || attachmentId == 0) {
                     throw ExceptionResultEnum.ERROR.exception("找不到模板对应的附件");
                 }

+ 1 - 1
distributed-print-business/src/main/resources/mapper/ExamCardMapper.xml

@@ -134,7 +134,7 @@
     </select>
     <select id="listCustom" resultType="com.qmth.distributed.print.business.entity.ExamCard">
         SELECT
-            a.id, a.title, a.type
+            a.id, a.title, a.type, a.create_id createId
         FROM
             exam_card a
         WHERE