|
@@ -297,22 +297,22 @@ func RefreshDataFromCalculateAll() (err error) {
|
|
|
continue
|
|
|
}
|
|
|
fmt.Println(v.EdbInfoId, v.EdbCode, v.EdbName, v.SourceName, source)
|
|
|
- //对依赖指标是基础指标的且基础指标停用,停用当前计算指标,因为item是按照edb_Info_id升序,所以默认层级关系是由低而上,所以不需要考虑嵌套,只要考虑当前的下一级依赖即可
|
|
|
- mappings, err := data_manage.GetEdbInfoCalculateMappingListByEdbInfoId(v.EdbInfoId)
|
|
|
- if err != nil {
|
|
|
- utils.FileLog.Error("[获取计算指标的依赖指标失败,不刷新指标,CODE:" + v.EdbCode + "],err:" + err.Error())
|
|
|
- continue
|
|
|
- }
|
|
|
- for _, mapping := range mappings {
|
|
|
- if mapping.FromEdbInfoId > 0 && mapping.NoUpdate == 1 {
|
|
|
- utils.FileLog.Info("依赖指标停用,依赖指标ID:" + mapping.FromEdbCode + ",停用当前计算指标,CODE:" + v.EdbCode)
|
|
|
- stopErr := data_manage.StopRefreshCalculateEdbIndex(v.EdbInfoId)
|
|
|
- if stopErr != nil {
|
|
|
- utils.FileLog.Error(fmt.Sprintf("停用计算指标失败,ID:%d;指标编码:%s;err:%s", mapping.EdbInfoId, mapping.EdbCode, stopErr.Error()))
|
|
|
- }
|
|
|
- continue
|
|
|
- }
|
|
|
- }
|
|
|
+ ////对依赖指标是基础指标的且基础指标停用,停用当前计算指标,因为item是按照edb_Info_id升序,所以默认层级关系是由低而上,所以不需要考虑嵌套,只要考虑当前的下一级依赖即可
|
|
|
+ //mappings, err := data_manage.GetEdbInfoCalculateMappingListByEdbInfoId(v.EdbInfoId)
|
|
|
+ //if err != nil {
|
|
|
+ // utils.FileLog.Error("[获取计算指标的依赖指标失败,不刷新指标,CODE:" + v.EdbCode + "],err:" + err.Error())
|
|
|
+ // continue
|
|
|
+ //}
|
|
|
+ //for _, mapping := range mappings {
|
|
|
+ // if mapping.FromEdbInfoId > 0 && mapping.NoUpdate == 1 {
|
|
|
+ // utils.FileLog.Info("依赖指标停用,依赖指标ID:" + mapping.FromEdbCode + ",停用当前计算指标,CODE:" + v.EdbCode)
|
|
|
+ // stopErr := data_manage.StopRefreshCalculateEdbIndex(v.EdbInfoId)
|
|
|
+ // if stopErr != nil {
|
|
|
+ // utils.FileLog.Error(fmt.Sprintf("停用计算指标失败,ID:%d;指标编码:%s;err:%s", mapping.EdbInfoId, mapping.EdbCode, stopErr.Error()))
|
|
|
+ // }
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ //}
|
|
|
fmt.Println("RefreshEdbCalculateData", v.EdbInfoId, v.EdbCode, startDate)
|
|
|
result, tmpErr := RefreshEdbCalculateData(v.EdbInfoId, v.EdbCode, startDate)
|
|
|
if tmpErr != nil {
|