CorporateProfitViews.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using OASystem.Domain.Entities.Financial;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace OASystem.Domain.ViewModels.Statistics
  8. {
  9. public class CorporateProfitViews
  10. {
  11. }
  12. public class CorporateProfitInfosView
  13. {
  14. public CorporateProfitInfo[] GroupItems { get; set; }
  15. public DailyInfo[] DailyItems { get; set; }
  16. }
  17. public class DailyInfo
  18. {
  19. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  20. public int Id { get; set; }
  21. public int PriceParentTypeId { get; set; }
  22. public string PriceParentTypeName { get; set; }
  23. public int PriceTypeId { get; set; }
  24. public string PriceTypeName { get; set; }
  25. public string CompanyName { get; set; }
  26. public string Instructions { get; set; }
  27. public decimal CNYTotal { get; set; }
  28. [Navigate(NavigateType.OneToMany, nameof(DailyPriceInfo.DFPId))]
  29. public List<DailyPriceInfo> PriceInfos { get; set; }
  30. }
  31. public class DailyPriceInfo
  32. {
  33. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  34. public int Id { get; set; }
  35. public int DFPId { get; set; }
  36. public string PriceName { get; set; }
  37. public decimal Quantity { get; set; }
  38. public decimal Price { get; set; }
  39. public decimal ItemTotal { get; set; }
  40. public string Remark { get; set; }
  41. }
  42. public class CorporateProfitInfo
  43. {
  44. public int RowIndex { get; set; }
  45. public int Id { get; set; }
  46. public string ClientName { get; set; }
  47. public string TeamName { get; set; }
  48. public int TeamDid { get; set; }
  49. public string GroupTypeName { get; set; }
  50. public DateTime VisitDate { get; set; }
  51. public int VisitPNumber { get; set; }
  52. /// <summary>
  53. /// 应收金额
  54. /// </summary>
  55. public decimal ReceivableAmount { get; set; }
  56. /// <summary>
  57. /// 已收金额
  58. /// </summary>
  59. public decimal ReceivedAmount { get; set; }
  60. /// <summary>
  61. /// 收款退还金额
  62. /// </summary>
  63. public decimal RefundedAmount { get; set; }
  64. /// <summary>
  65. /// 酒店金额
  66. /// </summary>
  67. public decimal HotelAmount { get; set; }
  68. /// <summary>
  69. /// 地接金额
  70. /// </summary>
  71. public decimal LocalGuideAmount { get; set; }
  72. /// <summary>
  73. /// 机票金额
  74. /// </summary>
  75. public decimal AirTicketAmount { get; set; }
  76. /// <summary>
  77. /// 签证金额
  78. /// </summary>
  79. public decimal VisaAmount { get; set; }
  80. /// <summary>
  81. /// 商邀金额
  82. /// </summary>
  83. public decimal OAAmount { get; set; }
  84. /// <summary>
  85. /// 保险金额
  86. /// </summary>
  87. public decimal InsureAmount { get; set; }
  88. /// <summary>
  89. /// 其他金额
  90. /// </summary>
  91. public decimal OtherAmount { get; set; }
  92. /// <summary>
  93. /// 收款合计
  94. /// </summary>
  95. public decimal CollectionTotal { get { return ReceivedAmount - RefundedAmount; } }
  96. /// <summary>
  97. /// 成本合计
  98. /// </summary>
  99. public decimal CostTotal { get { return HotelAmount + LocalGuideAmount + AirTicketAmount + VisaAmount + OAAmount + InsureAmount + OtherAmount; } }
  100. /// <summary>
  101. /// 利润合计
  102. /// </summary>
  103. public decimal ProfitTotal { get { return CollectionTotal - CostTotal; } }
  104. }
  105. public class CorporateProfitItem
  106. {
  107. public int RowIndex { get; set; }
  108. public int Id { get; set; }
  109. public string ClientName { get; set; }
  110. public string TeamName { get; set; }
  111. public DateTime VisitDate { get; set; }
  112. /// <summary>
  113. /// 收款合计
  114. /// </summary>
  115. public decimal CollectionTotal { get; set; }
  116. /// <summary>
  117. /// 成本合计
  118. /// </summary>
  119. public decimal CostTotal { get; set; }
  120. /// <summary>
  121. /// 利润合计
  122. /// </summary>
  123. public decimal ProfitTotal { get; set; }
  124. }
  125. public class CorporateProfitItemView
  126. {
  127. public CorporateProfitItem[] Items { get; set; }
  128. public string Label { get; set; }
  129. }
  130. }