Ver código fonte

信息化办公设备管理接口

长阳分支中职
ndbs 1 mês atrás
pai
commit
2ab22144a9
2 arquivos alterados com 122 adições e 0 exclusões
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  2. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/OfficeEquipmentApi.cs

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Ver arquivo

@@ -195,6 +195,7 @@
<Compile Include="Modules\Echarts\StudentEchartsApi.cs" />
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermApi.cs" />
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermNewApi.cs" />
<Compile Include="Modules\EducationalAdministration\OfficeEquipmentApi.cs" />
<Compile Include="Modules\EducationalAdministration\SafetyCheckApi.cs" />
<Compile Include="Modules\SSOApi.cs" />
<Compile Include="Modules\StampPersonalApi.cs" />


+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/OfficeEquipmentApi.cs Ver arquivo

@@ -0,0 +1,121 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-12-25 14:53
/// 描 述:日程安排
/// </summary>
public class OfficeEquipmentApi : BaseApi
{
private OfficeEquipmentIBLL OfficeEquipmentIBLL = new OfficeEquipmentBLL();

/// <summary>
/// 注册接口
/// <summary>
public OfficeEquipmentApi()
: base("/Learun/adms/EducationalAdministration/OfficeEquipment")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = OfficeEquipmentIBLL.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 GetList(dynamic _)
//{
// string queryJson = this.GetReqData();
// var data = OfficeEquipmentIBLL.GetList();
// return Success(data);
//}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var OfficeEquipmentData = OfficeEquipmentIBLL.GetOfficeEquipmentEntity(keyValue);

var jsonData = new
{
OfficeEquipment = OfficeEquipmentData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
OfficeEquipmentIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
OfficeEquipmentEntity entity = parameter.strEntity.ToObject<OfficeEquipmentEntity>();
OfficeEquipmentIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

Carregando…
Cancelar
Salvar