您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

56 行
1.7 KiB

  1. using Learun.Application.Base.SystemModule;
  2. using Learun.Application.TwoDevelopment.LogisticsManagement;
  3. using Learun.Application.TwoDevelopment.PersonnelManagement;
  4. using Learun.Util;
  5. using Nancy;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. namespace Learun.Application.WebApi.Modules
  10. {
  11. /// <summary>
  12. /// 考勤打卡功能
  13. /// </summary>
  14. public class AttendanceApi : BaseApi
  15. {
  16. public AttendanceApi()
  17. : base("/learun/adms/attendance")
  18. {
  19. Get["/getrecordpagelist"] = GetRecordPageList;
  20. Post["/clockin"] = ClockIn;
  21. }
  22. private ADR_RestrictionIBLL adr_RestrictionBLL = new ADR_RestrictionBLL();
  23. private ADR_RecordIBLL adr_RecordBLL = new ADR_RecordBLL();
  24. /// <summary>
  25. /// 打卡
  26. /// </summary>
  27. /// <param name="_"></param>
  28. /// <returns></returns>
  29. public Response ClockIn(dynamic _)
  30. {
  31. adr_RestrictionBLL.ClockIn();
  32. return Success("打卡成功");
  33. }
  34. /// <summary>
  35. /// 打卡
  36. /// </summary>
  37. /// <param name="_"></param>
  38. /// <returns></returns>
  39. public Response GetRecordPageList(dynamic _)
  40. {
  41. ReqPageParam parameter = this.GetReqData<ReqPageParam>();
  42. var data = adr_RecordBLL.GetPageList(parameter.pagination, parameter.queryJson);
  43. var jsonData = new
  44. {
  45. rows = data,
  46. total = parameter.pagination.total,
  47. page = parameter.pagination.page,
  48. records = parameter.pagination.records
  49. };
  50. return Success(jsonData);
  51. }
  52. }
  53. }