edb_data_table.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package models
  2. import (
  3. "hongze/hongze_chart_lib/utils"
  4. )
  5. func GetEdbDataTableName(source int) (tableName string) {
  6. switch source {
  7. case utils.DATA_SOURCE_THS:
  8. tableName = "edb_data_ths"
  9. case utils.DATA_SOURCE_WIND:
  10. tableName = "edb_data_wind"
  11. case utils.DATA_SOURCE_PB:
  12. tableName = "edb_data_pb"
  13. case utils.DATA_SOURCE_CALCULATE:
  14. tableName = "edb_data_calculate"
  15. case utils.DATA_SOURCE_CALCULATE_LJZZY:
  16. tableName = "edb_data_calculate_ljzzy"
  17. case utils.DATA_SOURCE_CALCULATE_TBZ:
  18. tableName = "edb_data_calculate_tbz"
  19. case utils.DATA_SOURCE_CALCULATE_TCZ:
  20. tableName = "edb_data_calculate_tcz"
  21. case utils.DATA_SOURCE_CALCULATE_NSZYDPJJS:
  22. tableName = "edb_data_calculate_nszydpjjs"
  23. case utils.DATA_SOURCE_MANUAL:
  24. tableName = "edb_data_manual"
  25. case utils.DATA_SOURCE_LZ:
  26. tableName = "edb_data_lz"
  27. default:
  28. tableName = ""
  29. }
  30. return
  31. }
  32. func GetEdbInfoCalculateTableName(source int) (tableName string) {
  33. switch source {
  34. case utils.DATA_SOURCE_CALCULATE:
  35. tableName = "edb_info_calculate"
  36. case utils.DATA_SOURCE_CALCULATE_LJZZY:
  37. tableName = "edb_info_calculate_ljzzy"
  38. case utils.DATA_SOURCE_CALCULATE_TBZ:
  39. tableName = "edb_info_calculate_tbz"
  40. case utils.DATA_SOURCE_CALCULATE_TCZ:
  41. tableName = "edb_info_calculate_tcz"
  42. case utils.DATA_SOURCE_CALCULATE_NSZYDPJJS:
  43. tableName = "edb_info_calculate_nszydpjjs"
  44. default:
  45. tableName = ""
  46. }
  47. return
  48. }