FIC_Solar/SolarPower/Repository/Interface/IPowerStationRepository.cs
2021-06-18 12:25:45 +08:00

193 lines
6.5 KiB
C#

using SolarPower.Models.PowerStation;
using SolarPower.Models.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Repository.Interface
{
public interface IPowerStationRepository : IRepositoryBase<PowerStation>
{
/// <summary>
/// 查詢縣市列表
/// </summary>
/// <param name="CompanyId"></param>
/// <returns></returns>
Task<List<CitySelectItemList>> GetCitySelectOptionListAsync();
/// <summary>
/// 查詢地區列表
/// </summary>
/// <param name="CompanyId"></param>
/// <returns></returns>
Task<List<AreaSelectItemList>> GetAreaSelectOptionListAsync(int cityId);
/// <summary>
/// 透過編號取得,縣市資訊
/// </summary>
/// <param name="cityId"></param>
/// <returns></returns>
Task<City> GetOneCityByIdAsync(int cityId);
/// <summary>
/// 透過編號取得,地區資訊
/// </summary>
/// <param name="areaId"></param>
/// <returns></returns>
Task<Area> GetOneAreaByIdAsync(int areaId);
/// <summary>
/// 取得縣市地區代碼
/// </summary>
/// <param name="areaId"></param>
/// <returns></returns>
Task<Zipcode> GetCityAreaZipcodeAsync(int areaId);
/// <summary>
/// 透過縣市地區編號,取得該縣市地區最後的流水號
/// </summary>
/// <param name="cityId"></param>
/// <param name="areaId"></param>
/// <returns></returns>
Task<string> GetLastSerialNumberByCityAreaIdAsync(int cityId, int areaId);
/// <summary>
/// 修改電站基本資訊
/// </summary>
/// <param name="entity"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdatePowerStationInfo(UpdatePowerStationInfo entity, List<string> properties);
/// <summary>
/// 修改能源局與台電資訊
/// </summary>
/// <param name="entity"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdateBoETPCInfo(UpdateBoETPCInfo entity, List<string> properties);
/// <summary>
/// 取得 土地房屋資訊
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<LandBuilding> GetOneLandBuildingInfo(int id);
/// <summary>
/// 新增 土地房屋資訊
/// </summary>
/// <param name="entity"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task<int> AddOneLandBuildingInfo(LandBuilding entity, List<string> properties);
/// <summary>
/// 更新 土地房屋資訊
/// </summary>
/// <param name="entity"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdateLandBuildingInfo(UpdateLandBuilding entity, List<string> properties);
/// <summary>
/// 軟刪除土地房屋資訊
/// </summary>
/// <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
/// </summary>
/// <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>
/// 裝置類型下拉式選單
/// </summary>
/// <returns></returns>
Task<List<UserSelectItemList>> DeviceType();
/// <summary>
/// 新增 裝置
/// </summary>
/// <param name=""></param>
/// <returns></returns>
Task AddDevice(Device DeviceInfo, List<string> properties);
/// <summary>
/// 修改 裝置
/// </summary>
/// <param name="DeviceInfo"></param>
/// <param name="properties"></param>
/// <returns></returns>
Task UpdateDevice(Device DeviceInfo, List<string> properties);
/// <summary>
/// 設備datatable
/// </summary>
/// <param name="stationId"></param>
/// <returns></returns>
Task<List<DeviceTable>> DeviceTable(int stationId);
/// <summary>
/// 異常datatable
/// </summary>
/// <param name="stationId"></param>
/// <returns></returns>
Task<List<ExceptionTable>> ExceptionTable(int stationId);
/// <summary>
/// 取單一筆DeviceInfo
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<DeviceInfo> OneDeviceInfo(int id);
/// <summary>
/// 新增 異常設定
/// </summary>
/// <param name="Exception"></param>
/// <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);
/// <summary>
/// 取最後一個設備流水號
/// </summary>
/// <param name="PowerStationId"></param>
/// <param name="Type"></param>
/// <returns></returns>
Task<string> GetFinalSerialNumber(int PowerStationId, string Type);
}
}