using Nancy;
using Learun.Util;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using Learun.Application.OA.Schedule;
using System;
using Learun.Application.TwoDevelopment.LR_LGManager;
namespace Learun.Application.WebApi
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-12-25 14:53
/// 描 述:自定义表单-教师请假统计
///
public class CustmerLeaveApi : BaseApi
{
private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL();
private StudentLeave_zcIBLL studentLeave_zcIBLL = new StudentLeave_zcBLL();
///
/// 注册接口
///
public CustmerLeaveApi()
: base("/Learun/adms/PersonnelManagement/CustmerLeave")
{
Get["/teacherleave"] = GetPageListOfTeacherLeave;
Get["/leaderleave"] = GetPageListOfLeaderLeave;
}
#region 获取数据
///
/// 普通教师请假统计
///
///
///
public Response GetPageListOfTeacherLeave(dynamic _)
{
ReqPageParam parameter = this.GetReqData();
var data = studentLeaveIBLL.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);
}
///
/// 中层及领导请假统计
///
///
///
public Response GetPageListOfLeaderLeave(dynamic _)
{
ReqPageParam parameter = this.GetReqData();
var data = studentLeave_zcIBLL.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);
}
#endregion
#region 私有类
///
/// 表单实体类
///
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion
}
}