|
@@ -40,6 +40,9 @@ using Hotline.Share.Dtos.File;
|
|
|
using Hotline.Application.Quality;
|
|
|
using Hotline.Enterprise;
|
|
|
using Hotline.Share.Dtos.Enterprise;
|
|
|
+using Hotline.Push.FWMessage;
|
|
|
+using Hotline.Share.Dtos.Push;
|
|
|
+using Hotline.Share.Enums.Push;
|
|
|
|
|
|
namespace Hotline.Api.Controllers;
|
|
|
|
|
@@ -89,11 +92,12 @@ public class OrderController : BaseController
|
|
|
private readonly IRepository<OrderSpecial> _orderSpecialRepository;
|
|
|
private readonly IRepository<WorkflowTrace> _workflowTraceRepository;
|
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
|
- private readonly ILogger<OrderController> _logger;
|
|
|
private readonly IOrderApplication _orderApplication;
|
|
|
private readonly IEnterpriseService _enterpriseService;
|
|
|
+ private readonly IPushDomainService _pushDomainService;
|
|
|
+ private readonly ILogger<OrderController> _logger;
|
|
|
|
|
|
- public OrderController(
|
|
|
+ public OrderController(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowApplication workflowApplication,
|
|
@@ -135,9 +139,11 @@ public class OrderController : BaseController
|
|
|
IRepository<OrderSpecial> orderSpecialRepository,
|
|
|
IRepository<WorkflowTrace> workflowTraceRepository,
|
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
|
- ILogger<OrderController> logger,
|
|
|
IOrderApplication orderApplication,
|
|
|
- IEnterpriseService enterpriseService)
|
|
|
+ IEnterpriseService enterpriseService,
|
|
|
+ IPushDomainService pushDomainService,
|
|
|
+ ILogger<OrderController> logger
|
|
|
+ )
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_orderRepository = orderRepository;
|
|
@@ -183,8 +189,8 @@ public class OrderController : BaseController
|
|
|
_logger = logger;
|
|
|
_orderApplication = orderApplication;
|
|
|
_enterpriseService = enterpriseService;
|
|
|
-
|
|
|
- }
|
|
|
+ _pushDomainService = pushDomainService;
|
|
|
+ }
|
|
|
|
|
|
#region 工单发布
|
|
|
|
|
@@ -1864,6 +1870,27 @@ public class OrderController : BaseController
|
|
|
|
|
|
//内容分词
|
|
|
await _orderApplication.OrderParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ //sms
|
|
|
+ try
|
|
|
+ {
|
|
|
+ await _pushDomainService.PushAsync(new MessageDto
|
|
|
+ {
|
|
|
+ PushBusiness = EPushBusiness.OrderAccept,
|
|
|
+ ExternalId = order.Id,
|
|
|
+ OrderId = order.Id,
|
|
|
+ PushPlatform = EPushPlatform.Sms,
|
|
|
+ Content =
|
|
|
+ $"宜宾12345温馨提示:您的来电已受理(流水号:{order.No};提取码:{order.Password},可通过网站(http://hotline.12345lm.cn)进行查询,谢谢。【宜宾12345热线平台】)",
|
|
|
+ Remark = order.Title,
|
|
|
+ Name = order.FromName,
|
|
|
+ TelNumber = order.Contact
|
|
|
+ }, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ _logger.LogError("新增工单发送短信失败,Error:{err}", e.Message);
|
|
|
+ }
|
|
|
return order.Id;
|
|
|
}
|
|
|
|