Преглед на файлове

Merge branch 'chart/14.3' into debug

Roc преди 1 година
родител
ревизия
246de893db
променени са 2 файла, в които са добавени 14 реда и са изтрити 14 реда
  1. 1 1
      services/chart/predict_edb_info.go
  2. 13 13
      services/chart/predict_edb_info_rule.go

+ 1 - 1
services/chart/predict_edb_info.go

@@ -54,7 +54,7 @@ func GetChartPredictEdbInfoDataList(predictEdbConf predictEdbConfModel.PredictEd
 			EdbInfoId:     int(predictEdbConf.PredictEdbInfoID),
 			DataTime:      v.Format(utils.FormatDate),
 			Value:         dataValue,
-			DataTimestamp: (v.UnixNano() / 1e6) + 1000, //前端需要让加1s,说是2022-09-01 00:00:00 这样的整点不合适
+			DataTimestamp: v.UnixNano() / 1e6,
 		})
 	}
 	return

+ 13 - 13
services/chart/predict_edb_info_rule.go

@@ -26,7 +26,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
 	}
@@ -53,7 +53,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
@@ -180,7 +180,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
@@ -309,7 +309,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)
@@ -375,7 +375,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)
@@ -452,7 +452,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)
@@ -529,7 +529,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)
@@ -645,7 +645,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)
@@ -712,7 +712,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)
@@ -898,7 +898,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)
@@ -1066,7 +1066,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)
@@ -1185,7 +1185,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
@@ -1311,7 +1311,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)