using MadRunFabric.Common;
using MadRunFabric.Model.WorkOrderApi;
using System;
using System.Collections.Generic;
using System.Text;

namespace WorkOrderApi.IRepositories
{
    /// <summary>
    /// 工单 - 售后管理系统
    /// </summary>
    public interface IBus_WorkOrder_BaseRepository : IRepository<Bus_WorkOrder_Base, string>
    {
        /// <summary>
        /// 分页列表 - 根据分页查询数据列表 包含查询条件，显示字段，排序 
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IEnumerable<object> GetListsByPage(string ordercode, string keyword, string phone, string province, string city, string sourceid,
            string typeid, string deptid, string stime, string etime, int state, int pageindex, int pagesize, out int recordCount);

        /// <summary>
        /// 详情 - 获取详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        object GetDetails(string id);

        /// <summary>
        /// 根据工单状态获取工单
        /// </summary>
        /// <param name="ordercode"></param>
        /// <param name="key"></param>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IEnumerable<object> GetOrderListsByPage(string ordercode, string key, string stime, string etime, int state, string touser, string sureuser, string dealuser, string createuser, string phone, string province, string city, string sourceid,
            string typeid, string deptid, int pageindex, int pagesize, out int recordCount, int isdc);

        /// <summary>
        /// 获取日周月年工单类型统计
        /// </summary>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="optuser"></param>
        /// <returns></returns>
        object GetWorkOrderTypeCountReport(string stime, string etime, string optuser);

        /// <summary>
        /// 获取日周月年工单来源统计
        /// </summary>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="optuser"></param>
        /// <returns></returns>
        object GetWorkOrderSourceCountReport(string stime, string etime, string optuser);

        /// <summary>
        /// 获取日周月年工单24小时统计
        /// </summary>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="optuser"></param>
        /// <returns></returns>
        object GetWorkOrder24CountReport(string stime, string etime, string optuser);

        /// <summary>
        /// 获取用户工单排行榜
        /// </summary>
        /// <param name="top"></param>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <returns></returns>
        object GetUserCountRank(int top, string stime, string etime);

        /// <summary>
        /// 用于导出已处理工单
        /// </summary>
        /// <param name="ordercode"></param>
        /// <param name="key"></param>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IEnumerable<object> GetOrderLists(string ordercode, string key, string stime, string etime, int state, string touser, string sureuser, string dealuser, string createuser, string phone, string province, string city, string sourceid,
            string typeid, string deptid, out int recordCount);
    }
}
