using OASystem.Domain.Entities.Financial; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OASystem.Domain.ViewModels.Statistics { public class CorporateProfitViews { } public class CorporateProfitInfosView { public CorporateProfitInfo[] GroupItems { get; set; } public DailyInfo[] DailyItems { get; set; } } public class DailyInfo { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } public int PriceParentTypeId { get; set; } public string PriceParentTypeName { get; set; } public int PriceTypeId { get; set; } public string PriceTypeName { get; set; } public string CompanyName { get; set; } public string Instructions { get; set; } public decimal CNYTotal { get; set; } [Navigate(NavigateType.OneToMany, nameof(DailyPriceInfo.DFPId))] public List PriceInfos { get; set; } } public class DailyPriceInfo { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } public int DFPId { get; set; } public string PriceName { get; set; } public decimal Quantity { get; set; } public decimal Price { get; set; } public decimal ItemTotal { get; set; } public string Remark { get; set; } } public class CorporateProfitInfo { public int RowIndex { get; set; } public int Id { get; set; } public string ClientName { get; set; } public string TeamName { get; set; } public int TeamDid { get; set; } public string GroupTypeName { get; set; } public DateTime VisitDate { get; set; } public int VisitPNumber { get; set; } /// /// 应收金额 /// public decimal ReceivableAmount { get; set; } /// /// 已收金额 /// public decimal ReceivedAmount { get; set; } /// /// 收款退还金额 /// public decimal RefundedAmount { get; set; } /// /// 酒店金额 /// public decimal HotelAmount { get; set; } /// /// 地接金额 /// public decimal LocalGuideAmount { get; set; } /// /// 机票金额 /// public decimal AirTicketAmount { get; set; } /// /// 签证金额 /// public decimal VisaAmount { get; set; } /// /// 商邀金额 /// public decimal OAAmount { get; set; } /// /// 保险金额 /// public decimal InsureAmount { get; set; } /// /// 其他金额 /// public decimal OtherAmount { get; set; } /// /// 收款合计 /// public decimal CollectionTotal { get { return ReceivedAmount - RefundedAmount; } } /// /// 成本合计 /// public decimal CostTotal { get { return HotelAmount + LocalGuideAmount + AirTicketAmount + VisaAmount + OAAmount + InsureAmount + OtherAmount; } } /// /// 利润合计 /// public decimal ProfitTotal { get { return CollectionTotal - CostTotal; } } } public class CorporateProfitItem { public int RowIndex { get; set; } public int Id { get; set; } public string ClientName { get; set; } public string TeamName { get; set; } public DateTime VisitDate { get; set; } /// /// 收款合计 /// public decimal CollectionTotal { get; set; } /// /// 成本合计 /// public decimal CostTotal { get; set; } /// /// 利润合计 /// public decimal ProfitTotal { get; set; } } public class CorporateProfitItemView { public CorporateProfitItem[] Items { get; set; } public string Label { get; set; } } }