Merge branch 'master' of https://github.com/shanghohui-Company/SolarPower
This commit is contained in:
commit
0325c7197e
@ -151,6 +151,7 @@ namespace SolarPower.Controllers
|
|||||||
analysisDevice.MultipleYaxes = new Dictionary<string, string>()
|
analysisDevice.MultipleYaxes = new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
{ "KWH", "發電量"},
|
{ "KWH", "發電量"},
|
||||||
|
{ "IrrDay", "累計日照度"},
|
||||||
{ "Irradiance", "日照度"},
|
{ "Irradiance", "日照度"},
|
||||||
{ "KWHKWP", "發電小時"},
|
{ "KWHKWP", "發電小時"},
|
||||||
{ "PR", "PR %"},
|
{ "PR", "PR %"},
|
||||||
@ -551,6 +552,10 @@ namespace SolarPower.Controllers
|
|||||||
var YaxesKey = "";
|
var YaxesKey = "";
|
||||||
switch (device.Type)
|
switch (device.Type)
|
||||||
{
|
{
|
||||||
|
case "TPY": //日照計
|
||||||
|
suffix = analysisDevice.MultipleYaxes["IrrDay"];
|
||||||
|
YaxesKey = "IrrDay";
|
||||||
|
break;
|
||||||
case "PYR": //日照計
|
case "PYR": //日照計
|
||||||
suffix = analysisDevice.MultipleYaxes["Irradiance"];
|
suffix = analysisDevice.MultipleYaxes["Irradiance"];
|
||||||
YaxesKey = "Irradiance";
|
YaxesKey = "Irradiance";
|
||||||
|
|||||||
@ -543,79 +543,79 @@ namespace SolarPower.Repository.Implement
|
|||||||
|
|
||||||
-- 傾印 資料表 power_station 結構
|
-- 傾印 資料表 power_station 結構
|
||||||
CREATE TABLE IF NOT EXISTS `power_station` (
|
CREATE TABLE IF NOT EXISTS `power_station` (
|
||||||
`Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
`Id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`Deleted` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否刪除, 0:否 1:是',
|
`Deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除, 0:否 1:是',
|
||||||
`CompanyId` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '公司編號',
|
`CompanyId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '公司編號',
|
||||||
`CityId` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '電站縣市',
|
`CityId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '電站縣市',
|
||||||
`AreaId` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '電站區域',
|
`AreaId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '電站區域',
|
||||||
`Status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否啟用, 0:否 1:是',
|
`Status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否啟用, 0:否 1:是',
|
||||||
`HealthStatus` TINYINT(4) UNSIGNED NOT NULL DEFAULT '1' COMMENT '1:設備正常 2:設備斷線 3:設備異常',
|
`HealthStatus` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '1:設備正常 2:設備斷線 3:設備異常',
|
||||||
`Address` VARCHAR(100) NULL DEFAULT NULL COMMENT '電站詳細地址' COLLATE 'utf8mb4_unicode_ci',
|
`Address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站詳細地址',
|
||||||
`Name` VARCHAR(50) NULL DEFAULT NULL COMMENT '名稱' COLLATE 'utf8mb4_unicode_ci',
|
`Name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名稱',
|
||||||
`MainDisplay` VARCHAR(50) NULL DEFAULT NULL COMMENT '主要顯示圖片' COLLATE 'utf8mb4_unicode_ci',
|
`MainDisplay` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '主要顯示圖片',
|
||||||
`Code` VARCHAR(50) NULL DEFAULT NULL COMMENT '電站代碼,縣市+區域+四碼流水號' COLLATE 'utf8mb4_unicode_ci',
|
`Code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站代碼,縣市+區域+四碼流水號',
|
||||||
`SerialNumber` VARCHAR(4) NULL DEFAULT NULL COMMENT '四碼流水號' COLLATE 'utf8mb4_unicode_ci',
|
`SerialNumber` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '四碼流水號',
|
||||||
`IsEscrow` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否為代管,0:否 1:是',
|
`IsEscrow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否為代管,0:否 1:是',
|
||||||
`EscrowName` VARCHAR(50) NULL DEFAULT NULL COMMENT '代管名稱' COLLATE 'utf8mb4_unicode_ci',
|
`EscrowName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '代管名稱',
|
||||||
`ElectricityMeterAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電掛錶日',
|
`ElectricityMeterAt` timestamp NULL DEFAULT NULL COMMENT '台電掛錶日',
|
||||||
`EstimatedRecoveryTime` VARCHAR(10) NULL DEFAULT NULL COMMENT '預估回收時間' COLLATE 'utf8mb4_unicode_ci',
|
`EstimatedRecoveryTime` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '預估回收時間',
|
||||||
`GeneratingCapacity` DECIMAL(10,4) NOT NULL DEFAULT '0.0000' COMMENT '電廠發電容量,單位(千瓦)',
|
`GeneratingCapacity` decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '電廠發電容量,單位(千瓦)',
|
||||||
`PowerRate` DECIMAL(10,4) NOT NULL DEFAULT '0.0000' COMMENT '受電費率',
|
`PowerRate` decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '受電費率',
|
||||||
`Coordinate` VARCHAR(50) NULL DEFAULT NULL COMMENT '座標' COLLATE 'utf8mb4_unicode_ci',
|
`Coordinate` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '座標',
|
||||||
`InverterBrand` VARCHAR(50) NULL DEFAULT NULL COMMENT '逆變器廠牌' COLLATE 'utf8mb4_unicode_ci',
|
`InverterBrand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器廠牌',
|
||||||
`InverterProductModel` VARCHAR(50) NULL DEFAULT NULL COMMENT '逆變器型號' COLLATE 'utf8mb4_unicode_ci',
|
`InverterProductModel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器型號',
|
||||||
`InverterAmount` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '逆變器數量',
|
`InverterAmount` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '逆變器數量',
|
||||||
`PhotovoltaicPanelBrand` VARCHAR(50) NULL DEFAULT NULL COMMENT '光電板廠牌' COLLATE 'utf8mb4_unicode_ci',
|
`PhotovoltaicPanelBrand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板廠牌',
|
||||||
`PhotovoltaicPanelProductModel` VARCHAR(50) NULL DEFAULT NULL COMMENT '光電板型號' COLLATE 'utf8mb4_unicode_ci',
|
`PhotovoltaicPanelProductModel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板型號',
|
||||||
`PhotovoltaicPanelSpecification` VARCHAR(100) NULL DEFAULT NULL COMMENT '光電板規格' COLLATE 'utf8mb4_unicode_ci',
|
`PhotovoltaicPanelSpecification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板規格',
|
||||||
`PhotovoltaicPanelAmount` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '光電板數量',
|
`PhotovoltaicPanelAmount` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '光電板數量',
|
||||||
`BoEFileName` VARCHAR(255) NULL DEFAULT NULL COMMENT '能源局原檔案名' COLLATE 'utf8mb4_unicode_ci',
|
`BoEFileName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局原檔案名',
|
||||||
`BoEFile` VARCHAR(255) NULL DEFAULT NULL COMMENT '能源局檔案' COLLATE 'utf8mb4_unicode_ci',
|
`BoEFile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局檔案',
|
||||||
`BoEDiscountRate` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '能源局折扣率',
|
`BoEDiscountRate` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '能源局折扣率',
|
||||||
`BoEDeviceRegisterNumber` VARCHAR(50) NULL DEFAULT NULL COMMENT '能源局設備登記編號' COLLATE 'utf8mb4_unicode_ci',
|
`BoEDeviceRegisterNumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局設備登記編號',
|
||||||
`BoERentRatio` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '能源局租金比率,單位(%)',
|
`BoERentRatio` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '能源局租金比率,單位(%)',
|
||||||
`BoERegisterPostAt` TIMESTAMP NULL DEFAULT NULL COMMENT '能源局登記發文日期',
|
`BoERegisterPostAt` timestamp NULL DEFAULT NULL COMMENT '能源局登記發文日期',
|
||||||
`GUINumber` VARCHAR(16) NULL DEFAULT NULL COMMENT '統一編號' COLLATE 'utf8mb4_unicode_ci',
|
`GUINumber` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '統一編號',
|
||||||
`TPCContractNumber` VARCHAR(50) NULL DEFAULT NULL COMMENT '台電契約編號' COLLATE 'utf8mb4_unicode_ci',
|
`TPCContractNumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電契約編號',
|
||||||
`TPCInvoiceBuyer` VARCHAR(100) NULL DEFAULT NULL COMMENT '台電發票買受人' COLLATE 'utf8mb4_unicode_ci',
|
`TPCInvoiceBuyer` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電發票買受人',
|
||||||
`TPCInvoiceAddress` VARCHAR(100) NULL DEFAULT NULL COMMENT '台電發票地址' COLLATE 'utf8mb4_unicode_ci',
|
`TPCInvoiceAddress` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電發票地址',
|
||||||
`TPCContractAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電簽約日期',
|
`TPCContractAt` timestamp NULL DEFAULT NULL COMMENT '台電簽約日期',
|
||||||
`TPCSellDeadline` INT(10) UNSIGNED NULL DEFAULT '0' COMMENT '台電售電期限,單位(年)',
|
`TPCSellDeadline` int(10) unsigned DEFAULT '0' COMMENT '台電售電期限,單位(年)',
|
||||||
`TPCMeterReading` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '台電每期抄錶日',
|
`TPCMeterReading` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '台電每期抄錶日',
|
||||||
`TPCPurchaseElectricityAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電正式購電日',
|
`TPCPurchaseElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式購電日',
|
||||||
`TPCSellElectricityAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電正式售電日',
|
`TPCSellElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式售電日',
|
||||||
`TPCMeterNumber` VARCHAR(50) NULL DEFAULT NULL COMMENT '台電電號' COLLATE 'utf8mb4_unicode_ci',
|
`TPCMeterNumber` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電電號',
|
||||||
`SolarType` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '電站類型',
|
`SolarType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '電站類型',
|
||||||
`kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000',
|
`kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000',
|
||||||
`Today_kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000' COMMENT '今日發電量',
|
`Today_kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '今日發電量',
|
||||||
`Total_kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000' COMMENT '總發電量',
|
`Total_kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '總發電量',
|
||||||
`today_kwhkwp` DECIMAL(10,3) NULL DEFAULT NULL COMMENT '今日kwhkwp',
|
`today_kwhkwp` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '今日kwhkwp',
|
||||||
`avg_kwhkwp` DECIMAL(10,3) NULL DEFAULT NULL COMMENT '30天平均kwhkwp',
|
`avg_kwhkwp` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '30天平均kwhkwp',
|
||||||
`today_money` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '今日金額',
|
`today_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '今日金額',
|
||||||
`total_money` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '總金額',
|
`total_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '總金額',
|
||||||
`today_PR` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '電站Pr值',
|
`today_PR` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '電站Pr值',
|
||||||
`avg_PR` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '平均Pr值',
|
`avg_PR` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '平均Pr值',
|
||||||
`today_carbon` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '今日減碳量',
|
`today_carbon` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '今日減碳量',
|
||||||
`total_carbon` DECIMAL(10,2) NOT NULL COMMENT '總減碳量',
|
`total_carbon` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '總減碳量',
|
||||||
`today_irradiance` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '今日日照度',
|
`today_irradiance` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '今日日照度',
|
||||||
`avg_irradiance` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '平均日照度',
|
`avg_irradiance` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '平均日照度',
|
||||||
`SolarHour` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '總運轉小時',
|
`SolarHour` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '總運轉小時',
|
||||||
`SiteDB` VARCHAR(20) NULL DEFAULT NULL COMMENT '電站 DB name: solar_com' COLLATE 'utf8mb4_unicode_ci',
|
`SiteDB` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站 DB name: solar_com',
|
||||||
`TodayWeather` VARCHAR(20) NULL DEFAULT NULL COMMENT '今日天氣' COLLATE 'utf8mb4_unicode_ci',
|
`TodayWeather` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '今日天氣',
|
||||||
`TodayWeatherTemp` DECIMAL(5,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '今日溫度',
|
`TodayWeatherTemp` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日溫度',
|
||||||
`WeathersStationId` VARCHAR(50) NULL DEFAULT NULL COMMENT '氣象站編號' COLLATE 'utf8mb4_unicode_ci',
|
`WeathersStationId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '氣象站編號',
|
||||||
`RateOfRain` VARCHAR(50) NULL DEFAULT NULL COMMENT '今日降雨率' COLLATE 'utf8mb4_unicode_ci',
|
`RateOfRain` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '今日降雨率',
|
||||||
`line_token` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
|
`line_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
`Estimate_kwh` DECIMAL(10,2) NULL DEFAULT '0.00' COMMENT '預估發電度數',
|
`Estimate_kwh` decimal(10,2) DEFAULT '0.00' COMMENT '預估發電度數',
|
||||||
`EstimateEfficacy` DECIMAL(10,2) NULL DEFAULT '0.00' COMMENT '預估發電效能',
|
`EstimateEfficacy` decimal(10,2) DEFAULT '0.00' COMMENT '預估發電效能',
|
||||||
`CreatedBy` INT(10) UNSIGNED NOT NULL COMMENT '建立者',
|
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
||||||
`CreatedAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
|
`CreatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
|
||||||
`UpdatedBy` INT(10) UNSIGNED NULL DEFAULT NULL COMMENT '修改者',
|
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
||||||
`UpdatedAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間',
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間',
|
||||||
PRIMARY KEY (`Id`) USING BTREE,
|
PRIMARY KEY (`Id`),
|
||||||
KEY `IDX_01` (`Deleted`) USING BTREE,
|
KEY `IDX_01` (`Deleted`),
|
||||||
KEY `IDX_02` (`CompanyId`) USING BTREE,
|
KEY `IDX_02` (`CompanyId`),
|
||||||
KEY `IDX_03` (`CityId`,`AreaId`) USING BTREE
|
KEY `IDX_03` (`CityId`,`AreaId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站資料';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='電站資料';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user