'use strict'; const _ = require('lodash'); const meta = require('./.lesson.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 课程表管理 class LessonController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.lesson; } // 自动排课 async autolesson() { const res = await this.service.autolesson(this.ctx.params); this.ctx.ok({ res }); } // 根据计划id与教师id查出班级和课程信息 async classbyteaid() { const data = await this.service.classbyteaid(this.ctx.request.query); this.ctx.ok({ data }); } // 根据计划id与教师id查出班级和课程信息 async teaclass() { const data = await this.service.teaclass(this.ctx.request.query); this.ctx.ok({ data }); } async uplessones() { const res = await this.service.uplessones(this.ctx.request.body); this.ctx.ok({ msg: "ok", data: res }); } } module.exports = CrudController(LessonController, meta);