base_from_fenwei.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. package models
  2. import "time"
  3. // FenweiExcelIndex 汾渭Excel指标数据
  4. type FenweiExcelIndex struct {
  5. //ClassifyName string `description:"指标目录"`
  6. //ClassifySort int `description:"指标目录排序号"`
  7. IndexName string `description:"指标名称"`
  8. IndexCode string `description:"指标编码"`
  9. Unit string `description:"单位"`
  10. Sort int `description:"排序号"`
  11. Frequency string `description:"频度"`
  12. TerminalCode string `description:"编码"`
  13. ClassifyId int `description:"分类ID"`
  14. ExcelDataMap map[string]string
  15. }
  16. // BaseFromFenweiClassifyItem 汾渭数据分类信息
  17. type BaseFromFenweiClassifyItem struct {
  18. ClassifyId int `description:"分类ID"`
  19. ClassifyName string `description:"分类名称"`
  20. ParentId int `description:"父级id"`
  21. Level int `description:"层级"`
  22. Sort int `description:"排序字段"`
  23. CreateTime string `description:"创建时间"`
  24. ModifyTime string `description:"修改时间"`
  25. Child []*BaseFromFenweiClassifyItem `description:"子分类"`
  26. }
  27. type EdbLibFenweiClassifyResponse struct {
  28. Ret int
  29. Msg string
  30. ErrMsg string
  31. ErrCode string
  32. Data []BaseFromFenweiClassifyItem
  33. }
  34. type BaseFromFenweiIndex struct {
  35. FenweiIndexId int64 `orm:"column(fenwei_index_id);pk"`
  36. IndexCode string
  37. IndexName string
  38. Frequency string
  39. Unit string
  40. ClassifyId int
  41. StartDate string
  42. EndDate string
  43. Sort int
  44. TerminalCode string
  45. CreateTime time.Time
  46. ModifyTime time.Time
  47. }
  48. type EdbLibFenweiIndexListResponse struct {
  49. Ret int
  50. Msg string
  51. ErrMsg string
  52. ErrCode string
  53. Data []BaseFromFenweiIndex
  54. }
  55. // RequestParams 接口爬取汾渭网页数据
  56. type RequestParams struct {
  57. Category interface{} `json:"category"`
  58. CheckedDims map[string][]string `json:"checkedDims"`
  59. DateRange string `json:"dateRange"`
  60. ProductCode string `json:"productCode"`
  61. QuotaName string `json:"quotaName"`
  62. SplitTypeKey string `json:"splitTypeKey"`
  63. IsTotal interface{} `json:"isTotal"`
  64. DataType interface{} `json:"dataType"`
  65. Type int `json:"type"`
  66. IsSeason int `json:"isSeason"`
  67. splitTypeKey string `json:"splitTypeKey"`
  68. }
  69. type Response struct {
  70. Code int `json:"code"`
  71. Message string `json:"message"`
  72. }
  73. type JsonConfig struct {
  74. Data []string `json:"data"`
  75. }
  76. type FenWeiNetResponse struct {
  77. MonthlyAccumulation string `json:"monthly_accumulation"`
  78. ProductItemCode string `json:"product_item_code"`
  79. MonthlyValueChnName string `json:"monthly_value_chn_name"`
  80. MonthlyAccumulationChnName string `json:"monthly_accumulation_chn_name"`
  81. ProductItemName string `json:"product_item_name"`
  82. DataDate string `json:"data_date"`
  83. MonthlyValue string `json:"monthly_value"`
  84. MonthlyValueChnUnit string `json:"monthly_value_chn_unit"`
  85. ProductCode string `json:"product_code"`
  86. ProvinceName string `json:"province_name"`
  87. MonthlyAccumulationChnUnit string `json:"monthly_accumulation_chn_unit"`
  88. PortName string `json:"port_name"`
  89. PortSonName string `json:"port_son_name"`
  90. Stock interface{} `json:"stock"`
  91. StockChnName string `json:"stock_chn_name"`
  92. StockChnUnit string `json:"stock_chn_unit"`
  93. CoalTypeName string `json:"coal_type_name"`
  94. WeekValueChnName string `json:"week_value_chn_name"`
  95. WeekValue string `json:"week_value"`
  96. AvaliableDaysChnName string `json:"avaliable_days_chn_name"`
  97. AvaliableDaysChnUnit string `json:"avaliable_days_chn_unit"`
  98. AvaliableDays string `json:"avaliable_days"`
  99. DailyConsumptionChnName string `json:"daily_consumption_chn_name"`
  100. DailyConsumptionChnUnit string `json:"daily_consumption_chn_unit"`
  101. DailyConsumption string `json:"daily_consumption"`
  102. InventoryIndexChnUnit string `json:"inventory_index_chn_unit"`
  103. InventoryIndex float64 `json:"inventory_index"`
  104. TonsChnUnit string `json:"tons_chn_unit"`
  105. Tons string `json:"tons"`
  106. TransportVolumeChnUnit string `json:"transport_volume_chn_unit"`
  107. TransportVolume string `json:"transport_volume"`
  108. PriceRmbChnName string `json:"price_rmb_chn_name"`
  109. PriceIndexMomChnName string `json:"price_index_mom_chn_name"`
  110. PriceRmbChnUnit string `json:"price_rmb_chn_unit"`
  111. PriceIndexMomChnUnit string `json:"price_index_mom_chn_unit"`
  112. PriceRmb interface{} `json:"price_rmb"`
  113. PriceIndexMom interface{} `json:"price_index_mom"`
  114. VehicleChnUnit string `json:"vehicle_chn_unit"`
  115. ShipChnUnit string `json:"ship_chn_unit"`
  116. WeekValueChnUnit string `json:"week_value_chn_unit"`
  117. }
  118. type FenWeiNetResponseWrapper struct {
  119. Data struct {
  120. Data []FenWeiNetResponse `json:"data"`
  121. } `json:"data"`
  122. }
  123. type FenWeiNetResponseMapWrapper struct {
  124. Data struct {
  125. Data map[string][]FenWeiNetResponse `json:"data"`
  126. } `json:"data"`
  127. }
  128. type FenWeiNetResponseAStratumMapWrapper struct {
  129. Data map[string][]FenWeiNetResponse `json:"data"`
  130. }
  131. type FenWeiNetResponseResult struct {
  132. Product string `json:"product"`
  133. FenWeiNetResponses []FenWeiNetResponse `json:"fenWeiNetResponses"`
  134. }
  135. type FenWeiNetIndexInfo struct {
  136. IndexName string `description:"指标名称"`
  137. //IndexCode string `description:"指标编码"`
  138. Unit string `description:"单位"`
  139. Frequency string `description:"频度"`
  140. TerminalCode string `description:"编码"`
  141. ClassifyName string `description:"分类名称"`
  142. DataTime string `description:"数据时间"`
  143. Value interface{} `description:"数据值"`
  144. }