using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using YBDevice.Entity;

namespace YBDevice.NApi
{
    /// <summary>
    /// 设备管理
    /// </summary>
    public interface IDeviceService
    {
        /// <summary>
        /// 获取设备
        /// </summary>
        /// <param name="ecode"></param>
        /// <returns></returns>
        Task<DeviceAndTypeModel> GetEquAsync(string ecode);
        /// <summary>
        /// 获取设备信息
        /// </summary>
        /// <param name="facecode">设备序列号</param>
        /// <returns></returns>
        Task<YB_Device> GetDeviceAsync(string facecode);
        /// <summary>
        /// 获取设备信息
        /// </summary>
        /// <param name="ecode">设备机器码</param>
        /// <returns></returns>
        Task<YB_Device> GetDeviceByEcodeAsync(string ecode);
        /// <summary>
        /// 设备注册
        /// </summary>
        /// <param name="yB_Device">设备资料</param>
        /// <returns></returns>
        Task<ResultInfo> RegAsync(YB_Device yB_Device);
        /// <summary>
        /// 设备列表
        /// </summary>
        /// <returns></returns>
        Task<List<YB_Device>> GetListAsync();
        /// <summary>
        /// 获取设备类型列表
        /// </summary>
        /// <param name="appid">小程序appid</param>
        /// <returns></returns>
        Task<ResultInfo> GetTypeListAsync(string appid);
        /// <summary>
        /// 根据设备确定要使用的公众号或者小程序
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<string> GetOfficeByDeviceAsync(YB_Device data);

        /// <summary>
        /// YB_Result迁移到YB_nResult
        /// </summary>
        void Result2NewResult();
        /// <summary>
        /// 根据扫码的设备列表导出EXCEL
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> ExportExcelByScanListAsync(ScanListC2SDto data);
    }
}
