using Hotline.Share.Requests;

namespace Hotline.Share.Dtos.StatisticalReport
{
    public class OrderDelayStatisicalReturnDto
    {
        /// <summary>
        /// 审批人id
        /// </summary>
        public string UserId { get; set; }

        /// <summary>
        /// 审批人名称
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }

        /// <summary>
        /// 同意数量
        /// </summary>
        public int PassNum { get; set; }

        /// <summary>
        /// 不同意数量
        /// </summary>
        public int NoPassNum { get; set; }

        /// <summary>
        /// 审批数量
        /// </summary>
        public int TotalNum => PassNum + NoPassNum;
    }

    public record OrderDelayStatisicalRequestDto : PagedKeywordRequest
    {
        public string UserName { get; set; }

        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeCode { get; set; }
    }

    public class HotspotStatisticsDto { 
    
        /// <summary>
        /// 分类名称
        /// </summary>
        public string HotspotName { get; set; }

        /// <summary>
        /// 分类全称
        /// </summary>
        public string HotSpotFullName { get; set; }

		/// <summary>
		/// 热点名称
		/// </summary>
		public string Name => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length >= 1 && HotSpotFullName.Split("-")[0] == HotspotName ? HotSpotFullName.Split("-")[0] : string.Empty;

		/// <summary>
		/// 一级热点
		/// </summary>
		public string OneHotspotName => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length == 1  ? HotSpotFullName.Split("-")[0] : string.Empty;

        /// <summary>
        /// 二级热点
        /// </summary>
        public string TwoHotspotName => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length == 2  ? HotSpotFullName.Split("-")[1] : string.Empty;

        /// <summary>
        /// 三级热点
        /// </summary>
        public string ThreeHotspotName => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length == 3 ? HotSpotFullName.Split("-")[2] : string.Empty;

        /// <summary>
        /// 四级热点
        /// </summary>
        public string FourHotspotName => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length == 4  ? HotSpotFullName.Split("-")[3] : string.Empty;

        /// <summary>
        /// 五级热点
        /// </summary>
        public string FiveHotspotName => !string.IsNullOrEmpty(HotSpotFullName) && HotSpotFullName.Split("-").Length == 5 ? HotSpotFullName.Split("-")[4] : string.Empty;


        public int SumCount { get; set; }

	}
}
