|
@@ -24,13 +24,6 @@ class LessonService extends CrudService {
|
|
if (!res) {
|
|
if (!res) {
|
|
throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '全年计划信息不存在');
|
|
throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '全年计划信息不存在');
|
|
}
|
|
}
|
|
-
|
|
|
|
- const _lessonmode = await this.lmodel.findOne({ type: '0' });
|
|
|
|
- if (!_lessonmode) {
|
|
|
|
- throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '课程模板信息不存在');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- const lessonmode = JSON.parse(_lessonmode.lessons);
|
|
|
|
const terms = res.termnum;
|
|
const terms = res.termnum;
|
|
|
|
|
|
for (const elm of terms) {
|
|
for (const elm of terms) {
|
|
@@ -49,6 +42,13 @@ class LessonService extends CrudService {
|
|
});
|
|
});
|
|
|
|
|
|
for (const cla of _classs) {
|
|
for (const cla of _classs) {
|
|
|
|
+
|
|
|
|
+ const _lessonmode = await this.lmodel.findOne({ type: cla.type });
|
|
|
|
+ if (!_lessonmode) {
|
|
|
|
+ throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '课程模板信息不存在');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const lessonmode = JSON.parse(_lessonmode.lessons);
|
|
|
|
|
|
let i = 1;
|
|
let i = 1;
|
|
|
|
|