|
@@ -157,6 +157,10 @@ func InitCalculateIndex() {
|
|
needAddIndexMap[cv.EdbCode] = cv.EdbCode
|
|
needAddIndexMap[cv.EdbCode] = cv.EdbCode
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if len(needAddIndexArr) > 2 {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
f.Save()
|
|
f.Save()
|
|
@@ -231,13 +235,13 @@ func InitCalculateIndex() {
|
|
utils.FileLog.Info("新增计算指标失败:" + err.Error() + " result:" + string(edbLibResult))
|
|
utils.FileLog.Info("新增计算指标失败:" + err.Error() + " result:" + string(edbLibResult))
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- baseResp := new(models.BaseResponse)
|
|
|
|
- err = json.Unmarshal([]byte(edbLibResult), &baseResp)
|
|
|
|
|
|
+ indexBaseResp := new(models.EdbInfoResp)
|
|
|
|
+ err = json.Unmarshal(edbLibResult, &indexBaseResp)
|
|
if err != nil {
|
|
if err != nil {
|
|
fmt.Println("edbLibResult json.Unmarshal Err:" + err.Error())
|
|
fmt.Println("edbLibResult json.Unmarshal Err:" + err.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if baseResp.Ret != 200 {
|
|
|
|
|
|
+ if indexBaseResp.Ret != 200 {
|
|
fmt.Println("PostEdbLib resp Err:" + hzResp.ErrMsg)
|
|
fmt.Println("PostEdbLib resp Err:" + hzResp.ErrMsg)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -263,7 +267,7 @@ func InitCalculateIndex() {
|
|
for _, cv := range hzCalculateResp.Data {
|
|
for _, cv := range hzCalculateResp.Data {
|
|
//新增指标信息
|
|
//新增指标信息
|
|
indexCalculateMap := make(map[string]interface{})
|
|
indexCalculateMap := make(map[string]interface{})
|
|
- indexCalculateMap["EdbInfoId"] = cv.EdbInfoId
|
|
|
|
|
|
+ indexCalculateMap["EdbInfoId"] = indexBaseResp.Data.EdbInfoId
|
|
indexCalculateMap["Source"] = cv.Source
|
|
indexCalculateMap["Source"] = cv.Source
|
|
indexCalculateMap["SourceName"] = cv.SourceName
|
|
indexCalculateMap["SourceName"] = cv.SourceName
|
|
indexCalculateMap["EdbCode"] = cv.EdbCode
|
|
indexCalculateMap["EdbCode"] = cv.EdbCode
|