Browse Source

Merge branch 'master' of http://110.188.24.182:10023/Fengwo/hotline

田爽 1 year ago
parent
commit
84b74d35ae

+ 2 - 0
src/Hotline.Api/Controllers/AiController.cs

@@ -129,6 +129,7 @@ namespace Hotline.Api.Controllers
                         if (callRecord != null) //有结果的任务
                         {
                             aiOrderVisitDetail.AiOrderVisitState = Share.Enums.Ai.EAiOrderVisitState.Ended; //更新AI子表
+                            aiOrderVisitDetail.AiVisitTime = DateTime.Now;
                             aiOrderVisit.VisitedCount++;
                             //处理结果
                             var visitDetail = _orderVisitDetailRepository.Queryable().Where(x => x.VisitId == aiOrderVisitDetail.OrderVisit.Id);
@@ -260,6 +261,7 @@ namespace Hotline.Api.Controllers
                             aiOrderVisitDetail.IsSuccess = false;
                             await _orderVisitRepository.UpdateAsync(aiOrderVisitDetail.OrderVisit, HttpContext.RequestAborted);
                         }
+                        
                         await _aiOrderVisitDetailRepository.UpdateAsync(aiOrderVisitDetail, HttpContext.RequestAborted);
                         if ((aiOrderVisit.VisitedFailCount+aiOrderVisit.VisitedCount)== aiOrderVisit.HasVisitCount)
                         {

+ 2 - 2
src/Hotline/FlowEngine/Workflows/IWorkflowDomainService.cs

@@ -22,7 +22,7 @@ namespace Hotline.FlowEngine.Workflows
         /// 进行流程的开始节点
         /// </summary>
         Task StartAsync(Workflow workflow, WorkflowStep startStep, BasicWorkflowDto dto, StepDefine firstStepDefine,
-            bool isNextDynamic, FlowAssignInfo flowAssignInfo, ECounterSignType counterSignType, DateTime? expiredTime,
+            bool isNextDynamic, FlowAssignInfo flowAssignInfo, ECounterSignType? counterSignType, DateTime? expiredTime,
             CancellationToken cancellationToken);
 
         /// <summary>
@@ -200,7 +200,7 @@ namespace Hotline.FlowEngine.Workflows
         /// <summary>
         /// 获取会签类型
         /// </summary>
-        ECounterSignType GetCounterSignType(EBusinessType businessType);
+        ECounterSignType? GetCounterSignType(EBusinessType businessType);
 
         /// <summary>
         /// 查询退回节点信息

+ 1 - 1
src/Hotline/FlowEngine/Workflows/Workflow.cs

@@ -620,7 +620,7 @@ public partial class Workflow
     /// <summary>
     /// 开始会签
     /// </summary>
-    public void StartCountersign(string startCsStepId, ECounterSignType counterSignType)
+    public void StartCountersign(string startCsStepId, ECounterSignType? counterSignType)
     {
         IsInCountersign = true;
         TopCountersignStepId = startCsStepId;

+ 3 - 2
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -98,7 +98,7 @@ namespace Hotline.FlowEngine.Workflows
         /// </summary>
         public async Task StartAsync(Workflow workflow, WorkflowStep startStep, BasicWorkflowDto dto,
             StepDefine firstStepDefine, bool isNextDynamic, FlowAssignInfo flowAssignInfo,
-            ECounterSignType counterSignType, DateTime? expiredTime, CancellationToken cancellationToken)
+            ECounterSignType? counterSignType, DateTime? expiredTime, CancellationToken cancellationToken)
         {
             //1. 创建first节点 (和trace)2.办理开始节点 
 
@@ -1120,12 +1120,13 @@ namespace Hotline.FlowEngine.Workflows
         /// <param name="businessType"></param>
         /// <returns></returns>
         /// <exception cref="ArgumentOutOfRangeException"></exception>
-        public ECounterSignType GetCounterSignType(EBusinessType businessType) =>
+        public ECounterSignType? GetCounterSignType(EBusinessType businessType) =>
             businessType switch
             {
                 EBusinessType.Center => ECounterSignType.Center,
                 EBusinessType.Send => ECounterSignType.Center,
                 EBusinessType.Department => ECounterSignType.Department,
+                EBusinessType.File => null,
                 _ => throw new ArgumentOutOfRangeException(nameof(businessType), businessType, null)
             };