|
@@ -2341,13 +2341,13 @@ func decompressZip(src string) error {
|
|
// @Param request body request.MarkEditSandbox true "type json string"
|
|
// @Param request body request.MarkEditSandbox true "type json string"
|
|
// @Success 200 标记成功 ;202 标记成功
|
|
// @Success 200 标记成功 ;202 标记成功
|
|
// @router /excel_info/mark [post]
|
|
// @router /excel_info/mark [post]
|
|
-func (this *ExcelInfoController) MarkEditStatus() {
|
|
|
|
|
|
+func (c *ExcelInfoController) MarkEditStatus() {
|
|
br := new(models.BaseResponse).Init()
|
|
br := new(models.BaseResponse).Init()
|
|
defer func() {
|
|
defer func() {
|
|
- this.Data["json"] = br
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
+ c.Data["json"] = br
|
|
|
|
+ c.ServeJSON()
|
|
}()
|
|
}()
|
|
- sysUser := this.SysUser
|
|
|
|
|
|
+ sysUser := c.SysUser
|
|
if sysUser == nil {
|
|
if sysUser == nil {
|
|
br.Msg = "请登录"
|
|
br.Msg = "请登录"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
@@ -2355,7 +2355,7 @@ func (this *ExcelInfoController) MarkEditStatus() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var req request.MarkEditExcel
|
|
var req request.MarkEditExcel
|
|
- err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
|
|
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &req)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "参数解析异常!"
|
|
br.Msg = "参数解析异常!"
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
@@ -2395,16 +2395,16 @@ func (this *ExcelInfoController) MarkEditStatus() {
|
|
// @Param request body excel3.BatchRefreshExcelReq true "type json string"
|
|
// @Param request body excel3.BatchRefreshExcelReq true "type json string"
|
|
// @Success Ret=200 刷新成功
|
|
// @Success Ret=200 刷新成功
|
|
// @router /excel_info/table/batch_refresh [post]
|
|
// @router /excel_info/table/batch_refresh [post]
|
|
-func (this *ExcelInfoController) BatchRefresh() {
|
|
|
|
|
|
+func (c *ExcelInfoController) BatchRefresh() {
|
|
br := new(models.BaseResponse).Init()
|
|
br := new(models.BaseResponse).Init()
|
|
defer func() {
|
|
defer func() {
|
|
if br.ErrMsg == "" {
|
|
if br.ErrMsg == "" {
|
|
br.IsSendEmail = false
|
|
br.IsSendEmail = false
|
|
}
|
|
}
|
|
- this.Data["json"] = br
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
+ c.Data["json"] = br
|
|
|
|
+ c.ServeJSON()
|
|
}()
|
|
}()
|
|
- sysUser := this.SysUser
|
|
|
|
|
|
+ sysUser := c.SysUser
|
|
if sysUser == nil {
|
|
if sysUser == nil {
|
|
br.Msg = "请登录"
|
|
br.Msg = "请登录"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
@@ -2412,7 +2412,7 @@ func (this *ExcelInfoController) BatchRefresh() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var req excel3.BatchRefreshExcelReq
|
|
var req excel3.BatchRefreshExcelReq
|
|
- err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
|
|
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &req)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "参数解析异常!"
|
|
br.Msg = "参数解析异常!"
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
@@ -2426,7 +2426,7 @@ func (this *ExcelInfoController) BatchRefresh() {
|
|
}
|
|
}
|
|
|
|
|
|
// 获取表格关联的指标IDs
|
|
// 获取表格关联的指标IDs
|
|
- edbIds, e := excel2.GetEdbIdsFromExcelCodes(req.ExcelCodes)
|
|
|
|
|
|
+ edbIds, e := excel2.GetEdbIdsFromExcelCodes(req.ExcelCodes, sysUser.AdminId)
|
|
if e != nil {
|
|
if e != nil {
|
|
br.Msg = "刷新失败"
|
|
br.Msg = "刷新失败"
|
|
br.ErrMsg = "获取表格关联的指标IDs失败, Err: " + e.Error()
|
|
br.ErrMsg = "获取表格关联的指标IDs失败, Err: " + e.Error()
|
|
@@ -2461,13 +2461,13 @@ func (this *ExcelInfoController) BatchRefresh() {
|
|
// @Param request body excel3.BatchRefreshExcelReq true "type json string"
|
|
// @Param request body excel3.BatchRefreshExcelReq true "type json string"
|
|
// @Success Ret=200 刷新成功
|
|
// @Success Ret=200 刷新成功
|
|
// @router /excel_info/table/batch_refresh/result [post]
|
|
// @router /excel_info/table/batch_refresh/result [post]
|
|
-func (this *ExcelInfoController) GetBatchChartRefreshResult() {
|
|
|
|
|
|
+func (c *ExcelInfoController) GetBatchChartRefreshResult() {
|
|
br := new(models.BaseResponse).Init()
|
|
br := new(models.BaseResponse).Init()
|
|
defer func() {
|
|
defer func() {
|
|
- this.Data["json"] = br
|
|
|
|
- this.ServeJSON()
|
|
|
|
|
|
+ c.Data["json"] = br
|
|
|
|
+ c.ServeJSON()
|
|
}()
|
|
}()
|
|
- sysUser := this.SysUser
|
|
|
|
|
|
+ sysUser := c.SysUser
|
|
if sysUser == nil {
|
|
if sysUser == nil {
|
|
br.Msg = "请登录"
|
|
br.Msg = "请登录"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
@@ -2475,7 +2475,7 @@ func (this *ExcelInfoController) GetBatchChartRefreshResult() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var req excel3.BatchRefreshExcelReq
|
|
var req excel3.BatchRefreshExcelReq
|
|
- err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
|
|
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &req)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "参数解析异常!"
|
|
br.Msg = "参数解析异常!"
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|