using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using DW5S.DTO; using DW5S.Entity; using DW5S.Repostory; using DW5S.WebApi; namespace DW5S.Controllers { ///// ///// 天线信息接口 ///// //public class TxController : BaseController //{ // /// // /// 获取天线信息(Item1:接收站,Item2:超短波,Item3:测向站,Item4:参考站) // /// // /// // [HttpGet] // public async Task> GetTxInfoAsync() // { // (TxInfo recTx, TxInfo cdbTx, TxInfo cxTx, TxInfo refLoc) txInfo; // try // { // using (RHDWContext db = new RHDWContext()) // { // List list = await db.TxInfos.ToListAsync(); // var recTx = list.Find(p => p.TxType == EnumTxType.Rec); // var cdbTx = list.Find(p => p.TxType == EnumTxType.Cdb); // var cxTx = list.Find(p => p.TxType == EnumTxType.Cx); // var refLoc = list.Find(p => p.TxType == EnumTxType.Ref); // txInfo = ValueTuple.Create(recTx, cdbTx, cxTx, refLoc); // } // } // catch (Exception ex) // { // return Error<(TxInfo, TxInfo, TxInfo, TxInfo)>($"查询天线信息异常,{ex.Message}"); // } // return Success<(TxInfo, TxInfo, TxInfo, TxInfo)>(txInfo); // } //} }