|
@@ -464,7 +464,7 @@ class TrainplanService extends CrudService {
|
|
{ key: 'family_is_hard', title: '是否困难' },
|
|
{ key: 'family_is_hard', title: '是否困难' },
|
|
{ key: 'have_grant', title: ' 是否获得过助学金' },
|
|
{ key: 'have_grant', title: ' 是否获得过助学金' },
|
|
// { key: 'job', title: '职务' },
|
|
// { key: 'job', title: '职务' },
|
|
- { key: 'bedroom', title: '寝室号' },
|
|
|
|
|
|
+ // { key: 'bedroom', title: '寝室号' },
|
|
{ key: 'is_fine', title: '是否优秀' },
|
|
{ key: 'is_fine', title: '是否优秀' },
|
|
{ key: 'isComming', title: '是否签到' },
|
|
{ key: 'isComming', title: '是否签到' },
|
|
{ key: 'selfscore', title: '个人分' },
|
|
{ key: 'selfscore', title: '个人分' },
|
|
@@ -1148,18 +1148,18 @@ class TrainplanService extends CrudService {
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
- async updatereteacher({ trainplanid, termid, reteacher }) {
|
|
|
|
- assert(trainplanid && termid && reteacher, '缺少参数项');
|
|
|
|
|
|
+ async updatereteacher({ trainplanid, termid, placereteacher }) {
|
|
|
|
+ assert(trainplanid && termid && placereteacher, '缺少参数项');
|
|
// 根据全年计划表id查出对应的全年计划详细信息
|
|
// 根据全年计划表id查出对应的全年计划详细信息
|
|
const trainplan = await this.model.findById(trainplanid);
|
|
const trainplan = await this.model.findById(trainplanid);
|
|
if (!trainplan) {
|
|
if (!trainplan) {
|
|
throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '全年计划信息不存在');
|
|
throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '全年计划信息不存在');
|
|
}
|
|
}
|
|
- const term = await trainplan.termnum.id(termid);
|
|
|
|
- if (term) {
|
|
|
|
- term.reteacher = reteacher;
|
|
|
|
|
|
+ const termnum = trainplan.termnum.find((f) => ObjectId(termid).equals(f._id));
|
|
|
|
+ if (termnum) {
|
|
|
|
+ termnum.placereteacher = placereteacher;
|
|
}
|
|
}
|
|
- return await trainplan.save();
|
|
|
|
|
|
+ await this.model.updateOne({ _id: trainplanid }, trainplan);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
module.exports = TrainplanService;
|
|
module.exports = TrainplanService;
|