NewClientDataQueryDto.cs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. using AutoMapper.Execution;
  2. using OASystem.Domain.ViewModels.CRM;
  3. using Org.BouncyCastle.Asn1.Ocsp;
  4. using Org.BouncyCastle.Asn1.X9;
  5. using System;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Reflection;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using static Google.Protobuf.Reflection.SourceCodeInfo.Types;
  13. namespace OASystem.Domain.Dtos.CRM
  14. {
  15. public class NewClientDataQueryDto:DtoBase
  16. {
  17. public int OperationUserId { get; set; }
  18. /// <summary>
  19. /// 联系人
  20. /// </summary>
  21. public string Contact { get; set; }
  22. /// <summary>
  23. /// 地区
  24. /// </summary>
  25. public string Location { get; set; }
  26. /// <summary>
  27. /// 单位
  28. /// </summary>
  29. public string Client { get; set; }
  30. /// <summary>
  31. /// 负责人
  32. /// </summary>
  33. public string Userid { get; set; }
  34. /// <summary>
  35. /// 客户级别(地市州)
  36. /// </summary>
  37. public int Lvlid { get; set; }
  38. /// <summary>
  39. /// 业务分类
  40. /// </summary>
  41. public string Business { get; set; }
  42. /// <summary>
  43. /// 省域
  44. /// </summary>
  45. public int Range { get; set; }
  46. /// <summary>
  47. /// 客户类别
  48. /// </summary>
  49. public int Category { get; set; }
  50. }
  51. public class NewClientDataExcelDownloadDto : NewClientDataQueryDto
  52. {
  53. public int PageId { get; set; }
  54. }
  55. public class NewClientOpDto:PortDtoBase
  56. {
  57. /// <summary>
  58. /// 操作状态
  59. /// 1 添加
  60. /// 2 修改
  61. /// </summary>
  62. public int Status { get; set; }
  63. /// <summary>
  64. /// 编号
  65. /// </summary>
  66. public int Id { get; set; }
  67. /// <summary>
  68. /// 序号
  69. /// </summary>
  70. public int Number { get; set; }
  71. /// <summary>
  72. /// 地市州Id
  73. /// </summary>
  74. public int Lvlid { get; set; }
  75. /// <summary>
  76. /// 客户单位
  77. /// </summary>
  78. public string Client { get; set; }
  79. /// <summary>
  80. /// 权重
  81. /// </summary>
  82. public string Weight { get; set; }
  83. /// <summary>
  84. /// 客户单位简写
  85. /// </summary>
  86. public string Clientshort { get; set; }
  87. /// <summary>
  88. /// 联系人
  89. /// </summary>
  90. public string Contact { get; set; }
  91. /// <summary>
  92. /// 联系人性别
  93. /// </summary>
  94. public int Gender { get; set; }
  95. /// <summary>
  96. /// 护照
  97. /// </summary>
  98. public string Passport { get; set; }
  99. /// <summary>
  100. /// 护照日期
  101. /// </summary>
  102. public string PassportDate { get; set; }
  103. /// <summary>
  104. /// 职位
  105. /// </summary>
  106. public string Job { get; set; }
  107. /// <summary>
  108. /// 联系手机号
  109. /// </summary>
  110. public string Telephone { get; set; }
  111. /// <summary>
  112. /// 联系座机号
  113. /// </summary>
  114. public string Phone { get; set; }
  115. /// <summary>
  116. /// 邮件
  117. /// </summary>
  118. public string Email { get; set; }
  119. /// <summary>
  120. /// 所属区域(所在城市)
  121. /// </summary>
  122. public string Location { get; set; }
  123. /// <summary>
  124. /// 地址
  125. /// </summary>
  126. public string Address { get; set; }
  127. /// <summary>
  128. /// 生日
  129. /// </summary>
  130. public string Birthday { get; set; }
  131. /// <summary>
  132. /// 其他信息
  133. /// </summary>
  134. public string Otherinfo { get; set; }
  135. /// <summary>
  136. /// 微信
  137. /// </summary>
  138. public string Wechat { get; set; }
  139. /// <summary>
  140. /// 分类
  141. /// </summary>
  142. public int Category { get; set; }
  143. /// <summary>
  144. /// 预计出团
  145. /// </summary>
  146. public int Predele { get; set; }
  147. /// <summary>
  148. /// 已出团
  149. /// </summary>
  150. public int FinlishedDele { get; set; }
  151. /// <summary>
  152. /// 创建者Id
  153. /// </summary>
  154. public int CreateUserId { get; set; }
  155. /// <summary>
  156. /// 备注
  157. /// </summary>
  158. public string Remark { get; set; }
  159. /// <summary>
  160. /// 负责人
  161. /// </summary>
  162. public List<int> AscribedUser { get; set; }
  163. /// <summary>
  164. /// 业务归属
  165. /// </summary>
  166. public List<int> AscribedDepartment { get; set; }
  167. }
  168. /// <summary>
  169. /// 详情 Dto
  170. /// </summary>
  171. public class NewClientDataDetailsDto:PortDtoBase
  172. {
  173. public int UserId { get; set; }
  174. public int Id { get; set; }
  175. }
  176. /// <summary>
  177. /// 批量指派
  178. /// </summary>
  179. public class BatchAssignmentDto : PortDtoBase
  180. {
  181. public int UserId { get; set; }
  182. /// <summary>
  183. /// 客户资料表Id集合
  184. /// </summary>
  185. public List<int>? ClientDataIdItem { get; set; }
  186. /// <summary>
  187. /// 用户Id集合
  188. /// </summary>
  189. public List<int>? UserIdItem { get; set; }
  190. }
  191. public class MarketCustomerInitDto : PortDtoBase
  192. {
  193. public int UserId { get; set;}
  194. }
  195. public class QueryClientTypeDto
  196. {
  197. public List<int> SetDataIdArr { get; set; }
  198. }
  199. public class MCRLvSettingDto
  200. {
  201. public List<int> SetDataIdArr { get; set; }
  202. }
  203. public class RemakeComparer : IComparer
  204. {
  205. public int Compare(object x, object y)
  206. {
  207. // 使用反射获取remake属性的值
  208. PropertyInfo xProperty = x.GetType().GetProperty("Remark");
  209. PropertyInfo yProperty = y.GetType().GetProperty("Remark");
  210. if (xProperty == null || yProperty == null)
  211. {
  212. throw new ArgumentException("Both objects must have a 'remake' property.");
  213. }
  214. string xRemake = xProperty.GetValue(x, null) as string;
  215. string yRemake = yProperty.GetValue(y, null) as string;
  216. // 使用TryParse安全地将字符串转换为整数
  217. bool xIsInt = int.TryParse(xRemake, out int xValue);
  218. bool yIsInt = int.TryParse(yRemake, out int yValue);
  219. // 如果x是整数而y不是,则x应该排在y前面
  220. if (xIsInt && !yIsInt)
  221. return -1;
  222. // 如果y是整数而x不是,则x应该排在后面
  223. else if (!xIsInt && yIsInt)
  224. return 1;
  225. // 如果x和y都是整数,则比较它们的值
  226. else if (xIsInt && yIsInt)
  227. return xValue.CompareTo(yValue);
  228. // 如果x和y都不是整数,则认为它们相等
  229. else
  230. return 0;
  231. }
  232. }
  233. }