lrf402788946 4 năm trước cách đây
mục cha
commit
3cede9dda4
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      app/service/trainplan.js

+ 1 - 2
app/service/trainplan.js

@@ -127,8 +127,7 @@ class TrainplanService extends CrudService {
       // 查哪个学校schtime表没有生成,就给生成了
       const schoolList = await this.smodel.find();
       for (const school of schoolList) {
-        const r = await this.schmodel.find({ year, planid: id, schid: school.code });
-        console.log(r);
+        const r = await this.schmodel.findOne({ year, planid: id, schid: school.code });
         if (r) continue;
         const obj = { schid: school.code, year, planid: id };
         await this.schmodel.create(obj);