|
@@ -76,6 +76,7 @@ public class OrderController : BaseController
|
|
|
private readonly IRepeatableEventDetailRepository _repeatableEventDetailRepository;
|
|
|
private readonly IRepository<OrderWord> _orderWrodRepository;
|
|
|
private readonly IRepository<OrderObserve> _orderObserveRepository;
|
|
|
+ private readonly IRepository<OrderVisitApply> _orderVisitApplyRepository;
|
|
|
private readonly IRepository<OrderFinality> _orderFinalityRepository;
|
|
|
|
|
|
|
|
@@ -114,7 +115,8 @@ public class OrderController : BaseController
|
|
|
IRepeatableEventDetailRepository repeatableEventDetailRepository,
|
|
|
IRepository<OrderWord> orderWrodRepository,
|
|
|
IRepository<OrderObserve> orderObserveRepository,
|
|
|
- IRepository<OrderFinality> orderFinalityRepository
|
|
|
+ IRepository<OrderFinality> orderFinalityRepository,
|
|
|
+ IRepository<OrderVisitApply> orderVisitApplyRepository
|
|
|
)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
@@ -151,6 +153,7 @@ public class OrderController : BaseController
|
|
|
_orderWrodRepository = orderWrodRepository;
|
|
|
_orderObserveRepository = orderObserveRepository;
|
|
|
_orderFinalityRepository = orderFinalityRepository;
|
|
|
+ _orderVisitApplyRepository = orderVisitApplyRepository;
|
|
|
|
|
|
|
|
|
}
|
|
@@ -600,6 +603,27 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 二次回访申请
|
|
|
+
|
|
|
+ public async Task ApplyOrderVisit([FromBody]VisitStartFlowDto dto)
|
|
|
+ {
|
|
|
+ var orderVisitApply = _mapper.Map<AddVisitApply>(dto.Data);
|
|
|
+ //验证是否可以申请二次回访
|
|
|
+
|
|
|
+
|
|
|
+ var isAny = await _orderVisitApplyRepository.AnyAsync(x => x.OrderId == orderVisitApply.OrderId && x.VisitApplyState != EVisitApplyState.NoPass,HttpContext.RequestAborted);
|
|
|
+ if (isAny)
|
|
|
+ {
|
|
|
+ throw UserFriendlyException.SameMessage("当前状态不能申请二次回访");
|
|
|
+ }
|
|
|
+
|
|
|
+ var orderModel = await _orderRepository.GetAsync(x => x.Id == orderVisitApply.OrderId, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 工单重办
|