|
@@ -2862,3 +2862,52 @@ func (c *ExcelInfoController) GetBatchChartRefreshResult() {
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+// GetBatchChartRefreshResult
|
|
|
+// @Title 获取批量刷新表格结果
|
|
|
+// @Description 获取批量刷新表格结果
|
|
|
+// @Param EdbInfoId query int true "edb id"
|
|
|
+// @Success Ret=200 刷新成功
|
|
|
+// @router /excel_info/get_edb_source [get]
|
|
|
+func (c *ExcelInfoController) GetEdbSource() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ c.Data["json"] = br
|
|
|
+ c.ServeJSON()
|
|
|
+ }()
|
|
|
+ sysUser := c.SysUser
|
|
|
+ if sysUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,SysUser Is Empty"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ edbInfoId, _ := c.GetInt("EdbInfoId")
|
|
|
+ if edbInfoId <= 0 {
|
|
|
+ br.Msg = "请选择指标"
|
|
|
+ br.ErrMsg = "请选择指标"
|
|
|
+ br.IsSendEmail = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ sourceNameList, sourceNameEnList, err := excel2.GetEdbSourceByEdbInfoIdList([]int{edbInfoId})
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "自定义表格数据获取失败"
|
|
|
+ br.ErrMsg = "自定义表格数据获取失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ excelSource := strings.Join(sourceNameList, ",")
|
|
|
+ excelSourceEn := strings.Join(sourceNameEnList, ",")
|
|
|
+
|
|
|
+ var resp struct {
|
|
|
+ ExcelSource string `description:"表格来源"`
|
|
|
+ ExcelSourceEn string `description:"表格来源(英文)"`
|
|
|
+ }
|
|
|
+
|
|
|
+ resp.ExcelSource = excelSource
|
|
|
+ resp.ExcelSourceEn = excelSourceEn
|
|
|
+
|
|
|
+ br.Data = resp
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+}
|