|
@@ -755,14 +755,17 @@ func DisableEdbRefresh(cont context.Context) (err error) {
|
|
|
for _, indexItem := range indexItems {
|
|
|
// 判断指标是否被创建
|
|
|
if _, ok := edbMap[indexItem.IndexCode]; !ok {
|
|
|
- stopRefreshIds = append(stopRefreshIds, indexItem.BaseFromMysteelChemicalIndexId)
|
|
|
- if len(stopRefreshIds) > 100 {
|
|
|
- err = data_manage.SetStopRefreshMysteelChemicalIndex(stopRefreshIds)
|
|
|
- if err != nil {
|
|
|
- err = fmt.Errorf("设置禁止刷新失败:%v", err)
|
|
|
- return
|
|
|
+ // 判断大写的指标编码是否存在
|
|
|
+ if _, ok1 := edbMap[strings.ToLower(indexItem.IndexCode)]; !ok1 {
|
|
|
+ stopRefreshIds = append(stopRefreshIds, indexItem.BaseFromMysteelChemicalIndexId)
|
|
|
+ if len(stopRefreshIds) > 100 {
|
|
|
+ err = data_manage.SetStopRefreshMysteelChemicalIndex(stopRefreshIds)
|
|
|
+ if err != nil {
|
|
|
+ err = fmt.Errorf("设置禁止刷新失败:%v", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ stopRefreshIds = make([]int32, 0)
|
|
|
}
|
|
|
- stopRefreshIds = make([]int32, 0)
|
|
|
}
|
|
|
}
|
|
|
}
|