|
@@ -9,6 +9,7 @@ import (
|
|
|
"eta/eta_api/services/data"
|
|
|
"eta/eta_api/services/data/excel"
|
|
|
"eta/eta_api/utils"
|
|
|
+ "fmt"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -18,6 +19,7 @@ import (
|
|
|
// @Title 指标列表
|
|
|
// @Description 指标列表
|
|
|
// @Param ExcelInfoId query int true "excel的id"
|
|
|
+// @Param Keyword query string false "指标关键词"
|
|
|
// @Success 200 {object} []excel.ExcelEdbMappingItem
|
|
|
// @router /edb/list [get]
|
|
|
func (c *CustomAnalysisController) EdbList() {
|
|
@@ -33,6 +35,11 @@ func (c *CustomAnalysisController) EdbList() {
|
|
|
br.IsSendEmail = false
|
|
|
return
|
|
|
}
|
|
|
+ keyword := c.GetString("Keyword")
|
|
|
+ keyword = strings.TrimSpace(keyword)
|
|
|
+ if keyword != "" {
|
|
|
+ keyword = fmt.Sprint("%", keyword, "%")
|
|
|
+ }
|
|
|
|
|
|
// 获取excel表详情
|
|
|
excelInfo, err := excelModel.GetExcelInfoById(excelInfoId)
|
|
@@ -48,7 +55,7 @@ func (c *CustomAnalysisController) EdbList() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- list, err := excelModel.GetAllExcelEdbMappingItemByExcelInfoId(excelInfo.ExcelInfoId)
|
|
|
+ list, err := excelModel.GetExcelEdbMappingItemByExcelInfoIdOrKeyword(excelInfo.ExcelInfoId, keyword)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|