'use strict'; const _ = require('lodash'); const meta = require('./.trainplan.js'); const Controller = require('egg').Controller; const { CrudController } = require('naf-framework-mongoose/lib/controller'); // 培训计划管理 class TrainplanController extends Controller { constructor(ctx) { super(ctx); this.service = this.ctx.service.trainplan; } // 导出exportExcel async exportExcel() { const data = await this.service.exportExcel(this.ctx.request.body); this.ctx.ok({ data }); } // 导出exportSchool学校大表 async exportSchool() { const data = await this.service.exportSchool(this.ctx.request.body); this.ctx.ok({ data }); } // 导出exportPlan计划日历 async exportPlan() { const data = await this.service.exportPlan(this.ctx.request.body); this.ctx.ok({ data }); } async updateclass() { const data = await this.service.updateclass(this.ctx.request.body); this.ctx.ok({ data }); } async updatereteacher() { const data = await this.service.updatereteacher(this.ctx.request.body); this.ctx.ok({ data }); } } module.exports = CrudController(TrainplanController, meta);