using ASHermed.SinoInterface.Api.ContractModel;
using ASHermed.SinoInterface.Api.ContractModel.App;
using ASHermed.SinoInterface.Api.ContractModel.Online.Param;
using ASHermed.SinoInterface.Repository.MySql;
using System;
using System.Collections.Generic;
using System.Text;

namespace ASHermed.SinoInterface.Api.IRepository
{
    public interface IOnlineAptInfoRepository : IBaseRepositoryToASHermed_SinoInterface<Online_Apt_Info>
    {
        int InsertOnlineApt(OnlineAptParam param);

        AptInfoModel GetAptInfoById(int aptId);
        Online_Apt_Info GetAptInfo(int aptId);
        /// <summary>
        /// 修改预约单状态1待确认,2已确认,3已取消,4已付款(对应我的预约即将就诊),5已完成
        /// </summary>
        /// <param name="aptId"></param>
        /// <param name="innerStatus"></param>
        /// <returns></returns>
        int UpdateAptStatus(int aptId, int innerStatus);
        /// <summary>
        /// 修改预约单保险状态0=未使用,1=待确认/2=取消/4=已确认
        /// </summary>
        /// <param name="aptId"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int UpdateAptInnerStatus(int aptId, int status);

        List<GetMyOnlineApt> GetMyOnlineApt(int userid, int type, int language);
        List<GetMyOnlineAptNew> GetMyOnlineAptNew(int userid);
        List<GetMyOnlineApt> GetMyOnlineVideoApt(int userid, int type, int language);
        string GetAptUsrn(int aptId);

        List<Online_Apt_Info> GetAptLockUsrnList(int patId);
        List<TreatedInfo> GetReadyApt(List<int> patIds, int userid);
        List<TreatedInfo> GetCignaApt(int userId);
        List<Tencent_Group_Record> GetForbiddenGroup();
        int UpdateGroupForbiddenTask(string groupId);
        List<OnlineAptInfoModel> GetAptTimeCond();
        List<OnlineAptInfoModel> GetAptTimeForDoc();
        List<OnlineAptInfoModel> GetAptTimeAfertCond();
        /// <summary>
        /// 修改用户是否已读
        /// 预约类型(1视频预约,2复诊开药)
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="isRead"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        bool UpdatePubUserInfoIsRead(int userId, bool isRead, int type);
        Pub_User_Info GetUserByPatId(int patId);
        List<Online_Apt_Info> GetAptInfoForUsrn(string usrn);

        int GetTodayAptCountByDept(int deptId, string date);
    }
}
