attendance.js 838 B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.attendance.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 考勤表管理
  7. class AttendanceController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.attendance;
  11. }
  12. // 考勤专用页面
  13. async wxauth() {
  14. console.log(this.ctx.query);
  15. const res = '{}';
  16. this.ctx.ok({ res });
  17. }
  18. async attendancecreate() {
  19. const res = await this.service.attendancecreate(this.ctx.request.body);
  20. this.ctx.ok({ res });
  21. }
  22. async attendancecreateList() {
  23. const res = await this.service.attendancecreateList(this.ctx.request.body);
  24. this.ctx.ok({ res });
  25. }
  26. }
  27. module.exports = CrudController(AttendanceController, meta);