|
@@ -166,15 +166,15 @@ class ClassService extends CrudService {
|
|
|
// }
|
|
|
|
|
|
// 更新学生的班级
|
|
|
- // const ckeys = Object.keys(result);
|
|
|
- // for (const classid of ckeys) {
|
|
|
- // await this.stumodel.updateMany({ _id: result[classid] }, { classid });
|
|
|
- // }
|
|
|
- // // 新添,给学生排序号
|
|
|
- // const claList = await this.model.find({ termid });
|
|
|
- // for (const cla of claList) {
|
|
|
- // await this.ctx.service.student.arrangeNumber({ classid: cla._id });
|
|
|
- // }
|
|
|
+ const ckeys = Object.keys(result);
|
|
|
+ for (const classid of ckeys) {
|
|
|
+ await this.stumodel.updateMany({ _id: result[classid] }, { classid });
|
|
|
+ }
|
|
|
+ // 新添,给学生排序号
|
|
|
+ const claList = await this.model.find({ termid });
|
|
|
+ for (const cla of claList) {
|
|
|
+ await this.ctx.service.student.arrangeNumber({ classid: cla._id });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|