mixed_table.go 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package request
  2. // 单元格的数据类型
  3. const (
  4. DateDT = iota + 1 //日期
  5. EdbDT // 指标类型
  6. CustomTextDT // 自定义文本
  7. InsertDataDT // 插值
  8. PopInsertDataDT // 弹框插值
  9. )
  10. // 单元格的日期类型类型
  11. const (
  12. CustomDateT = iota //手动输入日期
  13. SystemDateT // 系统日期
  14. EdbDateDT // 导入指标日期(指标库的最新日期)
  15. )
  16. // 单元格的日期类型类型
  17. const (
  18. SystemCurrDateT = iota + 1 //系统当前日期
  19. SystemCalculateDateT // 系统日期计算后的日期
  20. SystemFrequencyDateT // 导入系统日期相关的指定频率(所在周/旬/月/季/半年/年的最后/最早一天)
  21. )
  22. // MixedTableReq 混合表格保存请求参数
  23. type MixedTableReq struct {
  24. CellRelation string `description:"单元格关系"`
  25. Data [][]MixedTableCellDataReq `description:"混合表格单元格参数"`
  26. }
  27. // MixedTableCellDataReq 混合表格单元格参数
  28. type MixedTableCellDataReq struct {
  29. Uid string `description:"单元格唯一标识"`
  30. DataType int `description:"数据类型,1:日期,2:指标,3:自定义文本,4:插值"`
  31. DataTime string `description:"所属日期"`
  32. DataTimeType int `description:"日期类型:0:手动输入日期;1:导入系统日期;;3:导入指标日期(指标库的最新日期);"`
  33. EdbInfoId int `description:"指标id"`
  34. ShowValue string `description:"展示值"`
  35. Value string `description:"实际值"`
  36. }
  37. // CellRelationConf
  38. // @Description: 单元格的关系配置结构体
  39. type CellRelationConf struct {
  40. CellRelation
  41. //Type int `json:"type" description:"数据类型,跟MixedTableCellDataReq的DataType保持一致"`
  42. //Key string `json:"key" description:"单元格的唯一标识"`
  43. RelationDate CellRelation `json:"relation_date"`
  44. RelationEdb CellRelation `json:"relation_edb"`
  45. }
  46. // CellRelation
  47. // @Description: 单元格的关系结构体
  48. type CellRelation struct {
  49. Type int `json:"type" description:"数据类型,跟MixedTableCellDataReq的DataType保持一致"`
  50. Key string `json:"key" description:"单元格的唯一标识"`
  51. }
  52. // SystemDateConf
  53. // @Description: 系统导入日期配置
  54. type SystemDateConf struct {
  55. Source int `description:"类型,1:导入系统日期;2:导入系统日期计算后的日期;3:导入系统日期相关的指定频率"`
  56. CalculateNum int `description:"计算频度的数量"`
  57. CalculateFrequency string `description:"计算频度"`
  58. Frequency string `description:"指定频度"`
  59. Day string `description:"指定日期"`
  60. }
  61. // EdbDateConf
  62. // @Description: 导入指标日期配置
  63. type EdbDateConf struct {
  64. EdbInfoId int `description:"指标id"`
  65. }