|
@@ -5,6 +5,7 @@ import (
|
|
|
"eta/eta_api/controllers"
|
|
|
"eta/eta_api/models"
|
|
|
"eta/eta_api/models/data_manage"
|
|
|
+ "eta/eta_api/models/data_manage/response"
|
|
|
"eta/eta_api/models/system"
|
|
|
"eta/eta_api/services"
|
|
|
"eta/eta_api/services/data"
|
|
@@ -2747,6 +2748,53 @@ func (this *ChartInfoController) PreviewSectionScatterChartInfo() {
|
|
|
br.Data = resp
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func (this *EdbInfoController) GetBatchChartRefreshResult() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ sysUser := this.SysUser
|
|
|
+ if sysUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,SysUser Is Empty"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var req data_manage.BatchChartRefreshReq
|
|
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "参数解析异常!"
|
|
|
+ br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ refreshResult := true
|
|
|
+ redisKey := data.GetBatchChartRefreshKey(req.Source, req.ReportId, req.ReportChapterId)
|
|
|
+ if redisKey != `` {
|
|
|
+
|
|
|
+ isOk := utils.Rc.IsExist(redisKey)
|
|
|
+ if isOk {
|
|
|
+ refreshResult = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resp := response.ChartRefreshResp{
|
|
|
+ RefreshResult: refreshResult,
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Data = resp
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
|