|
@@ -728,7 +728,7 @@ func GetPredictDataListByPredictEdbInfo(edbInfo *EdbInfo, order int, startDate s
|
|
|
}
|
|
|
|
|
|
if startDate != `` {
|
|
|
- allDataList, err = GetEdbDataListAll(" AND edb_info_id=? ", []interface{}{sourceEdbInfoItem.EdbInfoId}, sourceEdbInfoItem.Source, 1)
|
|
|
+ allDataList, err = GetEdbDataListAll(" AND edb_info_id=? ", []interface{}{sourceEdbInfoItem.EdbInfoId}, sourceEdbInfoItem.Source, order)
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
@@ -748,7 +748,21 @@ func GetPredictDataListByPredictEdbInfo(edbInfo *EdbInfo, order int, startDate s
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
- dataList = append(dataList, predictDataList...)
|
|
|
+
|
|
|
+
|
|
|
+ if order == 1 {
|
|
|
+ dataList = append(dataList, predictDataList...)
|
|
|
+ }else{
|
|
|
+ lenPredictDataList := len(predictDataList)
|
|
|
+ if lenPredictDataList >0 {
|
|
|
+ tmpDataList :=make([]*EdbInfoSearchData,0)
|
|
|
+ for k,_:=range predictDataList{
|
|
|
+ tmpDataList = append(tmpDataList,predictDataList[lenPredictDataList-k-1])
|
|
|
+ }
|
|
|
+ tmpDataList = append(tmpDataList,dataList...)
|
|
|
+ dataList = tmpDataList
|
|
|
+ }
|
|
|
+ }
|
|
|
if len(predictDataList) > 0 {
|
|
|
|
|
|
if edbInfo.MinValue > predictMinValue {
|
|
@@ -780,7 +794,7 @@ func GetPredictEdbDataListAll(edbInfo *EdbInfo, order int) (items []*EdbInfoSear
|
|
|
|
|
|
func GetPredictEdbDataListAllByStartDate(edbInfo *EdbInfo, order int, startDate string) (items []*EdbInfoSearchData, err error) {
|
|
|
if edbInfo.Source == utils.DATA_SOURCE_PREDICT {
|
|
|
- items, _, _, err, _ = GetPredictDataListByPredictEdbInfo(edbInfo, 1, startDate)
|
|
|
+ items, _, _, err, _ = GetPredictDataListByPredictEdbInfo(edbInfo, order, startDate)
|
|
|
} else {
|
|
|
var condition string
|
|
|
var pars []interface{}
|