|
@@ -167,12 +167,11 @@ func (this *LineFeaturesChartInfoController) MultipleGraphPreview() {
|
|
|
chartInfo.ChartName = edbInfoMapping.EdbName
|
|
|
|
|
|
|
|
|
+ curveConf := req.Curve
|
|
|
+ startDate, endDate := utils.GetDateByDateType(curveConf.DateType, curveConf.StartDate, curveConf.EndDate)
|
|
|
{
|
|
|
tmpChartInfo := *chartInfo
|
|
|
|
|
|
- curveConf := req.Curve
|
|
|
- startDate, endDate := utils.GetDateByDateType(curveConf.DateType, curveConf.StartDate, curveConf.EndDate)
|
|
|
-
|
|
|
|
|
|
edbList, _, _, _, err, errMsg := data.GetChartEdbData(tmpChartInfo.ChartInfoId, tmpChartInfo.ChartType, tmpChartInfo.Calendar, startDate, endDate, []*data_manage.ChartEdbInfoMapping{edbInfoMapping}, tmpChartInfo.ExtraConfig)
|
|
|
if err != nil {
|
|
@@ -225,7 +224,7 @@ func (this *LineFeaturesChartInfoController) MultipleGraphPreview() {
|
|
|
tmpChartInfo.ChartName = fmt.Sprintf("%s%d期滚动标准差", edbInfoMapping.EdbName, req.StandardDeviation.CalculateValue)
|
|
|
|
|
|
|
|
|
- edbList, dataResp, err, errMsg := lineFeatureServ.GetStandardDeviationData(0, edbInfoMapping, req.StandardDeviation.CalculateValue)
|
|
|
+ edbList, dataResp, err, errMsg := lineFeatureServ.GetStandardDeviationData(0, startDate, endDate, edbInfoMapping, req.StandardDeviation.CalculateValue)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
if errMsg != `` {
|
|
@@ -279,7 +278,7 @@ func (this *LineFeaturesChartInfoController) MultipleGraphPreview() {
|
|
|
tmpChartInfo.ChartName = fmt.Sprintf("%s%d%s百分位", edbInfoMapping.EdbName, req.Percentile.CalculateValue, req.Percentile.CalculateUnit)
|
|
|
|
|
|
|
|
|
- edbList, dataResp, err, errMsg := lineFeatureServ.GetPercentileData(0, edbInfoMapping, req.Percentile.CalculateValue, req.Percentile.CalculateUnit)
|
|
|
+ edbList, dataResp, err, errMsg := lineFeatureServ.GetPercentileData(0, startDate, endDate, edbInfoMapping, req.Percentile.CalculateValue, req.Percentile.CalculateUnit)
|
|
|
if err != nil && errMsg != `` {
|
|
|
br.Msg = errMsg
|
|
|
br.ErrMsg = "获取图表,指标信息失败,Err:" + err.Error()
|
|
@@ -572,6 +571,9 @@ func (this *LineFeaturesChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
var chartInfo *data_manage.ChartInfo
|
|
|
var errMsg string
|
|
|
isSendEmail := true
|
|
|
+
|
|
|
+ curveConf := req.Curve
|
|
|
+ startDate, endDate := utils.GetDateByDateType(curveConf.DateType, curveConf.StartDate, curveConf.EndDate)
|
|
|
switch req.Source {
|
|
|
case utils.CHART_MULTIPLE_GRAPH_CURVE:
|
|
|
curveConf := req.Curve
|
|
@@ -653,7 +655,7 @@ func (this *LineFeaturesChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
}
|
|
|
extraConfig = fmt.Sprint(standardDeviationConf.CalculateValue)
|
|
|
|
|
|
- _, dataResp, err, errMsg := lineFeatureServ.GetStandardDeviationData(0, edbInfoMapping, req.StandardDeviation.CalculateValue)
|
|
|
+ _, dataResp, err, errMsg := lineFeatureServ.GetStandardDeviationData(0, startDate, endDate, edbInfoMapping, req.StandardDeviation.CalculateValue)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败"
|
|
|
if errMsg != `` {
|
|
@@ -682,7 +684,7 @@ func (this *LineFeaturesChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
extraConfig = string(extraConfigByte)
|
|
|
|
|
|
|
|
|
- _, dataResp, err, errMsg := lineFeatureServ.GetPercentileData(0, edbInfoMapping, req.Percentile.CalculateValue, req.Percentile.CalculateUnit)
|
|
|
+ _, dataResp, err, errMsg := lineFeatureServ.GetPercentileData(0, startDate, endDate, edbInfoMapping, req.Percentile.CalculateValue, req.Percentile.CalculateUnit)
|
|
|
if err != nil && errMsg != `` {
|
|
|
br.Msg = errMsg
|
|
|
br.ErrMsg = "获取图表,指标信息失败,Err:" + err.Error()
|
|
@@ -727,6 +729,9 @@ func (this *LineFeaturesChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
}
|
|
|
if chartInfoId <= 0 {
|
|
|
addChartReq := data_manage.AddChartInfoReq{
|
|
|
+ DateType: curveConf.DateType,
|
|
|
+ StartDate: curveConf.StartDate,
|
|
|
+ EndDate: curveConf.StartDate,
|
|
|
ChartClassifyId: req.ClassifyId,
|
|
|
ChartName: req.ChartName,
|
|
|
ChartType: utils.CHART_TYPE_CURVE,
|
|
@@ -744,6 +749,9 @@ func (this *LineFeaturesChartInfoController) MultipleGraphConfigSaveChart() {
|
|
|
ChartName: req.ChartName,
|
|
|
ChartClassifyId: req.ClassifyId,
|
|
|
ChartType: utils.CHART_TYPE_CURVE,
|
|
|
+ DateType: curveConf.DateType,
|
|
|
+ StartDate: curveConf.StartDate,
|
|
|
+ EndDate: curveConf.StartDate,
|
|
|
Calendar: "公历",
|
|
|
LeftMin: fmt.Sprint(leftMinVal),
|
|
|
LeftMax: fmt.Sprint(leftMaxVal),
|
|
@@ -1802,7 +1810,8 @@ func (this *LineFeaturesChartInfoController) Detail() {
|
|
|
br.ErrMsg = "格式化配置项失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- edbList, resultResp, err, errMsg = lineFeatureServ.GetStandardDeviationData(0, edbMapping, calculateValue)
|
|
|
+ startDate, endDate := utils.GetDateByDateType(chartInfo.DateType, chartInfo.StartDate, chartInfo.EndDate)
|
|
|
+ edbList, resultResp, err, errMsg = lineFeatureServ.GetStandardDeviationData(0, startDate, endDate, edbMapping, calculateValue)
|
|
|
case utils.CHART_SOURCE_LINE_FEATURE_PERCENTILE:
|
|
|
var percentileConfig request.Percentile
|
|
|
err = json.Unmarshal([]byte(chartInfo.ExtraConfig), &percentileConfig)
|
|
@@ -1811,7 +1820,8 @@ func (this *LineFeaturesChartInfoController) Detail() {
|
|
|
br.ErrMsg = "格式化配置项失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- edbList, resultResp, err, errMsg = lineFeatureServ.GetPercentileData(0, edbMapping, percentileConfig.CalculateValue, percentileConfig.CalculateUnit)
|
|
|
+ startDate, endDate := utils.GetDateByDateType(chartInfo.DateType, chartInfo.StartDate, chartInfo.EndDate)
|
|
|
+ edbList, resultResp, err, errMsg = lineFeatureServ.GetPercentileData(0, startDate, endDate, edbMapping, percentileConfig.CalculateValue, percentileConfig.CalculateUnit)
|
|
|
case utils.CHART_SOURCE_LINE_FEATURE_FREQUENCY:
|
|
|
var frequencyDistributionConfig request.FrequencyDistribution
|
|
|
err = json.Unmarshal([]byte(chartInfo.ExtraConfig), &frequencyDistributionConfig)
|
|
@@ -2274,7 +2284,8 @@ func GetChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoView, isCa
|
|
|
errMsg = "格式化配置项失败,Err:" + tmpErr.Error()
|
|
|
return
|
|
|
}
|
|
|
- edbList, resultResp, err, msg = lineFeatureServ.GetStandardDeviationData(0, edbMapping, calculateValue)
|
|
|
+ startDate, endDate := utils.GetDateByDateType(chartInfo.DateType, chartInfo.StartDate, chartInfo.EndDate)
|
|
|
+ edbList, resultResp, err, msg = lineFeatureServ.GetStandardDeviationData(0, startDate, endDate, edbMapping, calculateValue)
|
|
|
case utils.CHART_SOURCE_LINE_FEATURE_PERCENTILE:
|
|
|
var percentileConfig request.Percentile
|
|
|
err = json.Unmarshal([]byte(chartInfo.ExtraConfig), &percentileConfig)
|
|
@@ -2283,7 +2294,8 @@ func GetChartInfoDetailFromUniqueCode(chartInfo *data_manage.ChartInfoView, isCa
|
|
|
errMsg = "格式化配置项失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- edbList, resultResp, err, msg = lineFeatureServ.GetPercentileData(0, edbMapping, percentileConfig.CalculateValue, percentileConfig.CalculateUnit)
|
|
|
+ startDate, endDate := utils.GetDateByDateType(chartInfo.DateType, chartInfo.StartDate, chartInfo.EndDate)
|
|
|
+ edbList, resultResp, err, msg = lineFeatureServ.GetPercentileData(0, startDate, endDate, edbMapping, percentileConfig.CalculateValue, percentileConfig.CalculateUnit)
|
|
|
case utils.CHART_SOURCE_LINE_FEATURE_FREQUENCY:
|
|
|
var frequencyDistributionConfig request.FrequencyDistribution
|
|
|
err = json.Unmarshal([]byte(chartInfo.ExtraConfig), &frequencyDistributionConfig)
|
|
@@ -2597,3 +2609,43 @@ func (this *LineFeaturesChartInfoController) SearchByEs() {
|
|
|
br.Msg = "获取成功"
|
|
|
br.Data = resp
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|