TxController.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Data.Entity;
  5. using System.Data.Entity.Migrations;
  6. using System.Data.SqlClient;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Web.Http;
  12. using XdCxRhDW.Dto;
  13. using XdCxRhDW.Api;
  14. using XdCxRhDW.Entity;
  15. using XdCxRhDW.Repostory;
  16. using XdCxRhDW.WebApi;
  17. namespace XdCxRhDW.App.Controllers
  18. {
  19. ///// <summary>
  20. ///// 天线信息接口
  21. ///// </summary>
  22. //public class TxController : BaseController
  23. //{
  24. // /// <summary>
  25. // /// 获取天线信息(Item1:接收站,Item2:超短波,Item3:测向站,Item4:参考站)
  26. // /// </summary>
  27. // /// <returns></returns>
  28. // [HttpGet]
  29. // public async Task<AjaxResult<(TxInfo recTx, TxInfo cdbTx, TxInfo cxTx, TxInfo refLoc)>> GetTxInfoAsync()
  30. // {
  31. // (TxInfo recTx, TxInfo cdbTx, TxInfo cxTx, TxInfo refLoc) txInfo;
  32. // try
  33. // {
  34. // using (RHDWContext db = new RHDWContext())
  35. // {
  36. // List<TxInfo> list = await db.TxInfos.ToListAsync();
  37. // var recTx = list.Find(p => p.TxType == EnumTxType.Rec);
  38. // var cdbTx = list.Find(p => p.TxType == EnumTxType.Cdb);
  39. // var cxTx = list.Find(p => p.TxType == EnumTxType.Cx);
  40. // var refLoc = list.Find(p => p.TxType == EnumTxType.Ref);
  41. // txInfo = ValueTuple.Create(recTx, cdbTx, cxTx, refLoc);
  42. // }
  43. // }
  44. // catch (Exception ex)
  45. // {
  46. // return Error<(TxInfo, TxInfo, TxInfo, TxInfo)>($"查询天线信息异常,{ex.Message}");
  47. // }
  48. // return Success<(TxInfo, TxInfo, TxInfo, TxInfo)>(txInfo);
  49. // }
  50. //}
  51. }