|
@@ -168,6 +168,7 @@ class TrainplanService extends CrudService {
|
|
|
} else {
|
|
|
// 当班级数有更改时
|
|
|
// 删除所有班级 并重新生成班级
|
|
|
+ await this.clamodel.deleteMany({ termid: el.id, batchid: batchnum.id });
|
|
|
const classnum = batchnum.class;
|
|
|
for (let i = 1; i <= classnum; i++) {
|
|
|
const newdata = { name: i + '班', number: batchnum.number, batchid: batchnum.id, termid: el.id };
|