using PoJun.Dapper.IRepository;
using ASHermed.SinoInterface.Entity.Test;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using ASHermed.SinoInterface.Repository.MySql;
using ASHermed.SinoInterface.Api.ContractModel;
using ASHermed.AdminInterface.Api.ContractModel;
using ASHermed.SinoInterface.Api.ContractModel.App;

namespace ASHermed.SinoInterface.Api.IRepository
{

    public interface IOnlineOrderRepository : IBaseRepositoryToASHermed_SinoInterface<Online_Order>
    {
        int CreateOrder(Online_Order order);
        int PerfPayInfoByNo(string orderNo, string PayType, string payTime, string tradeNo, string tradeStatus);
        int AppPerfPayInfoByNo(string orderNo, string payTime, string tradeNo, string tradeStatus);
        PageListModel<OrderListModel> GetOrderList(OrderListReq req, List<int> patIds);
        OrderDetailModel GetOrderDetail(string orderNo, int language);
        List<Online_Order> GetAllOrder();
        OrderDetailModel GetOrderDetailForAptId(string aptId, int language);
        OrderDetailModel GetOrderDetailForPrescriptionAptId(int aptId);

        Online_Order GetOrderByNo(string orderNo);
        /// <summary>
        /// 订单状态(1待付款,2已付款 待确认,3已付款 已确认,4已付款 已完成就诊,5订单取消,6 订单退款成功,7 订单退款失败, 8 订单退款中, 9保险待审核,10保险已审核,11保险已完成,12保险通过,13药房审核,14保险理赔审核,17医生审核,20保险代签字)
        /// </summary>
        /// <param name="orderNo"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int UpdateOrder(string orderNo, int status);

        int CommentOrder(OrderCommentReq req);
        int UpdateCFOrder(int prescriptionId, int status);
        int UpdateOrderPayWay(string orderNo, string payway);
        int InsuranceOrderSign(InsuranceOrderSignReq req);

        List<string> GetCancelOrders();
        string GetGroupOrderNo(string groupId);
        List<Tencent_Group_Record> GetAllTencentGroup();
        int UpdateGroupUserId(int id, int userId);
        Online_Order_Comment GetOrderComment(string orderNo);
        int UpdateComment(OrderCommentReq req);

        List<Online_Order> GetNoticeOrders();
        /// <summary>
        /// 订单状态(1待付款,2已付款 待确认,3已付款 已确认,4已付款 已完成就诊,5订单取消,6 订单退款成功,7 订单退款失败, 8 订单退款中, 9保险待审核,10保险已审核,11保险已完成,20保险代签字)
        /// </summary>
        List<Online_Order> GetOrderByStatus(int userId, int status);
        AptInfo CheckMySoonApt(int userId, int language);
        string CheckMySoonPre(int userId);

        List<Online_Order> GetSginNoticeOrders();
        Online_Order GetUserSignOrders(int userId);
    }
}
