From b0f5cfb36734d28d8f0dd7461c8d0125a9fc8052 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Mon, 14 Nov 2022 15:10:24 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91webapi?=
=?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E6=99=AE=E9=80=9A=E6=95=99=E5=B8=88?=
=?UTF-8?q?=E8=AF=B7=E5=81=87=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=E3=80=81?=
=?UTF-8?q?=E4=B8=AD=E5=B1=82=E5=8F=8A=E9=A2=86=E5=AF=BC=E8=AF=B7=E5=81=87?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Learun.Application.WebApi.csproj | 1 +
.../PersonnelManagement/CustmerLeaveApi.cs | 87 +++++++++++++++++++
2 files changed, 88 insertions(+)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/CustmerLeaveApi.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
index 93fd1d6c5..306b5ec18 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
@@ -203,6 +203,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/CustmerLeaveApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/CustmerLeaveApi.cs
new file mode 100644
index 000000000..9a6c7bdef
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/CustmerLeaveApi.cs
@@ -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
+{
+ ///
+ /// 版 本 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
+
+ }
+}