272 lines
10 KiB
C#
272 lines
10 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SolarPower.Models.PowerStation
|
|
{
|
|
public class PowerStation : Created
|
|
{
|
|
private string electricityMeterAt = "", tpcContractAt = "", tpcPurchaseElectricityAt = "", tpcSellElectricityAt = "";
|
|
|
|
public int Id { get; set; }
|
|
public int CompanyId { get; set; }
|
|
public int CityId { get; set; } //縣市
|
|
public int AreaId { get; set; } //地區
|
|
public string Address { get; set; } //地址
|
|
public string Name { get; set; } //名稱
|
|
public string Code { get; set; } //電站代碼
|
|
public string SerialNumber { get; set; } //四碼流水號
|
|
public byte IsEscrow { get; set; } //是否被代管
|
|
public string EscrowName { get; set; } //被代管公司
|
|
public string ElectricityMeterAt //台電掛錶日
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(electricityMeterAt))
|
|
{
|
|
return Convert.ToDateTime(electricityMeterAt).ToString("yyyy-MM-dd");
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
set { electricityMeterAt = value; }
|
|
}
|
|
public int EstimatedRecoveryTime { get; set; } //預計回收年限
|
|
public double GeneratingCapacity { get; set; } //發電容量
|
|
public double PowerRate { get; set; } //授電費率
|
|
public string Coordinate { get; set; } //座標
|
|
public string InverterBrand { get; set; } //逆變器廠牌
|
|
public string InverterProductModel { get; set; } //逆變器型號
|
|
public int InverterAmount { get; set; } //逆變器數量
|
|
public string PhotovoltaicPanelBrand { get; set; } //光電板廠牌
|
|
public string PhotovoltaicPanelProductModel { get; set; } //光電板型號
|
|
public string PhotovoltaicPanelSpecification { get; set; } //光電板規格
|
|
public int PhotovoltaicPanelAmount { get; set; } //光電板規格
|
|
public string BoEFileName { get; set; } //能源局原檔案名
|
|
public string BoEFile { get; set; } //能源局檔案
|
|
public int BoEDiscountRate { get; set; } //能源局折扣率
|
|
public string BoEDeviceRegisterNumber { get; set; } //能源局設備登記編號
|
|
public int BoERentRatio { get; set; } //能源局租金比例
|
|
public string TPCContractNumber { get; set; } //台電契約編號
|
|
public string TPCContractAt //台電簽約日期
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(tpcContractAt))
|
|
{
|
|
return Convert.ToDateTime(tpcContractAt).ToString("yyyy-MM-dd");
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
set { tpcContractAt = value; }
|
|
}
|
|
public int TPCSellDeadline { get; set; } //台電售電期限(年)
|
|
public int TPCMeterReading { get; set; } //台電每期抄錶日
|
|
public string TPCPurchaseElectricityAt //台電正式購電日
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(tpcPurchaseElectricityAt))
|
|
{
|
|
return Convert.ToDateTime(tpcPurchaseElectricityAt).ToString("yyyy-MM-dd");
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
set { tpcPurchaseElectricityAt = value; }
|
|
}
|
|
public string TPCSellElectricityAt //台電正式售電日
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(tpcPurchaseElectricityAt))
|
|
{
|
|
return Convert.ToDateTime(tpcPurchaseElectricityAt).ToString("yyyy-MM-dd");
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
set { tpcPurchaseElectricityAt = value; }
|
|
}
|
|
public List<LandBuilding> LandBuildings { get; set; } //土地房屋資料
|
|
public string CreatorName { get; set; } //創建者名稱
|
|
}
|
|
|
|
public class LandBuilding : Created
|
|
{
|
|
private string leaseNotarizationAt;
|
|
|
|
public int Id { get; set; }
|
|
public int PowerStationId { get; set; }
|
|
public string Address { get; set; }
|
|
public string LeaseNotarizationAt //租約公證日期
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(leaseNotarizationAt))
|
|
{
|
|
return Convert.ToDateTime(leaseNotarizationAt).ToString("yyyy-MM-dd");
|
|
}
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
set { leaseNotarizationAt = value; }
|
|
}
|
|
public string Landowner { get; set; } //地主姓名
|
|
public string Purpose { get; set; } //房屋用途
|
|
public int LeaseRate { get; set; } //租金比例
|
|
public string Coordinate { get; set; } //經緯度
|
|
public string Phone { get; set; } //電話
|
|
public string CreatorName { get; set; } //創建者名稱
|
|
|
|
}
|
|
|
|
public class PostPowerStationInfo
|
|
{
|
|
public int Id { get; set; }
|
|
public int CityId { get; set; } //縣市
|
|
public int AreaId { get; set; } //地區
|
|
public string Address { get; set; } //地址
|
|
public string Name { get; set; } //名稱
|
|
//public string Code { get; set; }
|
|
public byte IsEscrow { get; set; } //是否被代管
|
|
public string EscrowName { get; set; } //被代管公司
|
|
public string ElectricityMeterAt { get; set; } //台電掛錶日
|
|
public int EstimatedRecoveryTime { get; set; } //預計回收年限
|
|
public double GeneratingCapacity { get; set; } //發電容量
|
|
public double PowerRate { get; set; } //授電費率
|
|
public string Coordinate { get; set; } //座標
|
|
public string InverterBrand { get; set; } //逆變器廠牌
|
|
public string InverterProductModel { get; set; } //逆變器型號
|
|
public int InverterAmount { get; set; } //逆變器數量
|
|
public string PhotovoltaicPanelBrand { get; set; } //光電板廠牌
|
|
public string PhotovoltaicPanelProductModel { get; set; } //光電板型號
|
|
public string PhotovoltaicPanelSpecification { get; set; } //光電板規格
|
|
public int PhotovoltaicPanelAmount { get; set; } //光電板規格
|
|
}
|
|
|
|
public class UpdatePowerStationInfo : Updated
|
|
{
|
|
public int CityId { get; set; } //縣市
|
|
public int AreaId { get; set; } //地區
|
|
public string Address { get; set; } //地址
|
|
public string Name { get; set; } //名稱
|
|
public byte IsEscrow { get; set; } //是否被代管
|
|
public string EscrowName { get; set; } //被代管公司
|
|
public string ElectricityMeterAt { get; set; } //台電掛錶日
|
|
public int EstimatedRecoveryTime { get; set; } //預計回收年限
|
|
public double GeneratingCapacity { get; set; } //發電容量
|
|
public double PowerRate { get; set; } //授電費率
|
|
public string Coordinate { get; set; } //座標
|
|
public string InverterBrand { get; set; } //逆變器廠牌
|
|
public string InverterProductModel { get; set; } //逆變器型號
|
|
public int InverterAmount { get; set; } //逆變器數量
|
|
public string PhotovoltaicPanelBrand { get; set; } //光電板廠牌
|
|
public string PhotovoltaicPanelProductModel { get; set; } //光電板型號
|
|
public string PhotovoltaicPanelSpecification { get; set; } //光電板規格
|
|
public int PhotovoltaicPanelAmount { get; set; } //光電板規格
|
|
}
|
|
|
|
public class PostBoETPCInfo
|
|
{
|
|
public int Id { get; set; }
|
|
public IFormFile BoEFile { get; set; }
|
|
public int BoEDiscountRate { get; set; }
|
|
public string BoEDeviceRegisterNumber { get; set; }
|
|
public int BoERentRatio { get; set; }
|
|
public string TPCContractNumber { get; set; }
|
|
public string TPCContractAt { get; set; }
|
|
public int TPCSellDeadline { get; set; }
|
|
public int TPCMeterReading { get; set; }
|
|
public string TPCPurchaseElectricityAt { get; set; }
|
|
public string TPCSellElectricityAt { get; set; }
|
|
}
|
|
|
|
public class UpdateBoETPCInfo : Updated
|
|
{
|
|
public string BoEFileName { get; set; }
|
|
public string BoEFile { get; set; }
|
|
public int BoEDiscountRate { get; set; }
|
|
public string BoEDeviceRegisterNumber { get; set; }
|
|
public int BoERentRatio { get; set; }
|
|
public string TPCContractNumber { get; set; }
|
|
public string TPCContractAt { get; set; }
|
|
public int TPCSellDeadline { get; set; }
|
|
public int TPCMeterReading { get; set; }
|
|
public string TPCPurchaseElectricityAt { get; set; }
|
|
public string TPCSellElectricityAt { get; set; }
|
|
}
|
|
|
|
public class PostLandBuildingInfo
|
|
{
|
|
public int Id { get; set; }
|
|
public int PowerStationId { get; set; }
|
|
public string Address { get; set; }
|
|
public string LeaseNotarizationAt { get; set; }
|
|
public string Landowner { get; set; }
|
|
public string Purpose { get; set; }
|
|
public int LeaseRate { get; set; }
|
|
public string Coordinate { get; set; }
|
|
public string Phone { get; set; }
|
|
}
|
|
|
|
public class UpdateLandBuilding : Updated
|
|
{
|
|
public string Address { get; set; }
|
|
public string LeaseNotarizationAt { get; set; }
|
|
public string Landowner { get; set; }
|
|
public string Purpose { get; set; }
|
|
public int LeaseRate { get; set; }
|
|
public string Coordinate { get; set; }
|
|
public string Phone { get; set; }
|
|
}
|
|
|
|
public class CitySelectItemList
|
|
{
|
|
public string Text { get; set; }
|
|
public string Value { get; set; }
|
|
}
|
|
|
|
public class AreaSelectItemList
|
|
{
|
|
public string Text { get; set; }
|
|
public string Value { get; set; }
|
|
}
|
|
|
|
public class Zipcode
|
|
{
|
|
public string City { get; set; }
|
|
public string Area { get; set; }
|
|
}
|
|
|
|
public class City
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; }
|
|
public string ZipCode { get; set; }
|
|
public int Priority { get; set; }
|
|
}
|
|
|
|
public class Area
|
|
{
|
|
public int Id { get; set; }
|
|
public int CityId { get; set; }
|
|
public string Name { get; set; }
|
|
public string ZipCode { get; set; }
|
|
}
|
|
|
|
}
|