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

namespace YBDevice.Application
{
    /// <summary>
    /// 测量记录
    /// </summary>
    public interface IResultService
    {
        /// <summary>
        /// 测量记录列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<MeasureUserListDto>> GetListAsync(QueryParams param);
        /// <summary>
        /// 根据设备查询测量记录列表
        /// </summary>
        /// <param name="devid"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<MeasureUserListDto>> GetDevResultAsync(int devid,QueryParams param);

        /// <summary>
        /// 根据记录ID,查询用户汇总数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<MeasureUserDto> GetUserData(int id);
        /// <summary>
        /// 指定用户的体重记录列表
        /// </summary>
        /// <param name="id"></param>
        /// <param name="starttime"></param>
        /// <param name="endtime"></param>
        /// <returns></returns>
        Task<List<MeasureUserWeightDto>> GetUserResultAsync(int id, DateTime? starttime, DateTime? endtime);
        /// <summary>
        /// 根据用户ID查询用户汇总汇总数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<FamilyDto>> GetUserDataByUserIdAsync(int id, QueryParams param);
        /// <summary>
        /// 根据用户ID查询用户测量记录
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<MeasureUserListDto>> GetUserResultByUserIdAsync(int userid, QueryParams param);
        /// <summary>
        /// 查询记录详情
        /// </summary>
        /// <param name="id">记录ID</param>
        /// <returns></returns>
        Task<UserMeasureDetailDto> GetDetailAsync(Guid id);
        /// <summary>
        /// 导出信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<ResultInfo> ExportAsync(QueryParams param);
    }
}
