12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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
- {
- ///// <summary>
- ///// 天线信息接口
- ///// </summary>
- //public class TxController : BaseController
- //{
- // /// <summary>
- // /// 获取天线信息(Item1:接收站,Item2:超短波,Item3:测向站,Item4:参考站)
- // /// </summary>
- // /// <returns></returns>
- // [HttpGet]
- // public async Task<AjaxResult<(TxInfo recTx, TxInfo cdbTx, TxInfo cxTx, TxInfo refLoc)>> GetTxInfoAsync()
- // {
- // (TxInfo recTx, TxInfo cdbTx, TxInfo cxTx, TxInfo refLoc) txInfo;
- // try
- // {
- // using (RHDWContext db = new RHDWContext())
- // {
- // List<TxInfo> 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);
- // }
- //}
- }
|