using Hotline.Share.Enums.Order;
using Hotline.Share.Requests;

namespace Hotline.Share.Dtos.JudicialManagement
{
    /// <summary>
    /// 司法行政监督管理工单查询参数
    /// </summary>
    public record QueryEnforcementOrderDto : PagedRequest
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 省本地编号（√）
        /// </summary>
        public string ProvinceNo { get; set; }

        /// <summary>
        /// 本地编号（√）
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 受理类型（√）
        /// </summary>
        public List<string> AcceptTypes { get; set; } = new();

        /// <summary>
        /// 来源渠道（√）
        /// </summary>
        public List<string> Channels { get; set; } = new();

        /// <summary>
        /// 转接号码（转接来源）（√）
        /// </summary>
        public string? TransferPhone { get; set; }

        /// <summary>
        /// 热点分类（√）
        /// </summary>
        public List<string> HotspotIds { get; set; } = new();

        /// <summary>
        /// 事项类型
        /// </summary>
        public string EventTypeId { get; set; } 

        /// <summary>
        /// 接办部门（√）
        /// </summary>
        public List<string> OrgCodes { get; set; } = new();

        /// <summary>
        /// 受理坐席名字或工号（×）
        /// </summary>
        public string? NameOrNo { get; set; }

        /// <summary>
        /// 受理时间(工单创建时间)（√）
        /// </summary>
        public DateTime? CreationTimeStart { get; set; }
        public DateTime? CreationTimeEnd { get; set; }

        /// <summary>
        /// 紧急程度（√）
        /// </summary>
        public List<EEmergencyLevel> EmergencyLevels { get; set; } = new();

        /// <summary>
        /// 来电号码（×）
        /// </summary>
        public string? FromPhone { get; set; }

        /// <summary>
        /// 来电或联系电话（√）
        /// </summary>
        public string? PhoneNo { get; set; }

        /// <summary>
        /// 推送分类（√）(单选)
        /// </summary>
        public string? PushTypeCode { get; set; }

        /// <summary>
        /// 期满时间（√）
        /// </summary>
        public DateTime? ExpiredTimeStart { get; set; }
        public DateTime? ExpiredTimeEnd { get; set; }


        /// <summary>
        /// 工单状态（√）
        /// </summary>
        public List<EOrderStatus> Statuses { get; set; } = new();

        /// <summary>
        /// 接办人（√）
        /// </summary>
        public string? ActualHandlerName { get; set; }

        /// <summary>
        /// 当前办理节点（√）（单选）
        /// </summary>
        public string CurrentStepCode { get; set; }

        /// <summary>
        /// 办结时间（√）
        /// </summary>
        public DateTime? ActualHandleTimeStart { get; set; }
        public DateTime? ActualHandleTimeEnd { get; set; }

        /// <summary>
        /// 是否超期（√）
        /// </summary>
        public bool? IsOverTime { get; set; }

        /// <summary>
        /// 来电主体（√）(单选)
        /// </summary>
        public EIdentityType? IdentityType { get; set; }

        /// <summary>
        /// 来电人姓名（×）
        /// </summary>
        public string? FromName { get; set; }

        /// <summary>
        /// 区域（×）(多选)
        /// </summary>
        public List<string> AreaCodes { get; set; } = new();

        /// <summary>
        /// 是否省工单（空为全部  true为省工单 false为市工单）
        /// </summary>
        public bool? IsProvinceOrder { get; set; }

        /// <summary>
        /// 是否行政执法类
        /// </summary>
        public bool? IsEnforcementOrder { get; set; }

        /// <summary>
        /// 是否推诿
        /// </summary>
        public bool? IsPassTheBuckOrder { get; set; }

        /// <summary>
        /// 线索是否属实
        /// </summary>
        public bool? IsTheClueTrue { get; set; }
    }

    /// <summary>
    /// 司法行政监督管理工单查询参数--新版
    /// </summary>
    public record QueryEnforcementOrderNewDto : PagedRequest
    {
        /// <summary>
        /// 本地编号
        /// </summary>
        public string? No { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string? Title { get; set; }

        /// <summary>
        /// 受理类型
        /// </summary>
        public string? AcceptTypeCode { get; set; }

        /// <summary>
        /// 热点分类
        /// </summary>
        public string? HotspotId { get; set; }

        /// <summary>
        /// 事项类型
        /// </summary>
        public string? EventTypeId { get; set; }

        /// <summary>
        /// 受理坐席名字或工号
        /// </summary>
        public string? NameOrNo { get; set; }

        /// <summary>
        /// 来源渠道
        /// </summary>
        public string? ChannelCode { get; set; }

        /// <summary>
        /// 区域
        /// </summary>
        public string AreaCode { get; set; }

        /// <summary>
        /// 工单创建时间
        /// </summary>
        public DateTime? CreationTimeStart { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreationTimeEnd { get; set; }

        /// <summary>
        /// 接办部门
        /// </summary>
        public string? OrgCode { get; set; }

        /// <summary>
        /// 执法部门
        /// </summary>
        public string? LawEnforcementOrgCode { get; set; }

        /// <summary>
        /// 来电人姓名
        /// </summary>
        public string? FromName { get; set; }

        /// <summary>
        /// 是否行政执法类
        /// </summary>
        public bool? IsEnforcementOrder { get; set; }

        /// <summary>
        /// 是否推诿
        /// </summary>
        public bool? IsPassTheBuckOrder { get; set; }

        /// <summary>
        /// 线索是否属实
        /// </summary>
        public bool? IsTheClueTrue { get; set; }

        /// <summary>
        /// 线索是否属实0：全部，1：待核实，2：线索属实，3：线索不属实，4：推诿工单，5：行政执法类工单
        /// </summary>
        public string IsTheClueTrueText {  get; set; }
    }
}
