Files
jinko.yikatong/Src/Dlhis.Canteen/Order/Response/ShiftAndBusinessPlaceAnalysisResponse.cs

75 lines
1.7 KiB
C#

using System.Text.Json.Serialization;
using Dlhis.Entity.Canteen.Enums;
using Dlhis.ExcelHelper;
using Kurisu.AspNetCore.DataAccess.Dto;
using Kurisu.AspNetCore.Utils.Extensions;
namespace Dlhis.Canteen.Order.Response;
public class ShiftAndBusinessPlaceAnalysisResponse
{
/// <summary>
/// 消费总金额
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// 消费人数
/// </summary>
public int Total { get; set; }
/// <summary>
/// 消费次数
/// </summary>
public int CostCount => Pagination.Total;
/// <summary>
/// 分页数据
/// </summary>
public Pagination<ShiftAndBusinessPlaceAnalysisItemResponse> Pagination { get; set; }
}
[Excel("ShiftAndBusinessPlaceAnalysis")]
public class ShiftAndBusinessPlaceAnalysisItemResponse : IExcelExportable
{
/// <summary>
/// 消费额
/// </summary>
[JsonIgnore]
public decimal CurrentAmount { get; set; }
/// <summary>
/// 消费额
/// </summary>
[Excel("消费额")]
public string Amount => Math.Abs(CurrentAmount).ToString("F2");
/// <summary>
/// 营业点
/// </summary>
[Excel("营业点")]
public string BusinessPlaceName { get; set; }
/// <summary>
/// 餐次
/// </summary>
public ShiftEnumType? ShiftType { get; set; }
/// <summary>
/// 餐次
/// </summary>
[Excel("餐次")]
public string ShiftTypeDesc => ShiftType?.GetDescription();
/// <summary>
/// 消费人数
/// </summary>
[Excel("消费人数")]
public int UserCount { get; set; }
/// <summary>
/// 消费次数
/// </summary>
[Excel("消费次数")]
public int CostCount { get; set; }
}