qinchaoyue 2 周之前
父节点
当前提交
e53a182e4d

+ 1 - 1
src/Hotline.Application/Snapshot/SnapshotOrderApplication.cs

@@ -435,7 +435,7 @@ public class SnapshotOrderApplication : IOrderSnapshotApplication, IScopeDepende
                     .Then(async industry =>
                     {
                         await _fileRepository.Queryable()
-                        .Where(m => m.Classify == EIndustryType.Declare.ToString())
+                        .Where(m => m.Key == industry.Id)
                         .Select(m => new FileJson { Id = m.Id, FileName = m.Name, Path = m.Path, FileType = m.Type })
                         .ToListAsync()
                         .Then(async file =>

+ 20 - 0
test/Hotline.Tests/Application/OrderSnapshotApplicationTest.cs

@@ -76,6 +76,26 @@ public class OrderSnapshotApplicationTest : TestBase
         };
     }
 
+    /// <summary>
+    /// 测试办理步骤中没有附件信息异常
+    /// </summary>
+    /// <returns></returns>
+    [Fact]
+    public async Task SnapshotOrder_Workflow_NextsStep_Document_Test()
+    {
+        var order = _orderServiceMock.CreateSnapshotOrder(SetWeiXin)
+            .办理到派单员(SetZuoXi)
+            .办理到一级部门(SetPaiDanYuan)
+            .StepHandle(async order => 
+            {
+                Set一级部门();
+                var steps = await _orderController.GetNextStepsWithRecommend(order.Id);
+                steps.DocumentFiles.ShouldNotBeNull();
+                steps.DocumentFiles.NotNullOrEmpty().ShouldBeTrue();
+            })
+            .GetCreateResult();
+    }
+
     /// <summary>
     /// 随手拍网格员超时:
     /// </summary>

+ 1 - 0
test/Hotline.Tests/Mock/OrderServiceMock.cs

@@ -28,6 +28,7 @@ using Hotline.Api.Controllers.Bi;
 using XF.Domain.Exceptions;
 using System;
 using DocumentFormat.OpenXml.Bibliography;
+using Hotline.Snapshot;
 using Hotline.Share.Enums.Settings;
 
 namespace Hotline.Tests.Mock;