using Hotline.Share.Tools;
namespace Hotline.Share.Dtos.CallCenter;
///
/// 坐席话务量统计
///
public class BiSeatCallsDto
{
///
/// 坐席姓名
///
public string Name { get; set; }
///
/// 用户ID
///
public string UserId { get; set; }
///
/// 工号
///
public string StaffNo { get; set; }
///
/// 分机号
///
public string TelNo { get; set; }
///
/// 呼入总量
///
public int InTotal { get; set; }
///
/// 呼出总量
///
public int OutTotal { get; set; }
///
/// 呼入接通量
///
public int InAnswered { get; set; }
///
/// 呼出接通量
///
public int OutAnswered { get; set; }
///
/// 呼入秒挂
///
public int InHangupImmediate { get; set; }
///
/// 呼入未接
///
public int InHanguped { get; set; }
///
/// 呼入平均时长
///
public double InDurationAvg { get; set; }
///
/// 呼出平均时长
///
public double OutDurationAvg { get; set; }
///
/// 有效接通量
///
public int InAvailableAnswer { get; set; }
///
/// 呼入接通秒挂
///
public int InHangupImmediateWhenAnswered { get; set; }
///
/// 登录时长(秒)
///
public double? LoginDuration { get; set; }
///
/// 登录时长(显示)
///
public string LoginDurationString => this.LoginDuration.SecondsToString();
///
/// 小休+摘机时长 (秒)
///
public double RestDuration { get; set; }
///
/// 小休+摘机时长(显示)
///
public string RestDurationString => this.RestDuration.SecondsToString();
///
/// 呼入接通率
///
public double InAnsweredRate => InTotal > 0 ? Math.Round(((double)InAnswered / (double)InTotal) * 100, digits: 4) : 0;
///
/// 呼入接通率(显示)
///
public string InAnsweredRateString => this.InAnsweredRate + "%";
///
/// 呼出接通率
///
public double OutAnsweredRate => OutTotal > 0 ? Math.Round(((double)OutAnswered / (double)OutTotal) * 100, digits: 4) : 0;
///
/// 呼出接通率(显示)
///
public string OutAnsweredRateString => this.OutAnsweredRate + "%";
///
/// 呼入有效接通率
///
public double AvailableAnswerRate => InTotal > 0 ? Math.Round(((double)InAvailableAnswer / (double)InTotal) * 100, digits: 4) : 0;
///
/// 呼入有效接通率(显示)
///
public string AvailableAnswerRateString => this.AvailableAnswerRate + "%";
///
/// 工作效率
///
public double WorkRate => LoginDuration > 0 ? Math.Round((1 - (double)RestDuration / (double)LoginDuration) * 100, digits: 4) : 0;
///
/// 工作效率(显示)
///
public string WorkRateString => this.WorkRate + "%";
}
public class BiSeatRestDto
{
public string UserId { get; set; }
public string? StaffNo { get; set; }
public string UserName { get; set; }
public int RestCount { get; set; }
public double RestDuration { get; set; }
public string RestDurationTxt => RestDuration.ToString("f2");
///
/// 小休累计时长 (单元: 分)
///
public double CumulativeDuration { get; set; }
public string CumulativeDurationTxt => CumulativeDuration.ToString("f2");
}
public class BiSeatSwitchDto
{
public string Id { get; set; }
public string? UserId { get; set; }
public string? UserName { get; set; }
public string? CPN { get; set; }
///
/// 外线号码
///
public string? CDPN { get; set; }
///
/// 分机号
///
public string? TelNo { get; set; }
///
/// 转接外线时间
///
public DateTime CreatedTime { get; set; }
}
public class BiVisitNoSatisfiedDto
{
public int Count { get; set; }
public string Key { get; set; }
public Dictionary Org { get; set; }
public string OrgName { get; set; }
public string OrgCode { get; set; }
}