edb_data_table.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. package models
  2. import (
  3. "eta/eta_index_lib/utils"
  4. )
  5. // 指标数据->存储表
  6. func GetEdbDataTableName(source int) (tableName string) {
  7. switch source {
  8. case utils.DATA_SOURCE_THS:
  9. tableName = "edb_data_ths"
  10. case utils.DATA_SOURCE_WIND:
  11. tableName = "edb_data_wind"
  12. case utils.DATA_SOURCE_PB, utils.DATA_SOURCE_PB_FINANCE:
  13. tableName = "edb_data_pb"
  14. case utils.DATA_SOURCE_CALCULATE:
  15. tableName = "edb_data_calculate"
  16. case utils.DATA_SOURCE_CALCULATE_LJZZY:
  17. tableName = "edb_data_calculate_ljzzy"
  18. case utils.DATA_SOURCE_CALCULATE_TBZ:
  19. tableName = "edb_data_calculate_tbz"
  20. case utils.DATA_SOURCE_CALCULATE_TCZ:
  21. tableName = "edb_data_calculate_tcz"
  22. case utils.DATA_SOURCE_CALCULATE_NSZYDPJJS:
  23. tableName = "edb_data_calculate_nszydpjjs"
  24. case utils.DATA_SOURCE_MANUAL:
  25. tableName = "edb_data_manual"
  26. case utils.DATA_SOURCE_LZ:
  27. tableName = "edb_data_lz"
  28. case utils.DATA_SOURCE_YS:
  29. tableName = "edb_data_ys"
  30. case utils.DATA_SOURCE_CALCULATE_HBZ:
  31. tableName = "edb_data_calculate_hbz"
  32. case utils.DATA_SOURCE_CALCULATE_HCZ:
  33. tableName = "edb_data_calculate_hcz"
  34. case utils.DATA_SOURCE_CALCULATE_BP:
  35. tableName = "edb_data_calculate_bp"
  36. case utils.DATA_SOURCE_GL:
  37. tableName = "edb_data_gl"
  38. case utils.DATA_SOURCE_ZZ:
  39. tableName = "edb_data_zz"
  40. case utils.DATA_SOURCE_DL:
  41. tableName = "edb_data_dl"
  42. case utils.DATA_SOURCE_SH:
  43. tableName = "edb_data_sh"
  44. case utils.DATA_SOURCE_CFFEX:
  45. tableName = "edb_data_cffex"
  46. case utils.DATA_SOURCE_SHFE:
  47. tableName = "edb_data_ine"
  48. case utils.DATA_SOURCE_GIE:
  49. tableName = "edb_data_gie"
  50. case utils.DATA_SOURCE_CALCULATE_ZJPJ:
  51. tableName = "edb_data_calculate_zjpj"
  52. case utils.DATA_SOURCE_CALCULATE_TIME_SHIFT:
  53. tableName = "edb_data_calculate_time_shift"
  54. case utils.DATA_SOURCE_CALCULATE_LJZTBPJ:
  55. tableName = "edb_data_calculate_ljztbpj"
  56. case utils.DATA_SOURCE_LT:
  57. tableName = "edb_data_lt"
  58. case utils.DATA_SOURCE_COAL:
  59. tableName = "edb_data_coal"
  60. case utils.DATA_SOURCE_PYTHON:
  61. tableName = "edb_data_python"
  62. case utils.DATA_SOURCE_GOOGLE_TRAVEL:
  63. tableName = "edb_data_google_travel"
  64. case utils.DATA_SOURCE_PREDICT_CALCULATE:
  65. tableName = "edb_data_predict_calculate"
  66. case utils.DATA_SOURCE_PREDICT_CALCULATE_TBZ:
  67. tableName = "edb_data_predict_calculate_tbz"
  68. case utils.DATA_SOURCE_PREDICT_CALCULATE_TCZ:
  69. tableName = "edb_data_predict_calculate_tcz"
  70. case utils.DATA_SOURCE_MYSTEEL_CHEMICAL:
  71. tableName = "edb_data_mysteel_chemical"
  72. case utils.DATA_SOURCE_CALCULATE_CJJX:
  73. tableName = "edb_data_calculate_cjjx"
  74. case utils.DATA_SOURCE_EIA_STEO:
  75. tableName = "edb_data_eia_steo"
  76. case utils.DATA_SOURCE_CALCULATE_NHCC:
  77. tableName = "edb_data_calculate_nhcc"
  78. case utils.DATA_SOURCE_COM_TRADE:
  79. tableName = "edb_data_com_trade"
  80. case utils.DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS:
  81. tableName = "edb_data_predict_calculate_nszydpjjs"
  82. case utils.DATA_SOURCE_CALCULATE_ADJUST:
  83. tableName = "edb_data_calculate_adjust"
  84. case utils.DATA_SOURCE_SCI:
  85. tableName = "edb_data_sci"
  86. case utils.DATA_SOURCE_PREDICT_CALCULATE_LJZZY:
  87. tableName = "edb_data_predict_calculate_ljzzy"
  88. case utils.DATA_SOURCE_PREDICT_CALCULATE_TIME_SHIFT:
  89. tableName = "edb_data_predict_calculate_time_shift"
  90. case utils.DATA_SOURCE_PREDICT_CALCULATE_ZJPJ:
  91. tableName = "edb_data_predict_calculate_zjpj"
  92. case utils.DATA_SOURCE_PREDICT_CALCULATE_LJZTBPJ:
  93. tableName = "edb_data_predict_calculate_ljztbpj"
  94. case utils.DATA_SOURCE_PREDICT_CALCULATE_NHCC:
  95. tableName = "edb_data_predict_calculate_nhcc"
  96. case utils.DATA_SOURCE_PREDICT_CALCULATE_CJJX:
  97. tableName = "edb_data_predict_calculate_cjjx"
  98. case utils.DATA_SOURCE_PREDICT_CALCULATE_HBZ:
  99. tableName = "edb_data_predict_calculate_hbz"
  100. case utils.DATA_SOURCE_PREDICT_CALCULATE_HCZ:
  101. tableName = "edb_data_predict_calculate_hcz"
  102. case utils.DATA_SOURCE_PREDICT_CALCULATE_BP:
  103. tableName = "edb_data_predict_calculate_bp"
  104. case utils.DATA_SOURCE_CALCULATE_JP:
  105. tableName = "edb_data_calculate_jp"
  106. case utils.DATA_SOURCE_CALCULATE_NH:
  107. tableName = "edb_data_calculate_nh"
  108. case utils.DATA_SOURCE_CALCULATE_KSZS:
  109. tableName = "edb_data_calculate_kszs"
  110. case utils.DATA_SOURCE_PREDICT_CALCULATE_JP:
  111. tableName = "edb_data_predict_calculate_jp"
  112. case utils.DATA_SOURCE_PREDICT_CALCULATE_NH:
  113. tableName = "edb_data_predict_calculate_nh"
  114. case utils.DATA_SOURCE_PREDICT_CALCULATE_KSZS:
  115. tableName = "edb_data_predict_calculate_kszs"
  116. case utils.DATA_SOURCE_BAIINFO:
  117. tableName = "edb_data_baiinfo"
  118. case utils.DATA_SOURCE_STOCK_PLANT:
  119. tableName = "edb_data_stock_plant"
  120. case utils.DATA_SOURCE_CALCULATE_CORRELATION:
  121. tableName = "edb_data_calculate_correlation"
  122. case utils.DATA_SOURCE_NATIONAL_STATISTICS:
  123. tableName = "edb_data_national_statistics"
  124. case utils.DATA_SOURCE_CALCULATE_LJZZJ: //累计值转季 -> 61
  125. tableName = "edb_data_calculate_ljzzj"
  126. case utils.DATA_SOURCE_CALCULATE_LJZ: //累计值 -> 62
  127. tableName = "edb_data_calculate_ljz"
  128. case utils.DATA_SOURCE_CALCULATE_LJZNCZJ: //累计值(年初至今) -> 63
  129. tableName = "edb_data_calculate_ljznczj"
  130. case utils.DATA_SOURCE_PREDICT_CALCULATE_LJZZJ: // 预测指标 - 累计值 -> 65
  131. tableName = "edb_data_predict_calculate_ljzzj"
  132. case utils.DATA_SOURCE_PREDICT_CALCULATE_LJZ: //预测指标 - 累计值转季->64
  133. tableName = "edb_data_predict_calculate_ljz"
  134. case utils.DATA_SOURCE_PREDICT_CALCULATE_LJZNCZJ: //预测指标 - 累计值(年初至今) -> 66
  135. tableName = "edb_data_predict_calculate_ljznczj"
  136. case utils.DATA_SOURCE_CALCULATE_STANDARD_DEVIATION: //标准差->67
  137. tableName = "edb_data_calculate_standard_deviation"
  138. case utils.DATA_SOURCE_CALCULATE_PERCENTILE: //百分位->68
  139. tableName = "edb_data_calculate_percentile"
  140. case utils.DATA_SOURCE_PREDICT_CALCULATE_STANDARD_DEVIATION: //预测标准差->69
  141. tableName = "edb_data_predict_ccalculate_standard_deviation"
  142. case utils.DATA_SOURCE_PREDICT_CALCULATE_PERCENTILE: //预测百分位->70
  143. tableName = "edb_data_predict_ccalculate_percentile"
  144. case utils.DATA_SOURCE_FUBAO:
  145. tableName = "edb_data_fubao"
  146. default:
  147. tableName = ""
  148. }
  149. return
  150. }