From ee0c004ea98f27992bfbad0ffda58dd50b62fc98 Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 27 Aug 2021 09:54:00 +0800 Subject: [PATCH] 1. bug fix --- SolarPower/Controllers/OperationController.cs | 8 +- SolarPower/DBSchema/solar_power_schema.sql | 2 + SolarPower/Views/ExceptionRecord/Index.cshtml | 74 ++++----- .../StationOverviewInfo.cshtml | 150 +++++++++--------- .../Views/StationOverview/_Exception.cshtml | 8 +- .../StationOverview/_OperationRecord.cshtml | 12 +- SolarPower/wwwroot/css/site.css | 2 +- 7 files changed, 129 insertions(+), 127 deletions(-) diff --git a/SolarPower/Controllers/OperationController.cs b/SolarPower/Controllers/OperationController.cs index 1a98979..fdc8183 100644 --- a/SolarPower/Controllers/OperationController.cs +++ b/SolarPower/Controllers/OperationController.cs @@ -15,7 +15,7 @@ namespace SolarPower.Controllers public class OperationController : MyBaseController { private readonly IOperationRepository operationRepository; - private string operationRecordFilePath = "/upload/operation_recode/"; + private string operationRecordFilePath = "/upload/operation_record/"; private string operationRecordSaveAsPath = ""; @@ -24,7 +24,7 @@ namespace SolarPower.Controllers { this.operationRepository = operationRepository; - operationRecordSaveAsPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "upload", "operation_recode"); + operationRecordSaveAsPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "upload", "operation_record"); } public IActionResult Index() @@ -477,9 +477,9 @@ namespace SolarPower.Controllers return apiResult; } - foreach (var recodeFile in operationRecord.RecordFiles) + foreach (var recordFile in operationRecord.RecordFiles) { - recodeFile.FileName = Path.Combine(operationRecordFilePath, operationRecord.Id.ToString()) + "/" + recodeFile.FileName; + recordFile.FileName = Path.Combine(operationRecordFilePath, operationRecord.Id.ToString()) + "/" + recordFile.FileName; } apiResult.Code = "0000"; diff --git a/SolarPower/DBSchema/solar_power_schema.sql b/SolarPower/DBSchema/solar_power_schema.sql index f84046d..5680776 100644 --- a/SolarPower/DBSchema/solar_power_schema.sql +++ b/SolarPower/DBSchema/solar_power_schema.sql @@ -2164,6 +2164,8 @@ ALTER TABLE `operation_record` ADD COLUMN `FixFirm` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '負責廠商' AFTER `FixDo`; + + /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/SolarPower/Views/ExceptionRecord/Index.cshtml b/SolarPower/Views/ExceptionRecord/Index.cshtml index b603a45..364f4bb 100644 --- a/SolarPower/Views/ExceptionRecord/Index.cshtml +++ b/SolarPower/Views/ExceptionRecord/Index.cshtml @@ -101,7 +101,7 @@