Files
ThingsGateway/framework/ThingsGateway.Application/Services/UploadDevice/IUploadDeviceService.cs
Kimdiego2098 13be91e78b 2.0.0
2023-08-07 15:09:53 +08:00

85 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#region copyright
//------------------------------------------------------------------------------
// 此代码版权声明为全文件覆盖,如有原作者特别声明,会在下方手动补充
// 此代码版权除特别声明外的代码归作者本人Diego所有
// 源代码使用协议遵循本仓库的开源协议及附加协议
// Gitee源代码仓库https://gitee.com/diego2098/ThingsGateway
// Github源代码仓库https://github.com/kimdiego2098/ThingsGateway
// 使用文档https://diego2098.gitee.io/thingsgateway-docs/
// QQ群605534569
//------------------------------------------------------------------------------
#endregion
using Furion.DependencyInjection;
using Microsoft.AspNetCore.Components.Forms;
namespace ThingsGateway.Application;
/// <summary>
/// 上传设备服务
/// </summary>
public interface IUploadDeviceService : ITransient
{
/// <summary>
/// Sql连接对象
/// </summary>
public ISqlSugarClient Context { get; set; }
/// <summary>
/// 添加上传设备
/// </summary>
Task AddAsync(UploadDevice input);
/// <summary>
/// 复制设备
/// </summary>
Task CopyDevAsync(IEnumerable<UploadDevice> input);
/// <summary>
/// 删除设备
/// </summary>
Task DeleteAsync(params long[] input);
/// <summary>
/// 编辑设备
/// </summary>
Task EditAsync(UploadDeviceEditInput input);
/// <summary>
/// 导出
/// </summary>
Task<MemoryStream> ExportFileAsync(List<UploadDevice> devDatas = null);
/// <summary>
/// 导出
/// </summary>
Task<MemoryStream> ExportFileAsync(UploadDeviceInput input);
/// <summary>
/// 获取缓存
/// </summary>
List<UploadDevice> GetCacheList(bool isMapster = true);
/// <summary>
/// 根据ID获取设备
/// </summary>
UploadDevice GetDeviceById(long Id);
/// <summary>
/// 根据名称获取ID
/// </summary>
long? GetIdByName(string name);
/// <summary>
/// 根据ID获取名称
/// </summary>
string GetNameById(long id);
/// <summary>
/// 获取上传设备运行状态
/// </summary>
List<UploadDeviceRunTime> GetUploadDeviceRuntime(long devId = 0);
/// <summary>
/// 导入
/// </summary>
Task ImportAsync(Dictionary<string, ImportPreviewOutputBase> input);
/// <summary>
/// 分页
/// </summary>
Task<SqlSugarPagedList<UploadDevice>> PageAsync(UploadDevicePageInput input);
/// <summary>
/// 导入验证
/// </summary>
Task<Dictionary<string, ImportPreviewOutputBase>> PreviewAsync(IBrowserFile file);
}