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