using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Share.Dtos.FlowEngine.Workflow;
using Hotline.Share.Dtos.TrCallCenter;
using Hotline.Share.Enums.Settings;

namespace Hotline.Share.Dtos.Order
{
    /// <summary>
    /// 工单流转
    /// </summary>
    public class OrderFlowDto
    {
        /// <summary>
        /// 工单信息
        /// </summary>
        public OrderDto Order { get; set; }

        /// <summary>
        /// 办理节点信息
        /// </summary>
        public WorkflowTraceDto WorkflowTrace { get; set; }

        /// <summary>
        /// 期满时间已变更
        /// </summary>
        public bool ExpiredTimeChanged { get; set; }

        /// <summary>
        /// 办理人部门等级
        /// </summary>
        public int HandlerOrgLevel { get; set; }

        public TrCallDto? TrCallRecordDto { get; set; }

        /// <summary>
        /// 非警情退回
        /// </summary>
        public bool IsNonPoliceReturn { get; set; }

        /// <summary>
        /// 是否存在延期申请
        /// </summary>
        public OrderSearchDelayDto? OrderSearchDelay { get; set; }
    }

    public class OrderSearchDelayDto
    {
        /// <summary>
        /// 延期申请Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 流程ID
        /// </summary>
        public string? WorkflowId { get; set; }

        /// <summary>
        /// 工单Id
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 工单编号（冗余）
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 申请部门Code
        /// </summary>
        public string ApplyOrgCode { get; set; }

        /// <summary>
        /// 申请部门名称
        /// </summary>
        public string ApplyOrgName { get; set; }

        /// <summary>
        /// 申请人
        /// </summary>
        public string EmployeeId { get; set; }

        /// <summary>
        /// 申请人名称
        /// </summary>
        public string? EmployeeName { get; set; }

        /// <summary>
        /// 延期申请时限
        /// </summary>
        public int DelayNum { get; set; }

        /// <summary>
        /// 延期申请单位
        /// </summary>
        public ETimeType DelayUnit { get; set; }

        /// <summary>
        /// 延期申请理由
        /// </summary>
        public string DelayReason { get; set; }

        /// <summary>
        /// 延期申请时间
        /// </summary>
        public DateTime ApplyDelayTime { get; set; }
    }
}
