NewClientDataQueryDto.cs 6.7 KB

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