attendance.js 805 B

12345678910111213141516171819202122232425262728293031
  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. const res = '{}';
  15. this.ctx.ok({ res });
  16. }
  17. async attendancecreate() {
  18. const res = await this.service.attendancecreate(this.ctx.request.body);
  19. this.ctx.ok({ res });
  20. }
  21. async attendancecreateList() {
  22. const res = await this.service.attendancecreateList(this.ctx.request.body);
  23. this.ctx.ok({ res });
  24. }
  25. }
  26. module.exports = CrudController(AttendanceController, meta);