xf 1 год назад
Родитель
Сommit
a1a6e5402f

+ 1 - 1
src/Hotline.Api/Controllers/ArticleController.cs

@@ -1,6 +1,6 @@
 using Hotline.Application.FlowEngine;
 using Hotline.Article;
-using Hotline.FlowEngine.WfModules;
+using Hotline.FlowEngine.WorkflowModules;
 using Hotline.Permissions;
 using Hotline.Repository.SqlSugar.Extensions;
 using Hotline.Settings;

+ 3 - 2
src/Hotline.Api/Controllers/OrderController.cs

@@ -28,6 +28,7 @@ using Microsoft.AspNetCore.Mvc;
 using MongoDB.Driver;
 using SqlSugar;
 using System.Threading;
+using Hotline.FlowEngine.WorkflowModules;
 using XF.Domain.Authentications;
 using XF.Domain.Constants;
 using XF.Domain.Exceptions;
@@ -685,7 +686,7 @@ public class OrderController : BaseController
         if (order.Status == EOrderStatus.WaitForAccept || order.Status == EOrderStatus.Filed)
             throw UserFriendlyException.SameMessage("当前工单状态不能申请延期");
 
-        bool IsHas = await _orderDelayRepository.AnyAsync(x => x.OrderId == dto.OrderId && x.DelayState == EDelayState.Examining, HttpContext.RequestAborted);
+        bool IsHas = await _orderDelayRepository.AnyAsync(x => x.OrderId == dto.Data.OrderId && x.DelayState == EDelayState.Examining, HttpContext.RequestAborted);
         if (IsHas)
             throw UserFriendlyException.SameMessage("该存在延期申请正在审核");
         //验证延期次数
@@ -702,7 +703,7 @@ public class OrderController : BaseController
         model.DelayState = EDelayState.Examining;
         if (model.BeforeDelay != null)
         {
-            model.AfterDelay = _timeLimitApplication.CalcEndTime(model.BeforeDelay.Value, dto.DelayUnit, dto.DelayNum)?.EndTime;
+            //model.AfterDelay = _timeLimitApplication.CalcEndTime(model.BeforeDelay.Value, dto.DelayUnit, dto.DelayNum)?.EndTime;//todo
         }
 
         model.ApplyDelayTime = DateTime.Now;

+ 1 - 1
src/Hotline.Api/Controllers/TestController.cs

@@ -1,7 +1,7 @@
 using Hotline.CallCenter.BlackLists;
 using Hotline.CallCenter.Devices;
 using Hotline.CallCenter.Ivrs;
-using Hotline.FlowEngine.WfModules;
+using Hotline.FlowEngine.WorkflowModules;
 using Hotline.Identity.Roles;
 using Hotline.Orders;
 using Hotline.Realtimes;

+ 17 - 16
src/Hotline.Application/Handlers/FlowEngine/EndWorkflowHandler.cs

@@ -31,9 +31,9 @@ public class EndWorkflowHandler : INotificationHandler<EndWorkflowNotify>
     private readonly ICapPublisher _capPublisher;
     private readonly IMapper _mapper;
     private readonly IRepository<OrderVisitDetail> _orderVisitedDetailRepository;
-	private readonly IRepository<OrderScreen> _orderScreenRepository;
+    private readonly IRepository<OrderScreen> _orderScreenRepository;
 
-	public EndWorkflowHandler(
+    public EndWorkflowHandler(
         IKnowledgeDomainService knowledgeDomainService,
         IOrderDomainService orderDomainService,
         ITelDomainService telDomainService,
@@ -43,7 +43,7 @@ public class EndWorkflowHandler : INotificationHandler<EndWorkflowNotify>
         ICapPublisher capPublisher,
         IMapper mapper,
         IRepository<OrderVisitDetail> orderVisitedDetailRepository,
-		IRepository<OrderScreen> orderScreenRepository
+        IRepository<OrderScreen> orderScreenRepository
         )
     {
         _knowledgeDomainService = knowledgeDomainService;
@@ -56,7 +56,7 @@ public class EndWorkflowHandler : INotificationHandler<EndWorkflowNotify>
         _mapper = mapper;
         _orderScreenRepository = orderScreenRepository;
         _orderVisitedDetailRepository = orderVisitedDetailRepository;
-	}
+    }
 
     /// <summary>Handles a notification</summary>
     /// <param name="notification">The notification</param>
@@ -98,21 +98,22 @@ public class EndWorkflowHandler : INotificationHandler<EndWorkflowNotify>
 
                 break;
             case WorkflowModuleConsts.OrderScreen:
-	            var screen = await _orderScreenRepository.GetAsync(workflow.ExternalId, cancellationToken);
-	            if (screen != null)
-	            {
-		            screen.Status = EScreenStatus.End;
+                var screen = await _orderScreenRepository.GetAsync(workflow.ExternalId, cancellationToken);
+                if (screen != null)
+                {
+                    screen.Status = EScreenStatus.End;
                     screen.ReplyContent = workflow.ActualOpinion;
-					await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
+                    await _orderScreenRepository.UpdateAsync(screen, cancellationToken);
                     var visitDetail = await _orderVisitedDetailRepository.GetAsync(screen.VisitDetailId, cancellationToken);
-                    if (visitDetail != null) {
-                        var screenSatisfy = new IdName() { Id = "6", Name = "甄别满意" };
-						visitDetail.OrgProcessingResults = screenSatisfy;
+                    if (visitDetail != null)
+                    {
+                        var screenSatisfy = new Kv() { Key = "6", Value = "甄别满意" };
+                        visitDetail.OrgProcessingResults = screenSatisfy;
                         visitDetail.OrgHandledAttitude = screenSatisfy;
                         await _orderVisitedDetailRepository.UpdateAsync(visitDetail, cancellationToken);
-					}
-				}
-	            break;
-		}
+                    }
+                }
+                break;
+        }
     }
 }