diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 6687a49..96bfac3 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -860,9 +860,9 @@ namespace SolarPower.Repository.Implement and a.errDeviceBrand = d.brend and a.errDeviceModel = d.model and a.errValue = d.errCode left join power_station ps on ps.`Code` = site_id left join operation_record pr on pr.ErrorCode = a.id - where sourceState = 1 and ps.`Code` is not null + where ps.`Code` is not null ) a LEFT JOIN notice_schedule ns ON ns.ExceptionId = a.id - WHERE ns.Id IS NULL "; + WHERE ns.Id IS NULL and a.dev_time >= '{ DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' "; exceptionEmailInfos = (await conn.QueryAsync(sql)).ToList(); } catch (Exception exception)