|
@@ -114,8 +114,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
private readonly IRepository<OrderObserve> _orderObserveRepository;
|
|
|
private readonly IOrderTerminateRepository _orderTerminateRepository;
|
|
|
private readonly IRepository<OrderPublishHistory> _orderPublishHistoryRepository;
|
|
|
+ private readonly IOrderDelayRepository _orderDelayRepository;
|
|
|
|
|
|
- public OrderApplication(
|
|
|
+ public OrderApplication(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowDomainService workflowDomainService,
|
|
@@ -151,7 +152,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
IRepository<TranspondCityRawData> transpondCityRawDataRepository,
|
|
|
IRepository<OrderObserve> orderObserveRepository,
|
|
|
IOrderTerminateRepository orderTerminateRepository,
|
|
|
- IRepository<OrderPublishHistory> orderPublishHistoryRepository)
|
|
|
+ IRepository<OrderPublishHistory> orderPublishHistoryRepository,
|
|
|
+ IOrderDelayRepository orderDelayRepository)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_workflowDomainService = workflowDomainService;
|
|
@@ -189,7 +191,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
_orderTerminateRepository = orderTerminateRepository;
|
|
|
_orderPublishHistoryRepository = orderPublishHistoryRepository;
|
|
|
_sessionContext = sessionContext;
|
|
|
- }
|
|
|
+ _orderDelayRepository = orderDelayRepository;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 更新工单办理期满时间(延期调用,其他不调用)
|
|
@@ -2561,16 +2565,23 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
var screen = await _orderScreenRepository.Queryable().Where(x => x.OrderId == dto.OrderId && (int)x.Status < 2).ToListAsync(cancellationToken);
|
|
|
//var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.Id == dto.OrderId);
|
|
|
var sendBackAudit = await _orderSendBackAuditRepository.Queryable().Where(x => x.OrderId == dto.OrderId && x.State == ESendBackAuditState.Apply).ToListAsync(cancellationToken);
|
|
|
- if (_appOptions.Value.IsYiBin)
|
|
|
+ var orderDelay = await _orderDelayRepository.Queryable().Where(x => x.OrderId == dto.OrderId && x.DelayState == EDelayState.Examining).ToListAsync(cancellationToken);
|
|
|
+
|
|
|
+ if (_appOptions.Value.IsYiBin)
|
|
|
{
|
|
|
if (screen.Any())
|
|
|
{
|
|
|
- _orderScreenRepository.RemoveRangeAsync(screen, true, cancellationToken);
|
|
|
+ await _orderScreenRepository.RemoveRangeAsync(screen, true, cancellationToken);
|
|
|
}
|
|
|
|
|
|
if (sendBackAudit.Any())
|
|
|
{
|
|
|
- _orderSendBackAuditRepository.RemoveRangeAsync(sendBackAudit, true, cancellationToken);
|
|
|
+ await _orderSendBackAuditRepository.RemoveRangeAsync(sendBackAudit, true, cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (orderDelay.Any())
|
|
|
+ {
|
|
|
+ await _orderDelayRepository.RemoveRangeAsync(orderDelay, true, cancellationToken);
|
|
|
}
|
|
|
|
|
|
if (order.Workflow.IsInCountersign)
|
|
@@ -2700,7 +2711,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
}
|
|
|
|
|
|
_mapper.Map(expiredTimeConfig, order);
|
|
|
- await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
+ //await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
//特提(撤回至发起)
|
|
|
if (!string.IsNullOrEmpty(order.WorkflowId))
|
|
|
{
|
|
@@ -2721,13 +2732,13 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
order.ExpiredTime, nextHandler, cancellationToken);
|
|
|
order.FileEmpty();
|
|
|
|
|
|
- var status = EOrderStatus.WaitForAccept;
|
|
|
+ order.Status = EOrderStatus.WaitForAccept;
|
|
|
if (isPaiDan)
|
|
|
{
|
|
|
- status = EOrderStatus.Handling;
|
|
|
+ order.Status = EOrderStatus.Handling;
|
|
|
}
|
|
|
- await _orderRepository.Updateable().SetColumns(o => new Order { Status = status }).Where(o => o.Id == order.Id).ExecuteCommandAsync(cancellationToken);
|
|
|
- //await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
+ //await _orderRepository.Updateable().SetColumns(o => new Order { Status = status }).Where(o => o.Id == order.Id).ExecuteCommandAsync(cancellationToken);
|
|
|
+
|
|
|
//处理回访和发布信息
|
|
|
|
|
|
var publish = await _orderPublishRepository.GetAsync(x => x.OrderId == order.Id);
|
|
@@ -2753,9 +2764,10 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ await _orderRepository.UpdateAsync(order, cancellationToken);
|
|
|
//await _workflowDomainService.RecallToStartStepAsync(order.WorkflowId, "省工单重派", current, cancellationToken);
|
|
|
}
|
|
|
- return _mapper.Map<AddOrderResponse>(order);
|
|
|
+ return _mapper.Map<AddOrderResponse>(order);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|