Browse Source

Merge remote-tracking branch 'origin/master' into debug

# Conflicts:
#	controllers/smart_report/smart_report.go
#	models/data_manage/edb_data_base.go
#	models/data_manage/edb_info.go
#	models/data_manage/my_chart.go
#	services/data/edb_info_calculate.go
Roc 1 year ago
parent
commit
8d17a5e419

+ 1 - 1
controllers/data_manage/excel/excel_info.go

@@ -1863,7 +1863,7 @@ func (c *ExcelInfoController) Refresh() {
 		}
 
 		if len(tableData.EdbInfoIdList) > 0 {
-			err, _ = data.EdbInfoRefreshAllFromBaseV3(tableData.EdbInfoIdList, false, true, true)
+			err, _ = data.EdbInfoRefreshAllFromBaseV3(tableData.EdbInfoIdList, false, true, false)
 			if err != nil {
 				br.Msg = "刷新失败"
 				br.ErrMsg = "刷新失败,Err:" + err.Error()

+ 3 - 0
services/data/edb_info.go

@@ -94,6 +94,9 @@ func EdbInfoRefreshAllFromBaseV3(edbInfoIdList []int, refreshAll, isSync, isRefr
 	if isRefreshTop {
 		// 获取所有关联的指标,上下所有的指标
 		newBaseEdbInfoArr, newBasePredictEdbInfoArr, newCalculateMap, newPredictCalculateMap, calculateArr, predictCalculateArr, err, errmsg = getRefreshEdbInfoListByIds(edbInfoIdList)
+		if err != nil {
+			return
+		}
 	} else {
 		// 获取溯源的指标
 		newBaseEdbInfoArr, newBasePredictEdbInfoArr, newCalculateMap, newPredictCalculateMap, calculateArr, predictCalculateArr = getEdbInfoIdList(edbInfoIdList)

+ 8 - 0
services/data/excel/custom_analysis_edb.go

@@ -250,7 +250,11 @@ func Refresh(excelInfo *excel.ExcelInfo) (err error, errMsg string, isSendEmail
 		DataList  []float64
 	}
 
+	edbInfoIdList := make([]int, 0)
+
 	for _, v := range list {
+		edbInfoIdList = append(edbInfoIdList, v.EdbInfoId)
+
 		dateList := make([]string, 0)
 		dataList := make([]string, 0)
 
@@ -452,6 +456,10 @@ func Refresh(excelInfo *excel.ExcelInfo) (err error, errMsg string, isSendEmail
 		//sheetInfo.Cell()
 	}
 
+	if len(edbInfoIdList) > 0 {
+		err, _ = data.EdbInfoRefreshAllFromBaseV3(edbInfoIdList, false, true, true)
+	}
+
 	//xlsxFile.Sheet[]
 
 	return