using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Threading.Tasks;
using YBDevice.Entity;
using YBDevice.NApi.Application.MeasureInfo;
using YBDevice.NApi.Application.UserInfo;

namespace YBDevice.NApi
{
    /// <summary>
    /// 用户测量处理
    /// </summary>
    public interface IResultService
    {
        /// <summary>
        /// 增加测量记录,用于蓝牙传输,身高带有单位(cm/ft)
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> MeasureOfUnitAsync(MeasureOfUnitSubmitModel model);

        /// <summary>
        /// 增加测量记录,用于蓝牙传输
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> MeasureAsync(MeasureSubmitModel model);

        /// <summary>
        /// 增加测量记录,用于蓝牙传输,适用于F01PRO
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> MeasureDataAsync(MeasureDataSubmitModel model);

        /// <summary>
        /// 添加测量记录,针对八电极
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> InsertBodyMeasureAsync(MeasureBodySubmitC2SDto data);

        /// <summary>
        /// 添加测量记录,针对八电极,不激活
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> InsertBodyMeasureNoActiveAsync(MeasureBodySubmitC2SDto data);

        /// <summary>
        /// 手动增加测量记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> InsertMeasureAsync(UserMeasureSubmitModel model);

        /// <summary>
        /// 获取历史记录
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <returns></returns>
        Task<PageParms<MeasureHisList>> GetHistoryListAsync(ParamQuery param);

        /// <summary>
        /// 删除测量记录
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteAsync(DeleteResultC2SDto data);

        /// <summary>
        /// 获取八电极历史记录
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <returns></returns>
        Task<PageParms<BodyMeasureHisListDto>> GetBodyHistoryListAsync(ParamQuery param);

        /// <summary>
        /// 手动添加的历史记录
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<AddResultList>> GetAddListAsync(ParamQuery param);

        /// <summary>
        /// 删除手动添加的记录
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultInfo> DeleteAddResultAsync(Guid id);

        /// <summary>
        /// 检测设备状态
        /// </summary>
        /// <param name="sn">设备机器码</param>
        /// <param name="type">类型,0-检测设备是否存在,1-不检测</param>
        /// <returns></returns>
        Task<ResultInfo> CheckDevStatus(string sn, int type = 0);

        /// <summary>
        /// 两次测量记录对比
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> ResultDiff(ResultDiffC2SDto data);

        /// <summary>
        /// 测量记录详情
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultInfo> DetailAsync(ResultDetailC2SDto input);
    }
}