Просмотр исходного кода

Merge branch 'feature/snapshot' into dev

qinchaoyue 2 месяцев назад
Родитель
Сommit
b4637300bb

+ 1 - 1
src/Hotline.Api/Controllers/Snapshot/BiSnapshotController.cs

@@ -50,7 +50,7 @@ public class BiSnapshotController : BaseController
     /// <returns></returns>
     [HttpGet("statistics/details")]
     public async Task<PagedDto<SnapshotStatisticsDetailOutDto>> GetSnapshotStatisticsDetailAsync([FromQuery] SnapshotStatisticsDetailInDto dto)
-        => (await _biSnapshotApplication.GetSnapshotStatisticsDetail(dto, HttpContext.RequestAborted).ToPagedListAsync(dto)).ToPaged();
+        => (await _biSnapshotApplication.GetSnapshotStatisticsDetail(dto).ToPagedListAsync(dto)).ToPaged();
     
 
 }

+ 0 - 1
src/Hotline.Api/Controllers/Snapshot/RedPackController.cs

@@ -129,7 +129,6 @@ public class RedPackController : BaseController
     /// <summary>
     /// 添加备注页面基础信息
     /// </summary>
-    /// <param name="dto"></param>
     /// <returns></returns>
     [HttpGet("audit/remark/basedata")]
     public async Task<Dictionary<string, object>> UpdateRedPackAuditRemarkBaseDataAsync()

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

@@ -90,7 +90,7 @@ public class BiSnapshotApplication : IBiSnapshotApplication, IScopeDependency
         return await query.FirstAsync();
     }
 
-    public ISugarQueryable<SnapshotStatisticsDetailOutDto> GetSnapshotStatisticsDetail(SnapshotStatisticsDetailInDto dto, CancellationToken requestAborted)
+    public ISugarQueryable<SnapshotStatisticsDetailOutDto> GetSnapshotStatisticsDetail(SnapshotStatisticsDetailInDto dto)
     {
         dto.FieldName = dto.FieldName.ToUpper();
         var query = _orderSnapshotRepository.Queryable(includeDeleted: true)

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

@@ -12,5 +12,5 @@ namespace Hotline.Application.Snapshot;
 public interface IBiSnapshotApplication
 {
     Task<SnapshotStatisticsOutDto> GetSnapshotStatisticsAsync(SnapshotStatisticsInDto dto, CancellationToken token);
-    ISugarQueryable<SnapshotStatisticsDetailOutDto> GetSnapshotStatisticsDetail(SnapshotStatisticsDetailInDto dto, CancellationToken requestAborted);
+    ISugarQueryable<SnapshotStatisticsDetailOutDto> GetSnapshotStatisticsDetail(SnapshotStatisticsDetailInDto dto);
 }

+ 15 - 0
src/Hotline.Application/Snapshot/RedPackApplication.cs

@@ -266,6 +266,21 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
             .WhereIF(dto.Status == 0, (redPackAudit, snapshot, order, special) => special.Id == null)
             .WhereIF(dto.Status == 1, (redPackAudit, snapshot, order, special) => special.Status == ERedPackAuditStatus.Agree)
             .WhereIF(dto.Status == 2, (redPackAudit, snapshot, order, special) => special.Status == ERedPackAuditStatus.Refuse)
+            .WhereIF(dto.No.NotNullOrEmpty(), (redPackAudit, snapshot, order, special) => order.No!.Contains(dto.No!))
+            .WhereIF(dto.Title.NotNullOrEmpty(), (redPackAudit, snapshot, order, special) => order.Title!.Contains(dto.Title!))
+            .WhereIF(dto.FromPhone.NotNullOrEmpty(), (redPackAudit, snapshot, order, special) => order.FromPhone!.Contains(dto.FromPhone!))
+            .WhereIF(dto.BeginCreationTime.HasValue && dto.EndCreationTime.HasValue, (redPackAudit, snapshot, order, special) => order.CreationTime >= dto.BeginCreationTime && order.CreationTime <= dto.EndCreationTime)
+            .WhereIF(dto.IsDeal.HasValue, (redPackAudit, snapshot, order, special) => snapshot.IsDeal == dto.IsDeal)
+            .WhereIF(dto.IsTruth.HasValue, (redPackAudit, snapshot, order, special) => snapshot.IsTruth == dto.IsTruth)
+            .WhereIF(dto.IsTruthDepartment.HasValue, (redPackAudit, snapshot, order, special) => snapshot.IsTruthDepartment == dto.IsTruthDepartment)
+            .WhereIF(dto.BeginAuditTime.HasValue && dto.EndAuditTime.HasValue, (redPackAudit, snapshot, order, special) => redPackAudit.AuditTime >=  dto.BeginAuditTime && redPackAudit.AuditTime <= dto.EndAuditTime)
+            .WhereIF(dto.BeginFiledTime.HasValue && dto.EndFiledTime.HasValue, (redPackAudit, snapshot, order, special) => order.FiledTime >=  dto.BeginFiledTime && order.FiledTime <= dto.EndFiledTime)
+            .WhereIF(dto.IsIssued.HasValue, (redPackAudit, snapshot, order, special) => redPackAudit.IsSend == dto.IsIssued)
+            .WhereIF(dto.IndustryId.NotNullOrEmpty(), (redPackAudit, snapshot, order, special) => snapshot.IndustryId == dto.IndustryId)
+            .WhereIF(dto.ConfigAmount.HasValue, (redPackAudit, snapshot, order, special) => special.ShouldAmount == dto.ConfigAmount)
+            .WhereIF(dto.AcutalAmount.HasValue, (redPackAudit, snapshot, order, special) => special.AcutalAmount == dto.AcutalAmount)
+            .WhereIF(dto.ApprovedAmount.HasValue, (redPackAudit, snapshot, order, special) => special.ApprovedAmount == dto.ApprovedAmount)
+            .WhereIF(dto.IsDanger.HasValue, (redPackAudit, snapshot, order, special) => snapshot.IsDanger == dto.IsDanger)
             .OrderByDescending((redPackAudit, snapshot, order, special) => redPackAudit.CreationTime)
                         .Select((redPackAudit, snapshot,order, special) => new SnapshotOrderAuditItemsOutDto
                         {