You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.4 KiB

  1. using Learun.Application.Base.SystemModule;
  2. using Learun.Application.TwoDevelopment.AssetManagementSystem;
  3. using Learun.Util;
  4. using Nancy;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. namespace Learun.Application.WebApi.Modules
  9. {
  10. public class Ass_AssetsInfoItemApi : BaseApi
  11. {
  12. public Ass_AssetsInfoItemApi()
  13. : base("/learun/adms/AssetManagementSystem/Ass_AssetsInfoItem")
  14. {
  15. Get["/getEntity"] = GetEntity;
  16. }
  17. private Ass_AssetsInfoItemIBLL ass_AssetsInfoItemIBLL = new Ass_AssetsInfoItemBLL();
  18. private Ass_AssetsInfoIBLL ass_AssetsInfoIBLL = new Ass_AssetsInfoBLL();
  19. /// <summary>
  20. /// 获取资产信息
  21. /// </summary>
  22. /// <param name="_"></param>
  23. /// <returns></returns>
  24. public Response GetEntity(dynamic _)
  25. {
  26. var keyValue = this.GetReqData();
  27. var entity = ass_AssetsInfoItemIBLL.GetAss_AssetsInfoItemEntity(keyValue);
  28. if (entity != null)
  29. {
  30. entity.ACode = ass_AssetsInfoIBLL.GetAss_AssetsInfoEntity(entity.AId)?.ACode;
  31. }
  32. else
  33. {
  34. entity = new Ass_AssetsInfoItemEntity();
  35. }
  36. var result = new
  37. {
  38. Ass_AssetsInfoItemEntity = entity
  39. };
  40. return Success(result);
  41. }
  42. }
  43. }