|
@@ -13,6 +13,22 @@ class SchtimeService extends CrudService {
|
|
|
this.model = this.ctx.model.Schtime;
|
|
|
}
|
|
|
|
|
|
+ async updateschtimes(data) {
|
|
|
+ assert(data, '缺少信息项');
|
|
|
+ for (const elm of data) {
|
|
|
+ const schtime = await this.model.findById();
|
|
|
+ if (schtime) {
|
|
|
+ schtime.schid = elm.schid;
|
|
|
+ schtime.year = elm.year;
|
|
|
+ schtime.planid = elm.planid;
|
|
|
+ schtime.remark = elm.remark;
|
|
|
+ schtime.daterange = elm.daterange;
|
|
|
+ schtime.term = elm.term;
|
|
|
+ await schtime.save();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|