NewClientDataQueryDto.cs 7.7 KB

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