From 72c247e2c805ca5a64ffd1273c0236ff9f821dcc Mon Sep 17 00:00:00 2001 From: Kai Date: Wed, 8 Sep 2021 18:36:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E6=94=B9=E7=99=BB=E5=85=A5?= =?UTF-8?q?=E5=9C=96=E7=89=87=E8=B7=AF=E5=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Controllers/MyBaseController.cs | 2 +- SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs | 6 ------ SolarPower/Repository/Implement/NoticeScheduleRepository.cs | 2 +- SolarPower/Views/Login/Index.cshtml | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/SolarPower/Controllers/MyBaseController.cs b/SolarPower/Controllers/MyBaseController.cs index bd9f96e..c479007 100644 --- a/SolarPower/Controllers/MyBaseController.cs +++ b/SolarPower/Controllers/MyBaseController.cs @@ -98,7 +98,7 @@ namespace SolarPower.Controllers } else { - myUser.Company.Logo = Path.Combine("upload", "company_logo", myUser.Company.Logo); + myUser.Company.Logo = "/" + Path.Combine("upload", "company_logo", myUser.Company.Logo); } } else diff --git a/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs b/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs index e2ba182..01dcc7f 100644 --- a/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs +++ b/SolarPower/Quartz/Jobs/CalcAvgPowerStationJob.cs @@ -1032,11 +1032,5 @@ namespace SolarPower.Quartz.Jobs } } } - - public IEnumerable EachDay(DateTime from, DateTime thru) - { - for (var day = from.Date; day.Date <= thru.Date; day = day.AddDays(1)) - yield return day; - } } } diff --git a/SolarPower/Repository/Implement/NoticeScheduleRepository.cs b/SolarPower/Repository/Implement/NoticeScheduleRepository.cs index 00eeabb..034c06c 100644 --- a/SolarPower/Repository/Implement/NoticeScheduleRepository.cs +++ b/SolarPower/Repository/Implement/NoticeScheduleRepository.cs @@ -76,7 +76,7 @@ namespace SolarPower.Repository.Implement { var sql = $@"SELECT p.*,ps.Name FROM power_station_operation_personnel p LEFT JOIN power_station ps ON p.PowerStationId = ps.Id - WHERE p.UserId = {Userid} AND p.Deleted = 0 "; + WHERE p.UserId = {Userid} AND p.Deleted = 0 and ps.Deleted = 0 and ps.Status = 1"; result = (await conn.QueryAsync(sql)).ToList(); diff --git a/SolarPower/Views/Login/Index.cshtml b/SolarPower/Views/Login/Index.cshtml index de2da5f..5441554 100644 --- a/SolarPower/Views/Login/Index.cshtml +++ b/SolarPower/Views/Login/Index.cshtml @@ -30,7 +30,7 @@