|
@@ -250,14 +250,7 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *data_manage.ChartEd
|
|
|
err = errors.New("指标change类型异常")
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-
|
|
|
baseDataList := make([]*data_manage.EdbDataList, 0)
|
|
|
baseDataMap := make(map[string]float64)
|
|
|
changeDataList := make([]*data_manage.EdbDataList, 0)
|
|
@@ -321,35 +314,13 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *data_manage.ChartEd
|
|
|
baseCalculateData = append(baseCalculateData, baseDataList[i].Value)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
if leadValue > 0 {
|
|
|
|
|
|
moveUnitDays := utils.FrequencyDaysMap[leadUnit]
|
|
|
|
|
|
for i := range xData {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
xCalculateData := make([]float64, 0)
|
|
|
yCalculateData := make([]float64, 0)
|
|
|
|
|
@@ -366,9 +337,6 @@ func GetChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *data_manage.ChartEd
|
|
|
}
|
|
|
}
|
|
|
if len(yCalculateData) <= 0 {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
continue
|
|
|
}
|
|
|
|
|
@@ -474,7 +442,6 @@ func GetRollingCorrelationChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *d
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
baseDataMap := make(map[string]float64)
|
|
|
changeDataList := make([]*data_manage.EdbDataList, 0)
|
|
|
changeDataMap := make(map[string]float64)
|
|
@@ -486,7 +453,6 @@ func GetRollingCorrelationChartDataByEdbInfo(edbInfoMappingA, edbInfoMappingB *d
|
|
|
err = fmt.Errorf("获取变频指标插值法Map失败, Err: %s", e.Error())
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
{
|
|
@@ -743,26 +709,6 @@ func AddChartInfo(req data_manage.AddChartInfoReq, source int, sysUser *system.A
|
|
|
isSendEmail = false
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if len(req.CorrelationChartInfo.EdbInfoIdList) != 2 {
|
|
|
errMsg = "请选择AB指标"
|
|
|
err = errors.New(errMsg)
|
|
@@ -941,40 +887,6 @@ func AddChartInfo(req data_manage.AddChartInfoReq, source int, sysUser *system.A
|
|
|
correlationChart.EdbInfoIdSecond = req.CorrelationChartInfo.EdbInfoIdList[1].EdbInfoId
|
|
|
correlationChart.CreateTime = time.Now().Local()
|
|
|
correlationChart.ModifyTime = time.Now().Local()
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
chartInfoId, e := data_manage.CreateCorrelationChartAndEdb(chartInfo, mapList, correlationChart)
|
|
|
if e != nil {
|
|
@@ -1035,12 +947,6 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
|
|
|
isSendEmail = false
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
startDate, e := time.Parse(utils.FormatDate, req.CorrelationChartInfo.StartDate)
|
|
|
if e != nil {
|
|
|
errMsg = "开始日期格式有误"
|
|
@@ -1160,38 +1066,6 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
|
|
|
|
|
|
|
|
|
disableVal := data.CheckIsDisableChart(edbInfoIdArr)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
correlationChart.LeadValue = req.CorrelationChartInfo.LeadValue
|
|
|
correlationChart.LeadUnit = req.CorrelationChartInfo.LeadUnit
|
|
|
correlationChart.CalculateValue = req.CorrelationChartInfo.CalculateValue
|
|
@@ -1205,10 +1079,8 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
|
|
|
if chartItem.Source == utils.CHART_SOURCE_ROLLING_CORRELATION {
|
|
|
correlationChart.DateType = req.CorrelationChartInfo.DateType
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
correlationChart.ModifyTime = time.Now().Local()
|
|
|
-
|
|
|
correlationUpdateCols := []string{"LeadValue", "LeadUnit", "CalculateValue", "CalculateUnit", "DateType", "StartDate", "EndDate", "EdbInfoIdFirst", "EdbInfoIdSecond", "ModifyTime"}
|
|
|
|
|
|
|
|
@@ -1311,46 +1183,6 @@ func CalculateCorrelation(leadValue int, leadUnit, frequencyA, frequencyB string
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
baseDataList := make([]*data_manage.EdbDataList, 0)
|
|
|
baseDataMap := make(map[string]float64)
|
|
@@ -1415,35 +1247,13 @@ func CalculateCorrelation(leadValue int, leadUnit, frequencyA, frequencyB string
|
|
|
baseCalculateData = append(baseCalculateData, baseDataList[i].Value)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
if leadValue > 0 {
|
|
|
|
|
|
moveUnitDays := utils.FrequencyDaysMap[leadUnit]
|
|
|
|
|
|
for i := range xData {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
xCalculateData := make([]float64, 0)
|
|
|
yCalculateData := make([]float64, 0)
|
|
|
|
|
@@ -1460,9 +1270,6 @@ func CalculateCorrelation(leadValue int, leadUnit, frequencyA, frequencyB string
|
|
|
}
|
|
|
}
|
|
|
if len(yCalculateData) <= 0 {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
continue
|
|
|
}
|
|
|
|