using Learun.Application.Base.SystemModule; using Learun.Application.TwoDevelopment.LogisticsManagement; using Learun.Application.TwoDevelopment.PersonnelManagement; using Learun.Util; using Nancy; using System; using System.Collections.Generic; using System.IO; namespace Learun.Application.WebApi.Modules { /// /// 考勤打卡功能 /// public class AttendanceApi : BaseApi { public AttendanceApi() : base("/learun/adms/attendance") { Get["/getrecordpagelist"] = GetRecordPageList; Post["/clockin"] = ClockIn; } private ADR_RestrictionIBLL adr_RestrictionBLL = new ADR_RestrictionBLL(); private ADR_RecordIBLL adr_RecordBLL = new ADR_RecordBLL(); /// /// 打卡 /// /// /// public Response ClockIn(dynamic _) { adr_RestrictionBLL.ClockIn(); return Success("打卡成功"); } /// /// 打卡 /// /// /// public Response GetRecordPageList(dynamic _) { ReqPageParam parameter = this.GetReqData(); var data = adr_RecordBLL.GetPageList(parameter.pagination, parameter.queryJson); var jsonData = new { rows = data, total = parameter.pagination.total, page = parameter.pagination.page, records = parameter.pagination.records }; return Success(jsonData); } } }