base_from_kpler.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package models
  2. type BaseFromKpler struct {
  3. Date string
  4. Value float64
  5. PeriodEndDate string
  6. }
  7. // withIntraCountry := false
  8. // withIntraRegion := true
  9. // withForecast := true
  10. // withFreightView := false
  11. // withProductEstimation := false
  12. type KplerFlowDataLibReq struct {
  13. Products string `description:"产品名称"`
  14. FromZones string `description:"来源区域ID,对应Location" `
  15. ToZones string `description:"流向区域ID"`
  16. Split string `description:"拆分类型"`
  17. FlowDirection string `description:"流向,对应periodicity:export/import"`
  18. Granularity string `description:"粒度: daily/weekly/monthly/yearly"`
  19. Unit string `description:"单位"`
  20. FromCountries string `description:"来源国家"`
  21. ToCountries string `description:"流向国家"`
  22. FromInstallations string `description:"来源安装"`
  23. ToInstallations string `description:"流向安装"`
  24. OnlyRealized string `description:"是否只查询已实现数据"`
  25. VesselTypes string `description:"船型"`
  26. VesselTypesAlt string `description:"船型"`
  27. WithIntraCountry string `description:"是否查询同国数据"`
  28. WithIntraRegion string `description:"是否查询同区域数据"`
  29. WithForecast string `description:"是否查询预测数据"`
  30. WithFreightView string `description:"是否查询运费数据"`
  31. WithProductEstimation string `description:"是否查询产品估算数据"`
  32. StartDate string `description:"开始日期"`
  33. EndDate string `description:"结束日期"`
  34. }
  35. type KplerFlowDataResp struct {
  36. ApiQueryUrl string
  37. List []KplerFlowData
  38. }
  39. type KplerFlowData struct {
  40. SplitItem string
  41. IndexData []KplerBaseExcelData
  42. }
  43. type KplerBaseExcelData struct {
  44. DataTime string
  45. Value string
  46. }
  47. //bodystr := "Id (Product);Name;Type (Product);Family;Family Id;Group;Group Id;Product;Product Id;Grade;Grade Id;Density (Product);Density Unit;Energy Density;Energy Density Unit;Expansion Ratio
  48. type KplerProduct struct {
  49. Id string
  50. Name string
  51. Type string
  52. Family string
  53. FamilyId string
  54. Group string
  55. GroupId string
  56. Product string
  57. ProductId string
  58. Grade string
  59. GradeId string
  60. Density string
  61. DensityUnit string
  62. EnergyDensity string
  63. EnergyDensityUnit string
  64. ExpansionRatio string
  65. }
  66. // Ancestor Id;Ancestor Name;Ancestor Type;Descendant Id;Descendant Name;Descendant Type
  67. type KplerZone struct {
  68. AncestorId string
  69. AncestorName string
  70. AncestorType string
  71. DescendantId string
  72. DescendantName string
  73. DescendantType string
  74. }
  75. type KplerZoneDataLibReq struct {
  76. Token string `description:"token"`
  77. AncestorName string `description:"祖先名称"`
  78. DescendantType string `description:"子类型"`
  79. }
  80. // HandleKplerExcelData Kpler的excel数据
  81. type HandleKplerExcelData struct {
  82. ClassifyName string `description:"指标目录"`
  83. ParentClassifyName string `description:"父级指标目录"`
  84. ClassifySort int `description:"指标目录排序号"`
  85. IndexName string `description:"指标名称"`
  86. IndexCode string `description:"指标编码"`
  87. Unit string `description:"单位"`
  88. Sort int `description:"排序号"`
  89. Frequency string `description:"频度"`
  90. ProductNames string `description:"产品名称"`
  91. FromZoneNames string `description:"区域名称"`
  92. ToZoneNames string `description:"区域名称"`
  93. FlowDirection string `description:"流向"`
  94. Granularity string `description:"粒度"`
  95. Split string `description:"拆分类型"`
  96. SplitName string `description:"拆分类型名称"`
  97. ExcelQueryUrl string `description:"Excel查询URL"`
  98. ExcelDataMap map[string]string
  99. }
  100. type HandleKplerExcelDataReq struct {
  101. List []*HandleKplerExcelData
  102. TerminalCode string `description:"编码"`
  103. }