註解功能

This commit is contained in:
b110212000 2021-06-18 10:03:15 +08:00
parent b757669d14
commit e8873251d1
4 changed files with 94 additions and 13 deletions

View File

@ -946,7 +946,6 @@ namespace SolarPower.Controllers
});
return result;
}
/// <summary>
/// 軟刪除單一土地房屋資訊
/// </summary>
@ -1044,7 +1043,11 @@ namespace SolarPower.Controllers
return apiResult;
}
/// <summary>
/// 新增/修改異常
/// </summary>
/// <param name="exceptionModal"></param>
/// <returns></returns>
public async Task<ApiResult<string>> SaveException(ExceptionModal exceptionModal)
{
ApiResult<string> apiResult = new ApiResult<string>();
@ -1112,7 +1115,11 @@ namespace SolarPower.Controllers
}
return apiResult;
}
/// <summary>
/// 異常dataTable
/// </summary>
/// <param name="stationId"></param>
/// <returns></returns>
public async Task<ActionResult> ExceptionTable(int stationId)
{
List<ExceptionTable> exceptionTable = new List<ExceptionTable>();
@ -1148,7 +1155,11 @@ namespace SolarPower.Controllers
});
return result;
}
/// <summary>
/// 取一筆異常設定
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<ApiResult<ExceptionModal>> GetOneException(int id)
{
ExceptionModal Exception = new ExceptionModal();
@ -1167,7 +1178,11 @@ namespace SolarPower.Controllers
return apiResult;
}
/// <summary>
/// 刪除一筆異常設定
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<ApiResult<string>> DeleteOneException(int id)
{
ApiResult<string> apiResult = new ApiResult<string>();

View File

@ -301,6 +301,9 @@ namespace SolarPower.Models.PowerStation
{
public List<Type> Type { get; set; }
}
/// <summary>
/// 表Variable 取來解析
/// </summary>
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; }//建立者
}
/// <summary>
///設備dataTable
/// </summary>
public class DeviceTable : DeviceInfo
{
public string UID { get; set; }//設備編號
public string Function { get; set; }//功能
}
/// <summary>
/// 異常modal
/// </summary>
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; }
}
/// <summary>
/// 異常設定Table
/// </summary>
public class ExceptionTable : ExceptionModal
{
public string PowerStationName { get; set; }

View File

@ -407,7 +407,12 @@ namespace SolarPower.Repository.Implement
}
}
/// <summary>
/// 新增運維
/// </summary>
/// <param name="operation"></param>
/// <param name="properties"></param>
/// <returns></returns>
public async Task<int> AddOperation(OperationInfo operation, List<string> properties)
{
using (IDbConnection conn = _databaseHelper.GetConnection())
@ -493,7 +498,12 @@ namespace SolarPower.Repository.Implement
return operation;
}
}
/// <summary>
/// 更新運維
/// </summary>
/// <param name="operation"></param>
/// <param name="properties"></param>
/// <returns></returns>
public async Task UpdateOperation(OperationInfo operation , List<string> properties)
{
using IDbConnection conn = _databaseHelper.GetConnection();
@ -640,7 +650,11 @@ namespace SolarPower.Repository.Implement
}
return Device;
}
/// <summary>
/// 取單一筆DeviceInfo
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<DeviceInfo> OneDeviceInfo(int id)
{
using (IDbConnection conn = _databaseHelper.GetConnection())
@ -663,7 +677,12 @@ namespace SolarPower.Repository.Implement
return Device;
}
}
/// <summary>
/// 新增 異常設定
/// </summary>
/// <param name="Exception"></param>
/// <param name="properties"></param>
/// <returns></returns>
public async Task AddException(ExceptionModal Exception, List<string> properties)
{
using IDbConnection conn = _databaseHelper.GetConnection();
@ -713,7 +732,11 @@ namespace SolarPower.Repository.Implement
}
return Exception;
}
/// <summary>
/// 取一筆異常設定
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<ExceptionModal> OneException(int id)
{
using (IDbConnection conn = _databaseHelper.GetConnection())
@ -736,7 +759,12 @@ namespace SolarPower.Repository.Implement
return Exception;
}
}
/// <summary>
/// 更新異常設定
/// </summary>
/// <param name="Exception"></param>
/// <param name="properties"></param>
/// <returns></returns>
public async Task UpdateException(ExceptionModal Exception, List<string> properties)
{
using IDbConnection conn = _databaseHelper.GetConnection();

View File

@ -98,6 +98,12 @@ namespace SolarPower.Repository.Interface
/// <param name="id"></param>
/// <returns></returns>
Task DeleteOneLandBuildingInfo(int id);
/// <summary>
/// 新增運維
/// </summary>
/// <param name="operation"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task<int> AddOperation(OperationInfo operation, List<string> properties);
/// <summary>
/// 運維dataTable
@ -105,7 +111,18 @@ namespace SolarPower.Repository.Interface
/// <param name="stationId"></param>
/// <returns></returns>
Task<List<OperationTable>> OperationTable (int stationId);
/// <summary>
/// 取一筆運維
/// </summary>
/// <param name="stationId"></param>
/// <returns></returns>
Task<OperationInfo> OneOperationInfo (int stationId);
/// <summary>
/// 更新運維
/// </summary>
/// <param name="operation"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdateOperation(OperationInfo operation, List<string> properties);
/// <summary>
/// 裝置類型下拉式選單
@ -151,9 +168,18 @@ namespace SolarPower.Repository.Interface
/// <param name="properties"></param>
/// <returns></returns>
Task AddException(ExceptionModal Exception, List<string> properties);
/// <summary>
/// 取一筆異常設定
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<ExceptionModal> OneException(int id);
/// <summary>
/// 更新異常設定
/// </summary>
/// <param name="Exception"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdateException(ExceptionModal Exception, List<string> properties);
}
}