|
@@ -4503,6 +4503,26 @@ public class OrderController : BaseController
|
|
|
return rsp;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 查询工单退回目标步节点信息
|
|
|
+ /// </summary>
|
|
|
+ [HttpGet("previous/targetStep/{orderId}")]
|
|
|
+ public async Task<TargetStepInfo> GetPreviousTargetStepInfo(string orderId)
|
|
|
+ {
|
|
|
+ var order = await _orderDomainService.GetOrderAsync(orderId, cancellationToken: HttpContext.RequestAborted);
|
|
|
+ if (string.IsNullOrEmpty(order.WorkflowId))
|
|
|
+ throw UserFriendlyException.SameMessage("该工单未开启流程");
|
|
|
+
|
|
|
+ var (currentStep, prevStep, isOrgToCenter, isSecondToFirstOrgLevel) = await _workflowApplication.GetPreviousInformationAsync(
|
|
|
+ order.WorkflowId, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId, _sessionContext.Roles, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ return new TargetStepInfo
|
|
|
+ {
|
|
|
+ CurrentBusinessType = currentStep.BusinessType,
|
|
|
+ TargetBusinessType = prevStep.BusinessType
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
#region 省工单退回
|