reponse.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. package statistic_report
  2. import (
  3. "github.com/rdlucklib/rdluck_tools/paging"
  4. "hongze/hz_crm_api/models/company"
  5. "hongze/hz_crm_api/models/data_manage"
  6. )
  7. // CompanyReportRecordResp 总统计信息
  8. type CompanyReportRecordResp struct {
  9. List []GroupReportRecord `description:"系统用户分组信息"`
  10. CompanyReportRecordNumList []CompanyReportRecordNum `description:"统计次数"`
  11. }
  12. // GroupReportRecord 分组统计信息
  13. type GroupReportRecord struct {
  14. Item []AdminReportRecord `description:"系统用户信息"`
  15. GroupId int `description:"系统用户分组id"`
  16. Name string `description:"分组名"`
  17. CompanyReportRecordNumList []CompanyReportRecordNum `description:"统计次数"`
  18. }
  19. // AdminReportRecord 系统用户统计信息
  20. type AdminReportRecord struct {
  21. Name string `description:"系统用户名"`
  22. AdminId int `description:"系统用户id"`
  23. CompanyReportRecordNumList []CompanyReportRecordNum `description:"统计次数"`
  24. }
  25. // CompanyReportRecordNum 系统用户统计信息
  26. type CompanyReportRecordNum struct {
  27. TryOutNum int `description:"试用客户数"`
  28. TryOutIds string `description:"试用客户ids"`
  29. FormalNum int `description:"正式客户数"`
  30. FormalIds string `description:"正式客户ids"`
  31. ActiveNum int `description:"活跃客户数"`
  32. ActiveIds string `description:"活跃客户ids"`
  33. AllActiveNum int `description:"所有活跃客户状态数"`
  34. AllActiveIds string `description:"所有活跃客户ids"`
  35. NoIncrementalActiveNum int `description:"非新增试用客户的活跃客户状态数"`
  36. NoIncrementalActiveIds string `description:"非新增试用客户的活跃客户ids"`
  37. StartDate string `description:"开始日期"`
  38. EndDate string `description:"结束日期"`
  39. TryStagePushNum int `description:"试用(推进)状态的客户数量"`
  40. TryStageFollowNum int `description:"试用(跟踪)状态的客户数量"`
  41. TryStageReadyNum int `description:"试用(预备)状态的客户数量"`
  42. TryStageInitNum int `description:"试用(未分类)状态的客户数量"`
  43. }
  44. type CompanyReportRecordGroup struct {
  45. AdminId int `description:"系统用户id"`
  46. GroupId int `description:"系统用户分组id"`
  47. AdminName string `description:"系统用户名称"`
  48. Num int `description:"汇总次数"`
  49. }
  50. type CompanyListResp struct {
  51. Paging *paging.PagingItem
  52. List []*CompanyListItem
  53. }
  54. type YbProductUserListResp struct {
  55. Paging *paging.PagingItem
  56. List []*YbProductUserListItem
  57. }
  58. type YbProductUserListItem struct {
  59. CompanyListItem
  60. OldUserId int
  61. OldRealName string
  62. YbLogNum int
  63. }
  64. type YbCollectUserListResp struct {
  65. Paging *paging.PagingItem
  66. List []*YbCollectUserListItem
  67. }
  68. type YbCollectUserListItem struct {
  69. CompanyListItem
  70. OldUserId int
  71. OldRealName string
  72. CollectNum int
  73. }
  74. type CollectListResp struct {
  75. Paging *paging.PagingItem
  76. List []*CollectListItem
  77. }
  78. type CollectListItem struct {
  79. CollectionId uint
  80. CollectionType uint8
  81. UserId uint
  82. Title string
  83. ModifyTime string
  84. }
  85. type CompanyListItem struct {
  86. CompanyId int `orm:"column(company_id);pk"`
  87. CompanyName string `description:"客户名称"`
  88. CreditCode string `description:"社会统一信用码"`
  89. CompanyCode string `description:"客户编码"`
  90. StartDate string `description:"合同开始日期"`
  91. EndDate string `description:"合同结束日期"`
  92. LoseReason string `description:"流失原因"`
  93. RenewalReason string `description:"续约说明"`
  94. FreezeReason string `description:"冻结理由"`
  95. LossTime string `description:"流失时间"`
  96. Status string `description:"客户状态:'试用','永续','冻结','流失','正式' "`
  97. CompanyType string `description:"客户类型:ficc/权益"`
  98. ApproveStatus string `description:"审批状态:'待审批','已审批','驳回' 审批状态为空时,表示没有审批申请"`
  99. SellerName string `description:"销售:吉根龙/颖丹"`
  100. SellerId int `description:"销售ID"`
  101. SellerIds string `description:"销售ID集合,包含ficc和权益的销售id"`
  102. FiccPackageType int `description:"ficc的套餐类型"`
  103. ExpireDay string `description:"到期天数"`
  104. FreezeTime string `description:"冻结时间"`
  105. GroupId int `description:"分组id"`
  106. GroupIds string `description:"分组id集合,包含ficc和权益的小组id" json:"-"`
  107. DepartmentId int `description:"部门id"`
  108. IndustryName string `description:"所属行业"`
  109. IsSuspend int `description:"是否暂停:1:暂停,0:启用 "`
  110. CreatedTime string `description:"创建时间"`
  111. Source string `description:"客户来源"`
  112. Province string `description:"省"`
  113. City string `description:"市"`
  114. Address string `description:"详细地址"`
  115. Reasons string `description:"新增理由"`
  116. FreezeStartDate string `description:"冻结开始日期"`
  117. FreezeEndDate string `description:"冻结结束日期"`
  118. FreezeExpireDays int `description:"冻结到期天数"`
  119. ProductId int `json:"-"`
  120. FormalTime string `description:"转正时间"`
  121. IsShared bool `description:"是否共享客户"`
  122. RegionType string `description:"区域:国内,海外"`
  123. FiccView int `description:"Ficc报告阅读次数"`
  124. RaiView int `description:"权益报告阅读次数"`
  125. FiccLastViewTime string `description:"ficc最近一次阅读时间"`
  126. RaiLastViewTime string `description:"权益最近一次阅读时间"`
  127. RoadShowTotal int `description:"累计路演次数"`
  128. TodoStatus bool `description:"是否存在进行中任务,true:存在待处理的任务"`
  129. CanConfirm bool `description:"是否允许完成任务,true:允许完成任务"`
  130. HiddenConfirm bool `description:"是否隐藏完成任务按钮,true:隐藏完成任务按钮"`
  131. HiddenCreate bool `description:"是否隐藏新增/编辑按钮,true:隐藏新增/编辑按钮"`
  132. TodoButtonColor string `description:"任务按钮颜色:red,green,gray"`
  133. AllViewTotal int `description:"总阅读数"`
  134. Deadline string `description:"未完成的todo任务的截止日期,截止目前还剩余的天数"`
  135. IsShow bool `description:"是否有权限展示(是否属于本组或自己下面的客户)"`
  136. TryStageSlice []company.TryStageSliceItem `description:"试用状态相关"`
  137. FiccTryOutDay int `description:"Ficc总试用天数"`
  138. RaiTryOutDay int `description:"权益总试用天数"`
  139. ShareSellerId int `description:"分配的咨询组销售ID"`
  140. ShareSeller string `description:"分配的咨询组销售名称"`
  141. ServiceYears string `description:"客户服务年限"`
  142. LatestServiceRecord string `description:"最近沟通时间"`
  143. }
  144. // CompanyRenewRecordResp 总统计信息
  145. type CompanyRenewRecordResp struct {
  146. List []GroupRenewRecord `description:"系统用户分组信息"`
  147. CompanyRenewRecordNumList []CompanyRenewRecordNum `description:"统计次数"`
  148. }
  149. // GroupRenewRecord 分组统计信息
  150. type GroupRenewRecord struct {
  151. Item []AdminRenewRecord `description:"系统用户信息"`
  152. GroupId int `description:"系统用户分组id"`
  153. Name string `description:"分组名"`
  154. CompanyRenewRecordNumList []CompanyRenewRecordNum `description:"统计次数"`
  155. }
  156. // AdminReportRecord 系统用户统计信息
  157. type AdminRenewRecord struct {
  158. Name string `description:"系统用户名"`
  159. AdminId int `description:"系统用户id"`
  160. CompanyRenewRecordNumList []CompanyRenewRecordNum `description:"统计次数"`
  161. }
  162. // CompanyRenewRecordNum 系统续约客户统计信息
  163. type CompanyRenewRecordNum struct {
  164. NotRenewNum int `description:"未续约客户数"`
  165. NotRenewIds string `description:"未续约客户ids"`
  166. RenewFollowNum int `description:"续约跟进客户数"`
  167. RenewFollowIds string `description:"续约跟进客户ids"`
  168. ExpireNum int `description:"到期客户数"`
  169. ExpireIds string `description:"到期客户ids"`
  170. RenewNum int `description:"续约客户数"`
  171. RenewIds string `description:"续约客户ids"`
  172. StartDate string `description:"开始日期"`
  173. EndDate string `description:"结束日期"`
  174. UnusualRenewNum int `description:"续约异常客户数"`
  175. UnusualRenewIds string `description:"续约异常客户ids"`
  176. UnusualRate string `description:"异常率"`
  177. }
  178. type YbChartCollectListResp struct {
  179. Paging *paging.PagingItem
  180. List []YbChartCollectListItem
  181. }
  182. type YbChartCollectListItem struct {
  183. Id int
  184. ChartInfo *data_manage.ChartInfoView
  185. CreateTime string
  186. }
  187. // CompanyUnusualRenewRecordResp
  188. // @Description: 续约异常客户统计返回
  189. type CompanyUnusualRenewRecordResp struct {
  190. List []GroupUnusualRenewRecord `description:"系统用户分组信息"`
  191. SummaryList []SummaryUnusualRenewRecordNum `description:"汇总信息"`
  192. }
  193. // GroupUnusualRenewRecord
  194. // @Description: 续约异常的分组信息
  195. type GroupUnusualRenewRecord struct {
  196. SellerId int `description:"销售ID"`
  197. SellerName string `description:"销售名称"`
  198. CompanyRenewRecordNumList []CompanyUnusualRenewRecordNum `description:"统计次数"`
  199. }
  200. // CompanyUnusualRenewRecordNum
  201. // @Description: 续约异常客户统计信息
  202. type CompanyUnusualRenewRecordNum struct {
  203. StartDate string `description:"开始日期"`
  204. EndDate string `description:"结束日期"`
  205. UnusualRenewNum int `description:"续约异常客户数"`
  206. UnusualRenewIds string `description:"续约异常客户ids"`
  207. UnusualRate string `description:"异常率"`
  208. }
  209. // SummaryUnusualRenewRecordNum
  210. // @Description: 续约异常客户汇总数据
  211. type SummaryUnusualRenewRecordNum struct {
  212. UnusualRenewNum int `description:"续约异常客户数"`
  213. UnusualRenewIds string `description:"续约异常客户ids"`
  214. UnusualRate string `description:"异常率"`
  215. }