statistic_report.go 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. package response
  2. import (
  3. "github.com/rdlucklib/rdluck_tools/paging"
  4. "hongze/hz_crm_api/models"
  5. )
  6. // 首页控制台数据
  7. type WorktopResp struct {
  8. FormalCompanyCount int `description:"正式客户数"`
  9. TrialCompanyTotal int `description:"试用客户数"`
  10. NewCompanyTotal int `description:"新签客户数"`
  11. RenewalCompanyTotal int `description:"续约客户数"`
  12. NotRenewalCompanyTotal int `description:"未续约客户数"`
  13. IncrementalCompanyChartList IncrementalCompanyChartResp `description:"增量客户图表数据"`
  14. WillExpireChartList WillExpireChartResp `description:"增量客户图表数据"`
  15. IncomeChartList IncomeChartResp `description:"收入统计图表数据"`
  16. ContractData ContractChartResp `description:"当前有效合同存量"`
  17. }
  18. // 增量客户图表数据
  19. type IncrementalCompanyChartResp struct {
  20. Title string `description:"图表名称"`
  21. Date []string `description:"月份"`
  22. NewCompanyTotal []int `description:"新签客户数"`
  23. RenewalCompanyTotal []int `description:"续约客户数"`
  24. //NotRenewalCompanyTotal []int `description:"未续约客户数"`
  25. }
  26. // 即将到期客户数
  27. type WillExpireChartResp struct {
  28. Title string `description:"图表名称"`
  29. Date []string `description:"月份"`
  30. CompanyTotal []int `description:"客户数"`
  31. }
  32. // 收入统计图表数据
  33. type IncomeChartResp struct {
  34. Title string `description:"图表名称"`
  35. Date []string `description:"月份"`
  36. ContractTotal []int `description:"合同数"`
  37. MoneyTotal []float64 `description:"合同总金额"`
  38. }
  39. // 当前有效合同存量
  40. type ContractChartResp struct {
  41. Title string `description:"图表名称"`
  42. FormalCompanyCount int `description:"正式客户数"`
  43. ContractTotal int `description:"合同数"`
  44. MoneyTotal float64 `description:"合同总金额"`
  45. }
  46. // 即将到期客户
  47. type WillExpireCompanyListResp struct {
  48. List []*models.WillExpireCompanyList
  49. Paging *paging.PagingItem `description:"分页数据"`
  50. TotalCompany int `description:"总客户数"`
  51. }
  52. // 合同统计数据接口返回结构体
  53. type ContractStatListResp struct {
  54. List []*models.ContractStatList
  55. TotalContract int `description:"合同数量"`
  56. TotalMoney float64 `description:"合同总金额"`
  57. TotalCompany int `description:"总客户数"`
  58. TotalFileContract int `description:"总上传附件合同数"`
  59. TotalSystemContract int `description:"总系统生成合同数"`
  60. Paging *paging.PagingItem `description:"分页数据"`
  61. }
  62. // CompanyContractStatListResp 企业客户的合同统计数据接口返回结构体
  63. type CompanyContractStatListResp struct {
  64. List []*models.CompanyContractStatList
  65. TotalContract int `description:"合同数量"`
  66. TotalMoney float64 `description:"合同总金额"`
  67. TotalCompany int `description:"总客户数"`
  68. Paging *paging.PagingItem `description:"分页数据"`
  69. }
  70. // 收入统计报表返回类
  71. type IncomeListResp struct {
  72. List []*models.IncomeList
  73. Paging *paging.PagingItem `description:"分页数据"`
  74. Total int `description:"新签合同总数"`
  75. Money float64 `description:"新签合同总金额"`
  76. }
  77. // 存量客户统计报表返回类
  78. type StackCompanyListResp struct {
  79. List []*models.StackCompanyStatisticList
  80. Paging *paging.PagingItem `description:"分页数据"`
  81. NewCompanyTotal int `description:"新签客户数"`
  82. RenewalCompanyTotal int `description:"续约客户数"`
  83. NotRenewalCompanyTotal int `description:"未续约客户数"`
  84. NotRenewalTryOut int `description:"未续约客户(试用)数"`
  85. NotRenewalNotTryOut int `description:"未续约客户(非试用)数"`
  86. }
  87. // 增量客户统计报表返回类
  88. type IncrementalCompanyListResp struct {
  89. Paging *paging.PagingItem `description:"分页数据"`
  90. List []*models.IncrementalList
  91. ListPermissionName []*models.CompanyContractPermissionNameGroupCountResp
  92. TrialTotal int `description:"新增试用客户数"`
  93. NewCompanyTotal int `description:"新签客户数"`
  94. RenewalCompanyTotal int `description:"续约客户数"`
  95. NotRenewalCompanyTotal int `description:"未续约客户数(已确认)"`
  96. NotRenewalCompanyToBeConfirmTotal int `description:"未续约客户数(待确认)"`
  97. NotRenewalTryOut int `description:"未续约客户(试用)数"`
  98. NotRenewalNotTryOut int `description:"未续约客户(非试用)数"`
  99. }
  100. // MoreRenewReasonResp 未续约说明列表返回类
  101. type MoreRenewReasonResp struct {
  102. RenewalReason string `description:"未续约说明"`
  103. RenewalTodo string `description:"待办事项说明"`
  104. CreateTime string `description:"添加时间"`
  105. ExpirationTimeExceeded string `description:"超出到期时间"`
  106. }
  107. // RenewReasonItemResp 客户未续约说明列表返回类
  108. type RenewReasonItemResp struct {
  109. RenewalReason string `description:"未续约说明"`
  110. RenewalTodo string `description:"待办事项说明"`
  111. CreateTime string `description:"添加时间"`
  112. }
  113. // 合并之后的合同详情
  114. type CompanyPreviousDetailResp struct {
  115. Detail *models.IncrementalList
  116. }
  117. // 权益客户统计,续约率,返回类
  118. type IncrementalCompanyPercentageListResp struct {
  119. Paging *paging.PagingItem `description:"分页数据"`
  120. List []*models.IncrementalList
  121. RenewalRateMoney string `description:"合同金额续约率"`
  122. RenewalRateMoneyContent string `description:"合同金额续约率详情"`
  123. RenewalRateTotal string `description:"合同数量续约率"`
  124. RenewalRateTotalContent string `description:"合同数量续约率详情"`
  125. RenewalContractTotal int `description:"续约合同数量"`
  126. RenewalContractMoney int `description:"续约合同总金额"`
  127. ExpireRenewalContractTotal int `description:"到期合同数量"`
  128. ExpireRenewalContractMoney int `description:"到期合同总金额"`
  129. }