瀏覽代碼

终止流程

田爽 6 月之前
父節點
當前提交
edb69988a7

+ 2 - 1
src/Hotline.Application/Handlers/FlowEngine/WorkflowStartHandler.cs

@@ -247,7 +247,8 @@ namespace Hotline.Application.Handlers.FlowEngine
 	                        .Where(x => x.Id == workflow.ExternalId).FirstAsync(cancellationToken);
                         if (orderTerminate != null)
                         {
-                            orderTerminate.Status = ETerminateStatus.Approval;
+	                        orderTerminate.WorkflowId = workflow.Id;
+							orderTerminate.Status = ETerminateStatus.Approval;
                             await _orderTerminateRepository.UpdateAsync(orderTerminate, cancellationToken);
 						}
                         break;

+ 13 - 2
src/Hotline.Share/Dtos/Order/OrderTerminateDto.cs

@@ -29,8 +29,6 @@ namespace Hotline.Share.Dtos.Order
 		/// </summary>
 		public ETerminateStatus? Status { get; set; }
 
-		public string StatusText => Status.HasValue ? Status.GetDescription() : "";
-
 		/// <summary>
 		/// 工单编号
 		/// </summary>
@@ -101,6 +99,19 @@ namespace Hotline.Share.Dtos.Order
 		/// </summary>
 		public bool IsCanHandle { get; set; }
 
+		/// <summary>
+		/// 审批状态 
+		/// </summary>
+		public ETerminateStatus? Status { get; set; }
+
+
+		public string StatusText => Status.GetDescription();
+
+		/// <summary>
+		/// 终止理由
+		/// </summary>
+		public string? Content { get; set; }
+
 
 		/// <summary>
 		/// 办理 true  审批 false