using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Hotline.Share.Enums.FlowEngine; using Hotline.Share.Enums.Order; using Hotline.Share.Enums.Settings; using Hotline.Share.Tools; using XF.Utility.EnumExtensions; namespace Hotline.Share.Dtos.Settings { /// /// 计算期满时间所需要的 工单信息 /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!! /// !!!!!该类中的字段顺序很重要!!!!!! /// 字段的顺序等于期满条件的优先级 /// 计算期满时间时, 会根据该类中字段顺序计算期满 /// public class OrderTimeClacInfo { public const string BusCodeName = "AcceptTypeCode"; public OrderTimeClacInfo() { } public OrderTimeClacInfo(string acceptTypeCode) { AcceptTypeCode = acceptTypeCode; } /// /// 受理类型代码 /// public string? AcceptTypeCode { get; set; } /// /// 流程方向 /// public EFlowDirection FlowDirection { get; set; } /// /// 24小时办结 /// [NoCode] // 不需要查询 BusCode public bool Is24HoursComplete { get; set; } /// /// 热点分类类目名称 /// [IsFuzzyQuery] // 模糊查询 [NoCode] // 不需要查询 BusCode public string? HotspotSpliceName { get; set; } /// /// 来电/信人身份 /// public EIdentityType? IdentityType { get; set; } /// /// 来源渠道 /// public string? SourceChannel { get; set; } } public class TimeConfig { public TimeConfig() { } public TimeConfig(int count, ETimeType timeType) { Count = count; TimeType = timeType; TimeText = $"{count}个{timeType.GetDescription()}"; } /// /// 命中的规则Id /// public string? TimeLimitSettingAttributeId { get; set; } public int Count { get; set; } public ETimeType TimeType { get; set; } private string timeText; public string TimeText { get { if (timeText.IsNullOrEmpty()) return $"{Count}个{TimeType.GetDescription()}"; return timeText; } set { timeText = value; } } /// /// 超期时限百分比 /// public int Percentage { get; set; } /// /// 超期时间百分比(第一级) /// public int PercentageOne { get; set; } /// /// 工作时间 /// public IList? WorkTime { get; set; } } public class ExpiredTimeWithConfig : TimeConfig { public DateTime ExpiredTime { get; set; } /// /// 即将超期时间 /// public DateTime NearlyExpiredTime { get; set; } /// /// 即将超期时间第一级 /// public DateTime NearlyExpiredTimeOne { get; set; } } }