Browse Source

fix:预测指标的增加1s,前端说不要了,没意义

Roc 1 year ago
parent
commit
dd193a3353
1 changed files with 13 additions and 13 deletions
  1. 13 13
      services/data/predict_edb_info_rule.go

+ 13 - 13
services/data/predict_edb_info_rule.go

@@ -25,7 +25,7 @@ func GetChartPredictEdbInfoDataListByRule1(edbInfoId int, dataValue float64, sta
 			EdbInfoId:     edbInfoId,
 			DataTime:      v.Format(utils.FormatDate),
 			Value:         dataValue,
-			DataTimestamp: (v.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: v.UnixNano() / 1e6,
 		})
 		existMap[v.Format(utils.FormatDate)] = dataValue
 	}
@@ -52,7 +52,7 @@ func GetChartPredictEdbInfoDataListByRuleTb(edbInfoId int, tbValue float64, star
 			EdbInfoId: edbInfoId,
 			DataTime:  currentDate.Format(utils.FormatDate),
 			//Value:         dataValue,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 
 		var val float64
@@ -183,7 +183,7 @@ func GetChartPredictEdbInfoDataListByRuleTc(edbInfoId int, tcValue float64, star
 			EdbInfoId: edbInfoId,
 			DataTime:  currentDate.Format(utils.FormatDate),
 			//Value:         dataValue,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 
 		var val float64
@@ -312,7 +312,7 @@ func GetChartPredictEdbInfoDataListByRuleHb(edbInfoId int, hbValue float64, star
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -378,7 +378,7 @@ func GetChartPredictEdbInfoDataListByRuleHc(edbInfoId int, hcValue float64, star
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -455,7 +455,7 @@ func GetChartPredictEdbInfoDataListByRuleNMoveMeanValue(edbInfoId int, nValue in
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -528,7 +528,7 @@ func GetChartPredictEdbInfoDataListByRuleNLinearRegression(edbInfoId int, nValue
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -644,7 +644,7 @@ func GetChartPredictEdbInfoDataListByRuleTrendsHC(edbInfoId, configId int, start
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -711,7 +711,7 @@ func GetChartPredictEdbInfoDataListByRuleFinalValueHc(edbInfoId int, finalValue
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -897,7 +897,7 @@ func GetChartPredictEdbInfoDataListByRuleSeason(edbInfoId int, yearsList []int,
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -1065,7 +1065,7 @@ func GetChartPredictEdbInfoDataListByRuleMoveAverageTb(edbInfoId int, nValue, ye
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)
@@ -1184,7 +1184,7 @@ func GetChartPredictEdbInfoDataListByRuleTbzscz(edbInfoId int, tbEndValue float6
 			EdbInfoId: edbInfoId,
 			DataTime:  currentDate.Format(utils.FormatDate),
 			//Value:         dataValue,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 
 		var val float64
@@ -1310,7 +1310,7 @@ func GetChartPredictEdbInfoDataListByRuleLineNh(edbInfoId int, dayList []time.Ti
 			EdbInfoId:     edbInfoId,
 			DataTime:      currentDateStr,
 			Value:         val,
-			DataTimestamp: (currentDate.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: currentDate.UnixNano() / 1e6,
 		}
 		newPredictEdbInfoData = append(newPredictEdbInfoData, tmpData)
 		allDataList = append(allDataList, tmpData)