import.js 821 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. const Controller = require('egg').Controller;
  3. const { CrudController } = require('naf-framework-mongoose-free/lib/controller');
  4. //
  5. class ImportController extends Controller {
  6. constructor(ctx) {
  7. super(ctx);
  8. this.service = this.ctx.service.import;
  9. }
  10. async examinee() {
  11. const data = await this.service.updateExaminee(this.ctx.request.body);
  12. this.ctx.ok(data);
  13. }
  14. async staff() {
  15. const data = await this.service.staffBase(this.ctx.request.body);
  16. this.ctx.ok({ data });
  17. }
  18. async securityGuard() {
  19. const data = await this.service.securityGuard(this.ctx.request.body);
  20. this.ctx.ok(data);
  21. }
  22. async guardWork() {
  23. const data = await this.service.guardWork(this.ctx.request.body);
  24. this.ctx.ok(data);
  25. }
  26. }
  27. module.exports = CrudController(ImportController, {});