using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Share.Dtos.CallCenter
{
    public class CenterReportStatisticsDto
    {
        /// <summary>
        /// 电话--自贡
        /// </summary>
        public CenterReportCallInfoDto CenterReportCallInfoDto { get; set; }

        /// <summary>
        /// 电话--宜宾
        /// </summary>
        public CenterReportCallDto CenterReportCall { get; set; }

        /// <summary>
        /// 语音分类
        /// </summary>
        public IVRCallTypeDto iVRCallTypeDto { get; set; }

		/// <summary>
		/// 工单
		/// </summary>
		public CenterReportOrderDto CenterReportOrder { get; set; }

        /// <summary>
        /// 按时办结情况
        /// </summary>
        public OrderCompletedDto OrderCompletedDto { get; set; }

        /// <summary>
        /// 办理时效
        /// </summary>
        public OrderAgingDto OrderAgingDto { get; set; }

		/// <summary>
		/// 企业办件情况
		/// </summary>
		public EnterpriseOrderDto EnterpriseOrderDto { get; set; }

		/// <summary>
		/// 信件回访量
		/// </summary>
		public CenterReportVisitdDto CenterReportVisitd { get; set; }

        /// <summary>
        /// 来源
        /// </summary>
        public List<CenterReportOrderSourceChannelDto> CenterReportOrderSourceChannels { get; set; }

        /// <summary>
        /// 信件分类
        /// </summary>
        public List<CenterReportOrderSourceChannelDto> CenterReportOrderAcceptTypes { get; set; }

		/// <summary>
		/// 信件分类
		/// </summary>
		public List<CenterReportOrderSourceChannelDto> EnterpriseCenterReportOrderAcceptTypes { get; set; }

		/// <summary>
		/// 专线统计
		/// </summary>
		public List<CenterReportOrderSourceChannelDto>  CenterReportOrderDedicatedLine{get;set ;}

        /// <summary>
        /// 市直部门
        /// </summary>
        public OrgStatisticsAll OrgStatisticsCityAll { get; set; }

        /// <summary>
        /// 区县部门
        /// </summary>
        public OrgStatisticsAll OrgStatisticsAreaAll { get; set; }
    }

    /// <summary>
    /// 话务情况
    /// </summary>
    public class CenterReportCallInfoDto
    {
        /// <summary>
        /// 话务总量
        /// </summary>
        public int AllCallCount { get; set; }

        /// <summary>
        /// 呼入总量
        /// </summary>
        public int InTotal { get; set; }

        /// <summary>
        /// 呼出总量
        /// </summary>
        public int OutTotal { get; set; }

        /// <summary>
        /// 呼入接通量
        /// </summary>
        public int InConnectionQuantity { get; set; }

        /// <summary>
        /// 呼出接通量
        /// </summary>
        public int OutConnectionQuantity { get; set; }

        /// <summary>
        /// 呼入未接通
        /// </summary>
        public int InHanguped { get; set; }

        /// <summary>
        /// 呼出未接通
        /// </summary>
        public int OutHanguped { get; set; }

        /// <summary>
        /// 队列挂断
        /// </summary>
        public int QueueByeCount { get; set; }

        /// <summary>
        /// IVR挂断
        /// </summary>
        public int IvrByeCount { get; set; }

        /// <summary>
        /// 呼入未接通
        /// </summary>
        public int CallInHanguped => InHanguped - QueueByeCount - IvrByeCount;

		/// <summary>
		/// 呼入接通率
		/// </summary>
		public double InConnectionQuantityRate => GetInConnectionQuantityRate();

		/// <summary>
		/// 呼入接通率
		/// </summary>
		/// <returns></returns>
		public double GetInConnectionQuantityRate()
		{
			if (InTotal > 0 && InConnectionQuantity > 0)
				return Math.Round(((double)InConnectionQuantity / InTotal) * 100, 2);
			return 0;
		}
	}

    /// <summary>
    /// 话务量
    /// </summary>
    public class CenterReportCallDto
    {
        /// <summary>
        /// 电话总量
        /// </summary>
        public int AllCallCount => InTotal + OutTotal;

		/// <summary>
		/// 接通总量
		/// </summary>
		public int AllConnectionCount => InConnectionQuantity + OutConnectionQuantity;

		/// <summary>
		/// 呼入总量
		/// </summary>
		public int InTotal { get; set; }

		/// <summary>
		/// 呼出总量
		/// </summary>
		public int OutTotal { get; set; }

		/// <summary>
		/// 呼入接通量
		/// </summary>
		public int InConnectionQuantity { get; set; }

		/// <summary>
		/// 呼出接通量
		/// </summary>
		public int OutConnectionQuantity { get; set; }

		/// <summary>
		/// 有效
		/// </summary>
		public int EffectiveCount { get; set; }

        /// <summary>
        /// 无效
        /// </summary>
        public int InvalidCount { get; set; }

        /// <summary>
        /// 队列挂断
        /// </summary>
        public int QueueByeCount { get; set; }

        /// <summary>
        /// IVR挂断
        /// </summary>
        public int IvrByeCount { get; set; }


		/// <summary>
		/// 挂断总量
		/// </summary>
		public int AllByeCount => QueueByeCount + IvrByeCount;


		/// <summary>
		/// 总体接通率
		/// </summary>
		public double AllEffectiveCountRate => AllEffectiveRate();

		/// <summary>
		/// 计算总体接通率
		/// </summary>
		/// <returns></returns>
		public double AllEffectiveRate()
		{
			if (AllCallCount > 0 && EffectiveCount > 0)
				return Math.Round(((double)EffectiveCount / AllCallCount) * 100, 2);
			return 0;
		}
	}

    /// <summary>
    /// 语音分类
    /// </summary>
    public class IVRCallTypeDto {

		/// <summary>
		/// 个人服务呼入总量
		/// </summary>
		public int PersonCallInCount { get; set; }

		/// <summary>
		/// 企业服务呼入总量
		/// </summary>
		public int EnterpriseCallInCount { get; set; }

		/// <summary>
		/// 智能应答呼入总量
		/// </summary>
		public int AiCallInCount { get; set; }


		/// <summary>
		/// 呼入电话量
		/// </summary>
		public int AllCallInCount => PersonCallInCount + EnterpriseCallInCount + AiCallInCount;

		/// <summary>
		/// 个人服务呼入总量 占比
		/// </summary>
		public double PersonCallInRate => GetPersonCallInRate();

		/// <summary>
		/// 个人服务呼入总量 占比
		/// </summary>
		/// <returns></returns>
		public double GetPersonCallInRate()
		{
			if (AllCallInCount > 0 && PersonCallInCount > 0)
				return Math.Round(((double)PersonCallInCount / AllCallInCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 企业服务呼入总量 占比
		/// </summary>
		public double EnterpriseCallInRate => GetEnterpriseCallInRate();

		/// <summary>
		/// 企业服务呼入总量 占比
		/// </summary>
		/// <returns></returns>
		public double GetEnterpriseCallInRate()
		{
			if (AllCallInCount > 0 && EnterpriseCallInCount > 0)
				return Math.Round(((double)EnterpriseCallInCount / AllCallInCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 智能应答呼入总量 占比
		/// </summary>
		public double AiCallInRate => GetAiCallInRate();

		/// <summary>
		/// 智能应答呼入总量 占比
		/// </summary>
		/// <returns></returns>
		public double GetAiCallInRate()
		{
			if (AllCallInCount > 0 && AiCallInCount > 0)
				return Math.Round(((double)AiCallInCount / AllCallInCount) * 100, 2);
			return 0;
		}
	}
    /// <summary>
    /// 工单数据
    /// </summary>
    public class CenterReportOrderDto
    {
        /// <summary>
        /// 工单总量
        /// </summary>
        public int AllCallCount => EffectiveCount + InvalidCount;

		/// <summary>
		/// 中心已办结
		/// </summary>
		public int CenterCompletedCount { get; set; }

		/// <summary>
		/// 中心已办结占比
		/// </summary>
		public double CenterCompletedCountRate => GetCenterCompletedCountRate();

		/// <summary>
		/// 中心已办结占比
		/// </summary>
		/// <returns></returns>
		public double GetCenterCompletedCountRate()
		{
			if (CenterCompletedCount > 0 && AllCallCount > 0)
				return Math.Round(((double)CenterCompletedCount / AllCallCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 有效
		/// </summary>
		public int EffectiveCount { get; set; }

        /// <summary>
        /// 无效
        /// </summary>
        public int InvalidCount { get; set; }

        /// <summary>
        /// 市级受理
        /// </summary>
        public int CityAccept { get; set; }

		/// <summary>
		/// 市级受理占比
		/// </summary>
		public double CityAcceptRate => GetCityAcceptRate();

		/// <summary>
		/// 市级受理占比
		/// </summary>
		/// <returns></returns>
		public double GetCityAcceptRate()
		{
			if (CityAccept > 0 && AllCallCount > 0)
				return Math.Round(((double)CityAccept / AllCallCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 区县受理
		/// </summary>
		public int CountyAccept { get; set; }


		/// <summary>
		/// 区县受理占比
		/// </summary>
		public double CountyAcceptRate => GetCountyAcceptRate();

		/// <summary>
		/// 区县受理占比
		/// </summary>
		/// <returns></returns>
		public double GetCountyAcceptRate()
		{
			if (CountyAccept > 0 && AllCallCount > 0)
				return Math.Round(((double)CountyAccept / AllCallCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 中心受理
		/// </summary>
		public int CenterAccept { get; set; }

		/// <summary>
		/// 中心受理占比
		/// </summary>
		public double CenterAcceptRate => GetCenterAcceptRate();

		/// <summary>
		/// 中心受理占比
		/// </summary>
		/// <returns></returns>
		public double GetCenterAcceptRate()
		{
			if (CenterAccept > 0 && AllCallCount > 0)
				return Math.Round(((double)CenterAccept / AllCallCount) * 100, 2);
			return 0;
		}


		/// <summary>
		/// 已办结
		/// </summary>
		public int CompletedCount { get; set; }

		/// <summary>
		/// 已办结占比
		/// </summary>
		public double CompletedCountRate => GetCompletedCountRate();

		/// <summary>
		/// 已办结占比
		/// </summary>
		/// <returns></returns>
		public double GetCompletedCountRate()
		{
			if (CompletedCount > 0 && AllCallCount > 0)
				return Math.Round(((double)CompletedCount / AllCallCount) * 100, 2);
			return 0;
		}


		/// <summary>
		/// 按时办结
		/// </summary>
		public int OnTimeCompletedCount { get; set; }

        /// <summary>
        /// 按时办结率
        /// </summary>
        public double OnTimeCompletedCountClc => CalcRate();

        /// <summary>
        /// 计算办结率
        /// </summary>
        /// <returns></returns>
        public double CalcRate()
        {
            if (OnTimeCompletedCount > 0 && CompletedCount > 0)
                return Math.Round(((double)OnTimeCompletedCount / CompletedCount) * 100, 2);
            return 0;
        }

        /// <summary>
        /// 部门已办结
        /// </summary>
        public int OrgCompletedCount { get; set; }

		/// <summary>
		/// 已办结总量
		/// </summary>
		public int AllCompletedCount => CenterCompletedCount + OrgCompletedCount;

		/// <summary>
		/// 在办
		/// </summary>
		public int InProgressCount { get; set; }

		/// <summary>
		/// 在办总量
		/// </summary>
		public int AllInProgressCount => CenterInProgressCount + OrgInProgressCount;

		/// <summary>
		/// 中心在办
		/// </summary>
		public int CenterInProgressCount { get; set; }

        /// <summary>
        /// 部门在办
        /// </summary>
        public int OrgInProgressCount { get; set; }


		/// <summary>
		/// 总体办结率
		/// </summary>
		public double AllCompletedRate => GetAllCompletedRate();

		public double GetAllCompletedRate()
		{
			if (CompletedCount > 0 && AllCallCount > 0)
				return Math.Round(((double)CompletedCount / AllCallCount) * 100, 2);
			return 0;
		}
		 
		/// <summary>
		/// 催办总数
		/// </summary>
		public int orderUrge { get; set; }

	}

    /// <summary>
    /// 按时办结情况
    /// </summary>
    public class OrderCompletedDto {


		/// <summary>
		/// 已办结
		/// </summary>
		public int CompletedCount { get; set; }

		/// <summary>
		/// 市级已办结
		/// </summary>
		public int CityCompletedCount { get; set; }

		/// <summary>
		/// 区县已办结
		/// </summary>
		public int CountyCompletedCount { get; set; }

		/// <summary>
		/// 中心已办结
		/// </summary>
		public int CenterCompletedCount { get; set; }

		/// <summary>
		/// 超期已办办结
		/// </summary>
		public int ExpiredTimeCompletedCount { get; set; }

		/// <summary>
		/// 总体按时办结率
		/// </summary>
		public double AllCompletedRate => GetAllCompletedRate();

		public double GetAllCompletedRate()
		{
			if (CompletedCount > 0)
				return Math.Round(((double)(CompletedCount - ExpiredTimeCompletedCount) / CompletedCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 市级超期已办办结
		/// </summary>
		public int CityExpiredTimeCompletedCount { get; set; }

		/// <summary>
		/// 市级按时办结率
		/// </summary>
		public double CityCompletedRate => GetCityCompletedRate();

		public double GetCityCompletedRate()
		{
			if (CityCompletedCount > 0)
				return Math.Round(((double)(CityCompletedCount - CityExpiredTimeCompletedCount) / CityCompletedCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 区县超期已办办结
		/// </summary>
		public int CountyExpiredTimeCompletedCount { get; set; }

		/// <summary>
		/// 区县按时办结率
		/// </summary>
		public double CountyCompletedRate => GetCountyCompletedRate();

		public double GetCountyCompletedRate()
		{
			if (CountyCompletedCount > 0)
				return Math.Round(((double)(CountyCompletedCount - CountyExpiredTimeCompletedCount) / CountyCompletedCount) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 部门办结率
		/// </summary>
		public double OrgCompletedRate => GetOrgCompletedRate();

		public double GetOrgCompletedRate()
		{
			if (CityCompletedCount > 0 || CountyCompletedCount > 0)
				return Math.Round(((double)((CityCompletedCount + CountyCompletedCount) - (CityExpiredTimeCompletedCount + CountyExpiredTimeCompletedCount)) / (CityCompletedCount + CountyCompletedCount) ) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 中心超期已办办结
		/// </summary>
		public int CenterExpiredTimeCompletedCount { get; set; }

		/// <summary>
		/// 中心按时办结率
		/// </summary>
		public double CenterCompletedRate => GetCenterCompletedRate();

		public double GetCenterCompletedRate()
		{
			if (CenterCompletedCount > 0)
				return Math.Round(((double)(CenterCompletedCount - CenterExpiredTimeCompletedCount) / CenterCompletedCount) * 100, 2);
			return 0;
		}
	}

    /// <summary>
    /// 办理时效情况
    /// </summary>
    public class OrderAgingDto {
    
        /// <summary>
        /// 来件总计
        /// </summary>
        public int OrderCount {  get; set; }

        /// <summary>
        /// 办理总时长
        /// </summary>
        public double? CompletedAging {  get; set; }

        /// <summary>
        /// 办理总时长平均
        /// </summary>
        public double CompletedAgingMean => GetCompletedAgingMean();

        public double GetCompletedAgingMean() {
			if (OrderCount > 0 && CompletedAging > 0)
				return Math.Round(((CompletedAging.Value / OrderCount) / 3600 / 8), 2);
			return 0;
		}

		/// <summary>
		/// 市级来件总计
		/// </summary>
		public int CityOrderCount { get; set; }

		/// <summary>
		/// 市级办理总时长
		/// </summary>
		public double? CityCompletedAging { get; set; }

		/// <summary>
		/// 市级办理总时长平均
		/// </summary>
		public double CityCompletedAgingMean => GetCityCompletedAgingMean();

		public double GetCityCompletedAgingMean()
		{
			if (CityOrderCount > 0 && CityCompletedAging > 0)
				return Math.Round(((CityCompletedAging.Value / CityOrderCount) / 3600 / 8), 2);
			return 0;
		}

		/// <summary>
		/// 区县来件总计
		/// </summary>
		public int CountyOrderCount { get; set; }

		/// <summary>
		/// 区县办理总时长
		/// </summary>
		public double? CountyCompletedAging { get; set; }

		/// <summary>
		/// 区县办理总时长平均
		/// </summary>
		public double CountyCompletedAgingMean => GetCountyCompletedAgingMean();

		public double GetCountyCompletedAgingMean()
		{
			if (CountyOrderCount > 0 && CountyCompletedAging > 0)
				return Math.Round(((CountyCompletedAging.Value / CountyOrderCount) / 3600 / 8), 2);
			return 0;
		}

		/// <summary>
		/// 中心来件总计
		/// </summary>
		public int CenterOrderCount { get; set; }

		/// <summary>
		/// 中心办理总时长
		/// </summary>
		public double? CenterCompletedAging { get; set; }

		/// <summary>
		/// 中心办理总时长平均
		/// </summary>
		public double CenterCompletedAgingMean => GetCenterCompletedAgingMean();

		public double GetCenterCompletedAgingMean()
		{
			if (CenterOrderCount > 0 && CenterCompletedAging > 0)
				return Math.Round(((CenterCompletedAging.Value / CenterOrderCount) / 3600 / 8), 2);
			return 0;
		}
	}


    public class EnterpriseOrderDto : OrderAgingDto
	{

		/// <summary>
		/// 在办
		/// </summary>
		public int InProgressCount { get; set; }

		/// <summary>
		/// 已办结
		/// </summary>
		public int CompletedCount { get; set; }

		/// <summary>
		/// 中心件
		/// </summary>
		public int CenterCount { get; set; }

		/// <summary>
		/// 市级件
		/// </summary>
		public int CityCount { get; set; }

		/// <summary>
		/// 区县件
		/// </summary>
		public int CountyCount { get; set; }

		/// <summary>
		/// 已回访
		/// </summary>
		public int VisitdCount { get; set; }

		/// <summary>
		/// 不满意
		/// </summary>
		public int Dissatisfied { get; set; }

		/// <summary>
		/// 市级部门不满意
		/// </summary>
		public int CityDissatisfied { get; set; }

		/// <summary>
		/// 县（区）不满意
		/// </summary>
		public int CountyDissatisfied { get; set; }

		/// <summary>
		/// 满意
		/// </summary>
		public int Satisfied { get; set; }

		/// <summary>
		/// 市级部门满意
		/// </summary>
		public int CitySatisfied { get; set; }

		/// <summary>
		/// 县（区）满意
		/// </summary>
		public int CountySatisfied { get; set; }

		/// <summary>
		/// 总满意率
		/// </summary>
		public double SatisfiedRate => GetSatisfiedRate();

		
		public double GetSatisfiedRate()
		{
			if (Satisfied > 0 )
				return Math.Round(((double)Satisfied / (double)(Satisfied + Dissatisfied)) * 100, 2);
			return 100;
		}

		/// <summary>
		/// 市级满意率
		/// </summary>
		/// <returns></returns>
		public double CitySatisfiedRate => GetCitySatisfiedRate();

		public double GetCitySatisfiedRate()
		{
			if (CitySatisfied > 0)
				return Math.Round(((double)CitySatisfied / (double)(CitySatisfied + CityDissatisfied)) * 100, 2);
			return 100;
		}

		/// <summary>
		/// 区县满意率
		/// </summary>
		/// <returns></returns>
		public double CountySatisfiedRate => GetCountySatisfiedRate();

		public double GetCountySatisfiedRate()
		{
			if (CountySatisfied > 0)
				return Math.Round(((double)CountySatisfied / (double)(CountySatisfied + CountyDissatisfied)) * 100, 2);
			return 100;
		}
	}

	/// <summary>
	/// 信件来源
	/// </summary>
	public class CenterReportOrderSourceChannelDto
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 总量
        /// </summary>
        public int AllCountNum { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int CountNum { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

		/// <summary>
		/// 占比
		/// </summary>
		public double CountNumRate => GetCountNumRate();
		public double GetCountNumRate()
		{
			if (CountNum > 0 && AllCountNum > 0)
				return Math.Round(((double)CountNum / AllCountNum) * 100, 2);
			return 0;
		}

		/// <summary>
		/// 办理总时长
		/// </summary>
		public double? CompletedAging { get; set; }

		/// <summary>
		/// 办理总时长平均
		/// </summary>
		public double CompletedAgingMean => GetCompletedAgingMean();

		public double GetCompletedAgingMean()
		{
			if (CountNum > 0 && CompletedAging > 0)
				return Math.Round(((CompletedAging.Value / CountNum) / 3600), 2);
			return 0;
		}

		/// <summary>
		/// 占比
		/// </summary>
		public double ProportionRate => CalcProportionRate();

        public double CalcProportionRate()
        {
            if (AllCountNum != 0 && CountNum != 0)
            {
                return Math.Round((CountNum / (double)AllCountNum) * 100, 2);
            }
            return 0;
        }
    }

    /// <summary>
    /// 信件回访量
    /// </summary>
    public class CenterReportVisitdDto
    {

		/// <summary>
		/// 回访总量
		/// </summary>
		public int AllVisitd => Visitd + WaitVisitd;

		/// <summary>
		/// 已回访
		/// </summary>
		public int Visitd { get; set; }

        /// <summary>
        /// 已回访--电话
        /// </summary>
        public int CallVisitd { get; set; }

        /// <summary>
        /// 已回访--短信
        /// </summary>
        public int SmsVisitd { get; set; }

        /// <summary>
        /// 其他回访
        /// </summary>
        public int OtherVisitd { get; set; }

        /// <summary>
        /// 待回访
        /// </summary>
        public int WaitVisitd { get; set; }

        /// <summary>
        /// 坐席满意度
        /// </summary>
        public double SeatsRate { get; set; }

        /// <summary>
        /// 部门满意度
        /// </summary>
        public double OrgRate { get; set; }

        /// <summary>
        /// 总体满意度
        /// </summary>
        public double AllRate { get; set; }

		/// <summary>
		/// 市级部门满意率
		/// </summary>
		public double CityRate { get; set; }

		/// <summary>
		/// 县（区）满意率
		/// </summary>
		public double CountyRate { get; set; }

		/// <summary>
		/// 12345中心满意率
		/// </summary>
		public double CenterRate { get; set; }

		/// <summary>
		/// 满意
		/// </summary>
		public int Satisfied { get; set; }


		/// <summary>
		/// 不满意
		/// </summary>
		public int Dissatisfied { get; set; }

		/// <summary>
		/// 市级部门不满意
		/// </summary>
		public int CityDissatisfied { get; set; }

		/// <summary>
		/// 县（区）不满意
		/// </summary>
		public int CountyDissatisfied { get; set; }

	}

    public class Satisfaction
    {
        /// <summary>
        /// 满意
        /// </summary>
        public int Satisfied { get; set; }

        /// <summary>
        /// 不满意
        /// </summary>
        public int Dissatisfied { get; set; }
    }

    /// <summary>
    /// 信件分布
    /// </summary>
    public class OrgStatisticsAll
    {
        /// <summary>
        /// 总数
        /// </summary>
        public int OrgStatisticsCountAll => Totalize();

        /// <summary>
        /// 明细
        /// </summary>
        public List<OrgStatistics> OrgStatistics { get; set; }

        public int Totalize()
        {
            int SunNum = 0;
            foreach (var item in OrgStatistics)
            {
                SunNum += item.CountNum;
            }

            return SunNum;
        }
    }

    public class OrgStatistics
    {
        /// <summary>
        /// 部门编码
        /// </summary>
        public string OrgCode { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        public string OrgName { get; set; }

        /// <summary>
        /// 工单数量
        /// </summary>
        public int CountNum { get; set; }

        /// <summary>
        /// 办件次数
        /// </summary>
        public int HandleCountNum => CountNum;
    }
}
