xf 1 year ago
parent
commit
ae045ac628

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

@@ -1,6 +1,6 @@
 using Hotline.Caching.Interfaces;
+using Hotline.FlowEngine;
 using Hotline.Repository.SqlSugar.Extensions;
-using Hotline.Settings;
 using Hotline.Settings.Hotspots;
 using Hotline.Settings.TimeLimits;
 using Hotline.Share.Dtos;

+ 1 - 0
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -1,5 +1,6 @@
 using Hotline.Application.FlowEngine;
 using Hotline.Application.Knowledge;
+using Hotline.FlowEngine;
 using Hotline.KnowledgeBase;
 using Hotline.KnowledgeBase.Notifies;
 using Hotline.Permissions;

+ 1 - 0
src/Hotline.Api/Controllers/OrderController.cs

@@ -1,4 +1,5 @@
 using Hotline.Application.FlowEngine;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Definitions;
 using Hotline.FlowEngine.Workflows;
 using Hotline.Orders;

+ 1 - 0
src/Hotline.Api/Controllers/PbxController.cs

@@ -4,6 +4,7 @@ using Hotline.CallCenter.Calls;
 using Hotline.CallCenter.Devices;
 using Hotline.CallCenter.Ivrs;
 using Hotline.CallCenter.Tels;
+using Hotline.FlowEngine;
 using Hotline.Permissions;
 using Hotline.Settings;
 using Hotline.Share.Dtos.CallCenter;

+ 1 - 0
src/Hotline.Api/Controllers/WorkflowController.cs

@@ -1,5 +1,6 @@
 using Google.Rpc;
 using Hotline.Application.FlowEngine;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Definitions;
 using Hotline.FlowEngine.Workflows;
 using Hotline.Identity.Roles;

+ 2 - 2
src/Hotline.Api/Hotline.Api.csproj

@@ -1,11 +1,11 @@
-<Project Sdk="Microsoft.NET.Sdk.Web">
+<Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
     <TargetFramework>net7.0</TargetFramework>
     <Nullable>enable</Nullable>
     <ImplicitUsings>enable</ImplicitUsings>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
-    <NoWarn>$(NoWarn);1591;8618;1803</NoWarn>
+    <NoWarn>$(NoWarn);1591;8618;1803;</NoWarn>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/AcceptWorkflowHandler.cs

@@ -3,9 +3,9 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 
 namespace Hotline.Application.Handlers.FlowEngine

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/EndWorkflowHandler.cs

@@ -1,8 +1,8 @@
 using Hotline.CallCenter.Tels;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.KnowledgeBase;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 
 namespace Hotline.Application.Handlers.FlowEngine;

+ 2 - 2
src/Hotline.Application/Handlers/FlowEngine/JumpHandler.cs

@@ -1,6 +1,6 @@
-using Hotline.FlowEngine.Notifications;
+using Hotline.FlowEngine;
+using Hotline.FlowEngine.Notifications;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 using Microsoft.Extensions.Logging;
 

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/NextStepHandler.cs

@@ -1,10 +1,10 @@
 using DotNetCore.CAP;
 using Hotline.Application.FlowEngine;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.FlowEngine.Workflows;
 using Hotline.KnowledgeBase;
 using Hotline.Orders;
-using Hotline.Settings;
 using Hotline.Share.Dtos.FlowEngine;
 using Hotline.Share.Dtos.Order;
 using Hotline.Share.Enums.Order;

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/OrderFinalManageHandler.cs

@@ -3,9 +3,9 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 
 namespace Hotline.Application.Handlers.FlowEngine

+ 2 - 2
src/Hotline.Application/Handlers/FlowEngine/OrderRecallFinalManageHandler.cs

@@ -1,6 +1,6 @@
-using Hotline.FlowEngine.Notifications;
+using Hotline.FlowEngine;
+using Hotline.FlowEngine.Notifications;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 
 namespace Hotline.Application.Handlers.FlowEngine;

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/StartWorkflowHandler.cs

@@ -2,10 +2,10 @@
 using System.Text.Json;
 using System.Text.Unicode;
 using Hotline.CallCenter.Tels;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.KnowledgeBase;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 using Microsoft.Extensions.Logging;
 

+ 1 - 1
src/Hotline.Application/Handlers/FlowEngine/TerminalWorkflowHandler.cs

@@ -1,8 +1,8 @@
 using Hotline.CallCenter.Tels;
+using Hotline.FlowEngine;
 using Hotline.FlowEngine.Notifications;
 using Hotline.KnowledgeBase;
 using Hotline.Orders;
