CorporateProfitViews.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. public int Id { get; set; }
  20. public int CompanyId { get; set; }
  21. public string CompanyName { get; set; }
  22. /// <summary>
  23. /// 部门
  24. /// </summary>
  25. public string Branch { get; set; }
  26. /// <summary>
  27. /// 申请人
  28. /// </summary>
  29. public string Applicant { get; set; }
  30. public int PriceParentTypeId { get; set; }
  31. public string PriceParentTypeName { get; set; }
  32. public int PriceTypeId { get; set; }
  33. public string PriceTypeName { get; set; }
  34. public string Instructions { get; set; }
  35. public decimal CNYTotal { 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. public DateTime CreateTime { get; set; }
  42. }
  43. public class CorporateProfitInfo
  44. {
  45. public int RowIndex { get; set; }
  46. public int Id { get; set; }
  47. public string ClientName { get; set; }
  48. public string TeamName { get; set; }
  49. public int TeamDid { get; set; }
  50. public string GroupTypeName { get; set; }
  51. public DateTime VisitDate { get; set; }
  52. public int VisitPNumber { get; set; }
  53. /// <summary>
  54. /// 应收金额
  55. /// </summary>
  56. public decimal ReceivableAmount { get; set; }
  57. /// <summary>
  58. /// 已收金额
  59. /// </summary>
  60. public decimal ReceivedAmount { get; set; }
  61. /// <summary>
  62. /// 收款退还金额
  63. /// </summary>
  64. public decimal RefundedAmount { get; set; }
  65. /// <summary>
  66. /// 酒店金额
  67. /// </summary>
  68. public decimal HotelAmount { get; set; }
  69. /// <summary>
  70. /// 地接金额
  71. /// </summary>
  72. public decimal LocalGuideAmount { get; set; }
  73. /// <summary>
  74. /// 机票金额
  75. /// </summary>
  76. public decimal AirTicketAmount { get; set; }
  77. /// <summary>
  78. /// 签证金额
  79. /// </summary>
  80. public decimal VisaAmount { get; set; }
  81. /// <summary>
  82. /// 商邀金额
  83. /// </summary>
  84. public decimal OAAmount { get; set; }
  85. /// <summary>
  86. /// 保险金额
  87. /// </summary>
  88. public decimal InsureAmount { get; set; }
  89. /// <summary>
  90. /// 其他金额
  91. /// </summary>
  92. public decimal OtherAmount { get; set; }
  93. /// <summary>
  94. /// 收款合计
  95. /// </summary>
  96. public decimal CollectionTotal
  97. {
  98. get
  99. {
  100. var total = ReceivedAmount - RefundedAmount;
  101. var totalInt = (int)(total * 100);
  102. var total1 = new decimal(0, 0, 0, false, 2);
  103. if (total > 0) total1 = new decimal(totalInt, 0, 0, false, 2);
  104. else if (total < 0) total1 = new decimal(totalInt, 0, 0, true, 2);
  105. return total1;
  106. }
  107. }
  108. /// <summary>
  109. /// 成本合计
  110. /// </summary>
  111. public decimal CostTotal
  112. {
  113. get
  114. {
  115. var total = HotelAmount + LocalGuideAmount + AirTicketAmount + VisaAmount + OAAmount + InsureAmount + OtherAmount;
  116. var totalInt = (int)(total * 100);
  117. var total1 = new decimal(0, 0, 0, false, 2);
  118. if (total > 0) total1 = new decimal(totalInt, 0, 0, false, 2);
  119. else if (total < 0) total1 = new decimal(totalInt, 0, 0, true, 2);
  120. return total1;
  121. }
  122. }
  123. /// <summary>
  124. /// 利润合计
  125. /// </summary>
  126. public decimal ProfitTotal
  127. {
  128. get
  129. {
  130. var total = CollectionTotal - CostTotal;
  131. var totalInt = (int)(total * 100);
  132. var total1 = new decimal(0, 0, 0, false, 2);
  133. if (total > 0) total1 = new decimal(totalInt, 0, 0, false, 2);
  134. else if (total < 0) total1 = new decimal(totalInt, 0, 0, true, 2);
  135. return total1;
  136. }
  137. }
  138. }
  139. public class CorporateProfitItem
  140. {
  141. public int RowIndex { get; set; }
  142. public int Id { get; set; }
  143. public string ClientName { get; set; }
  144. public string TeamName { get; set; }
  145. public DateTime VisitDate { get; set; }
  146. /// <summary>
  147. /// 收款合计
  148. /// </summary>
  149. public decimal CollectionTotal { get; set; }
  150. /// <summary>
  151. /// 成本合计
  152. /// </summary>
  153. public decimal CostTotal { get; set; }
  154. /// <summary>
  155. /// 利润合计
  156. /// </summary>
  157. public decimal ProfitTotal { get; set; }
  158. }
  159. public class CorporateProfitItemView
  160. {
  161. public CorporateProfitItem[] Items { get; set; }
  162. public string Label { get; set; }
  163. }
  164. public class CorporateProfitDailyView
  165. {
  166. public string No { get; set; }
  167. public string PriceName { get; set; }
  168. public decimal ThisMonthAmount { get; set; }
  169. public decimal ThisYearAmount { get; set; }
  170. public string Remark { get; set; }
  171. }
  172. public class CorporateProfitDailyCommentView
  173. {
  174. public string MonthComment { get; set; }
  175. public string YearComment { get; set; }
  176. }
  177. }