|
@@ -20,6 +20,7 @@ import com.qmth.teachcloud.common.entity.BasicAttachment;
|
|
|
import com.qmth.teachcloud.common.entity.SysUser;
|
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.teachcloud.common.service.BasicAttachmentService;
|
|
|
+import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
|
import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -61,6 +62,9 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
|
@Resource
|
|
|
TeachcloudCommonService teachcloudCommonService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ BasicCourseService basicCourseService;
|
|
|
+
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public String saveExamCard(ExamCardParams examCardParams) {
|
|
@@ -78,7 +82,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
|
if (examCardParams.getId() == null) {
|
|
|
examCard = new ExamCard();
|
|
|
examCard.setSchoolId(schoolId);
|
|
|
- examCard.setOrgId(user.getOrgId());
|
|
|
+ examCard.setOrgId(basicCourseService.getOrgIdBySchoolIdAndCourseCode(schoolId, examCardParams.getCourseCode()));
|
|
|
examCard.setCourseCode(examCardParams.getCourseCode());
|
|
|
examCard.setCourseName(examCardParams.getCourseName());
|
|
|
examCard.setTitle(examCardParams.getTitle());
|
|
@@ -87,7 +91,6 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
|
|
|
examCard.setType(examCardParams.getType());
|
|
|
examCard.setTemplateId(examCardParams.getTemplateId());
|
|
|
examCard.insertInfo(user.getId());
|
|
|
- examCard.setOrgId(user.getOrgId());
|
|
|
this.save(examCard);
|
|
|
|
|
|
examCardDetail = new ExamCardDetail();
|