|
@@ -224,7 +224,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
_sessionContextManager = sessionContextManager;
|
|
|
_orderVisitApplication = orderVisitApplication;
|
|
|
_roleRepository = roleRepository;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 更新工单办理期满时间(延期调用,其他不调用)
|
|
@@ -3485,27 +3485,27 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
var orderSecondaries = await _orderSecondaryHandlingRepository.Queryable()
|
|
|
.Where(x => x.OrderId == order.Id && x.State == ESecondaryHandlingState.Apply).ToListAsync(cancellationToken);
|
|
|
|
|
|
- if (screen.Any())
|
|
|
+ if (screen != null && screen.Any())
|
|
|
{
|
|
|
await _orderScreenRepository.RemoveRangeAsync(screen, false, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- if (sendBackAudit.Any())
|
|
|
+ if (sendBackAudit != null && sendBackAudit.Any())
|
|
|
{
|
|
|
await _orderSendBackAuditRepository.RemoveRangeAsync(sendBackAudit, false, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- if (orderDelay.Any())
|
|
|
+ if (orderDelay != null && orderDelay.Any())
|
|
|
{
|
|
|
await _orderDelayRepository.RemoveRangeAsync(orderDelay, false, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- if (orderSecondaries.Any())
|
|
|
+ if (orderSecondaries != null && orderSecondaries.Any())
|
|
|
{
|
|
|
await _orderSecondaryHandlingRepository.RemoveRangeAsync(orderSecondaries, false, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- if (order.Workflow.IsInCountersign)
|
|
|
+ if (order.Workflow != null && order.Workflow.IsInCountersign)
|
|
|
{
|
|
|
var workflowStep = await _workflowStepRepository.Queryable().Where(x => x.Id == order.Workflow.TopCountersignStepId)
|
|
|
.FirstAsync(cancellationToken);
|
|
@@ -4339,8 +4339,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
|
|
|
var orderExtension = await _orderDomainService.GetOrderExtensionsAsync(dto.ReceiveProvinceNo, cancellationToken);
|
|
|
|
|
|
- var order = await _orderRepository.GetAsync(d => d.ReceiveProvinceNo == dto.ReceiveProvinceNo, cancellationToken);
|
|
|
-
|
|
|
+ // var order = await _orderRepository.GetAsync(d => d.ReceiveProvinceNo == dto.ReceiveProvinceNo, cancellationToken);
|
|
|
+ var order = await _orderRepository.Queryable().Includes(d => d.Workflow).FirstAsync(d => d.ReceiveProvinceNo == dto.ReceiveProvinceNo);
|
|
|
//处理省下行数据,热点名称为空
|
|
|
if (!string.IsNullOrEmpty(dto.HotspotId) && string.IsNullOrEmpty(dto.HotspotName))
|
|
|
{
|
|
@@ -5394,7 +5394,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
}
|
|
|
else if (newStep.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(newStep.RoleId))
|
|
|
{
|
|
|
- var role = await _roleRepository.Queryable().Includes(x=> x.Accounts).FirstAsync(x => x.Name == newStep.RoleId, cancellationToken);
|
|
|
+ var role = await _roleRepository.Queryable().Includes(x => x.Accounts).FirstAsync(x => x.Name == newStep.RoleId, cancellationToken);
|
|
|
foreach (var user in role.Accounts)
|
|
|
{
|
|
|
await _circularRecordDomainService.OrderSendBackCircularMessage(user.Id, user.Name, order, cancellationToken);
|