xiaof 3 роки тому
батько
коміт
17e3a015a9

+ 5 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java

@@ -82,7 +82,11 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
         if (examCardParams.getId() == null) {
             examCard = new ExamCard();
             examCard.setSchoolId(schoolId);
-            examCard.setOrgId(basicCourseService.getOrgIdBySchoolIdAndCourseCode(schoolId, examCardParams.getCourseCode()));
+            if(Objects.isNull(examCardParams.getTemplateId())) {
+                examCard.setOrgId(basicCourseService.getOrgIdBySchoolIdAndCourseCode(schoolId, examCardParams.getCourseCode()));
+            } else {
+                examCard.setOrgId(user.getOrgId());
+            }
             examCard.setCourseCode(examCardParams.getCourseCode());
             examCard.setCourseName(examCardParams.getCourseName());
             examCard.setTitle(examCardParams.getTitle());