|
@@ -165,7 +165,7 @@ class ClassService extends CrudService {
|
|
|
async studentupclass({ id }, data) {
|
|
|
assert(id, '班级id为必填项');
|
|
|
// 根据全年计划表id查出对应的全年计划详细信息
|
|
|
- const trainplan = await this.model.findOne({ 'termnum.batchnum.class._id': ObjectId(id) });
|
|
|
+ const trainplan = await this.tmodel.findOne({ 'termnum.batchnum.class._id': ObjectId(id) });
|
|
|
if (!trainplan) {
|
|
|
throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '全年计划信息不存在');
|
|
|
}
|
|
@@ -186,7 +186,7 @@ class ClassService extends CrudService {
|
|
|
}
|
|
|
let classid_ = '';
|
|
|
if (classname) {
|
|
|
- const cla_ = await this.clamodel.findOne({ termid, batchid, name: classname });
|
|
|
+ const cla_ = await this.model.findOne({ termid, batchid, name: classname });
|
|
|
if (cla_) {
|
|
|
classid_ = cla_.id;
|
|
|
}
|