|
@@ -2083,8 +2083,12 @@ public class OrderController : BaseController
|
|
|
try
|
|
|
{
|
|
|
var workflow = dto.NextWorkflow;
|
|
|
- var delay = await _orderDelayRepository.GetAsync(item, HttpContext.RequestAborted);
|
|
|
+ var delay = await _orderDelayRepository.Queryable().Includes(x=>x.Order).Where(x=>x.Id == item).FirstAsync(HttpContext.RequestAborted);
|
|
|
workflow.WorkflowId = delay.WorkflowId;
|
|
|
+ var workflowEntuty = await _workflowDomainService.GetWorkflowAsync(workflow.WorkflowId, withDefine: true, withSteps: true,cancellationToken: HttpContext.RequestAborted);
|
|
|
+ var currentStep =
|
|
|
+ workflowEntuty.Steps.FirstOrDefault(d => d.Status == EWorkflowStepStatus.WaitForAccept || d.Status == EWorkflowStepStatus.WaitForHandle);
|
|
|
+
|
|
|
NextStepsWithOpinionDto<NextStepOption> next = null;
|
|
|
|
|
|
try
|
|
@@ -2104,7 +2108,23 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
}
|
|
|
if (next == null) continue;
|
|
|
-
|
|
|
+
|
|
|
+ if (!delay.Order.IsProvince)
|
|
|
+ {
|
|
|
+ if (next.Steps.Any(x => x.Value == "省审批"))
|
|
|
+ {
|
|
|
+ next.Steps.Remove(next.Steps.First(x => x.Value == "省审批"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!_sessionContext.OrgIsCenter && currentStep.Name != "中心初审")
|
|
|
+ {
|
|
|
+ if (next.Steps.Any(x => x.Value == "中心终审"))
|
|
|
+ {
|
|
|
+ next.Steps.Remove(next.Steps.First(x => x.Value == "中心终审"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
var isBatch = next.Steps.Where(x => x.Value == workflow.NextStepName).Any();
|
|
|
if (isBatch)
|
|
|
{
|