using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Share.Enums.Order;
using Hotline.Share.Requests;
using Hotline.Share.Tools;

namespace Hotline.Share.Dtos.Order
{
    /// <summary>
    /// 待办工单dto
    /// </summary>
    public class OrderWaitedDto : OrderDto
    {
        ///// <summary>
        ///// 已超期或预计超级时间
        ///// </summary>
        //public string ExpiredDescription { get; set; }

        /// <summary>
        /// 节点期满时间
        /// </summary>
        public DateTime? StepExpiredTime { get; set; }
    }

    public record QueryOrderWaitedDto : PagedKeywordRequest, IQueryFixedDto
    {
        public bool? IsProvince { get; set; }

        /// <summary>
        /// true: 工单已办
        /// false: 工单待办
        /// </summary>
        public bool? IsHandled { get; set; }
        public bool? IsCounterSign { get; set; }
        public bool? ExpiredOrAlmostOverdue { get; set; }
        public string? No { get; set; }

        /// <summary>
        /// 是否紧急
        /// </summary>
        public bool? IsUrgent { get; set; }

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

        /// <summary>
        /// 工单状态
        /// </summary>
        public EOrderStatus? Status { get; set; }

        public int QueryIndex { get; set; }

        public int QueryCount { get; set; }

        /// <summary>
        /// 1: 交办件
        /// 2: 办结件
        /// </summary>
        public int? TypeCode { get; set; }

        /// <summary>
        /// 1 中心办理  2 转单件 3 二次派发件
        /// </summary>
        public int? QueryType { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string? SortField { get; set; }

        /// <summary>
        /// 排序方式 // 0 升序 1 降序
        /// </summary>
        public int? SortRule { get; set; }

        /// <summary>
        /// 受理人名称
        /// </summary>
        public string? AcceptorName { get; set; }

        /// <summary>
        /// 当前办理节点
        /// </summary>
        public string? CurrentStepCode { get; set; }

        /// <summary>
        /// 随手拍行业类型
        /// </summary>
        public string? IndustryId { get; set; }

        /// <summary>
        /// 工单标签Code
        /// </summary>
        public string? OrderTagCode { get; set; }
    }

    /// <summary>
    /// 中心待办
    /// </summary>
    public record QueryOrderWaitedCenterDto : PagedKeywordRequest
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string? No { get; set; }

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

        /// <summary>
        /// 开始生成时间
        /// </summary>
        public DateTime? StCreationTime { get; set; }

        /// <summary>
        /// 结束生成时间
        /// </summary>
        public DateTime? EndCreationTime { get; set; }

        /// <summary>
        /// 结束受理时间
        /// </summary>
        public DateTime? StartTimeEnd { get; set; }

        /// <summary>
        /// 开始受理时间
        /// </summary>
        public DateTime? StartTimeSt { get; set; }

        /// <summary>
        /// 当前节点名称
        /// </summary>
        public string? StepName { get; set; }

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

        /// <summary>
        /// 状态
        /// </summary>
        public EOrderStatus? Status { get; set; }

        /// <summary>
        /// 受理人
        /// </summary>
        public string? AcceptorName { get; set; }

        /// <summary>
        /// 交办人(派单员)
        /// </summary>
        public string? CenterToOrgHandlerName { get; set; }

        /// <summary>
        /// 过期状态
        /// </summary>
        public EExpiredStatus? ExpiredStatus { get; set; }

        /// <summary>
        /// 是否紧急
        /// </summary>
        public bool? IsUrgent { get; set; }

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