|
@@ -8,6 +8,7 @@ using Hotline.Article;
|
|
using Hotline.Authentications;
|
|
using Hotline.Authentications;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.Configurations;
|
|
using Hotline.Configurations;
|
|
|
|
+using Hotline.Early;
|
|
using Hotline.File;
|
|
using Hotline.File;
|
|
using Hotline.FlowEngine.Definitions;
|
|
using Hotline.FlowEngine.Definitions;
|
|
using Hotline.FlowEngine.Notifications;
|
|
using Hotline.FlowEngine.Notifications;
|
|
@@ -111,6 +112,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
private readonly ICircularRecordDomainService _circularRecordDomainService;
|
|
private readonly ICircularRecordDomainService _circularRecordDomainService;
|
|
private readonly ISessionContextManager _sessionContextManager;
|
|
private readonly ISessionContextManager _sessionContextManager;
|
|
private readonly IOrderVisitApplication _orderVisitApplication;
|
|
private readonly IOrderVisitApplication _orderVisitApplication;
|
|
|
|
+ private readonly IRepository<OrderEarlyWarning> _orderEarlyWarningRepository;
|
|
|
|
|
|
public OrderApplication(
|
|
public OrderApplication(
|
|
IOrderDomainService orderDomainService,
|
|
IOrderDomainService orderDomainService,
|
|
@@ -162,8 +164,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
ISessionContextCreator sessionContextCreator,
|
|
ISessionContextCreator sessionContextCreator,
|
|
ISessionContextManager sessionContextManager,
|
|
ISessionContextManager sessionContextManager,
|
|
IOrderVisitApplication orderVisitApplication,
|
|
IOrderVisitApplication orderVisitApplication,
|
|
- IRepository<Role> roleRepository
|
|
|
|
- )
|
|
|
|
|
|
+ IRepository<Role> roleRepository,
|
|
|
|
+ IRepository<OrderEarlyWarning> orderEarlyWarningRepository)
|
|
{
|
|
{
|
|
_orderDomainService = orderDomainService;
|
|
_orderDomainService = orderDomainService;
|
|
_workflowDomainService = workflowDomainService;
|
|
_workflowDomainService = workflowDomainService;
|
|
@@ -214,6 +216,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
_sessionContextManager = sessionContextManager;
|
|
_sessionContextManager = sessionContextManager;
|
|
_orderVisitApplication = orderVisitApplication;
|
|
_orderVisitApplication = orderVisitApplication;
|
|
_roleRepository = roleRepository;
|
|
_roleRepository = roleRepository;
|
|
|
|
+ _orderEarlyWarningRepository = orderEarlyWarningRepository;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -691,7 +694,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
//}
|
|
//}
|
|
}
|
|
}
|
|
|
|
|
|
- public async Task OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
|
|
|
|
|
|
+ public async Task<List<string>?> OrderSensitiveParticiple(string inputStr, string orderId, CancellationToken cancellationToken)
|
|
{
|
|
{
|
|
var words = await _orderWrodRepository.Queryable().Where(x => x.IsEnable == 1 && x.Classify.Contains("敏感标签")).Select(x => x.Tag)
|
|
var words = await _orderWrodRepository.Queryable().Where(x => x.IsEnable == 1 && x.Classify.Contains("敏感标签")).Select(x => x.Tag)
|
|
.ToListAsync(cancellationToken);
|
|
.ToListAsync(cancellationToken);
|
|
@@ -702,7 +705,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
var intersect = words.Intersect(res).ToList();
|
|
var intersect = words.Intersect(res).ToList();
|
|
await _orderRepository.Updateable().SetColumns(o => new Order() { Sensitive = intersect }).Where(o => o.Id == orderId)
|
|
await _orderRepository.Updateable().SetColumns(o => new Order() { Sensitive = intersect }).Where(o => o.Id == orderId)
|
|
.ExecuteCommandAsync(cancellationToken);
|
|
.ExecuteCommandAsync(cancellationToken);
|
|
|
|
+ return intersect;
|
|
}
|
|
}
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -5156,6 +5161,42 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 坐席预警
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="orderId"></param>
|
|
|
|
+ /// <param name="seatEarlyWarningLevelValue"></param>
|
|
|
|
+ /// <param name="seatEarlyWarningLevelName"></param>
|
|
|
|
+ /// <param name="seatEarlyWarningTypeValue"></param>
|
|
|
|
+ /// <param name="seatEarlyWarningTypeName"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public async Task SeatEarly(string orderId,List<string> intersect, string seatEarlyWarningLevelValue, string seatEarlyWarningLevelName, string seatEarlyWarningTypeValue, string seatEarlyWarningTypeName,CancellationToken cancellationToken)
|
|
|
|
+ {
|
|
|
|
+ var model = await _orderEarlyWarningRepository.GetAsync(orderId, cancellationToken);
|
|
|
|
+ if (model!=null)
|
|
|
|
+ {
|
|
|
|
+ model.SeatEarlyWarningLevelValue = seatEarlyWarningLevelValue;
|
|
|
|
+ model.SeatEarlyWarningLevelName = seatEarlyWarningLevelName;
|
|
|
|
+ model.SeatEarlyWarningTypeValue = seatEarlyWarningTypeValue;
|
|
|
|
+ model.SeatEarlyWarningTypeName = seatEarlyWarningTypeName;
|
|
|
|
+ await _orderEarlyWarningRepository.UpdateAsync(model, cancellationToken);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ model = new OrderEarlyWarning();
|
|
|
|
+ model.SeatEarlyWarningLevelValue = seatEarlyWarningLevelValue;
|
|
|
|
+ model.SeatEarlyWarningLevelName = seatEarlyWarningLevelName;
|
|
|
|
+ model.SeatEarlyWarningTypeValue = seatEarlyWarningTypeValue;
|
|
|
|
+ model.SeatEarlyWarningTypeName = seatEarlyWarningTypeName;
|
|
|
|
+ //预警预选信息
|
|
|
|
+
|
|
|
|
+ model.CanChooseEarlyWarning = null;
|
|
|
|
+
|
|
|
|
+ await _orderEarlyWarningRepository.AddAsync(model, cancellationToken);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 知识库引用
|
|
/// 知识库引用
|
|
/// </summary>
|
|
/// </summary>
|