MarketingSalesDto.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. using FluentValidation;
  2. using OASystem.Domain.Dtos.System;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Globalization;
  9. using OASystem.Domain.ViewModels.Groups;
  10. namespace OASystem.Domain.Dtos.Statistics
  11. {
  12. public class MarketingSalesUserPageFuncDtoBase
  13. {
  14. /// <summary>
  15. /// 请求端口分类
  16. /// 1 Web 2 Android 3 IOS
  17. /// </summary>
  18. public int PortType { get; set; } = 1;
  19. /// <summary>
  20. /// 用户Id
  21. /// </summary>
  22. public int UserId { get; set; }
  23. /// <summary>
  24. /// 页面Id
  25. /// </summary>
  26. public int PageId { get; set; } = 180;
  27. }
  28. public class MarketingSalesUserPageFuncDtoBaseFoalidator : AbstractValidator<MarketingSalesUserPageFuncDtoBase>
  29. {
  30. public MarketingSalesUserPageFuncDtoBaseFoalidator()
  31. {
  32. RuleFor(it => it.PortType).InclusiveBetween(1,3).WithMessage(MsgTips.Port);
  33. RuleFor(it => it.UserId).GreaterThan(1).WithMessage(MsgTips.UserId);
  34. RuleFor(it => it.PageId).GreaterThan(1).WithMessage(MsgTips.PageId);
  35. }
  36. }
  37. /// <summary>
  38. /// 市场部销售额 Dto
  39. /// </summary>
  40. public class MarketingSalesDto { }
  41. /// <summary>
  42. /// 市场部销售额
  43. /// 市场部人员列表
  44. /// Dto
  45. /// </summary>
  46. public class MarketingSalesInitDataDto : MarketingSalesUserPageFuncDtoBase { }
  47. public class MarketingSalesInitDataDtoFoalidator : AbstractValidator<MarketingSalesInitDataDto>
  48. {
  49. public MarketingSalesInitDataDtoFoalidator()
  50. {
  51. Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
  52. }
  53. }
  54. /// <summary>
  55. /// 市场部销售额
  56. /// 年度/季度/月度 报表
  57. /// </summary>
  58. public class MarketingSalesStatisticsDto : MarketingSalesUserPageFuncDtoBase
  59. {
  60. /// <summary>
  61. /// 公司Id
  62. /// </summary>
  63. public int CompanyId { get; set; }
  64. /// <summary>
  65. /// 接团人Id
  66. /// </summary>
  67. public int GroupPickupUserId { get; set; }
  68. public string BeginDt { get; set; }
  69. public string EndDt { get; set; }
  70. }
  71. public class MarketingSalesStatisticsDtoFoalidator : AbstractValidator<MarketingSalesStatisticsDto>
  72. {
  73. public MarketingSalesStatisticsDtoFoalidator()
  74. {
  75. Include(new MarketingSalesUserPageFuncDtoBaseFoalidator());
  76. RuleFor(it => it.BeginDt)
  77. .Must(dateString => DateTime.TryParse(dateString, out _))
  78. .WithMessage("请输入有效开始的日期");
  79. RuleFor(it => it.EndDt)
  80. .Must(dateString => DateTime.TryParse(dateString, out _))
  81. .WithMessage("请输入有效结束的日期");
  82. }
  83. }
  84. /// <summary>
  85. /// 市场部销售额
  86. /// 团组列表
  87. /// </summary>
  88. public class MarketingSalesGroupListDto : MarketingSalesStatisticsDto {
  89. public int PageIndex { get; set; } = 1;
  90. public int PageSize { get; set; } = 10;
  91. public string SearchCriteria { get; set; }
  92. }
  93. /// <summary>
  94. /// 市场部销售额
  95. /// 客户类型、客户等级 统计
  96. /// </summary>
  97. public class MarketingSalesGroupStatisticsDto : MarketingSalesStatisticsDto
  98. {
  99. /// <summary>
  100. /// 图形统计类型
  101. /// 1 客户类型 2 客户等级
  102. /// </summary>
  103. public int StatisticsType { get; set; } = 1;
  104. }
  105. /// <summary>
  106. /// 市场部销售额
  107. /// 接单排名
  108. /// </summary>
  109. public class MarketingSalesOrderRankingDto : MarketingSalesStatisticsDto
  110. {
  111. public int PageIndex { get; set; } = 1;
  112. public int PageSize { get; set; } = 5;
  113. }
  114. public class MarketingSalesVCListDto: MarketingSalesUserPageFuncDtoBase
  115. {
  116. public int PageIndex { get; set; } = 1;
  117. public int PageSize { get; set; } = 10;
  118. public int DiId { get; set; }
  119. public string Search { get; set; }
  120. }
  121. public class MarketingSalesVCOperrateDto : MarketingSalesUserPageFuncDtoBase
  122. {
  123. /// <summary>
  124. /// opearate 时
  125. /// Id > 0 修改
  126. /// Id < 1 添加
  127. /// </summary>
  128. public int Id { get; set; }
  129. /// <summary>diid
  130. /// </summary>
  131. public int DiId { get; set; }
  132. /// <summary>
  133. /// 拜访时间 - 开始
  134. /// </summary>
  135. public string BeginDt { get; set; }
  136. /// <summary>
  137. /// 拜访时间 - 结束
  138. /// </summary>
  139. public string EndDt { get; set; }
  140. /// <summary>
  141. /// 客户单位
  142. /// </summary>
  143. public string CustomerUnit { get; set; }
  144. /// <summary>
  145. /// 客户工作
  146. /// </summary>
  147. public string CustomerJob { get; set; }
  148. /// <summary>
  149. /// 客户姓名
  150. /// </summary>
  151. public string CustomerName { get; set; }
  152. /// <summary>
  153. /// 客户联系方式
  154. /// </summary>
  155. public string CustomerContact { get; set; }
  156. /// <summary>
  157. /// 拜访内容
  158. /// </summary>
  159. public string Remark { get; set; }
  160. }
  161. public class MarketingSalesVCSaveDto: MarketingSalesUserPageFuncDtoBase
  162. {
  163. public int DiId { get; set; }
  164. public List<VisitingClientsListView> Items { get; set; }
  165. }
  166. public class MarketingSalesVCDelDto
  167. {
  168. public int UserId { get; set; }
  169. public int Id { get; set; }
  170. }
  171. #region YOY-Dto
  172. public class YOYDto
  173. {
  174. public int Year { get; set; }
  175. }
  176. #endregion
  177. public class StatisticsOPDto
  178. {
  179. public int Year { get; set; }
  180. /// <summary>
  181. /// 1 年、2 月
  182. /// </summary>
  183. public int Type { get; set; }
  184. }
  185. public class StatisticsBRCostDto : DtoBase
  186. {
  187. public int Year { get; set; }
  188. public string Search { get; set; }
  189. }
  190. public class StatisticsNowCityOfGroupDto : PortDtoBase
  191. {
  192. ///// <summary>
  193. ///// 当前时间
  194. ///// </summary>
  195. //public string Now { get; set; }
  196. }
  197. }