diff --git a/SolarPower/Controllers/PowerStationController.cs b/SolarPower/Controllers/PowerStationController.cs index a10b9ae..01780dc 100644 --- a/SolarPower/Controllers/PowerStationController.cs +++ b/SolarPower/Controllers/PowerStationController.cs @@ -946,7 +946,6 @@ namespace SolarPower.Controllers }); return result; } - /// /// 軟刪除單一土地房屋資訊 /// @@ -1044,7 +1043,11 @@ namespace SolarPower.Controllers return apiResult; } - + /// + /// 新增/修改異常 + /// + /// + /// public async Task> SaveException(ExceptionModal exceptionModal) { ApiResult apiResult = new ApiResult(); @@ -1112,7 +1115,11 @@ namespace SolarPower.Controllers } return apiResult; } - + /// + /// 異常dataTable + /// + /// + /// public async Task ExceptionTable(int stationId) { List exceptionTable = new List(); @@ -1148,7 +1155,11 @@ namespace SolarPower.Controllers }); return result; } - + /// + /// 取一筆異常設定 + /// + /// + /// public async Task> GetOneException(int id) { ExceptionModal Exception = new ExceptionModal(); @@ -1167,7 +1178,11 @@ namespace SolarPower.Controllers return apiResult; } - + /// + /// 刪除一筆異常設定 + /// + /// + /// public async Task> DeleteOneException(int id) { ApiResult apiResult = new ApiResult(); diff --git a/SolarPower/Models/PowerStation.cs b/SolarPower/Models/PowerStation.cs index c52d9df..e18f2e7 100644 --- a/SolarPower/Models/PowerStation.cs +++ b/SolarPower/Models/PowerStation.cs @@ -301,6 +301,9 @@ namespace SolarPower.Models.PowerStation { public List Type { get; set; } } + /// + /// 表Variable 取來解析 + /// public class Variable { public string name { get; set; } @@ -328,11 +331,17 @@ namespace SolarPower.Models.PowerStation public string UID { get; set; }//設備編號 public int CreatedBy { get; set; }//建立者 } + /// + ///設備dataTable + /// public class DeviceTable : DeviceInfo { public string UID { get; set; }//設備編號 public string Function { get; set; }//功能 } + /// + /// 異常modal + /// public class ExceptionModal : Created { public int Id { get; set; } @@ -342,6 +351,9 @@ namespace SolarPower.Models.PowerStation public decimal LowerLimit { get; set; } public byte Alarm { get; set; } } + /// + /// 異常設定Table + /// public class ExceptionTable : ExceptionModal { public string PowerStationName { get; set; } diff --git a/SolarPower/Repository/Implement/PowerStationRepository.cs b/SolarPower/Repository/Implement/PowerStationRepository.cs index 295d551..f7ddb09 100644 --- a/SolarPower/Repository/Implement/PowerStationRepository.cs +++ b/SolarPower/Repository/Implement/PowerStationRepository.cs @@ -406,8 +406,13 @@ namespace SolarPower.Repository.Implement } } } - + /// + /// 新增運維 + /// + /// + /// + /// public async Task AddOperation(OperationInfo operation, List properties) { using (IDbConnection conn = _databaseHelper.GetConnection()) @@ -493,7 +498,12 @@ namespace SolarPower.Repository.Implement return operation; } } - + /// + /// 更新運維 + /// + /// + /// + /// public async Task UpdateOperation(OperationInfo operation , List properties) { using IDbConnection conn = _databaseHelper.GetConnection(); @@ -640,7 +650,11 @@ namespace SolarPower.Repository.Implement } return Device; } - + /// + /// 取單一筆DeviceInfo + /// + /// + /// public async Task OneDeviceInfo(int id) { using (IDbConnection conn = _databaseHelper.GetConnection()) @@ -663,7 +677,12 @@ namespace SolarPower.Repository.Implement return Device; } } - + /// + /// 新增 異常設定 + /// + /// + /// + /// public async Task AddException(ExceptionModal Exception, List properties) { using IDbConnection conn = _databaseHelper.GetConnection(); @@ -713,7 +732,11 @@ namespace SolarPower.Repository.Implement } return Exception; } - + /// + /// 取一筆異常設定 + /// + /// + /// public async Task OneException(int id) { using (IDbConnection conn = _databaseHelper.GetConnection()) @@ -736,7 +759,12 @@ namespace SolarPower.Repository.Implement return Exception; } } - + /// + /// 更新異常設定 + /// + /// + /// + /// public async Task UpdateException(ExceptionModal Exception, List properties) { using IDbConnection conn = _databaseHelper.GetConnection(); diff --git a/SolarPower/Repository/Interface/IPowerStationRepository.cs b/SolarPower/Repository/Interface/IPowerStationRepository.cs index 8836ebb..19548d4 100644 --- a/SolarPower/Repository/Interface/IPowerStationRepository.cs +++ b/SolarPower/Repository/Interface/IPowerStationRepository.cs @@ -98,6 +98,12 @@ namespace SolarPower.Repository.Interface /// /// Task DeleteOneLandBuildingInfo(int id); + /// + /// 新增運維 + /// + /// + /// + /// Task AddOperation(OperationInfo operation, List properties); /// /// 運維dataTable @@ -105,7 +111,18 @@ namespace SolarPower.Repository.Interface /// /// Task> OperationTable (int stationId); + /// + /// 取一筆運維 + /// + /// + /// Task OneOperationInfo (int stationId); + /// + /// 更新運維 + /// + /// + /// + /// Task UpdateOperation(OperationInfo operation, List properties); /// /// 裝置類型下拉式選單 @@ -151,9 +168,18 @@ namespace SolarPower.Repository.Interface /// /// Task AddException(ExceptionModal Exception, List properties); - + /// + /// 取一筆異常設定 + /// + /// + /// Task OneException(int id); - + /// + /// 更新異常設定 + /// + /// + /// + /// Task UpdateException(ExceptionModal Exception, List properties); } }