|
@@ -11,6 +11,7 @@ using Hotline.Repository.SqlSugar.Snapshot;
|
|
|
using Hotline.Settings;
|
|
|
using Hotline.Share.Dtos;
|
|
|
using Hotline.Share.Dtos.Snapshot;
|
|
|
+using Hotline.Share.Enums.CallCenter;
|
|
|
using Hotline.Share.Enums.Snapshot;
|
|
|
using Hotline.Share.Requests;
|
|
|
using Hotline.Share.Tools;
|
|
@@ -112,6 +113,37 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ [Theory]
|
|
|
+ [InlineData(true)]
|
|
|
+ [InlineData(false)]
|
|
|
+ public async Task SnapshotOrder_AddPoints_Test(bool 是受理范围)
|
|
|
+ {
|
|
|
+ var order = _orderServiceMock.CreateSnapshotOrder(SetWeiXin, "安全隐患")
|
|
|
+ .StepHandle(async order =>
|
|
|
+ {
|
|
|
+ if (是受理范围 == false)
|
|
|
+ {
|
|
|
+ var entity = _orderRepository.Get(order.Id);
|
|
|
+ entity.HotspotId = "181301";
|
|
|
+ await _orderRepository.UpdateAsync(entity);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .办理到一级部门(SetZuoXi)
|
|
|
+ .办理到归档(Set一级部门, data =>
|
|
|
+ {
|
|
|
+ data.CompliantType = ECompliantType.First;
|
|
|
+ data.VerifyType = "现场";
|
|
|
+ data.IsCheckList = true;
|
|
|
+ }).GetCreateResult();
|
|
|
+ var points = await _pointsRecordRepository.Queryable()
|
|
|
+ .Where(m => m.OrderId == order.Id && m.Direction == EPointsDirection.In && m.Source == EPointsSource.Report)
|
|
|
+ .FirstAsync();
|
|
|
+ if (是受理范围)
|
|
|
+ points.ShouldNotBeNull();
|
|
|
+ else
|
|
|
+ points.ShouldBeNull();
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 随手拍网格员超时:
|
|
|
/// </summary>
|
|
@@ -267,7 +299,7 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
baseData.AuditTypeCode.ShouldNotBeNull();
|
|
|
baseData.Amount.ShouldNotBeNull();
|
|
|
|
|
|
- var specialRedAuditItems = await _redPackApplication.GetRedPackSpecialAuditItems(new SnapshotOrderAuditItemsInDto() { PageIndex = 1, PageSize = 10 , No = order.No, Status = 1}).ToListAsync();
|
|
|
+ var specialRedAuditItems = await _redPackApplication.GetRedPackSpecialAuditItems(new SnapshotOrderAuditItemsInDto() { PageIndex = 1, PageSize = 10, No = order.No, Status = 1 }).ToListAsync();
|
|
|
var specialRedAudit = specialRedAuditItems.FirstOrDefault();
|
|
|
specialRedAudit.ShouldNotBeNull();
|
|
|
var a = _systemDicDataCacheManager.SnapshotReplenishType.First();
|
|
@@ -288,7 +320,7 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
};
|
|
|
|
|
|
await _redPackApplication.UpdateRedPackSpecialRecordAsync(inDto); // 补充发放
|
|
|
- specialRedAuditItems = await _redPackApplication.GetRedPackSpecialAuditItems(new SnapshotOrderAuditItemsInDto() { PageIndex = 1, PageSize = 10 , Status = 1, No = order.No}).ToListAsync();
|
|
|
+ specialRedAuditItems = await _redPackApplication.GetRedPackSpecialAuditItems(new SnapshotOrderAuditItemsInDto() { PageIndex = 1, PageSize = 10, Status = 1, No = order.No }).ToListAsync();
|
|
|
specialRedAudit = specialRedAuditItems.First();
|
|
|
specialRedAudit.ShouldNotBeNull();
|
|
|
specialRedAudit.BankCardNo.ShouldBe(inDto.BankCardNo);
|
|
@@ -329,7 +361,7 @@ public class OrderSnapshotApplicationTest : TestBase
|
|
|
}); // 添加备注
|
|
|
|
|
|
SetWeiXin();
|
|
|
- redPackItems = await _snapshotApplication.GetRedPacksAsync(new RedPacksInDto() { Status = ERedPackPickupStatus.Received }, CancellationToken.None);
|
|
|
+ redPackItems = await _snapshotApplication.GetRedPacksAsync(new RedPacksInDto() { Status = ERedPackPickupStatus.Received }, CancellationToken.None);
|
|
|
redPackRecord = redPackItems.Where(m => m.OrderId == order.Id).FirstOrDefault();
|
|
|
redPackRecord.ShouldNotBeNull();
|
|
|
redPackRecord.Amount.ShouldBe(11);
|