Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

58 linhas
1.7 KiB

  1. using Learun.Application.Form;
  2. using Learun.Util;
  3. using Nancy;
  4. namespace Learun.Application.WebApi.Modules
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创建人:数字化智慧校园-框架开发组
  10. /// 日 期:2018.03.22
  11. /// 描 述:自定义表单功能
  12. /// </summary>
  13. public class CustmerFormApi: BaseApi
  14. {
  15. /// <summary>
  16. /// 注册接口
  17. /// </summary>
  18. public CustmerFormApi()
  19. : base("/learun/adms/custmer")
  20. {
  21. Get["/pagelist"] = GetPageList;// 获取数据字典详细列表
  22. }
  23. private FormSchemeIBLL formSchemeIBLL = new FormSchemeBLL();
  24. /// <summary>
  25. /// 获取自定义表单分页数据
  26. /// </summary>
  27. /// <param name="_"></param>
  28. /// <returns></returns>
  29. private Response GetPageList(dynamic _)
  30. {
  31. QueryModel parameter = this.GetReqData<QueryModel>();
  32. var data = formSchemeIBLL.GetFormPageList(parameter.formId, parameter.pagination, parameter.queryJson);
  33. var jsonData = new
  34. {
  35. rows = data,
  36. total = parameter.pagination.total,
  37. page = parameter.pagination.page,
  38. records = parameter.pagination.records,
  39. };
  40. return Success(jsonData);
  41. }
  42. /// <summary>
  43. /// 查询条件对象
  44. /// </summary>
  45. private class QueryModel
  46. {
  47. public Pagination pagination { get; set; }
  48. public string formId { get; set; }
  49. public string queryJson { get; set; }
  50. }
  51. }
  52. }