|
@@ -4,6 +4,7 @@ import (
|
|
|
"encoding/json"
|
|
|
"eta/eta_api/controllers"
|
|
|
"eta/eta_api/models"
|
|
|
+ "eta/eta_api/models/data_manage"
|
|
|
"eta/eta_api/models/sandbox"
|
|
|
"eta/eta_api/models/sandbox/request"
|
|
|
"eta/eta_api/models/sandbox/response"
|
|
@@ -1401,7 +1402,6 @@ func (this *SandboxController) ChartClassifyMove() {
|
|
|
updateCol = append(updateCol, "Sort", "ModifyTime")
|
|
|
}
|
|
|
|
|
|
-
|
|
|
} else {
|
|
|
// prevId为0,也就是沙盘移到最前端
|
|
|
firstClassify, err := sandbox.GetFirstSandboxByClassifyId(req.ClassifyId)
|
|
@@ -1782,14 +1782,15 @@ func (this *SandboxController) SaveV2() {
|
|
|
} else {
|
|
|
//编辑沙盘
|
|
|
sandboxInfo := &sandbox.Sandbox{
|
|
|
- SandboxId: req.SandboxId,
|
|
|
+ SandboxId: req.SandboxId,
|
|
|
Name: utils.TrimStr(req.Name),
|
|
|
Content: req.Content,
|
|
|
+ MindmapData: req.MindmapData,
|
|
|
PicUrl: utils.TrimStr(req.PicUrl),
|
|
|
ModifyTime: time.Now(),
|
|
|
SandboxClassifyId: req.SandboxClassifyId,
|
|
|
}
|
|
|
- var updateSandboxColumn = []string{"Content","PicUrl","ModifyTime","SandboxClassifyId"}
|
|
|
+ var updateSandboxColumn = []string{"Content", "MindmapData", "PicUrl", "ModifyTime", "SandboxClassifyId"}
|
|
|
err = sandboxInfo.Update(updateSandboxColumn)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败!"
|
|
@@ -1979,7 +1980,6 @@ func (this *SandboxController) GetSandboxDetail() {
|
|
|
// br.Data = resp
|
|
|
//}
|
|
|
|
|
|
-
|
|
|
//// SandboxMove
|
|
|
//// @Title 移动沙盘接口
|
|
|
//// @Description 移动图表接口
|
|
@@ -2309,3 +2309,58 @@ func (this *SandboxController) SandboxClassifyList() {
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = resp
|
|
|
}
|
|
|
+
|
|
|
+// @Title 链接指标检测
|
|
|
+// @Description 链接指标检测接口
|
|
|
+// @Param request body data_manage.ChartClassifyDeleteCheckResp true "type json string"
|
|
|
+// @Success 200 Ret=200 检测成功
|
|
|
+// @router /link/check [post]
|
|
|
+func (this *SandboxController) LinkEdbInfoCheck() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ var req sandbox.SandboxLinkCheckReq
|
|
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "参数解析异常!"
|
|
|
+ br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(sandbox.SandboxLinkCheckResp)
|
|
|
+ edbInfoList, err := data_manage.GetEdbInfoByIdList(req.EdbInfoIdList)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取指标信息失败"
|
|
|
+ br.ErrMsg = "获取指标信息失败,err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range edbInfoList {
|
|
|
+ resp.EdbInfoIdList = append(resp.EdbInfoIdList, v.EdbInfoId)
|
|
|
+ }
|
|
|
+
|
|
|
+ chartList, err := data_manage.GetChartInfoByIdList(req.ChartInfoIdList)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = `获取失败`
|
|
|
+ br.ErrMsg = `获取图表列表失败,ERR:` + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range chartList {
|
|
|
+ resp.ChartInfoIdList = append(resp.ChartInfoIdList, v.ChartInfoId)
|
|
|
+ }
|
|
|
+
|
|
|
+ reportList, err := models.GetSimpleReportByIds(req.ReportIdList)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = `获取失败`
|
|
|
+ br.ErrMsg = `获取报告列表失败,ERR:` + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range reportList {
|
|
|
+ resp.ReportIdList = append(resp.ReportIdList, v.Id)
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Msg = "检测成功"
|
|
|
+ br.Success = true
|
|
|
+ br.Data = resp
|
|
|
+}
|