فهرست منبع

Merge branch 'ETA_1.4.4' into debug

zwxi 1 سال پیش
والد
کامیت
57e8f0fe0c
1فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 7 4
      services/base_from_ths_ds_http.go

+ 7 - 4
services/base_from_ths_ds_http.go

@@ -64,9 +64,9 @@ func getEdbDataFromThsDsHttp(stockCode, edbCode, startDate, endDate, thsRefreshT
 	tablesList := make([]models.Tables, 0)
 	tableTimeList := make([]string, 0)
 	if len(tmpItems.Tables) > 0 {
-		for _, time := range tmpItems.Tables[0].Time{
-			tableTimeList = append(tableTimeList, time)
-		}
+		//for _, time := range tmpItems.Tables[0].Time{
+		//	tableTimeList = append(tableTimeList, time)
+		//}
 		for _, field := range edbCodeList {
 			tableValueList := make([]float64, 0)
 
@@ -80,7 +80,10 @@ func getEdbDataFromThsDsHttp(stockCode, edbCode, startDate, endDate, thsRefreshT
 					value := reflect.ValueOf(sliceValue.Index(i).Interface())
 					if value.Kind() == reflect.Float64 {
 						tableValue = value.Float()
-						tableValueList = append(tableValueList, tableValue)
+						if tableValue != 0 {
+							tableTimeList = append(tableTimeList, tmpItems.Tables[0].Time[i])
+							tableValueList = append(tableValueList, tableValue)
+						}
 					}
 				}
 			} else {