diff --git a/SolarPower/Controllers/LoginController.cs b/SolarPower/Controllers/LoginController.cs index cad0bd0..b8ca67b 100644 --- a/SolarPower/Controllers/LoginController.cs +++ b/SolarPower/Controllers/LoginController.cs @@ -84,7 +84,7 @@ namespace SolarPower.Controllers return View(); } - + HttpContext.Session.SetString("MyAccount", edFunction.AESEncrypt(user.Account)); //將帳號透過AES加密 HttpContext.Session.SetString("CompanyId", edFunction.AESEncrypt(user.CompanyId.ToString())); //將公司id透過AES加密 diff --git a/SolarPower/Repository/Implement/StationReportRepository.cs b/SolarPower/Repository/Implement/StationReportRepository.cs index aedf0ec..195fde2 100644 --- a/SolarPower/Repository/Implement/StationReportRepository.cs +++ b/SolarPower/Repository/Implement/StationReportRepository.cs @@ -167,7 +167,7 @@ namespace SolarPower.Repository.Implement ) b on a.powerStationid = b.powerStationid and DATE_FORMAT(a.TIMESTAMP,''%Y-%m-%d'') = b.report_date left join ( # month - SELECT powerStationid, ROUND(AVG(TODAYKWH),2) AS monthKWH, + SELECT powerStationid, ROUND(SUM(TODAYKWH),2) AS monthKWH, ROUND(AVG(KWHKWP),2) AS KWHKWP, ROUND(AVG(PR),2) AS PR, ROUND(SUM(MONEY),2) AS money, diff --git a/SolarPower/Views/Login/Index.cshtml b/SolarPower/Views/Login/Index.cshtml index 920ecbf..de2da5f 100644 --- a/SolarPower/Views/Login/Index.cshtml +++ b/SolarPower/Views/Login/Index.cshtml @@ -145,3 +145,60 @@ + + + +