|
@@ -74,6 +74,7 @@ using Hotline.Share.Dtos.Org;
|
|
|
using Hotline.Snapshot.Interfaces;
|
|
|
using Hotline.Snapshot.Notifications;
|
|
|
using Hotline.Snapshot;
|
|
|
+using Hotline.Application.Snapshot;
|
|
|
|
|
|
namespace Hotline.Api.Controllers;
|
|
|
|
|
@@ -150,6 +151,7 @@ public class OrderController : BaseController
|
|
|
private readonly ISystemLogApplication _systemLogApplication;
|
|
|
private readonly IRepository<OrderCarboncopy> _orderCarboncopy;
|
|
|
private readonly IOrderSnapshotRepository _orderSnapshotRepository;
|
|
|
+ private readonly IOrderSnapshotApplication _orderSnapshotApplication;
|
|
|
private readonly IIndustryRepository _industryRepository;
|
|
|
|
|
|
public OrderController(
|
|
@@ -220,7 +222,8 @@ public class OrderController : BaseController
|
|
|
ITypedCache<string> typeCache,
|
|
|
ISystemLogApplication systemLogApplication,
|
|
|
IOrderSnapshotRepository orderSnapshotRepository,
|
|
|
- IIndustryRepository industryRepository)
|
|
|
+ IIndustryRepository industryRepository,
|
|
|
+ IOrderSnapshotApplication orderSnapshotApplication)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_orderRepository = orderRepository;
|
|
@@ -290,6 +293,7 @@ public class OrderController : BaseController
|
|
|
_systemLogApplication = systemLogApplication;
|
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
|
_industryRepository = industryRepository;
|
|
|
+ _orderSnapshotApplication = orderSnapshotApplication;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -567,10 +571,8 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
|
|
|
string visitId = await _orderVisitRepository.AddAsync(orderVisit);
|
|
|
- if (_systemSettingCacheManager.Snapshot && dto.SnapshotLabels.NotNullOrEmpty())
|
|
|
- {
|
|
|
- await _orderSnapshotRepository.UpdateLabelAsync(order.Id, dto.SnapshotLabels);
|
|
|
- }
|
|
|
+ await _orderSnapshotApplication.UpdateLabelAsync(order.Id, dto.SnapshotLabels);
|
|
|
+
|
|
|
|
|
|
//新增回访信息
|
|
|
var visitedDetail = new List<OrderVisitDetail>();
|
|
@@ -4146,13 +4148,13 @@ public class OrderController : BaseController
|
|
|
|
|
|
//抄送
|
|
|
var ccs = orderHandleFlowDto.Copys
|
|
|
- .Where(d => !string.IsNullOrEmpty(d.OrgId)
|
|
|
- || !string.IsNullOrEmpty(d.RoleId)
|
|
|
+ .Where(d => !string.IsNullOrEmpty(d.OrgId)
|
|
|
+ || !string.IsNullOrEmpty(d.RoleId)
|
|
|
|| !string.IsNullOrEmpty(d.UserId))
|
|
|
.Select(d => _mapper.Map<OrderCarboncopy>(d))
|
|
|
.Distinct()
|
|
|
.ToList();
|
|
|
- ccs.ForEach(d=>d.OrderId = order.Id);
|
|
|
+ ccs.ForEach(d => d.OrderId = order.Id);
|
|
|
await _orderCarboncopy.AddRangeAsync(ccs, HttpContext.RequestAborted);
|
|
|
|
|
|
break;
|