|
@@ -11,11 +11,11 @@ import (
|
|
|
)
|
|
|
|
|
|
// GetStandardDeviationData 获取标准差图表的指标数据
|
|
|
-func GetStandardDeviationData(chartInfoId int, mappingInfo *models.ChartEdbInfoMapping, calculateValue int) (edbList []*models.ChartEdbInfoMapping, dataResp response.LineFeatureDataResp, err error, errMsg string) {
|
|
|
+func GetStandardDeviationData(chartInfoId int, startDate, endDate string, mappingInfo *models.ChartEdbInfoMapping, calculateValue int) (edbList []*models.ChartEdbInfoMapping, dataResp response.LineFeatureDataResp, err error, errMsg string) {
|
|
|
edbList = make([]*models.ChartEdbInfoMapping, 0)
|
|
|
|
|
|
// 指标对应的所有数据
|
|
|
- _, edbList, err = data.GetEdbDataMapList(chartInfoId, 1, `公历`, ``, ``, []*models.ChartEdbInfoMapping{mappingInfo})
|
|
|
+ _, edbList, err = data.GetEdbDataMapList(chartInfoId, 1, `公历`, startDate, endDate, []*models.ChartEdbInfoMapping{mappingInfo})
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
@@ -78,7 +78,7 @@ func GetStandardDeviationData(chartInfoId int, mappingInfo *models.ChartEdbInfoM
|
|
|
}
|
|
|
|
|
|
// GetPercentileData 获取百分位图表的指标数据
|
|
|
-func GetPercentileData(chartInfoId int, mappingInfo *models.ChartEdbInfoMapping, calculateValue int, calculateUnit string) (edbList []*models.ChartEdbInfoMapping, dataResp response.LineFeatureDataResp, err error, errMsg string) {
|
|
|
+func GetPercentileData(chartInfoId int, startDate, endDate string, mappingInfo *models.ChartEdbInfoMapping, calculateValue int, calculateUnit string) (edbList []*models.ChartEdbInfoMapping, dataResp response.LineFeatureDataResp, err error, errMsg string) {
|
|
|
edbList = make([]*models.ChartEdbInfoMapping, 0)
|
|
|
moveUnitDays, ok := utils.FrequencyDaysMap[calculateUnit]
|
|
|
if !ok {
|
|
@@ -88,7 +88,7 @@ func GetPercentileData(chartInfoId int, mappingInfo *models.ChartEdbInfoMapping,
|
|
|
}
|
|
|
calculateDay := calculateValue * moveUnitDays
|
|
|
// 指标对应的所有数据
|
|
|
- _, edbList, err = data.GetEdbDataMapList(chartInfoId, 1, `公历`, ``, ``, []*models.ChartEdbInfoMapping{mappingInfo})
|
|
|
+ _, edbList, err = data.GetEdbDataMapList(chartInfoId, 1, `公历`, startDate, endDate, []*models.ChartEdbInfoMapping{mappingInfo})
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|