Browse Source

会员卡

master
wxd 2 months ago
parent
commit
d270adad66
  1. 6
      src/Shentun.Peis.Application.Contracts/CardBills/GetCardBillListDto.cs
  2. 8
      src/Shentun.Peis.Application.Contracts/CardBills/GetCardBillStatisticsReportInputDto.cs
  3. 11
      src/Shentun.Peis.Application/CardBills/CardBillAppService.cs

6
src/Shentun.Peis.Application.Contracts/CardBills/GetCardBillListDto.cs

@ -53,5 +53,11 @@ namespace Shentun.Peis.CardBills
/// 支付方式 集合
/// </summary>
public List<string> PayModeIds { get; set; } = new List<string>();
/// <summary>
/// 操作用户id 集合
/// </summary>
public List<Guid> OperateUserIds { get; set; } = new List<Guid>();
}
}

8
src/Shentun.Peis.Application.Contracts/CardBills/GetCardBillStatisticsReportInputDto.cs

@ -26,7 +26,7 @@ namespace Shentun.Peis.CardBills
/// 手机
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 记账标志 0、充值 1、扣费 2、退费
@ -48,5 +48,11 @@ namespace Shentun.Peis.CardBills
/// 支付方式 集合
/// </summary>
public List<string> PayModeIds { get; set; } = new List<string>();
/// <summary>
/// 操作用户id 集合
/// </summary>
public List<Guid> OperateUserIds { get; set; } = new List<Guid>();
}
}

11
src/Shentun.Peis.Application/CardBills/CardBillAppService.cs

@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Enums;
using Shentun.Peis.Models;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@ -114,6 +115,11 @@ namespace Shentun.Peis.CardBills
queryable = queryable.Where(m => input.PayModeIds.Contains(m.PayModeId));
}
if (input.OperateUserIds.Any())
{
queryable = queryable.Where(m => input.OperateUserIds.Contains(m.CreatorId.Value));
}
var userlist = await _userRepository.GetListAsync();
var entlist = queryable.Select(s => new CardBillDto
@ -415,6 +421,11 @@ namespace Shentun.Peis.CardBills
query = query.Where(m => input.PayModeIds.Contains(m.cardBill.PayModeId));
}
if (input.OperateUserIds.Any())
{
query = query.Where(m => input.OperateUserIds.Contains(m.cardBill.CreatorId.Value));
}
var queryList = query.ToList().GroupBy(g => g.cardRegister);

Loading…
Cancel
Save