-using Hotline.Settings;
 using MediatR;
 
 namespace Hotline.Application.Handlers.FlowEngine;

+ 0 - 5
src/Hotline.Share/Dtos/Org/OrgDto.cs

@@ -64,11 +64,6 @@ namespace Hotline.Share.Dtos.Org
         /// </summary>
         public int OrgLevel { get; set; }
 
-        /// <summary>
-        /// 部门类型
-        /// </summary>
-        public EOrgType OrgType { get; set; }
-
         public string OrgTypeText => OrgType.GetDescription();
     }
 }

+ 1 - 1
src/Hotline.Share/Hotline.Share.csproj

@@ -5,7 +5,7 @@
     <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <GenerateDocumentationFile>True</GenerateDocumentationFile>
-    <NoWarn>$(NoWarn);1591</NoWarn>
+    <NoWarn>$(NoWarn);1591;8618;</NoWarn>
     <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
     <Version>1.0.7</Version>
   </PropertyGroup>

+ 1 - 1
src/Hotline/Settings/WorkflowModule.cs → src/Hotline/FlowEngine/WorkflowModule.cs

@@ -8,7 +8,7 @@ using Hotline.FlowEngine.Definitions;
 using SqlSugar;
 using XF.Domain.Repository;
 
-namespace Hotline.Settings;
+namespace Hotline.FlowEngine;
 
 /// <summary>
 /// 工作流业务模块

+ 0 - 1
src/Hotline/KnowledgeBase/KnowledgeDomainService.cs

@@ -1,7 +1,6 @@
 using DotNetCore.CAP;
 using Hotline.FlowEngine;
 using Hotline.FlowEngine.Workflows;
-using Hotline.Settings;
 using Hotline.Share.Dtos.Knowledge;
 using Hotline.Share.Enums.KnowledgeBase;
 using Hotline.Share.Mq;

+ 29 - 29
src/XF.Domain/Dependency/DependencyInjectionExtensions.cs

@@ -47,35 +47,35 @@ public static class DependencyInjectionExtensions
 
         return allAssemblies;
         //
-        HashSet<string> loadedAssemblies = new();
-
-        foreach (var item in allAssemblies)
-        {
-            loadedAssemblies.Add(item.FullName!);
-        }
-
-        Queue<Assembly> assembliesToCheck = new();
-        assembliesToCheck.Enqueue(Assembly.GetEntryAssembly()!);
-
-        while (assembliesToCheck.Any())
-        {
-            var assemblyToCheck = assembliesToCheck.Dequeue();
-            var referencedAssemblies = assemblyToCheck!.GetReferencedAssemblies();
-            foreach (var reference in referencedAssemblies)
-            {
-                if (!loadedAssemblies.Contains(reference.FullName))
-                {
-                    var assembly = Assembly.Load(reference);
-                    assembliesToCheck.Enqueue(assembly);
-
-                    loadedAssemblies.Add(reference.FullName);
-
-                    allAssemblies.Add(assembly);
-
-                }
-            }
-        }
-        return allAssemblies;
+        //HashSet<string> loadedAssemblies = new();
+
+        //foreach (var item in allAssemblies)
+        //{
+        //    loadedAssemblies.Add(item.FullName!);
+        //}
+
+        //Queue<Assembly> assembliesToCheck = new();
+        //assembliesToCheck.Enqueue(Assembly.GetEntryAssembly()!);
+
+        //while (assembliesToCheck.Any())
+        //{
+        //    var assemblyToCheck = assembliesToCheck.Dequeue();
+        //    var referencedAssemblies = assemblyToCheck!.GetReferencedAssemblies();
+        //    foreach (var reference in referencedAssemblies)
+        //    {
+        //        if (!loadedAssemblies.Contains(reference.FullName))
+        //        {
+        //            var assembly = Assembly.Load(reference);
+        //            assembliesToCheck.Enqueue(assembly);
+
+        //            loadedAssemblies.Add(reference.FullName);
+
+        //            allAssemblies.Add(assembly);
+
+        //        }
+        //    }
+        //}
+        //return allAssemblies;
     }
 }
 

+ 1 - 1
src/XF.Domain/Exceptions/UserFriendlyException.cs

@@ -10,7 +10,7 @@ namespace XF.Domain.Exceptions
     public class UserFriendlyException : Exception
     {
         public int Code { get; set; }
-        public string FriendlyMessage { get; set; }
+        public string? FriendlyMessage { get; set; }
 
         public UserFriendlyException()
         {