|
@@ -38,9 +38,8 @@ using Hotline.CallCenter.Calls;
|
|
|
using Hotline.DataSharing.Province.Services;
|
|
|
using Hotline.Share.Dtos.File;
|
|
|
using Hotline.Application.Quality;
|
|
|
-using Hotline.Push.FWMessage;
|
|
|
-using Hotline.Share.Dtos.Push;
|
|
|
-using Hotline.Share.Enums.Push;
|
|
|
+using Hotline.Enterprise;
|
|
|
+using Hotline.Share.Dtos.Enterprise;
|
|
|
|
|
|
namespace Hotline.Api.Controllers;
|
|
|
|
|
@@ -92,9 +91,9 @@ public class OrderController : BaseController
|
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
|
private readonly ILogger<OrderController> _logger;
|
|
|
private readonly IOrderApplication _orderApplication;
|
|
|
- private readonly IPushDomainService _pushDomainService;
|
|
|
+ private readonly IEnterpriseService _enterpriseService;
|
|
|
|
|
|
- public OrderController(
|
|
|
+ public OrderController(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowApplication workflowApplication,
|
|
@@ -138,7 +137,7 @@ public class OrderController : BaseController
|
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
|
ILogger<OrderController> logger,
|
|
|
IOrderApplication orderApplication,
|
|
|
- IPushDomainService pushDomainService)
|
|
|
+ IEnterpriseService enterpriseService)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_orderRepository = orderRepository;
|
|
@@ -183,8 +182,9 @@ public class OrderController : BaseController
|
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
|
_logger = logger;
|
|
|
_orderApplication = orderApplication;
|
|
|
- _pushDomainService = pushDomainService;
|
|
|
- }
|
|
|
+ _enterpriseService = enterpriseService;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
#region 工单发布
|
|
|
|
|
@@ -1053,7 +1053,7 @@ public class OrderController : BaseController
|
|
|
startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderDelay;
|
|
|
startDto.Title = model.DelayReason;
|
|
|
string workFlowId = await _workflowApplication.StartWorkflowAsync(startDto, model.Id,
|
|
|
- cancellationToken: HttpContext.RequestAborted);
|
|
|
+ cancellationToken: HttpContext.RequestAborted);
|
|
|
model.WorkflowId = workFlowId;
|
|
|
await _orderDelayRepository.UpdateAsync(model, HttpContext.RequestAborted);
|
|
|
}
|
|
@@ -1272,7 +1272,7 @@ public class OrderController : BaseController
|
|
|
startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderScreen;
|
|
|
startDto.Title = dto.Data.Content;
|
|
|
workflowId = await _workflowApplication.StartWorkflowAsync(startDto, model.Id,
|
|
|
- cancellationToken: HttpContext.RequestAborted);
|
|
|
+ cancellationToken: HttpContext.RequestAborted);
|
|
|
var screen = await _orderScreenRepository.GetAsync(model.Id, HttpContext.RequestAborted);
|
|
|
if (screen != null)
|
|
|
{
|
|
@@ -1733,13 +1733,11 @@ public class OrderController : BaseController
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.TransferPhone), d => d.TransferPhone.Contains(dto.TransferPhone!))
|
|
|
//.WhereIF(dto.OrgCodes.Any(), d => d.Workflow.Assigns.Any(s => dto.OrgCodes.Contains(s.OrgCode)))
|
|
|
.WhereIF(dto.OrgCodes.Any(), d => dto.OrgCodes.Contains(d.Workflow.ActualHandleOrgCode))
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.NameOrNo),
|
|
|
- d => d.AcceptorName.Contains(dto.NameOrNo!) || d.AcceptorStaffNo.Contains(dto.NameOrNo!))
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.NameOrNo), d => d.AcceptorName.Contains(dto.NameOrNo!) || d.AcceptorStaffNo.Contains(dto.NameOrNo!))
|
|
|
.WhereIF(dto.CreationTimeStart.HasValue, d => d.CreationTime >= dto.CreationTimeStart)
|
|
|
.WhereIF(dto.CreationTimeEnd.HasValue, d => d.CreationTime <= dto.CreationTimeEnd)
|
|
|
.WhereIF(dto.EmergencyLevels.Any(), d => dto.EmergencyLevels.Contains(d.EmergencyLevel))
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.PhoneNo),
|
|
|
- d => d.FromPhone.Contains(dto.PhoneNo!) || d.Contact.Contains(dto.PhoneNo!))
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.PhoneNo), d => d.FromPhone.Contains(dto.PhoneNo!) || d.Contact.Contains(dto.PhoneNo!))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.PushTypeCode), d => d.PushTypeCode == dto.PushTypeCode)
|
|
|
.WhereIF(dto.ExpiredTimeStart.HasValue, d => d.ExpiredTime >= dto.ExpiredTimeStart)
|
|
|
.WhereIF(dto.ExpiredTimeEnd.HasValue, d => d.ExpiredTime <= dto.ExpiredTimeEnd)
|
|
@@ -1798,7 +1796,7 @@ public class OrderController : BaseController
|
|
|
.Includes(d => d.OrderDelays)
|
|
|
.Includes(d => d.OrderScreens)
|
|
|
.Includes(d => d.OrderVisits, x => x.OrderVisitDetails)
|
|
|
- .Includes(d => d.OrderVisits, x => x.Employee)
|
|
|
+ .Includes(d=> d.OrderVisits,x=>x.Employee)
|
|
|
.FirstAsync(d => d.Id == id);
|
|
|
if (order == null)
|
|
|
return new();
|
|
@@ -1866,27 +1864,6 @@ public class OrderController : BaseController
|
|
|
|
|
|
//内容分词
|
|
|
await _orderApplication.OrderParticiple(dto.Content, order.Id, HttpContext.RequestAborted);
|
|
|
-
|
|
|
- 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热线平台】)",
|
|
|
- Name = order.FromName,
|
|
|
- Remark = order.Title,
|
|
|
- TelNumber = order.Contact
|
|
|
- }, HttpContext.RequestAborted);
|
|
|
- }
|
|
|
- catch (Exception e)
|
|
|
- {
|
|
|
- _logger.LogError("创建工单推送sms失败,{err}", e.Message);
|
|
|
- }
|
|
|
-
|
|
|
return order.Id;
|
|
|
}
|
|
|
|
|
@@ -1964,8 +1941,7 @@ public class OrderController : BaseController
|
|
|
try
|
|
|
{
|
|
|
//期满时间
|
|
|
- var expiredTimeConfig =
|
|
|
- _timeLimitDomainService.CalcExpiredTime(DateTime.Now, EFlowDirection.OrgToCenter, dto.Data.AcceptTypeCode);
|
|
|
+ var expiredTimeConfig = _timeLimitDomainService.CalcExpiredTime(DateTime.Now, EFlowDirection.OrgToCenter, dto.Data.AcceptTypeCode);
|
|
|
|
|
|
var startDto = _mapper.Map<StartWorkflowDto>(dto.Workflow);
|
|
|
startDto.DefinitionModuleCode = WorkflowModuleConsts.OrderHandle;
|
|
@@ -2349,7 +2325,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
await _provinceService.RevokeOrder(
|
|
|
new PublishSpecialDto
|
|
|
- { Order = _mapper.Map<OrderDto>(order), Special = _mapper.Map<OrderSpecialDto>(model) },
|
|
|
+ { Order = _mapper.Map<OrderDto>(order), Special = _mapper.Map<OrderSpecialDto>(model) },
|
|
|
HttpContext.RequestAborted);
|
|
|
}
|
|
|
catch (Exception e)
|
|
@@ -2414,7 +2390,7 @@ public class OrderController : BaseController
|
|
|
{
|
|
|
await _provinceService.RevokeOrder(
|
|
|
new PublishSpecialDto
|
|
|
- { Order = _mapper.Map<OrderDto>(order), Special = _mapper.Map<OrderSpecialDto>(special) },
|
|
|
+ { Order = _mapper.Map<OrderDto>(order), Special = _mapper.Map<OrderSpecialDto>(special) },
|
|
|
HttpContext.RequestAborted);
|
|
|
}
|
|
|
catch (Exception e)
|
|
@@ -3129,5 +3105,18 @@ public class OrderController : BaseController
|
|
|
await _orderRepository.UpdateAsync(order, HttpContext.RequestAborted);
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 获取企业信息
|
|
|
+ /// <summary>
|
|
|
+ /// 获取企业信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("enterprise/List")]
|
|
|
+ public async Task<EnterpriseListData> GetEnterpriseList([FromQuery] PagedKeywordRequest dto)
|
|
|
+ {
|
|
|
+ return await _enterpriseService.GetEnterpriseList(dto.Keyword!, dto.PageIndex,dto.PageSize, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
}
|