TxController.cs 1.7 KB

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