|
@@ -18,9 +18,6 @@ import (
|
|
|
"eta/eta_api/services/data"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
- "github.com/shopspring/decimal"
|
|
|
- "github.com/tealeg/xlsx"
|
|
|
"os"
|
|
|
"path/filepath"
|
|
|
"reflect"
|
|
@@ -28,6 +25,10 @@ import (
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
|
+
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
+ "github.com/shopspring/decimal"
|
|
|
+ "github.com/tealeg/xlsx"
|
|
|
)
|
|
|
|
|
|
// TargetController 手工指标服务(鉴权)
|
|
@@ -1109,7 +1110,7 @@ func (this *TargetController) ImportData() {
|
|
|
failDatas = append(failDatas, failItem)
|
|
|
continue
|
|
|
}
|
|
|
- tmpErr := data.AddEdbInfo(secName, unit, frequency, "", sysUser.Mobile, classify.ClassifyId, sysUser.AdminId)
|
|
|
+ tmpErr := data.AddEdbInfo(secName, unit, frequency, "", sysUser.Mobile, classify.ClassifyId, sysUser.AdminId, i)
|
|
|
if tmpErr != nil {
|
|
|
fmt.Println("line 158")
|
|
|
failItem := new(models.EdbdataImportFail)
|
|
@@ -3720,7 +3721,7 @@ func (this *TargetController) ExcelDataAdd() {
|
|
|
// continue
|
|
|
//}
|
|
|
|
|
|
- tmpErr := data.AddEdbInfo(secName, unit, frequency, "", sysUser.Mobile, req.ClassifyId, sysUser.AdminId)
|
|
|
+ tmpErr := data.AddEdbInfo(secName, unit, frequency, "", sysUser.Mobile, req.ClassifyId, sysUser.AdminId, i)
|
|
|
if tmpErr != nil {
|
|
|
//fmt.Println("AddEdbInfo err:", err.Error())
|
|
|
utils.FileLogData.Error("AddEdbInfo err :%s", tmpErr.Error())
|
|
@@ -3737,6 +3738,14 @@ func (this *TargetController) ExcelDataAdd() {
|
|
|
targetMap[secName] = target
|
|
|
}
|
|
|
}
|
|
|
+ // 判断指标的顺序是否发生改变
|
|
|
+ if targetMap[secName].Sort != i {
|
|
|
+ edbinfo := models.Edbinfo{Sort: i}
|
|
|
+ er := edbinfo.Update([]string{"sort"})
|
|
|
+ if er != nil {
|
|
|
+ fmt.Println("sort update err:", er.Error())
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//判断指标数据是否已经存在
|
|
|
tmpDataMap, ok2 := edbCodeDataMap[target.TradeCode]
|
|
@@ -3842,6 +3851,14 @@ func (this *TargetController) ExcelDataAdd() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ list, err := models.GetTargetItemList(req.ClassifyId, 1, req.Frequency, "", "", []string{})
|
|
|
+ if err != nil {
|
|
|
+ br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ fmt.Println(list)
|
|
|
}
|
|
|
|
|
|
//resp := models.TargetItemListResp{
|