From 91aa8c12e635e41d1b1ed76e5acb3ccb392016b5 Mon Sep 17 00:00:00 2001 From: lxw Date: Tue, 25 Jun 2024 12:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Ammeter/EmeterEnergyService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Service/Ammeter/EmeterEnergyService.cs b/Service/Ammeter/EmeterEnergyService.cs index 09bdeaa..0236ad4 100644 --- a/Service/Ammeter/EmeterEnergyService.cs +++ b/Service/Ammeter/EmeterEnergyService.cs @@ -206,7 +206,7 @@ ORDER BY DateTime endDateTime = DateTime.Parse(endTime); // 根据传入的时间参数计算7天前的时间 - DateTime startDateTime = endDateTime.AddDays(-7); + DateTime startDateTime = endDateTime.AddMinutes(-1); // 根据code分组,取最新时间的一条数据,数据范围7天 string sql = @"