tangjiang 6 ماه پیش
والد
کامیت
abafc99696
2فایلهای تغییر یافته به همراه35 افزوده شده و 15 حذف شده
  1. 11 15
      src/Hotline.Api/Controllers/OrderController.cs
  2. 24 0
      src/Hotline/Orders/OrderRevocation.cs

+ 11 - 15
src/Hotline.Api/Controllers/OrderController.cs

@@ -3329,23 +3329,19 @@ public class OrderController : BaseController
         //首先是工单编辑页面提交的、流程已经开启、工单未归档的工单才能修改期满时间
         if (dto.IsEdit && !string.IsNullOrEmpty(order.WorkflowId) && order.Status < EOrderStatus.Filed && dto.AcceptTypeCode != order.AcceptTypeCode)
         {
-            //自贡业务
-            if (_appOptions.Value.IsZiGong)
+            //查询当前工单的实际办理节点,如果在热线中心不处理,如果在部门需要更新期满时间
+            var workflow = await _workflowDomainService.GetWorkflowAsync(order.WorkflowId, withSteps: true, withTraces: true, cancellationToken: HttpContext.RequestAborted);
+            var nowWorkflow = workflow.Steps.Where(p => p.Id == order.ActualHandleStepId && p.BusinessType >= EBusinessType.Department && p.BusinessType <= EBusinessType.DepartmentLeader).FirstOrDefault();
+            //在部门、中心到部门的交办时间不为空
+            if (nowWorkflow != null && order.CenterToOrgTime.HasValue)
             {
-                //查询当前工单的实际办理节点,如果在热线中心不处理,如果在部门需要更新期满时间
-                var workflow = await _workflowDomainService.GetWorkflowAsync(order.WorkflowId, withSteps: true, withTraces: true, cancellationToken: HttpContext.RequestAborted);
-                var nowWorkflow = workflow.Steps.Where(p => p.Id == order.ActualHandleStepId && p.BusinessType >= EBusinessType.Department && p.BusinessType <= EBusinessType.DepartmentLeader).FirstOrDefault();
-                //在部门、中心到部门的交办时间不为空
-                if (nowWorkflow != null && order.CenterToOrgTime.HasValue)
+                //计算期满时间
+                ExpiredTimeWithConfig expiredTimeConfig = await _expireTime.CalcExpiredTime(order.CenterToOrgTime.Value, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
+                if (expiredTimeConfig is not null && expiredTimeConfig.ExpiredTime > order.ExpiredTime)
                 {
-                    //自贡计算期满时间
-                    ExpiredTimeWithConfig expiredTimeConfig = await _expireTime.CalcExpiredTime(order.CenterToOrgTime.Value, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
-                    if (expiredTimeConfig is not null && expiredTimeConfig.ExpiredTime > order.ExpiredTime)
-                    {
-                        order.ExpiredTime = expiredTimeConfig.ExpiredTime;
-                        order.NearlyExpiredTime = expiredTimeConfig.NearlyExpiredTime;
-                        order.NearlyExpiredTimeOne = expiredTimeConfig.NearlyExpiredTimeOne;
-                    }
+                    order.ExpiredTime = expiredTimeConfig.ExpiredTime;
+                    order.NearlyExpiredTime = expiredTimeConfig.NearlyExpiredTime;
+                    order.NearlyExpiredTimeOne = expiredTimeConfig.NearlyExpiredTimeOne;
                 }
             }
         }

+ 24 - 0
src/Hotline/Orders/OrderRevocation.cs

@@ -0,0 +1,24 @@
+using System.ComponentModel;
+using XF.Domain.Repository;
+
+namespace Hotline.Orders
+{
+    [Description("撤销件")]
+    public class OrderRevocation : CreationEntity
+    {
+        /// <summary>
+        /// 工单ID
+        /// </summary>
+        public string OrderId { get; set; }
+
+        /// <summary>
+        /// 撤销原因
+        /// </summary>
+        public string RevocationReason { get; set; }
+
+        /// <summary>
+        /// 是否发送撤销短信
+        /// </summary>
+        public bool IsSendSms { get; set; }
+    }
+}