excel_info.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package response
  2. import (
  3. excel2 "eta/eta_api/models/data_manage/excel"
  4. "eta/eta_api/models/data_manage/excel/request"
  5. "eta/eta_api/services/excel"
  6. "time"
  7. "github.com/rdlucklib/rdluck_tools/paging"
  8. )
  9. // AddExcelInfoResp 添加excel表格的返回
  10. type AddExcelInfoResp struct {
  11. ExcelInfoId int `description:"表格id"`
  12. UniqueCode string `description:"表格唯一编码"`
  13. }
  14. // ExcelListResp 表格列表返回数据
  15. type ExcelListResp struct {
  16. Paging *paging.PagingItem
  17. List []*excel2.MyExcelInfoList
  18. }
  19. // ExcelTableDetailResp excel表格详情
  20. type ExcelTableDetailResp struct {
  21. UniqueCode string `description:"表格唯一code"`
  22. ExcelImage string `description:"表格截图"`
  23. ExcelName string `description:"表格名称"`
  24. TableInfo excel.TableData
  25. Config ExcelTableDetailConfigResp
  26. SourcesFrom string `description:"图表来源"`
  27. ExcelSource string `description:"表格来源str"`
  28. ExcelSourceEn string `description:"表格来源(英文)"`
  29. }
  30. // ExcelTableDetailConfigResp
  31. // @Description: Excel表格的配置信息
  32. type ExcelTableDetailConfigResp struct {
  33. FontSize int
  34. }
  35. // TableCellResp 单元格
  36. type TableCellResp struct {
  37. DataType int `description:"数据类型,1:普通的,2:插值法,3:手动输入,4:公式计算"`
  38. DataTime string `description:"所属日期"`
  39. ShowValue string `description:"展示的值"`
  40. Value string `description:"实际值(计算公式)"`
  41. }
  42. type TableDataItem struct {
  43. EdbInfoId int `description:"指标id"`
  44. Data []request.ManualDataReq `description:"数据列表"`
  45. Decimal int `description:"小数位数"`
  46. ExcelSource string `description:"表格来源str"`
  47. ExcelSourceEn string `description:"表格来源(英文)"`
  48. }
  49. // TableDetailResp excel表格详情
  50. type TableDetailResp struct {
  51. ExcelInfo excel2.ExcelInfo `description:"表格基础信息"`
  52. TableData request.TableDataReq `description:"表格内容"`
  53. }
  54. // ExcelInfoDetail excel表格详情(前端使用)
  55. type ExcelInfoDetail struct {
  56. ExcelInfoId int `orm:"column(excel_info_id);pk"`
  57. Source int `description:"表格来源,1:excel插件的表格,2:自定义表格,默认:1"`
  58. ExcelType int `description:"表格类型,1:指标列,2:日期列,默认:1"`
  59. ExcelName string `description:"表格名称"`
  60. UniqueCode string `description:"表格唯一编码"`
  61. ExcelClassifyId int `description:"表格分类id"`
  62. SysUserId int `description:"操作人id"`
  63. SysUserRealName string `description:"操作人真实姓名"`
  64. Content string `description:"表格内容"`
  65. ExcelImage string `description:"表格图片"`
  66. FileUrl string `description:"表格下载地址"`
  67. Sort int `description:"排序字段,数字越小越排前面"`
  68. IsDelete int `description:"是否删除,0:未删除,1:已删除"`
  69. ModifyTime time.Time `description:"最近修改日期"`
  70. CreateTime time.Time `description:"创建日期"`
  71. TableData interface{} `description:"表格内容"`
  72. Button excel2.ExcelInfoDetailButton `description:"操作权限"`
  73. CanEdit bool `description:"是否可编辑"`
  74. Editor string `description:"编辑人"`
  75. IsJoinPermission int `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
  76. HaveOperaAuth bool `description:"是否有数据权限"`
  77. ParentId int `description:"表格的父级id"`
  78. BalanceType int `description:"平衡表类型:0 动态表,1静态表"`
  79. UpdateUserId int `description:"更新人id"`
  80. UpdateUserRealName string `description:"更新人真实姓名"`
  81. RelExcelInfoId int `description:"平衡表里静态表关联的动态表excel id"`
  82. SourcesFrom string `description:"图表来源"`
  83. ExcelSource string `description:"表格来源str"`
  84. ExcelSourceEn string `description:"表格来源(英文)"`
  85. }
  86. type BalanceChildTableResp struct {
  87. List []*excel2.ExcelInfo
  88. }
  89. type BalanceTableWorkerResp struct {
  90. List []*excel2.ExcelWorker
  91. }
  92. type BalanceTableVersionListItem struct {
  93. ExcelInfoId int `description:"表格id"`
  94. UniqueCode string `description:"表格唯一编码"`
  95. BalanceType int `description:"平衡表类型:0 动态表,1静态表"`
  96. RelExcelInfoId int `description:"平衡表里静态表关联的动态表excel id"`
  97. VersionName string `description:"静态表版本名称"`
  98. }
  99. type BalanceTableVersionListResp struct {
  100. List []*BalanceTableVersionListItem
  101. }
  102. // ShareExcelInfoDetail 分享表格详情
  103. type ShareExcelInfoDetail struct {
  104. ExcelInfoId int `description:"表格ID"`
  105. ViewUserIds []int `description:"查看权限用户IDs"`
  106. EditUserIds []int `description:"编辑权限用户IDs"`
  107. }
  108. type ExcelRuleListResp struct {
  109. List []*excel2.ExcelInfoRuleMappingView
  110. }