|
@@ -4437,20 +4437,13 @@ public class OrderController : BaseController
|
|
|
if (!validResult.IsValid)
|
|
|
throw new UserFriendlyException(
|
|
|
$"非法参数, {string.Join(',', validResult.Errors.Select(d => d.ErrorMessage))}");
|
|
|
- var order = await _orderApplication.SaveOrderWorkflowInfo(dto, HttpContext.RequestAborted);
|
|
|
|
|
|
- // 随手拍业务处理
|
|
|
- if (_systemSettingCacheManager.Snapshot)
|
|
|
- {
|
|
|
- await _orderSnapshotApplication.SaveOrderWorkflowInfo(dto);
|
|
|
- }
|
|
|
-
|
|
|
- var workflow = await _workflowDomainService.GetWorkflowAsync(dto.Workflow.WorkflowId, withDefine: true, withSteps: true, withTraces: true,
|
|
|
- cancellationToken: HttpContext.RequestAborted);
|
|
|
+ var workflow = await _workflowDomainService.GetWorkflowAsync(dto.Workflow.WorkflowId, withDefine: true, withSteps: true, withTraces: true,
|
|
|
+ cancellationToken: HttpContext.RequestAborted);
|
|
|
|
|
|
#region 中心归档,自动延期一天
|
|
|
- if (dto.Workflow.StepType == EStepType.End && dto.Workflow.NextStepCode =="end" && _appOptions.Value.IsYiBin && _sessionContext.OrgIsCenter)
|
|
|
- {
|
|
|
+ if (dto.Workflow.StepType == EStepType.End && dto.Workflow.NextStepCode == "end" && _appOptions.Value.IsYiBin && _sessionContext.OrgIsCenter)
|
|
|
+ {
|
|
|
var dOrder = await _orderRepository.GetAsync(workflow.ExternalId, HttpContext.RequestAborted);
|
|
|
if (dOrder != null && dOrder.ExpiredTime < DateTime.Now)
|
|
|
{
|
|
@@ -4507,6 +4500,14 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
+
|
|
|
+ var order = await _orderApplication.SaveOrderWorkflowInfo(dto, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ // 随手拍业务处理
|
|
|
+ if (_systemSettingCacheManager.Snapshot)
|
|
|
+ {
|
|
|
+ await _orderSnapshotApplication.SaveOrderWorkflowInfo(dto);
|
|
|
+ }
|
|
|
//await _workflowApplication.NextAsync(dto.WorkflowDto, order.ExpiredTime, HttpContext.RequestAborted);
|
|
|
var startStep = workflow.Steps.First(d => d.Id == dto.Workflow.StepId);
|
|
|
await HandleOrderAsync(order, workflow, startStep, dto.Data, dto.Workflow, HttpContext.RequestAborted);
|