|
@@ -55,7 +55,7 @@ class ClassService extends CrudService {
|
|
|
// 自动生成班级私有方法
|
|
|
async autoclass(planid, termid) {
|
|
|
// 删除所有计划下的班级
|
|
|
- await this.clamodel.deleteMany({ planid, termid });
|
|
|
+ await this.model.deleteMany({ planid, termid });
|
|
|
// 根据批次id取得当前批次具体信息
|
|
|
const res = await this.tmodel.findById(planid);
|
|
|
if (!res) {
|
|
@@ -67,7 +67,7 @@ class ClassService extends CrudService {
|
|
|
const classs = await batch.class;
|
|
|
for (const cla of classs) {
|
|
|
const newdata = { name: cla.name, number: cla.number, batchid: batch.id, termid: term.id, planid: res.id, type: cla.type, headteacherid: cla.headteacherid };
|
|
|
- await this.clamodel.create(newdata);
|
|
|
+ await this.model.create(newdata);
|
|
|
}
|
|
|
}
|
|
|
}
|