1234567891011121314151617181920212223242526272829 |
- 'use strict';
- const _ = require('lodash');
- const Controller = require('egg').Controller;
- const { CrudController } = require('naf-framework-mongoose/lib/controller');
- // 教师申请讲课表管理
- class CountController extends Controller {
- constructor(ctx) {
- super(ctx);
- this.service = this.ctx.service.count;
- }
- // 统计全年计划所有学校
- async countstudent() {
- const data = await this.service.countstudent();
- this.ctx.ok({ data });
- }
- // 按学校统计学生情况
- async countschstu() {
- const data = await this.service.countschstu(this.ctx.params);
- this.ctx.ok({ data });
- }
- }
- module.exports = CountController;
|