|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using System.Text;
|
|
|
|
|
using DocumentFormat.OpenXml.Math;
|
|
|
|
|
using Infrastructure;
|
|
|
|
|
using Infrastructure.CloudSdk.wayline;
|
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
@ -174,7 +175,23 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 导出无人机信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public async Task<IActionResult> ExportDevice()
|
|
|
|
|
{
|
|
|
|
|
var content = await _app.GetUavSn();
|
|
|
|
|
// 将内容转换为字节数组(UTF-8 编码)
|
|
|
|
|
byte[] fileBytes = Encoding.UTF8.GetBytes(content);
|
|
|
|
|
|
|
|
|
|
// 设置文件名(你也可以支持动态命名)
|
|
|
|
|
string fileName = "DeviceSNList_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
|
|
|
|
|
|
|
|
|
|
// 返回带内容的 FileResult,Content-Type 设置为 text/plain
|
|
|
|
|
return File(fileBytes, "text/plain", fileName);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 任务管理
|
|
|
|
|