teaplan.js 662 B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.teaplan.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 班主任全年计划管理
  7. class TeaplanController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.teaplan;
  11. }
  12. async findteacher() {
  13. const data = await this.service.findteacher(this.ctx.query);
  14. this.ctx.ok({ data });
  15. }
  16. async divide() {
  17. const data = await this.service.divide(this.ctx.query);
  18. this.ctx.ok({ data });
  19. }
  20. }
  21. module.exports = CrudController(TeaplanController, meta);