fix 查询优化

This commit is contained in:
2024-04-08 18:25:18 +08:00
parent 3d136b13bf
commit 9ca748a432
9 changed files with 156 additions and 98 deletions

View File

@@ -1,9 +1,11 @@
using Dlhis.Entity.Canteen.Enums;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.Core.DataAccess.Dto;
using Newtonsoft.Json;
namespace Dlhis.Canteen.Order.Response;
public class BalanceRecordUserResponse
public class BalanceRecordUserPageResponse
{
public long Id { get; set; }
@@ -20,37 +22,36 @@ public class BalanceRecordUserResponse
public string SourceDesc => Source.GetDescription();
/// <summary>
/// 收入/支出
/// 金额
/// </summary>
public BalanceRecordTypeEnumType Type { get; set; }
public string TypeDesc => Type.GetDescription();
[JsonIgnore]
public decimal CurrentAmount { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Amount { get; set; }
public string Amount => CurrentAmount.ToString("f2");
/// <summary>
/// 营业点
/// </summary>
public string BusinessPlaceName { get; set; }
public string BusinessShiftName { get; set; }
/// <summary>
/// 数据状态
/// 餐次
/// </summary>
public BalanceRecordStatusEnumType Status { get; set; }
public ShiftEnumType? ShiftType { get; set; }
/// <summary>
/// 数据状态描述
/// 餐次
/// </summary>
public string StatusDesc => Status.GetDescription();
public string ShiftTypeDesc => ShiftType?.GetDescription();
/// <summary>
/// 记录产生日期
/// 消费时间
/// </summary>
public DateTime CostDateTime { get; set; }
/// <summary>
/// 消费应用类型
/// </summary>
@@ -61,3 +62,18 @@ public class BalanceRecordUserResponse
/// </summary>
public string ApplicationTypeDesc => ApplicationType.GetDescription();
}
public class BalanceRecordUserResultResponse
{
[JsonIgnore]
public decimal CurrentMonthSum { get; set; }
/// <summary>
/// 当前月份总和
/// </summary>
public string MonthSum => CurrentMonthSum.ToString("f2");
public Pagination<BalanceRecordUserPageResponse> Items { get; set; }
}