disclosure.js 617 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. const meta = require('./.disclosure.js');
  3. const Controller = require('egg').Controller;
  4. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  5. // 交底书
  6. class DisclosureController extends Controller {
  7. constructor(ctx) {
  8. super(ctx);
  9. this.service = this.ctx.service.patent.disclosure;
  10. }
  11. async haveReport() {
  12. const data = await this.service.haveReport(this.ctx.query);
  13. this.ctx.ok(data);
  14. }
  15. async toExport() {
  16. await this.service.toExport(this.ctx.request.body);
  17. this.ctx.ok();
  18. }
  19. }
  20. module.exports = CrudController(DisclosureController, meta);