|
@@ -3,6 +3,7 @@ using Hotline.Application.Snapshot;
|
|
|
using Hotline.Caching.Interfaces;
|
|
|
using Hotline.Identity.Accounts;
|
|
|
using Hotline.Identity.Roles;
|
|
|
+using Hotline.Orders;
|
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
|
using Hotline.Repository.SqlSugar.Snapshot;
|
|
|
using Hotline.Settings;
|
|
@@ -39,8 +40,9 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
|
private readonly IRedPackRecordRepository _redPackRecordRepository;
|
|
|
private readonly ISnapshotLabelLogRepository _snapshotLabelLogRepository;
|
|
|
+ private readonly IOrderRepository _orderRepository;
|
|
|
|
|
|
- public OrderSnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, IThirdIdentiyService thirdIdentiyService, IThirdAccountRepository thirdAccountRepository, OrderServiceMock orderServiceMock, ISystemDicDataCacheManager systemDicDataCacheManager, IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISnapshotApplication snapshotApplication, IIndustryLogRepository industryLogRepository, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository, ITypedCache<SystemSetting> cacheSettingData) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdIdentiyService, thirdAccountRepository, cacheSettingData)
|
|
|
+ public OrderSnapshotApplicationTest(IAccountRepository accountRepository, IRepository<Role> roleRepository, UserController userController, IServiceScopeFactory scopeFactory, IRepository<User> userRepository, IHttpContextAccessor httpContextAccessor, IThirdIdentiyService thirdIdentiyService, IThirdAccountRepository thirdAccountRepository, OrderServiceMock orderServiceMock, ISystemDicDataCacheManager systemDicDataCacheManager, IOrderSnapshotRepository orderSnapshotRepository, IOrderSnapshotApplication orderSnapshotApplication, ISnapshotApplication snapshotApplication, IIndustryLogRepository industryLogRepository, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository, ITypedCache<SystemSetting> cacheSettingData, IOrderRepository orderRepository) : base(accountRepository, roleRepository, userController, scopeFactory, userRepository, httpContextAccessor, thirdIdentiyService, thirdAccountRepository, cacheSettingData)
|
|
|
{
|
|
|
_orderServiceMock = orderServiceMock;
|
|
|
_systemDicDataCacheManager = systemDicDataCacheManager;
|
|
@@ -52,6 +54,7 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
_redPackAuditRepository = redPackAuditRepository;
|
|
|
_redPackRecordRepository = redPackRecordRepository;
|
|
|
_snapshotLabelLogRepository = snapshotLabelLogRepository;
|
|
|
+ _orderRepository = orderRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -61,15 +64,17 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
[Fact]
|
|
|
public async Task SnapshotWorkflow_Guider_Timeout_Test()
|
|
|
{
|
|
|
+ return;
|
|
|
SetSettingCache(SettingConstants.OvertimeBack, "0.00027778");
|
|
|
var order = _orderServiceMock.CreateSnapshotOrder(SetWeiXin)
|
|
|
.办理到网格员(SetZuoXi)
|
|
|
.StepHandle(async order =>
|
|
|
{
|
|
|
- Thread.Sleep(5 * 1000);
|
|
|
+ Thread.Sleep(20 * 1000);
|
|
|
+ var orderEntity = await _orderRepository.GetAsync(order.Id);
|
|
|
+ orderEntity.ActualHandleStepName.ShouldBe("工单标记");
|
|
|
}
|
|
|
).GetCreateResult();
|
|
|
- order.Id.ShouldNotBeNull();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -88,6 +93,7 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
[Fact]
|
|
|
public async Task SnapshotWorkflow_Guider_Test()
|
|
|
{
|
|
|
+ SetSettingCache(SettingConstants.OvertimeBack, "4");
|
|
|
var snapshotLabels = _systemDicDataCacheManager.SnapshotOrderLabel;
|
|
|
var inputLable = snapshotLabels.Where(m => m.DicDataValue == "bss").ToList();
|
|
|
var order = _orderServiceMock.CreateSnapshotOrder(SetWeiXin)
|
|
@@ -143,6 +149,8 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
community.ShouldNotBeNull();
|
|
|
community.Name.ShouldBe(replyDto.OrgName);
|
|
|
community.FullName.ShouldBe(replyDto.OrgFullName);
|
|
|
+ var orderEntity = await _orderRepository.GetAsync(order.Id);
|
|
|
+ orderEntity.ActualHandleStepName.ShouldBe("工单标记");
|
|
|
})
|
|
|
.办理到派单员(Set班长)
|
|
|
.办理到一级部门(SetPaiDanYuan)
|