Parcourir la source

修改自动排课天数问题

liuyu il y a 5 ans
Parent
commit
5aba951b16
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      app/service/lesson.js

+ 2 - 2
app/service/lesson.js

@@ -43,10 +43,10 @@ class LessonService extends CrudService {
         const sedays = await this.getAllDays(batch.startdate, batch.enddate);
         const sedays = await this.getAllDays(batch.startdate, batch.enddate);
         // 根据批次取得当前批次下所有班级
         // 根据批次取得当前批次下所有班级
         const _classs = await this.clamodel.find({ planid: id, termid: elm.id, batchid: batch.id });
         const _classs = await this.clamodel.find({ planid: id, termid: elm.id, batchid: batch.id });
-        // 记录天数
-        let i = 1;
         // 循环班级
         // 循环班级
         for (const cla of _classs) {
         for (const cla of _classs) {
+          // 记录天数
+          let i = 1;
           // 循环天数
           // 循环天数
           const newlesson = [];
           const newlesson = [];
           for (const day of sedays) {
           for (const day of sedays) {