1. bug fix
2. 背景執行 時間設定 拉出至config
This commit is contained in:
parent
88f6857de4
commit
830937f967
@ -33,6 +33,7 @@ namespace SolarPower.Controllers
|
|||||||
private IUserRepository userRepository => HttpContext?.RequestServices.GetService<IUserRepository>();
|
private IUserRepository userRepository => HttpContext?.RequestServices.GetService<IUserRepository>();
|
||||||
private ICompanyRepository companyRepository => HttpContext?.RequestServices.GetService<ICompanyRepository>();
|
private ICompanyRepository companyRepository => HttpContext?.RequestServices.GetService<ICompanyRepository>();
|
||||||
private IRoleRepository roleRepository => HttpContext?.RequestServices.GetService<IRoleRepository>();
|
private IRoleRepository roleRepository => HttpContext?.RequestServices.GetService<IRoleRepository>();
|
||||||
|
private IPowerStationRepository powerStationRepository => HttpContext?.RequestServices.GetService<IPowerStationRepository>();
|
||||||
private IOperatorLogRepository operatorLogRepository => HttpContext?.RequestServices.GetService<IOperatorLogRepository>();
|
private IOperatorLogRepository operatorLogRepository => HttpContext?.RequestServices.GetService<IOperatorLogRepository>();
|
||||||
|
|
||||||
protected MyUser myUser = null;
|
protected MyUser myUser = null;
|
||||||
@ -83,9 +84,23 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewBag.auths = auth_arr;
|
if (myUser.Role.Layer != (int)RoleLayerEnum.PlatformAdmin && !auth_arr.Contains(controllerName))
|
||||||
|
{
|
||||||
|
filterContext.Result = new RedirectToRouteResult(
|
||||||
|
new RouteValueDictionary
|
||||||
|
{
|
||||||
|
{"controller", "Login"},
|
||||||
|
{"action", "Index"}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//取得當前使用者可以查看的電站
|
||||||
|
ViewBag.myPowerStationSummaries = powerStationRepository.GetMyPowerStationSummary(myUser);
|
||||||
|
|
||||||
|
ViewBag.auths = auth_arr;
|
||||||
|
|
||||||
ViewBag.myUser = myUser;
|
ViewBag.myUser = myUser;
|
||||||
|
|
||||||
#region 記錄人員操作記錄
|
#region 記錄人員操作記錄
|
||||||
|
|||||||
@ -50,14 +50,13 @@ namespace SolarPower.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<ApiResult<List<UserSelectItemList>>> GetUserSelectOptionListAsync()
|
public async Task<ApiResult<List<UserSelectItemList>>> GetUserSelectOptionListAsync(int powerStationId)
|
||||||
{
|
{
|
||||||
ApiResult<List<UserSelectItemList>> apiResult = new ApiResult<List<UserSelectItemList>>();
|
ApiResult<List<UserSelectItemList>> apiResult = new ApiResult<List<UserSelectItemList>>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
EDFunction edFunction = new EDFunction();
|
var powerStation = await powerStationRepository.GetOneAsync(powerStationId);
|
||||||
var companyId = Convert.ToInt32(edFunction.AESDecrypt(HttpContext.Session.GetString("CompanyId"))); //將公司id透過AES解密
|
var userSelectItemLists = await userRepository.GetUserSelectOptionListAsync(powerStation.CompanyId);
|
||||||
var userSelectItemLists = await userRepository.GetUserSelectOptionListAsync(companyId);
|
|
||||||
|
|
||||||
apiResult.Code = "0000";
|
apiResult.Code = "0000";
|
||||||
apiResult.Data = userSelectItemLists;
|
apiResult.Data = userSelectItemLists;
|
||||||
@ -119,7 +118,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 取得縣市選單
|
/// 取得地區選單
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@ -186,7 +185,7 @@ namespace SolarPower.Controllers
|
|||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
else if (powerStation.CompanyId != myUser.CompanyId)
|
else if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -364,7 +363,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -523,7 +522,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -636,7 +635,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1453,7 +1452,7 @@ namespace SolarPower.Controllers
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if(powerStation.CompanyId != myUser.CompanyId)
|
if(!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1506,7 +1505,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1611,7 +1610,7 @@ namespace SolarPower.Controllers
|
|||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1659,7 +1658,7 @@ namespace SolarPower.Controllers
|
|||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1749,7 +1748,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1802,7 +1801,7 @@ namespace SolarPower.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
@ -1899,7 +1898,7 @@ namespace SolarPower.Controllers
|
|||||||
{
|
{
|
||||||
powerStation = await powerStationRepository.GetOneAsync(post.PowerStationId);
|
powerStation = await powerStationRepository.GetOneAsync(post.PowerStationId);
|
||||||
|
|
||||||
if (powerStation.CompanyId != myUser.CompanyId)
|
if (!IsPlatformLayer(myUser.Role.Layer) && powerStation.CompanyId != myUser.CompanyId)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9993";
|
apiResult.Code = "9993";
|
||||||
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
apiResult.Msg = errorCode.GetString(apiResult.Code);
|
||||||
|
|||||||
@ -301,7 +301,7 @@ namespace SolarPower.Controllers
|
|||||||
|
|
||||||
#region 新增使用者
|
#region 新增使用者
|
||||||
//判斷帳號 是否已存在
|
//判斷帳號 是否已存在
|
||||||
var exist = userRepository.GetOneByAccountAsync(post.Account);
|
var exist = await userRepository.GetOneByAccountAsync(post.Account);
|
||||||
if(exist != null)
|
if(exist != null)
|
||||||
{
|
{
|
||||||
apiResult.Code = "9986";
|
apiResult.Code = "9986";
|
||||||
|
|||||||
@ -401,30 +401,43 @@ INSERT INTO `area` (`Id`, `CityId`, `Name`, `ZipCode`) VALUES
|
|||||||
(368, 21, '烏坵鄉', '06');
|
(368, 21, '烏坵鄉', '06');
|
||||||
/*!40000 ALTER TABLE `area` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `area` ENABLE KEYS */;
|
||||||
|
|
||||||
-- 傾印 資料表 solar_power.auth_page 結構
|
-- 傾印 資料表 auth_page 結構
|
||||||
CREATE TABLE IF NOT EXISTS `auth_page` (
|
CREATE TABLE IF NOT EXISTS `auth_page` (
|
||||||
`AuthCode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`AuthCode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||||
`MainName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大項名稱',
|
`MainName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '大項名稱',
|
||||||
`SubName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '功能名稱',
|
`SubName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '功能名稱',
|
||||||
`ControlName` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`TagName` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '細項功能名稱',
|
||||||
|
`ControlName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
PRIMARY KEY (`AuthCode`)
|
PRIMARY KEY (`AuthCode`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設定權限頁面';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設定權限頁面';
|
||||||
|
|
||||||
-- 正在傾印表格 solar_power.auth_page 的資料:~-1 rows (近似值)
|
-- 正在傾印表格 auth_page 的資料
|
||||||
DELETE FROM `auth_page`;
|
DELETE FROM `auth_page`;
|
||||||
/*!40000 ALTER TABLE `auth_page` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `auth_page` DISABLE KEYS */;
|
||||||
INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `ControlName`) VALUES
|
INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `TagName`, `ControlName`) VALUES
|
||||||
('A', '系統管理', '帳號管理', 'User,Role'),
|
('A', '總覽', '地圖總覽', NULL, 'MapOverview'),
|
||||||
('B', '系統管理', '公司管理', 'Company'),
|
('B', '總覽', '電站總覽', NULL, 'StationOverview'),
|
||||||
('C', '系統管理', '電站資料管理', 'AAA'),
|
('C', '總覽', '電站總覽', '即時資訊', 'StationOverview_UpToDate'),
|
||||||
('D', '系統管理', '定時任務設定', 'Setting'),
|
('D', '總覽', '電站總覽', '基本資料', 'StationOverview_Info'),
|
||||||
('E', '系統管理', '功能清單', 'ASDA'),
|
('E', '總覽', '電站總覽', '歷史資料', 'StationOverview_History'),
|
||||||
('F', '總覽', '地圖總覽', 'BBB'),
|
('F', '總覽', '電站總覽', '逆變器分析', 'StationOverview_Inverter'),
|
||||||
('G', '總攬', '電占總覽', 'CCC'),
|
('G', '總覽', '電站總覽', '異常記錄', 'StationOverview_Exception'),
|
||||||
('H', '總覽', '運為總覽', 'HHH'),
|
('H', '總覽', '電站總覽', '運維記錄', 'StationOverview_OperationRecord'),
|
||||||
('J', '即時告警', '即時告警', 'JJJ'),
|
('J', '總覽', '電站總覽', '顯示發電金額', 'ShowMoney'),
|
||||||
('K', '交叉分析', '逆變器', 'KKK'),
|
('K', '電站資訊', '電站管理', NULL, 'PowerStation'),
|
||||||
('L', '交叉分析', '電站運轉效率', 'LLL');
|
('L', '交叉分析', '合併電站', NULL, 'Setting'),
|
||||||
|
('M', '交叉分析', '電站交叉分析', NULL, 'ASDA'),
|
||||||
|
('N', '交叉分析', '逆變器交叉分析', NULL, 'BBB'),
|
||||||
|
('P', '報表查詢', '電站報表', NULL, 'CCC'),
|
||||||
|
('Q', '報表查詢', '電廠發電效能統計', NULL, 'HHH'),
|
||||||
|
('R', '報表查詢', '輸入台電售電紀錄', NULL, 'JJJ'),
|
||||||
|
('S', '報表查詢', '報告發送設定', NULL, 'JJJ'),
|
||||||
|
('T', '即時告警', '異常事件查詢', NULL, 'KKK'),
|
||||||
|
('U', '運維管理', '定期計畫建立', NULL, 'Operation'),
|
||||||
|
('V', '運維管理', '運維作業記錄', NULL, 'OperationRecord'),
|
||||||
|
('W', '系統管理', '公司管理', NULL, 'Company'),
|
||||||
|
('X', '系統管理', '帳號管理', NULL, 'User,Role'),
|
||||||
|
('Y', '系統管理', '定時任務設定', NULL, 'LLL');
|
||||||
/*!40000 ALTER TABLE `auth_page` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `auth_page` ENABLE KEYS */;
|
||||||
|
|
||||||
-- 傾印 資料表 solar_power.city 結構
|
-- 傾印 資料表 solar_power.city 結構
|
||||||
@ -1024,24 +1037,6 @@ COMMENT='各電站每月日照度的平均值'
|
|||||||
COLLATE='utf8mb4_unicode_ci'
|
COLLATE='utf8mb4_unicode_ci'
|
||||||
ENGINE=InnoDB
|
ENGINE=InnoDB
|
||||||
;
|
;
|
||||||
-- 子DB逆變器新增欄位 20210708
|
|
||||||
ALTER TABLE `inverter`
|
|
||||||
ADD COLUMN `Enabled` tinyint(4) DEFAULT '0' COMMENT '是否啟用,0:未啟用 1:啟用' AFTER `Deleted`,
|
|
||||||
ADD COLUMN `Status` tinyint(4) DEFAULT '0' COMMENT '狀態,0:未啟用 1:正常 2:異常' AFTER `Enabled`,
|
|
||||||
ADD COLUMN `InstallDate` timestamp NULL DEFAULT NULL COMMENT '安裝日期' AFTER `Status`,
|
|
||||||
ADD COLUMN `InverterName` varchar(50) DEFAULT NULL COMMENT '逆變器名稱' AFTER `SerialNumber`,
|
|
||||||
ADD COLUMN `Brand` varchar(50) DEFAULT NULL COMMENT '廠牌' AFTER `ControllerId`,
|
|
||||||
ADD COLUMN `Model` varchar(50) DEFAULT NULL COMMENT '型號' AFTER `Brand`,
|
|
||||||
ADD COLUMN `Capacity` double(10,3) DEFAULT NULL COMMENT '裝置容量 kWp' AFTER `Model`,
|
|
||||||
ADD COLUMN `Pyrheliometer` int(10) DEFAULT NULL COMMENT '日照計設備流水號'AFTER `Capacity`;
|
|
||||||
|
|
||||||
-- 子DB裝置列表新增欄位 20210708
|
|
||||||
ALTER TABLE `device`
|
|
||||||
ADD COLUMN `Enabled` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否啟用, 0:否 1:是' AFTER `PowerStationId`,
|
|
||||||
ADD COLUMN `Status` tinyint(4) DEFAULT '0' COMMENT '狀態,0:未啟用 1:正常 2:異常' AFTER `Enabled`,
|
|
||||||
ADD COLUMN `InstallDate` timestamp NULL DEFAULT NULL COMMENT '安裝日期' AFTER `ColName`,
|
|
||||||
DROP COLUMN `Remark`;
|
|
||||||
|
|
||||||
|
|
||||||
-- 各電站每天的逆變器歷史記錄 20210712
|
-- 各電站每天的逆變器歷史記錄 20210712
|
||||||
CREATE TABLE `inverter_history_day` (
|
CREATE TABLE `inverter_history_day` (
|
||||||
|
|||||||
@ -38,7 +38,6 @@ namespace SolarPower.Helper
|
|||||||
var passwordStr = ed.AESDecrypt(dbConfig.Password);
|
var passwordStr = ed.AESDecrypt(dbConfig.Password);
|
||||||
|
|
||||||
var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
|
var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
|
||||||
//var connStr = @"server=210.61.91.43;port=10068;database=solar_power_test;user=idafenweb;password=P@ssw0rd;charset=utf8;";
|
|
||||||
|
|
||||||
this._connectionString = connStr;
|
this._connectionString = connStr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ namespace SolarPower.Models.Company
|
|||||||
public string AuthCode { get; set; }
|
public string AuthCode { get; set; }
|
||||||
public string MainName { get; set; }
|
public string MainName { get; set; }
|
||||||
public string SubName { get; set; }
|
public string SubName { get; set; }
|
||||||
|
public string TagName { get; set; }
|
||||||
public string ControlName { get; set; }
|
public string ControlName { get; set; }
|
||||||
public byte CheckAuth { get; set; }
|
public byte CheckAuth { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,6 +74,27 @@ namespace SolarPower.Models
|
|||||||
public List<string> Auths { get; set; } //可操作頁面
|
public List<string> Auths { get; set; } //可操作頁面
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class MyPowerStationInfo
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int CityId { get; set; }
|
||||||
|
public string CityName { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MyPowerStationSummary
|
||||||
|
{
|
||||||
|
public string CityName { get; set; }
|
||||||
|
public int Amount { get; set; }
|
||||||
|
public List<MyPowerStation> MyPowerStations { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MyPowerStation
|
||||||
|
{
|
||||||
|
public int PowerStationId { get; set; }
|
||||||
|
public string PowerStationName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class Variable
|
public class Variable
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|||||||
@ -89,6 +89,7 @@ namespace SolarPower.Models.Role
|
|||||||
public string CompanyName { get; set; } //公司名稱
|
public string CompanyName { get; set; } //公司名稱
|
||||||
public string RoleName { get; set; } //角色名稱
|
public string RoleName { get; set; } //角色名稱
|
||||||
public string AuthPageSubName { get; set; } //權限功能名稱
|
public string AuthPageSubName { get; set; } //權限功能名稱
|
||||||
|
public string AuthPageTagName { get; set; } //權限功能細項名稱
|
||||||
public string CreatorName { get; set; } //建立者名稱
|
public string CreatorName { get; set; } //建立者名稱
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,6 +107,7 @@ namespace SolarPower.Models.Role
|
|||||||
public string AuthCode { get; set; }
|
public string AuthCode { get; set; }
|
||||||
public string MainName { get; set; }
|
public string MainName { get; set; }
|
||||||
public string SubName { get; set; }
|
public string SubName { get; set; }
|
||||||
|
public string TagName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PostRoleAuth
|
public class PostRoleAuth
|
||||||
|
|||||||
@ -58,8 +58,6 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
calcPowerStation.Id = powerStation.Id;
|
calcPowerStation.Id = powerStation.Id;
|
||||||
var dateNowDay = DateTimeNow.AddDays(-1).ToString("yyyy-MM-dd");
|
var dateNowDay = DateTimeNow.AddDays(-1).ToString("yyyy-MM-dd");
|
||||||
|
|
||||||
dateNowDay = "2021-07-08";
|
|
||||||
|
|
||||||
#region step2-1. 計算該電站的30天平均資料
|
#region step2-1. 計算該電站的30天平均資料
|
||||||
var table_name = String.Format("`{0}`.`{1}01_station`", powerStation.SiteDB, powerStation.Code);
|
var table_name = String.Format("`{0}`.`{1}01_station`", powerStation.SiteDB, powerStation.Code);
|
||||||
var history = await powerStationRepository.CalcAvgPowerStationHistory30day(dateNowDay, table_name);
|
var history = await powerStationRepository.CalcAvgPowerStationHistory30day(dateNowDay, table_name);
|
||||||
|
|||||||
@ -29,6 +29,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
{
|
{
|
||||||
#region step1. 找出所有電站
|
#region step1. 找出所有電站
|
||||||
var powerStations = await powerStationRepository.GetAllAsync();
|
var powerStations = await powerStationRepository.GetAllAsync();
|
||||||
|
|
||||||
|
string json = System.Text.Json.JsonSerializer.Serialize(powerStations);
|
||||||
|
logger.LogError("【{0}】{1}", "CalcPowerStationJob - step1", json);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
List<PowerStationHistory> powerStationHistoriesHour = new List<PowerStationHistory>();
|
List<PowerStationHistory> powerStationHistoriesHour = new List<PowerStationHistory>();
|
||||||
@ -54,12 +57,14 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
|
|
||||||
var dateTime = DateTimeNow.AddHours(-1).ToString("yyyy-MM-dd HH");
|
var dateTime = DateTimeNow.AddHours(-1).ToString("yyyy-MM-dd HH");
|
||||||
|
|
||||||
dateTime = "2021-07-08 12";
|
|
||||||
|
|
||||||
#region step2-1. 取得該電站的當前這小時的歷史資料
|
#region step2-1. 取得該電站的當前這小時的歷史資料
|
||||||
var table_name = String.Format("`{0}`.{1}01_station", powerStation.SiteDB, powerStation.Code);
|
var table_name = String.Format("`{0}`.{1}01_station", powerStation.SiteDB, powerStation.Code);
|
||||||
|
logger.LogError("【{0}】{1}", "CalcPowerStationJob - time & dataTable", dateTime + "======" + table_name);
|
||||||
|
|
||||||
var history = await powerStationRepository.GetPowerStationHistoryPerHour(dateTime, table_name);
|
var history = await powerStationRepository.GetPowerStationHistoryPerHour(dateTime, table_name);
|
||||||
|
json = System.Text.Json.JsonSerializer.Serialize(history);
|
||||||
|
logger.LogError("【{0}】{1}", "CalcPowerStationJob - history", json);
|
||||||
|
|
||||||
if (history != null)
|
if (history != null)
|
||||||
{
|
{
|
||||||
history.PowerStationId = powerStation.Id;
|
history.PowerStationId = powerStation.Id;
|
||||||
@ -208,6 +213,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
"SolarHour"
|
"SolarHour"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
json = System.Text.Json.JsonSerializer.Serialize(powerStationHistoriesHour);
|
||||||
|
logger.LogError("【{0}】{1}", "CalcPowerStationJob - step3", json);
|
||||||
|
|
||||||
await powerStationRepository.AddPowerStationHistory(powerStationHistoriesHour, history_properties);
|
await powerStationRepository.AddPowerStationHistory(powerStationHistoriesHour, history_properties);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@ -34,12 +34,12 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
var sql = $"SELECT Id AS Value, Name AS Text FROM {tableName} WHERE Deleted = 0";
|
var sql = $"SELECT Id AS Value, Name AS Text FROM {tableName} WHERE Deleted = 0";
|
||||||
|
|
||||||
if(companyId > 0)
|
if (companyId > 0)
|
||||||
{
|
{
|
||||||
sql += " AND Id = @SelectedCompanyId";
|
sql += " AND Id = @SelectedCompanyId";
|
||||||
}
|
}
|
||||||
|
|
||||||
result = (await conn.QueryAsync<CompanySelectItemList>(sql, new { SelectedCompanyId = companyId})).ToList();
|
result = (await conn.QueryAsync<CompanySelectItemList>(sql, new { SelectedCompanyId = companyId })).ToList();
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
@ -444,7 +444,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
`UpdatedBy` int(10) unsigned DEFAULT NULL,
|
`UpdatedBy` int(10) unsigned DEFAULT NULL,
|
||||||
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`Id`)
|
PRIMARY KEY (`Id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='控制器';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='控制器';
|
||||||
|
|
||||||
-- 傾印 資料表 device 結構
|
-- 傾印 資料表 device 結構
|
||||||
CREATE TABLE IF NOT EXISTS `device` (
|
CREATE TABLE IF NOT EXISTS `device` (
|
||||||
@ -494,7 +494,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
`UpdatedBy` int(10) DEFAULT NULL,
|
`UpdatedBy` int(10) DEFAULT NULL,
|
||||||
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`Id`)
|
PRIMARY KEY (`Id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='逆變器';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='逆變器';
|
||||||
|
|
||||||
-- 傾印 資料表 land_building 結構
|
-- 傾印 資料表 land_building 結構
|
||||||
CREATE TABLE IF NOT EXISTS `land_building` (
|
CREATE TABLE IF NOT EXISTS `land_building` (
|
||||||
@ -536,56 +536,64 @@ 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 '電站區域',
|
||||||
`Address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站詳細地址',
|
`HealthStatus` TINYINT(4) UNSIGNED NOT NULL DEFAULT '1' COMMENT '1:設備正常 2:設備斷線 3:設備異常',
|
||||||
`Name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名稱',
|
`Address` VARCHAR(100) NULL DEFAULT NULL COMMENT '電站詳細地址' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`MainDisplay` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '主要顯示圖片',
|
`Name` VARCHAR(50) NULL DEFAULT NULL COMMENT '名稱' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`Code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站代碼,縣市+區域+四碼流水號',
|
`MainDisplay` VARCHAR(50) NULL DEFAULT NULL COMMENT '主要顯示圖片' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`SerialNumber` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '四碼流水號',
|
`Code` VARCHAR(50) NULL DEFAULT NULL COMMENT '電站代碼,縣市+區域+四碼流水號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`IsEscrow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否為代管,0:否 1:是',
|
`SerialNumber` VARCHAR(4) NULL DEFAULT NULL COMMENT '四碼流水號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`EscrowName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '代管名稱',
|
`IsEscrow` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否為代管,0:否 1:是',
|
||||||
`ElectricityMeterAt` timestamp NULL DEFAULT NULL COMMENT '台電掛錶日',
|
`EscrowName` VARCHAR(50) NULL DEFAULT NULL COMMENT '代管名稱' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`EstimatedRecoveryTime` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '預估回收時間',
|
`ElectricityMeterAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電掛錶日',
|
||||||
`GeneratingCapacity` decimal(10,1) NOT NULL DEFAULT '0.0' COMMENT '電廠發電容量,單位(千瓦)',
|
`EstimatedRecoveryTime` VARCHAR(10) NULL DEFAULT NULL COMMENT '預估回收時間' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`PowerRate` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '受電費率',
|
`GeneratingCapacity` DECIMAL(10,1) NOT NULL DEFAULT '0.0' COMMENT '電廠發電容量,單位(千瓦)',
|
||||||
`Coordinate` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '座標',
|
`PowerRate` DECIMAL(10,3) NOT NULL DEFAULT '0.000' COMMENT '受電費率',
|
||||||
`InverterBrand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器廠牌',
|
`Coordinate` VARCHAR(50) NULL DEFAULT NULL COMMENT '座標' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`InverterProductModel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '逆變器型號',
|
`InverterBrand` VARCHAR(50) NULL DEFAULT NULL COMMENT '逆變器廠牌' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`InverterAmount` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '逆變器數量',
|
`InverterProductModel` VARCHAR(50) NULL DEFAULT NULL COMMENT '逆變器型號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`PhotovoltaicPanelBrand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板廠牌',
|
`InverterAmount` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '逆變器數量',
|
||||||
`PhotovoltaicPanelProductModel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板型號',
|
`PhotovoltaicPanelBrand` VARCHAR(50) NULL DEFAULT NULL COMMENT '光電板廠牌' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`PhotovoltaicPanelSpecification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '光電板規格',
|
`PhotovoltaicPanelProductModel` VARCHAR(50) NULL DEFAULT NULL COMMENT '光電板型號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`PhotovoltaicPanelAmount` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '光電板數量',
|
`PhotovoltaicPanelSpecification` VARCHAR(100) NULL DEFAULT NULL COMMENT '光電板規格' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`BoEFileName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局原檔案名',
|
`PhotovoltaicPanelAmount` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '光電板數量',
|
||||||
`BoEFile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局檔案',
|
`BoEFileName` VARCHAR(255) NULL DEFAULT NULL COMMENT '能源局原檔案名' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`BoEDiscountRate` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '能源局折扣率',
|
`BoEFile` VARCHAR(255) NULL DEFAULT NULL COMMENT '能源局檔案' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`BoEDeviceRegisterNumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '能源局設備登記編號',
|
`BoEDiscountRate` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '能源局折扣率',
|
||||||
`BoERentRatio` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '能源局租金比率,單位(%)',
|
`BoEDeviceRegisterNumber` VARCHAR(50) NULL DEFAULT NULL COMMENT '能源局設備登記編號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`TPCContractNumber` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '台電契約編號',
|
`BoERentRatio` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '能源局租金比率,單位(%)',
|
||||||
`TPCContractAt` timestamp NULL DEFAULT NULL COMMENT '台電簽約日期',
|
`TPCContractNumber` VARCHAR(50) NULL DEFAULT NULL COMMENT '台電契約編號' COLLATE 'utf8mb4_unicode_ci',
|
||||||
`TPCSellDeadline` int(10) unsigned DEFAULT '0' COMMENT '台電售電期限,單位(年)',
|
`TPCContractAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電簽約日期',
|
||||||
`TPCMeterReading` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '台電每期抄錶日',
|
`TPCSellDeadline` INT(10) UNSIGNED NULL DEFAULT '0' COMMENT '台電售電期限,單位(年)',
|
||||||
`TPCPurchaseElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式購電日',
|
`TPCMeterReading` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '台電每期抄錶日',
|
||||||
`TPCSellElectricityAt` timestamp NULL DEFAULT NULL COMMENT '台電正式售電日',
|
`TPCPurchaseElectricityAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電正式購電日',
|
||||||
`SolarType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '電站類型',
|
`TPCSellElectricityAt` TIMESTAMP NULL DEFAULT NULL COMMENT '台電正式售電日',
|
||||||
`kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000',
|
`SolarType` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '電站類型',
|
||||||
`Today_kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '今日發電量',
|
`kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000',
|
||||||
`Total_kwh` decimal(10,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '總發電量',
|
`Today_kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000' COMMENT '今日發電量',
|
||||||
`kwhkwp` decimal(10,3) unsigned NOT NULL DEFAULT '0.000',
|
`Total_kwh` DECIMAL(10,3) UNSIGNED NOT NULL DEFAULT '0.000' COMMENT '總發電量',
|
||||||
`PR` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '電站Pr值',
|
`today_kwhkwp` DECIMAL(10,3) NULL DEFAULT NULL COMMENT '今日kwhkwp',
|
||||||
`MP` decimal(5,2) unsigned NOT NULL DEFAULT '0.00',
|
`avg_kwhkwp` DECIMAL(10,3) NULL DEFAULT NULL COMMENT '30天平均kwhkwp',
|
||||||
`SolarHour` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '總運轉小時',
|
`today_monery` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '今日金額',
|
||||||
`SiteDB` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站 DB name: solar_com',
|
`total_monery` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '總金額',
|
||||||
`TodayWeather` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '今日天氣',
|
`today_PR` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '電站Pr值',
|
||||||
`TodayWeatherTemp` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日溫度',
|
`avg_PR` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '平均Pr值',
|
||||||
`CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者',
|
`today_carbon` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '今日減碳量',
|
||||||
`CreatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
|
`total_carbon` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '總減碳量',
|
||||||
`UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者',
|
`today_irradiance` DECIMAL(5,2) NULL DEFAULT NULL COMMENT '今日日照度',
|
||||||
`UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間',
|
`avg_irradiance` DECIMAL(5,2) NULL DEFAULT NULL 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',
|
||||||
|
`TodayWeather` VARCHAR(20) NULL DEFAULT NULL COMMENT '今日天氣' COLLATE 'utf8mb4_unicode_ci',
|
||||||
|
`TodayWeatherTemp` DECIMAL(5,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '今日溫度',
|
||||||
|
`CreatedBy` INT(10) UNSIGNED NOT NULL COMMENT '建立者',
|
||||||
|
`CreatedAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
|
||||||
|
`UpdatedBy` INT(10) UNSIGNED NULL DEFAULT NULL COMMENT '修改者',
|
||||||
|
`UpdatedAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間',
|
||||||
PRIMARY KEY (`Id`),
|
PRIMARY KEY (`Id`),
|
||||||
KEY `IDX_01` (`Deleted`),
|
KEY `IDX_01` (`Deleted`),
|
||||||
KEY `IDX_02` (`CompanyId`),
|
KEY `IDX_02` (`CompanyId`),
|
||||||
@ -644,7 +652,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
`CreatedBy` int(10) unsigned NOT NULL,
|
`CreatedBy` int(10) unsigned NOT NULL,
|
||||||
`CreatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
`CreatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`Id`)
|
PRIMARY KEY (`Id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='共享設備';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='共享設備';
|
||||||
";
|
";
|
||||||
|
|
||||||
await conn.ExecuteAsync(sql, trans);
|
await conn.ExecuteAsync(sql, trans);
|
||||||
|
|||||||
@ -22,6 +22,64 @@ namespace SolarPower.Repository.Implement
|
|||||||
tableName = "power_station";
|
tableName = "power_station";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<MyPowerStationSummary> GetMyPowerStationSummary(MyUser myUser)
|
||||||
|
{
|
||||||
|
List<MyPowerStationSummary> results = new List<MyPowerStationSummary>();
|
||||||
|
|
||||||
|
using (IDbConnection conn = this._databaseHelper.GetConnection())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var sql = @"SELECT ps.Id, ps.CityId, c.Name AS CityName, ps.Name
|
||||||
|
FROM power_station ps
|
||||||
|
LEFT JOIN city c ON ps.CityId = c.Id";
|
||||||
|
|
||||||
|
if(myUser.Role.Layer == 2)
|
||||||
|
{ //公司管理員
|
||||||
|
sql += @" WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId";
|
||||||
|
}
|
||||||
|
else if (myUser.Role.Layer == 3)
|
||||||
|
{
|
||||||
|
sql += @" LEFT JOIN power_station_operation_personnel ps.Id = op.PowerStationId
|
||||||
|
WHERE ps.Deleted = 0 AND op.Deleted = 0 AND op.UserId = @UserId ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sql += @" WHERE ps.Deleted = 0";
|
||||||
|
}
|
||||||
|
|
||||||
|
var myPowerStationInfos = conn.Query<MyPowerStationInfo>(sql, new { CompanyId = myUser.CompanyId, UserId = myUser.Id }).ToList();
|
||||||
|
|
||||||
|
var myPowerStationInfos_group = myPowerStationInfos.GroupBy(x => x.CityId);
|
||||||
|
|
||||||
|
foreach (var myPowerStationInfo in myPowerStationInfos_group)
|
||||||
|
{
|
||||||
|
MyPowerStationSummary myPowerStationSummary = new MyPowerStationSummary();
|
||||||
|
myPowerStationSummary.CityName = myPowerStationInfo.First().CityName;
|
||||||
|
myPowerStationSummary.Amount = myPowerStationInfo.Count();
|
||||||
|
myPowerStationSummary.MyPowerStations = new List<MyPowerStation>();
|
||||||
|
foreach (var info in myPowerStationInfo)
|
||||||
|
{
|
||||||
|
MyPowerStation myPowerStation = new MyPowerStation();
|
||||||
|
myPowerStation.PowerStationId = info.Id;
|
||||||
|
myPowerStation.PowerStationName = info.Name;
|
||||||
|
|
||||||
|
myPowerStationSummary.MyPowerStations.Add(myPowerStation);
|
||||||
|
}
|
||||||
|
|
||||||
|
results.Add(myPowerStationSummary);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查詢縣市列表
|
/// 查詢縣市列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -2186,12 +2244,12 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
var sql = $@"SELECT *
|
var sql = $@"SELECT *
|
||||||
FROM {db_name}.device d
|
FROM {db_name}.device d
|
||||||
WHERE d.PowerStationId = @PowerStationId AND d.`Type` = 'PYR' AND d.Deleted = 0
|
WHERE d.PowerStationId = @PowerStationId AND d.`Type` = 'PYR' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||||
UNION
|
UNION
|
||||||
SELECT d.*
|
SELECT d.*
|
||||||
FROM {db_name}.sharedevice sd
|
FROM {db_name}.sharedevice sd
|
||||||
LEFT JOIN {db_name}.device d ON sd.DeviceId = d.Id
|
LEFT JOIN {db_name}.device d ON sd.DeviceId = d.Id
|
||||||
WHERE sd.PowerStationId = @PowerStationId AND d.`Type` = 'PYR' AND d.Deleted = 0
|
WHERE sd.PowerStationId = @PowerStationId AND d.`Type` = 'PYR' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||||
";
|
";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<DeviceInfo>(sql, new { PowerStationId = powerStationId })).ToList();
|
result = (await conn.QueryAsync<DeviceInfo>(sql, new { PowerStationId = powerStationId })).ToList();
|
||||||
@ -2213,12 +2271,12 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
var sql = $@"SELECT *
|
var sql = $@"SELECT *
|
||||||
FROM {db_name}.device d
|
FROM {db_name}.device d
|
||||||
WHERE d.PowerStationId = @PowerStationId AND d.`Type` = 'MTR' AND d.Deleted = 0
|
WHERE d.PowerStationId = @PowerStationId AND d.`Type` = 'MTR' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||||
UNION
|
UNION
|
||||||
SELECT d.*
|
SELECT d.*
|
||||||
FROM {db_name}.sharedevice sd
|
FROM {db_name}.sharedevice sd
|
||||||
LEFT JOIN {db_name}.device d ON sd.DeviceId = d.Id
|
LEFT JOIN {db_name}.device d ON sd.DeviceId = d.Id
|
||||||
WHERE sd.PowerStationId = @PowerStationId AND d.`Type` = 'MTR' AND d.Deleted = 0
|
WHERE sd.PowerStationId = @PowerStationId AND d.`Type` = 'MTR' AND d.Deleted = 0 AND d.Enabled = 1 AND d.Status != 0
|
||||||
";
|
";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<DeviceInfo>(sql, new { PowerStationId = powerStationId })).ToList();
|
result = (await conn.QueryAsync<DeviceInfo>(sql, new { PowerStationId = powerStationId })).ToList();
|
||||||
@ -2259,7 +2317,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
sql_per_device.Add(str);
|
sql_per_device.Add(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
var sql = @$"SELECT a.TIMESTAMP, AVG(a.SENSOR) AS {typename} FROM(" + string.Join(" UNION ", sql_per_device) + @") a GROUP BY TIMESTAMP";
|
var sql = @$"SELECT a.TIMESTAMP, AVG(a.SENSOR) AS {typename} FROM(" + string.Join(" UNION ", sql_per_device) + @") a GROUP BY `TIMESTAMP`";
|
||||||
|
|
||||||
result = await conn.QueryFirstOrDefaultAsync<PyrheliometerHistory>(sql, new { DateTime = dateTime });
|
result = await conn.QueryFirstOrDefaultAsync<PyrheliometerHistory>(sql, new { DateTime = dateTime });
|
||||||
}
|
}
|
||||||
@ -2802,7 +2860,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
|
|
||||||
if (myUser.Role.Layer == (int)RoleLayerEnum.CompanyAdmin)
|
if (myUser.Role.Layer == (int)RoleLayerEnum.CompanyAdmin)
|
||||||
{
|
{
|
||||||
sql += @$"SELECT ps.Id FROM power_station ps WHERE ps.Deleted = 0 AND ComapnyId = @ComapnyId";
|
sql += @$"SELECT ps.Id FROM power_station ps WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId";
|
||||||
}
|
}
|
||||||
else if (myUser.Role.Layer == (int)RoleLayerEnum.CompanyUser)
|
else if (myUser.Role.Layer == (int)RoleLayerEnum.CompanyUser)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT Id AS Value, Name AS Text FROM {tableName} WHERE Deleted = 0 AND CompanyId = @CompanyId";
|
var sql = $"SELECT Id AS Value, Name AS Text FROM `{tableName}` WHERE Deleted = 0 AND CompanyId = @CompanyId";
|
||||||
|
|
||||||
result = (await conn.QueryAsync<RoleSelectItemList>(sql, new { CompanyId = companyId })).ToList();
|
result = (await conn.QueryAsync<RoleSelectItemList>(sql, new { CompanyId = companyId })).ToList();
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
conn.Open();
|
conn.Open();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0 AND Id = @Id";
|
var sql = $"SELECT * FROM `{tableName}` WHERE Deleted = 0 AND Id = @Id";
|
||||||
|
|
||||||
result = conn.QueryFirstOrDefault<MyRole>(sql, new { Id = id });
|
result = conn.QueryFirstOrDefault<MyRole>(sql, new { Id = id });
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
conn.Open();
|
conn.Open();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0 AND Id = @Id";
|
var sql = $"SELECT * FROM `{tableName}` WHERE Deleted = 0 AND Id = @Id";
|
||||||
|
|
||||||
result = await conn.QueryFirstOrDefaultAsync<Role>(sql, new { Id = id });
|
result = await conn.QueryFirstOrDefaultAsync<Role>(sql, new { Id = id });
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
r.*,
|
r.*,
|
||||||
c.Name AS CompanyName,
|
c.Name AS CompanyName,
|
||||||
u.Name AS CreatorName
|
u.Name AS CreatorName
|
||||||
FROM {tableName} r
|
FROM `{tableName}` r
|
||||||
LEFT JOIN company c ON r.CompanyId = c.Id
|
LEFT JOIN company c ON r.CompanyId = c.Id
|
||||||
LEFT JOIN user u ON r.CreatedBy = u.Id
|
LEFT JOIN user u ON r.CreatedBy = u.Id
|
||||||
WHERE r.Deleted = 0
|
WHERE r.Deleted = 0
|
||||||
@ -195,9 +195,10 @@ namespace SolarPower.Repository.Implement
|
|||||||
r.Name AS RoleName,
|
r.Name AS RoleName,
|
||||||
c.Name AS CompanyName,
|
c.Name AS CompanyName,
|
||||||
u.Name AS CreatorName,
|
u.Name AS CreatorName,
|
||||||
ap.SubName AS AuthPageSubName
|
ap.SubName AS AuthPageSubName,
|
||||||
|
ap.TagName AS AuthPageTagName
|
||||||
FROM role_auth ra
|
FROM role_auth ra
|
||||||
LEFT JOIN role r ON ra.Id = r.Id
|
LEFT JOIN `role` r ON ra.Id = r.Id
|
||||||
LEFT JOIN auth_page ap ON ra.AuthCode = ap.AuthCode
|
LEFT JOIN auth_page ap ON ra.AuthCode = ap.AuthCode
|
||||||
LEFT JOIN user u ON ra.CreatedBy = u.Id
|
LEFT JOIN user u ON ra.CreatedBy = u.Id
|
||||||
LEFT JOIN company c ON r.CompanyId = c.Id
|
LEFT JOIN company c ON r.CompanyId = c.Id
|
||||||
@ -257,10 +258,10 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = @$"SELECT ap2.AuthCode, ap2.MainName, ap2.SubName
|
var sql = @$"SELECT ap2.AuthCode, ap2.MainName, ap2.SubName, ap2.TagName
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT cap.CompanyId, cap.AuthCode, ap.MainName, ap.SubName, ap.ControlName
|
SELECT cap.CompanyId, cap.AuthCode, ap.MainName, ap.SubName, ap.TagName , ap.ControlName
|
||||||
FROM company_auth_page cap
|
FROM company_auth_page cap
|
||||||
LEFT JOIN auth_page ap ON cap.AuthCode = ap.AuthCode
|
LEFT JOIN auth_page ap ON cap.AuthCode = ap.AuthCode
|
||||||
WHERE cap.CompanyId = @CompanyId
|
WHERE cap.CompanyId = @CompanyId
|
||||||
|
|||||||
@ -30,7 +30,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE deleted = 0 AND status = @Status AND account = @Account";
|
var sql = $"SELECT * FROM `{tableName}` WHERE deleted = 0 AND status = @Status AND account = @Account";
|
||||||
|
|
||||||
result = await conn.QueryFirstOrDefaultAsync<User>(sql, new { Status = UserStatusEnum.Normal, Account = account });
|
result = await conn.QueryFirstOrDefaultAsync<User>(sql, new { Status = UserStatusEnum.Normal, Account = account });
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
conn.Open();
|
conn.Open();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE deleted = 0 AND status = @Status AND email = @Email";
|
var sql = $"SELECT * FROM `{tableName}` WHERE deleted = 0 AND status = @Status AND email = @Email";
|
||||||
|
|
||||||
result = await conn.QueryFirstOrDefaultAsync<User>(sql, new { Status = UserStatusEnum.Normal, Email = email });
|
result = await conn.QueryFirstOrDefaultAsync<User>(sql, new { Status = UserStatusEnum.Normal, Email = email });
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"UPDATE {tableName} SET password = @Password WHERE id = @Id";
|
var sql = $"UPDATE `{tableName}` SET password = @Password WHERE id = @Id";
|
||||||
|
|
||||||
await conn.ExecuteAsync(sql, new { Password = password, Id = id }, trans);
|
await conn.ExecuteAsync(sql, new { Password = password, Id = id }, trans);
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
conn.Open();
|
conn.Open();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT * FROM {tableName} WHERE deleted = 0 AND status = @Status AND account = @Account";
|
var sql = $"SELECT * FROM `{tableName}` WHERE deleted = 0 AND status = @Status AND account = @Account";
|
||||||
|
|
||||||
result = conn.QueryFirstOrDefault<MyUser>(sql, new { Status = UserStatusEnum.Normal, Account = account });
|
result = conn.QueryFirstOrDefault<MyUser>(sql, new { Status = UserStatusEnum.Normal, Account = account });
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
var sql = @$"SELECT
|
var sql = @$"SELECT
|
||||||
u.*,
|
u.*,
|
||||||
c.Name AS CompanyName
|
c.Name AS CompanyName
|
||||||
FROM {tableName} u
|
FROM `{tableName}` u
|
||||||
LEFT JOIN company c ON u.CompanyId = c.Id
|
LEFT JOIN company c ON u.CompanyId = c.Id
|
||||||
WHERE u.Deleted = 0 AND u.Id = @Id";
|
WHERE u.Deleted = 0 AND u.Id = @Id";
|
||||||
|
|
||||||
@ -254,9 +254,9 @@ namespace SolarPower.Repository.Implement
|
|||||||
c.Name AS CompanyName,
|
c.Name AS CompanyName,
|
||||||
r.Name AS RoleName,
|
r.Name AS RoleName,
|
||||||
opc.SPStationAmount
|
opc.SPStationAmount
|
||||||
FROM {tableName} u
|
FROM `{tableName}` u
|
||||||
LEFT JOIN company c ON u.CompanyId = c.Id
|
LEFT JOIN company c ON u.CompanyId = c.Id
|
||||||
LEFT JOIN role r ON u.RoleId = r.Id
|
LEFT JOIN `role` r ON u.RoleId = r.Id
|
||||||
LEFT JOIN (SELECT op.UserId, COUNT(*) AS SPStationAmount FROM power_station_operation_personnel op WHERE op.Deleted = 0 GROUP BY op.UserId) opc ON u.Id = opc.UserId
|
LEFT JOIN (SELECT op.UserId, COUNT(*) AS SPStationAmount FROM power_station_operation_personnel op WHERE op.Deleted = 0 GROUP BY op.UserId) opc ON u.Id = opc.UserId
|
||||||
WHERE u.Deleted = 0";
|
WHERE u.Deleted = 0";
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sql = $"SELECT Id AS Value, Name AS Text FROM {tableName} WHERE Deleted = 0";
|
var sql = $"SELECT Id AS Value, Name AS Text FROM `{tableName}` WHERE Deleted = 0";
|
||||||
if (companyId != 0)
|
if (companyId != 0)
|
||||||
{
|
{
|
||||||
sql += @" AND CompanyId=@companyId";
|
sql += @" AND CompanyId=@companyId";
|
||||||
|
|||||||
@ -11,6 +11,13 @@ namespace SolarPower.Repository.Interface
|
|||||||
public interface IPowerStationRepository : IRepositoryBase<PowerStation>
|
public interface IPowerStationRepository : IRepositoryBase<PowerStation>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 取得當前使用者可操作的電站
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="myUser"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
List<MyPowerStationSummary> GetMyPowerStationSummary(MyUser myUser);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查詢縣市列表
|
/// 查詢縣市列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -101,7 +101,7 @@ namespace SolarPower
|
|||||||
#region 計算電站發電量等資訊(每整點5分執行)
|
#region 計算電站發電量等資訊(每整點5分執行)
|
||||||
services.AddSingleton<CalcPowerStationJob>();
|
services.AddSingleton<CalcPowerStationJob>();
|
||||||
services.AddSingleton(
|
services.AddSingleton(
|
||||||
new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0 5 * * * ?")
|
new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcPowerStationJob"))
|
||||||
//new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?")
|
//new JobSchedule(jobType: typeof(CalcPowerStationJob), cronExpression: "0/10 * * * * ?")
|
||||||
);
|
);
|
||||||
#endregion
|
#endregion
|
||||||
@ -109,7 +109,7 @@ namespace SolarPower
|
|||||||
#region 計算電站日照量、PR、kWP 30日平均、(每天凌晨2點執行)
|
#region 計算電站日照量、PR、kWP 30日平均、(每天凌晨2點執行)
|
||||||
services.AddSingleton<CalcAvgPowerStationJob>();
|
services.AddSingleton<CalcAvgPowerStationJob>();
|
||||||
services.AddSingleton(
|
services.AddSingleton(
|
||||||
new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0 0 2 * * ?")
|
new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: Configuration.GetValue<string>("BackgroundServiceCron:CalcAvgPowerStationJob"))
|
||||||
//new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0/10 * * * * ?")
|
//new JobSchedule(jobType: typeof(CalcAvgPowerStationJob), cronExpression: "0/10 * * * * ?")
|
||||||
);
|
);
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -168,6 +168,7 @@
|
|||||||
@*<th>編號</th>*@
|
@*<th>編號</th>*@
|
||||||
<th>功能大項</th>
|
<th>功能大項</th>
|
||||||
<th>功能名稱</th>
|
<th>功能名稱</th>
|
||||||
|
<th>功能細項名稱</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -247,7 +248,7 @@
|
|||||||
'orderable': false,
|
'orderable': false,
|
||||||
'className': 'dt-body-center',
|
'className': 'dt-body-center',
|
||||||
'render': function (data, type, full, meta) {
|
'render': function (data, type, full, meta) {
|
||||||
return '<img src="' + data + '?v=' + Date.now() + '" class="img-fluid">';
|
return '<img src="' + data + '?v=' + Date.now() + '" width="200px" height="40px">';
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"language": {
|
"language": {
|
||||||
@ -318,6 +319,8 @@
|
|||||||
"data": "mainName"
|
"data": "mainName"
|
||||||
}, {
|
}, {
|
||||||
"data": "subName"
|
"data": "subName"
|
||||||
|
}, {
|
||||||
|
"data": "tagName"
|
||||||
}],
|
}],
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
'targets': 0,
|
'targets': 0,
|
||||||
|
|||||||
@ -16,51 +16,55 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
|
||||||
|
<div class="ml-auto">kwh</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>總發電量</p>
|
<p>總發電量</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwh">126,161.72</span> kWh</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_kwh">126,161.72</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>平均發電量</p>
|
<p>平均發電量</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwh">4,069.73</span> kWh</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_kwh">4,069.73</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
||||||
|
<div class="ml-auto">kw/m<sup>2</sup></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>即時平均日照度</p>
|
<p>即時平均日照度</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">126,161.72</span> kW/m<sup>2</sup></p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_irradiance">126,161.72</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>平均日照度(30天)</p>
|
<p>平均日照度(30天)</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_irradiance">4,069.73</span> kW/m<sup>2</sup></p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_irradiance">4,069.73</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
||||||
|
<div class="ml-auto">%</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>即時平均 PR 值</p>
|
<p>即時平均 PR 值</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">119.04</span> hr</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_PR">119.04</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>平均 PR 值(30天)</p>
|
<p>平均 PR 值(30天)</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_PR">3.84</span> hr</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="avg_PR">3.84</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> kWh / kWp</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> kWh / kWp</h4>
|
||||||
|
<div class="ml-auto">hr</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@ -76,15 +80,16 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-cow mr-1"></span> 減碳量</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-cow mr-1"></span> 減碳量</h4>
|
||||||
|
<div class="ml-auto">kG</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>今日減碳量</p>
|
<p>今日減碳量</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_carbon">6,091.78</span> KG</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="today_carbon">6,091.78</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>總減碳量</p>
|
<p>總減碳量</p>
|
||||||
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_carbon">985.98</span> KG</p>
|
<p><span class="color-info-700 fs-xl font-weight-bold" id="total_carbon">985.98</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -33,27 +33,27 @@
|
|||||||
<ul class="nav nav-tabs mb-5" role="tablist" id="tablist">
|
<ul class="nav nav-tabs mb-5" role="tablist" id="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-station-info" role="tab">
|
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-station-info" role="tab">
|
||||||
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">電站資料</span>
|
<i class="fal fa-server text-success"></i> <span class="hidden-sm-down ml-1">電站資料</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-device-setting" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-device-setting" role="tab">
|
||||||
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">裝置列表</span>
|
<i class="fal fa-list-alt text-success"></i> <span class="hidden-sm-down ml-1">裝置列表</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-operation-firm" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-operation-firm" role="tab">
|
||||||
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">維運廠商</span>
|
<i class="fal fa-hands-helping text-success"></i> <span class="hidden-sm-down ml-1">維運廠商</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-upload-image" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-upload-image" role="tab">
|
||||||
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">資料上傳</span>
|
<i class="fal fa-upload text-success"></i> <span class="hidden-sm-down ml-1">資料上傳</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-exception" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-exception" role="tab">
|
||||||
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">異常設定</span>
|
<i class="fal fa-sensor-alert text-success"></i> <span class="hidden-sm-down ml-1">異常設定</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -708,7 +708,10 @@
|
|||||||
|
|
||||||
//#region 預先載入運維人員下拉式選單select_option
|
//#region 預先載入運維人員下拉式選單select_option
|
||||||
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
||||||
$.get(url_user_select_option, function (rel) {
|
var send_data = {
|
||||||
|
powerStationId: stationId
|
||||||
|
}
|
||||||
|
$.get(url_user_select_option, send_data, function (rel) {
|
||||||
if (rel.code != "0000") {
|
if (rel.code != "0000") {
|
||||||
toast_error(rel.msg);
|
toast_error(rel.msg);
|
||||||
return;
|
return;
|
||||||
@ -745,8 +748,10 @@
|
|||||||
$.each(rel.data, function (index, val) {
|
$.each(rel.data, function (index, val) {
|
||||||
$("#ShareDevice_PowerStationId_modal").append($("<option />").val(val.value).text(val.text));
|
$("#ShareDevice_PowerStationId_modal").append($("<option />").val(val.value).text(val.text));
|
||||||
});
|
});
|
||||||
|
if (rel.data.length > 0)
|
||||||
|
{
|
||||||
DeviceUIDList($("#ShareDevice_PowerStationId_modal").val());
|
DeviceUIDList($("#ShareDevice_PowerStationId_modal").val());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -861,6 +866,9 @@
|
|||||||
$.each(rel.data, function (index, val) {
|
$.each(rel.data, function (index, val) {
|
||||||
$("#ShareDevice_UID_modal").append($("<option />").val(val.value).text(val.text));
|
$("#ShareDevice_UID_modal").append($("<option />").val(val.value).text(val.text));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -956,7 +964,7 @@
|
|||||||
}
|
}
|
||||||
formData.append("BoEDiscountRate", $("#BoE_discount_rate").val());
|
formData.append("BoEDiscountRate", $("#BoE_discount_rate").val());
|
||||||
formData.append("BoEDeviceRegisterNumber", $("#BoE_device_register_number").val());
|
formData.append("BoEDeviceRegisterNumber", $("#BoE_device_register_number").val());
|
||||||
formData.append("BoERentRatio", $("#BoE_discount_rate").val());
|
formData.append("BoERentRatio", $("#BoE_rent_ratio").val());
|
||||||
formData.append("TPCContractNumber", $("#TPC_contract_number").val());
|
formData.append("TPCContractNumber", $("#TPC_contract_number").val());
|
||||||
formData.append("TPCContractAt", $("#TPC_contract_at").val());
|
formData.append("TPCContractAt", $("#TPC_contract_at").val());
|
||||||
formData.append("TPCSellDeadline", $("#TPC_sell_deadline").val());
|
formData.append("TPCSellDeadline", $("#TPC_sell_deadline").val());
|
||||||
@ -1379,9 +1387,9 @@
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region 能源局與台電資料 input
|
//#region 能源局與台電資料 input
|
||||||
$("#BoE_discount_rate").val(powerStationData.boeEiscountRate);
|
$("#BoE_discount_rate").val(powerStationData.boEDiscountRate);
|
||||||
$("#BoE_device_register_number").val(powerStationData.boEDeviceRegisterNumber);
|
$("#BoE_device_register_number").val(powerStationData.boEDeviceRegisterNumber);
|
||||||
$("#BoE_discount_rate").val(powerStationData.boERentRatio);
|
$("#BoE_rent_ratio").val(powerStationData.boERentRatio);
|
||||||
|
|
||||||
$("#TPC_contract_number").val(powerStationData.tpcContractNumber);
|
$("#TPC_contract_number").val(powerStationData.tpcContractNumber);
|
||||||
$("#TPC_contract_at").val(powerStationData.tpcContractAt);
|
$("#TPC_contract_at").val(powerStationData.tpcContractAt);
|
||||||
@ -1425,7 +1433,7 @@
|
|||||||
|
|
||||||
var appendStr = "";
|
var appendStr = "";
|
||||||
appendStr += '<div class="card border mb-g w-100" data-land-building-id="' + value.id + '">' +
|
appendStr += '<div class="card border mb-g w-100" data-land-building-id="' + value.id + '">' +
|
||||||
'<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">' +
|
'<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">' +
|
||||||
'<div class="card-title font-weight-bold">土地房屋資料</div>' +
|
'<div class="card-title font-weight-bold">土地房屋資料</div>' +
|
||||||
'<div class="text-right">' +
|
'<div class="text-right">' +
|
||||||
'<button class="btn btn-sm btn-warning ml-auto waves-effect waves-themed save-land-building-info-btn" style="display:none" data-land-building-id="' + value.id + '" id="save-land-building-info-btn-' + value.id + '">' +
|
'<button class="btn btn-sm btn-warning ml-auto waves-effect waves-themed save-land-building-info-btn" style="display:none" data-land-building-id="' + value.id + '" id="save-land-building-info-btn-' + value.id + '">' +
|
||||||
@ -1529,7 +1537,7 @@
|
|||||||
function CreateAddLandBuildingCard(dom) {
|
function CreateAddLandBuildingCard(dom) {
|
||||||
var appendStr = "";
|
var appendStr = "";
|
||||||
appendStr += '<div class="card border mb-g w-100" id="add-land-building-card">' +
|
appendStr += '<div class="card border mb-g w-100" id="add-land-building-card">' +
|
||||||
'<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">' +
|
'<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">' +
|
||||||
'<div class="card-title font-weight-bold">土地房屋資料</div>' +
|
'<div class="card-title font-weight-bold">土地房屋資料</div>' +
|
||||||
'<div class="text-right">' +
|
'<div class="text-right">' +
|
||||||
'<button class="btn btn-sm btn-success ml-auto waves-effect waves-themed" id="add-land-building-info-btn">' +
|
'<button class="btn btn-sm btn-success ml-auto waves-effect waves-themed" id="add-land-building-info-btn">' +
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">控制器</div>
|
<div class="card-title font-weight-bold">控制器</div>
|
||||||
<div class="text-right ">
|
<div class="text-right ">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">逆變器</div>
|
<div class="card-title font-weight-bold">逆變器</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">裝置設定</div>
|
<div class="card-title font-weight-bold">裝置設定</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">共用裝置</div>
|
<div class="card-title font-weight-bold">共用裝置</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">電站基本資料</div>
|
<div class="card-title font-weight-bold">電站基本資料</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
@ -106,7 +106,7 @@
|
|||||||
<label class="col-xl-4 form-label" id="estimated_recovery_time_label" for="estimated_recovery_time">預計回收年限</label>
|
<label class="col-xl-4 form-label" id="estimated_recovery_time_label" for="estimated_recovery_time">預計回收年限</label>
|
||||||
<div class="col-xl-8">
|
<div class="col-xl-8">
|
||||||
<label id="estimated_recovery_time_text" class="color-info-600"></label>
|
<label id="estimated_recovery_time_text" class="color-info-600"></label>
|
||||||
<input type="text" id="estimated_recovery_time" name="estimated_recovery_time" class="form-control">
|
<input type="number" step="1" id="estimated_recovery_time" name="estimated_recovery_time" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-3 row justify-content-center align-items-center">
|
<div class="col-xl-3 row justify-content-center align-items-center">
|
||||||
@ -197,7 +197,7 @@
|
|||||||
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
|
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
|
||||||
<div class="col-xl-8">
|
<div class="col-xl-8">
|
||||||
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
|
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
|
||||||
<input type="text" id="photovoltaic_panel_amount" name="photovoltaic_panel_amount" class="form-control">
|
<input type="number" step="1" id="photovoltaic_panel_amount" name="photovoltaic_panel_amount" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-4 mb-3 row">
|
<div class="col-xl-4 mb-3 row">
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<div class="row mb-5" id="BoEPart">
|
<div class="row mb-5" id="BoEPart">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">經濟部能源局與台電資訊</div>
|
<div class="card-title font-weight-bold">經濟部能源局與台電資訊</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-5 w-100">
|
<div class="card border mb-5 w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">圖片上傳</div>
|
<div class="card-title font-weight-bold">圖片上傳</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-g w-100" >
|
<div class="card border mb-g w-100" >
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">單線圖</div>
|
<div class="card-title font-weight-bold">單線圖</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
@using SolarPower.Models.Role
|
||||||
|
@model RoleLayerEnum
|
||||||
|
<!DOCTYPE html>
|
||||||
<html lang="zh-Hant-TW">
|
<html lang="zh-Hant-TW">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
@ -91,31 +93,61 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-title">Navigation Title</li>-->
|
<li class="nav-title">Navigation Title</li>-->
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("MapOverview") || ViewBag.auths.Contains("StationOverview"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "1" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "1" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-ballot-check"></i>
|
<i class="fal fa-ballot-check"></i>
|
||||||
<span class="nav-link-text" data-i18n="nav.category">總覽</span>
|
<span class="nav-link-text" data-i18n="nav.category">總覽</span>
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("MapOverview"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "1" ? "active" : "")">
|
||||||
<a asp-controller="MapOverview" asp-action="Index" title="地圖總覽" data-filter-tags="utilities disabled item">
|
<a asp-controller="MapOverview" asp-action="Index" title="地圖總覽" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">地圖總覽</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">地圖總覽</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||||
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
|
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站總覽</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站總覽</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
<!-- Example of open and active states -->
|
<!-- Example of open and active states -->
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="javascript:void(0);" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-file"></i>
|
<i class="fal fa-file"></i>
|
||||||
<span class="nav-link-text" data-i18n="nav.category">電站資訊</span>
|
<span class="nav-link-text" data-i18n="nav.category">電站資訊</span>
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@foreach (var myPowerStationSummary in ViewBag.myPowerStationSummaries)
|
||||||
|
{
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0);" title="Category" data-filter-tags="utilities menu child sublevel item">
|
||||||
|
<span class="nav-link-text" data-i18n="nav.category">@myPowerStationSummary.CityName</span>
|
||||||
|
<span class="dl-ref bg-primary-500 hidden-nav-function-minify hidden-nav-function-top">@myPowerStationSummary.Amount</span>
|
||||||
|
</a>
|
||||||
|
<ul>
|
||||||
|
@foreach (var myPowerStation in myPowerStationSummary.MyPowerStations)
|
||||||
|
{
|
||||||
|
<li>
|
||||||
|
<a asp-controller="PowerStation" asp-action="Edit" asp-route-stationId="@myPowerStation.PowerStationId" title="Sublevel Item" data-filter-tags="utilities menu child sublevel item">
|
||||||
|
<span class="nav-link-text" data-i18n="nav.utilities_menu_child_sublevel_item">@myPowerStation.PowerStationName</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
<li class="@(ViewData["MainNum"] == "2" && ViewData["SubNum"] == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "2" && ViewData["SubNum"] == "1" ? "active" : "")">
|
||||||
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
|
||||||
@ -123,6 +155,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))@*TODO:修改成交叉分析的權限*@
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-crosshairs"></i>
|
<i class="fal fa-crosshairs"></i>
|
||||||
@ -146,6 +181,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))@*TODO:修改成報表的權限*@
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-file-chart-line"></i>
|
<i class="fal fa-file-chart-line"></i>
|
||||||
@ -169,7 +207,10 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))@*TODO:修改成即時告警的權限*@
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "5" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "5" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-siren-on"></i>
|
<i class="fal fa-siren-on"></i>
|
||||||
@ -183,53 +224,80 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation") || ViewBag.auths.Contains("OperationRecord"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "6" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "6" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-rabbit-fast"></i>
|
<i class="fal fa-rabbit-fast"></i>
|
||||||
<span class="nav-link-text" data-i18n="nav.category">運維管理</span>
|
<span class="nav-link-text" data-i18n="nav.category">運維管理</span>
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "1" ? "active" : "")">
|
||||||
<a asp-controller="Operation" asp-action="Index" title="定期計畫建立" data-filter-tags="utilities disabled item">
|
<a asp-controller="Operation" asp-action="Index" title="定期計畫建立" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定期計畫建立</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定期計畫建立</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("OperationRecord"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||||
<a asp-controller="Operation" asp-action="Record" title="運維作業記錄" data-filter-tags="utilities disabled item">
|
<a asp-controller="Operation" asp-action="Record" title="運維作業記錄" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">運維作業記錄</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">運維作業記錄</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Company") || ViewBag.auths.Contains("User") || ViewBag.auths.Contains("Role") || ViewBag.auths.Contains("User"))@*TODO修改定時任務權限*@
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "7" ? "active open" : "")">
|
<li class="@(ViewData["MainNum"] == "7" ? "active open" : "")">
|
||||||
<a href="#" title="Category" data-filter-tags="category">
|
<a href="#" title="Category" data-filter-tags="category">
|
||||||
<i class="fal fa-cog"></i>
|
<i class="fal fa-cog"></i>
|
||||||
<span class="nav-link-text" data-i18n="nav.category">系統管理</span>
|
<span class="nav-link-text" data-i18n="nav.category">系統管理</span>
|
||||||
</a>
|
</a>
|
||||||
<ul>
|
<ul>
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Company"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "7" && ViewData["SubNum"] == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "7" && ViewData["SubNum"] == "1" ? "active" : "")">
|
||||||
<a asp-controller="Company" asp-action="Index" title="公司管理" data-filter-tags="utilities disabled item">
|
<a asp-controller="Company" asp-action="Index" title="公司管理" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">公司管理</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">公司管理</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("User"))
|
||||||
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "7" && ViewData["SubNum"] == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "7" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||||
<a asp-controller="User" asp-action="Index" title="帳號管理" data-filter-tags="utilities disabled item">
|
<a asp-controller="User" asp-action="Index" title="帳號管理" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">帳號管理</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">帳號管理</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.auths.Contains("User"))
|
||||||
|
{
|
||||||
<li class="">
|
<li class="">
|
||||||
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
|
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.auths.Contains("User"))
|
||||||
|
{
|
||||||
<li class="">
|
<li class="">
|
||||||
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
|
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="filter-message js-filter-message bg-success-600"></div>
|
<div class="filter-message js-filter-message bg-success-600"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -80,36 +80,39 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
|
||||||
|
<div class="ml-auto">kWh</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="min-height: 148px;">
|
<div class="card-body" style="min-height: 148px;">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>今日發電量</p>
|
<p>今日發電量</p>
|
||||||
<p><span class="color-info-700" id="today_kwh">126,161.72</span> kWh</p>
|
<p><span class="color-info-700" id="today_kwh">126,161.72</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>累積發電量</p>
|
<p>累積發電量</p>
|
||||||
<p><span class="color-info-700" id="total_kwh">4,069.73</span> kWh</p>
|
<p><span class="color-info-700" id="total_kwh">4,069.73</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
|
||||||
|
<div class="ml-auto">kW/m<sup>2</sup></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="min-height: 148px;">
|
<div class="card-body" style="min-height: 148px;">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>即時平均日照度</p>
|
<p>即時平均日照度</p>
|
||||||
<p><span class="color-info-700" id="today_irradiance">126,161.72</span> kW/m<sup>2</sup></p>
|
<p><span class="color-info-700" id="today_irradiance">126,161.72</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>平均日照度(30天)</p>
|
<p>平均日照度(30天)</p>
|
||||||
<p><span class="color-info-700" id="avg_irradiance">4,069.73</span> kW/m<sup>2</sup></p>
|
<p><span class="color-info-700" id="avg_irradiance">4,069.73</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
|
||||||
|
<div class="ml-auto">%</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="min-height: 148px;">
|
<div class="card-body" style="min-height: 148px;">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@ -125,6 +128,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> kWh / kWp</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> kWh / kWp</h4>
|
||||||
|
<div class="ml-auto">hr</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="min-height: 148px;">
|
<div class="card-body" style="min-height: 148px;">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@ -140,15 +144,16 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
|
||||||
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 減碳量</h4>
|
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 減碳量</h4>
|
||||||
|
<div class="ml-auto">kG</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body" style="min-height: 148px;">
|
<div class="card-body" style="min-height: 148px;">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>今日減碳量</p>
|
<p>今日減碳量</p>
|
||||||
<p><span class="color-info-700" id="today_carbon">6,091.78</span> kG</p>
|
<p><span class="color-info-700" id="today_carbon">6,091.78</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<p>累積減碳量</p>
|
<p>累積減碳量</p>
|
||||||
<p><span class="color-info-700" id="total_carbon">985.98</span> kG</p>
|
<p><span class="color-info-700" id="total_carbon">985.98</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,6 +3,8 @@
|
|||||||
ViewData["SubNum"] = "2";
|
ViewData["SubNum"] = "2";
|
||||||
ViewData["Title"] = "電站總覽";
|
ViewData["Title"] = "電站總覽";
|
||||||
}
|
}
|
||||||
|
@using SolarPower.Models.Role
|
||||||
|
@model RoleLayerEnum
|
||||||
|
|
||||||
<ol class="breadcrumb page-breadcrumb">
|
<ol class="breadcrumb page-breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="javascript:void(0);">總覽</a></li>
|
<li class="breadcrumb-item"><a href="javascript:void(0);">總覽</a></li>
|
||||||
@ -33,61 +35,102 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs mb-5" role="tablist">
|
<ul class="nav nav-tabs mb-5" role="tablist">
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-overview-uptodate" role="tab">
|
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-overview-uptodate" role="tab">
|
||||||
<i class="fal fa-monitor-heart-rate text-success"></i> <span class="hidden-sm-down ml-1">即時資訊</span>
|
<i class="fal fa-monitor-heart-rate text-success"></i> <span class="hidden-sm-down ml-1">即時資訊</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-info" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-info" role="tab">
|
||||||
<i class="fal fa-info-square text-success"></i> <span class="hidden-sm-down ml-1">基本資料</span>
|
<i class="fal fa-info-square text-success"></i> <span class="hidden-sm-down ml-1">基本資料</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-history" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-history" role="tab">
|
||||||
<i class="fal fa-history text-success"></i> <span class="hidden-sm-down ml-1">歷史資料</span>
|
<i class="fal fa-history text-success"></i> <span class="hidden-sm-down ml-1">歷史資料</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-inverter" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-inverter" role="tab">
|
||||||
<i class="fal fa-analytics text-success"></i> <span class="hidden-sm-down ml-1">逆變器分析</span>
|
<i class="fal fa-analytics text-success"></i> <span class="hidden-sm-down ml-1">逆變器分析</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-exception" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-exception" role="tab">
|
||||||
<i class="fal fa-sensor-alert text-success"></i> <span class="hidden-sm-down ml-1">異常記錄</span>
|
<i class="fal fa-sensor-alert text-success"></i> <span class="hidden-sm-down ml-1">異常記錄</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||||
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-operationRecord" role="tab">
|
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-overview-operationRecord" role="tab">
|
||||||
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">運維記錄</span>
|
<i class="fal fa-digital-tachograph text-success"></i> <span class="hidden-sm-down ml-1">運維記錄</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content p-3">
|
<div class="tab-content p-3">
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_UpToDate"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade show active" id="tab-overview-uptodate" role="tabpanel" aria-labelledby="tab-overview-uptodate">
|
<div class="tab-pane fade show active" id="tab-overview-uptodate" role="tabpanel" aria-labelledby="tab-overview-uptodate">
|
||||||
@Html.Partial("_UpToDate")
|
@Html.Partial("_UpToDate")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Info"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade" id="tab-overview-info" role="tabpanel" aria-labelledby="tab-overview-info">
|
<div class="tab-pane fade" id="tab-overview-info" role="tabpanel" aria-labelledby="tab-overview-info">
|
||||||
@Html.Partial("_Info")
|
@Html.Partial("_Info")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_History"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade" id="tab-overview-history" role="tabpanel" aria-labelledby="tab-overview-history">
|
<div class="tab-pane fade" id="tab-overview-history" role="tabpanel" aria-labelledby="tab-overview-history">
|
||||||
@Html.Partial("_History")
|
@Html.Partial("_History")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Inverter"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade" id="tab-overview-inverter" role="tabpanel" aria-labelledby="tab-overview-inverter">
|
<div class="tab-pane fade" id="tab-overview-inverter" role="tabpanel" aria-labelledby="tab-overview-inverter">
|
||||||
@Html.Partial("_Inverter")
|
@Html.Partial("_Inverter")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_Exception"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade" id="tab-overview-exception" role="tabpanel" aria-labelledby="tab-overview-exception">
|
<div class="tab-pane fade" id="tab-overview-exception" role="tabpanel" aria-labelledby="tab-overview-exception">
|
||||||
@Html.Partial("_Exception")
|
@Html.Partial("_Exception")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationOverview_OperationRecord"))
|
||||||
|
{
|
||||||
<div class="tab-pane fade" id="tab-overview-operationRecord" role="tabpanel" aria-labelledby="tab-overview-operationRecord">
|
<div class="tab-pane fade" id="tab-overview-operationRecord" role="tabpanel" aria-labelledby="tab-overview-operationRecord">
|
||||||
@Html.Partial("_OperationRecord")
|
@Html.Partial("_OperationRecord")
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -546,7 +589,12 @@
|
|||||||
|
|
||||||
//#region 預先載入運維人員下拉式選單select_option
|
//#region 預先載入運維人員下拉式選單select_option
|
||||||
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
|
||||||
$.get(url_user_select_option, function (rel) {
|
|
||||||
|
var send_data = {
|
||||||
|
powerStationId: stationId
|
||||||
|
}
|
||||||
|
|
||||||
|
$.get(url_user_select_option, send_data, function (rel) {
|
||||||
if (rel.code != "0000") {
|
if (rel.code != "0000") {
|
||||||
toast_error(rel.msg);
|
toast_error(rel.msg);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">電站基本資料</div>
|
<div class="card-title font-weight-bold">電站基本資料</div>
|
||||||
</div>
|
</div>
|
||||||
@ -161,7 +161,7 @@
|
|||||||
<div class="row mb-5" id="BoEPart">
|
<div class="row mb-5" id="BoEPart">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">經濟部能源局與台電資訊</div>
|
<div class="card-title font-weight-bold">經濟部能源局與台電資訊</div>
|
||||||
</div>
|
</div>
|
||||||
@ -256,7 +256,7 @@
|
|||||||
<div class="row mb-5">
|
<div class="row mb-5">
|
||||||
<div class="card border mb-g w-100">
|
<div class="card border mb-g w-100">
|
||||||
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
<!-- notice the additions of utility paddings and display properties on .card-header -->
|
||||||
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
<div class="card-header bg-fusion-25 py-2 pr-3 d-flex align-items-center flex-wrap justify-content-between">
|
||||||
<!-- we wrap header title inside a div tag with utility padding -->
|
<!-- we wrap header title inside a div tag with utility padding -->
|
||||||
<div class="card-title font-weight-bold">單線圖</div>
|
<div class="card-title font-weight-bold">單線圖</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -123,88 +123,7 @@
|
|||||||
UpdateRegisterNumber($(this).val());
|
UpdateRegisterNumber($(this).val());
|
||||||
|
|
||||||
//查詢該公司的角色
|
//查詢該公司的角色
|
||||||
var url_company_role_select_option = "/Role/GetRoleSelectOptionList";
|
UpdateCompanyRoleSelectOption($(this).val());
|
||||||
|
|
||||||
send_data = {
|
|
||||||
CompanyId: $(this).val()
|
|
||||||
}
|
|
||||||
|
|
||||||
$.get(url_company_role_select_option, send_data, function (rel) {
|
|
||||||
if (rel.code != "0000") {
|
|
||||||
toast_error(rel.msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#region 帳號管理Tab - 角色下拉式選單(搜尋)
|
|
||||||
if (rel.data.length > 0) {
|
|
||||||
$("#select_company_role_userManager_tab").empty();
|
|
||||||
$("#select_company_role_userManager_tab").append($("<option />").val(0).text("全部"));
|
|
||||||
|
|
||||||
$.each(rel.data, function (index, val) {
|
|
||||||
$("#select_company_role_userManager_tab").append($("<option />").val(val.value).text(val.text));
|
|
||||||
});
|
|
||||||
|
|
||||||
//預設查詢第一個
|
|
||||||
$("#select_company_role_userManager_tab").val($("#select_company_role_userManager_tab option:first").val()).trigger('change');
|
|
||||||
|
|
||||||
//更新帳號管理DataTable
|
|
||||||
if (selected_tab == "#tab-user-manager") {
|
|
||||||
userTable.ajax.reload();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#select_company_role_userManager_tab").empty();
|
|
||||||
$("#select_company_role_userManager_tab").append('<option value="0" disabled>請先新增角色</option>');
|
|
||||||
|
|
||||||
$("#select_company_role_userManager_tab").val($("#select_company_role_userManager_tab option:first").val()).trigger('change');
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region 帳號管理Tab - 人員基本資料新增/修改 modal
|
|
||||||
if (rel.data.length > 0) {
|
|
||||||
$('#user_role_modal').empty();
|
|
||||||
|
|
||||||
$.each(rel.data, function (index, val) {
|
|
||||||
$("#user_role_modal").append($("<option />").val(val.value).text(val.text));
|
|
||||||
});
|
|
||||||
|
|
||||||
//預設查詢第一個
|
|
||||||
$("#user_role_modal").val($("#user_role_modal option:first").val()).trigger('change');
|
|
||||||
} else {
|
|
||||||
$("#user_role_modal").empty();
|
|
||||||
$("#user_role_modal").append('<option value="0" disabled>請先新增角色</option>');
|
|
||||||
|
|
||||||
$("#user_role_modal").val($("#user_role_modal option:first").val()).trigger('change');
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region 角色權限Tab - 角色下拉是選單(搜尋)
|
|
||||||
if (rel.data.length > 0) {
|
|
||||||
$("#select_roleId_roleAuth_tab").empty();
|
|
||||||
|
|
||||||
$.each(rel.data, function (index, val) {
|
|
||||||
$("#select_roleId_roleAuth_tab").append($("<option />").val(val.value).text(val.text));
|
|
||||||
});
|
|
||||||
|
|
||||||
//預設查詢第一個
|
|
||||||
$("#select_roleId_roleAuth_tab").val($("#select_roleId_roleAuth_tab option:first").val()).trigger('change');
|
|
||||||
|
|
||||||
//更新角色權限DataTable
|
|
||||||
if (selected_tab == "#tab-role-auth") {
|
|
||||||
roleAuthTable.ajax.reload();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#select_roleId_roleAuth_tab").empty();
|
|
||||||
$("#select_roleId_roleAuth_tab").append('<option value="0" disabled>請先新增角色</option>');
|
|
||||||
|
|
||||||
$("#select_roleId_roleAuth_tab").val($("#select_roleId_roleAuth_tab option:first").val()).trigger('change');
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//更新角色管理DataTable
|
|
||||||
if (selected_tab == "#tab-role-manager") {
|
|
||||||
roleTable.ajax.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -413,6 +332,8 @@
|
|||||||
"data": "roleName"
|
"data": "roleName"
|
||||||
}, {
|
}, {
|
||||||
"data": "authPageSubName"
|
"data": "authPageSubName"
|
||||||
|
}, {
|
||||||
|
"data": "authPageTagName"
|
||||||
}, {
|
}, {
|
||||||
"data": "creatorName"
|
"data": "creatorName"
|
||||||
}, {
|
}, {
|
||||||
@ -497,6 +418,8 @@
|
|||||||
"data": "mainName"
|
"data": "mainName"
|
||||||
}, {
|
}, {
|
||||||
"data": "subName"
|
"data": "subName"
|
||||||
|
}, {
|
||||||
|
"data": "tagName"
|
||||||
}],
|
}],
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
'targets': 0,
|
'targets': 0,
|
||||||
@ -1028,6 +951,7 @@
|
|||||||
toast_ok(rel.msg);
|
toast_ok(rel.msg);
|
||||||
$('#role-modal').modal('hide');
|
$('#role-modal').modal('hide');
|
||||||
|
|
||||||
|
UpdateCompanyRoleSelectOption($("#role_companyId_modal").val())
|
||||||
roleTable.ajax.reload();
|
roleTable.ajax.reload();
|
||||||
}, 'json');
|
}, 'json');
|
||||||
}
|
}
|
||||||
@ -1163,6 +1087,90 @@
|
|||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
function UpdateCompanyRoleSelectOption(companyId) {
|
||||||
|
var url_company_role_select_option = "/Role/GetRoleSelectOptionList";
|
||||||
|
|
||||||
|
send_data = {
|
||||||
|
CompanyId: companyId
|
||||||
|
}
|
||||||
|
|
||||||
|
$.get(url_company_role_select_option, send_data, function (rel) {
|
||||||
|
if (rel.code != "0000") {
|
||||||
|
toast_error(rel.msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//#region 帳號管理Tab - 角色下拉式選單(搜尋)
|
||||||
|
if (rel.data.length > 0) {
|
||||||
|
$("#select_company_role_userManager_tab").empty();
|
||||||
|
$("#select_company_role_userManager_tab").append($("<option />").val(0).text("全部"));
|
||||||
|
|
||||||
|
$.each(rel.data, function (index, val) {
|
||||||
|
$("#select_company_role_userManager_tab").append($("<option />").val(val.value).text(val.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
//預設查詢第一個
|
||||||
|
$("#select_company_role_userManager_tab").val($("#select_company_role_userManager_tab option:first").val()).trigger('change');
|
||||||
|
|
||||||
|
//更新帳號管理DataTable
|
||||||
|
if (selected_tab == "#tab-user-manager") {
|
||||||
|
userTable.ajax.reload();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$("#select_company_role_userManager_tab").empty();
|
||||||
|
$("#select_company_role_userManager_tab").append('<option value="0" disabled>請先新增角色</option>');
|
||||||
|
|
||||||
|
$("#select_company_role_userManager_tab").val($("#select_company_role_userManager_tab option:first").val()).trigger('change');
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//#region 帳號管理Tab - 人員基本資料新增/修改 modal
|
||||||
|
if (rel.data.length > 0) {
|
||||||
|
$('#user_role_modal').empty();
|
||||||
|
|
||||||
|
$.each(rel.data, function (index, val) {
|
||||||
|
$("#user_role_modal").append($("<option />").val(val.value).text(val.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
//預設查詢第一個
|
||||||
|
$("#user_role_modal").val($("#user_role_modal option:first").val()).trigger('change');
|
||||||
|
} else {
|
||||||
|
$("#user_role_modal").empty();
|
||||||
|
$("#user_role_modal").append('<option value="0" disabled>請先新增角色</option>');
|
||||||
|
|
||||||
|
$("#user_role_modal").val($("#user_role_modal option:first").val()).trigger('change');
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//#region 角色權限Tab - 角色下拉是選單(搜尋)
|
||||||
|
if (rel.data.length > 0) {
|
||||||
|
$("#select_roleId_roleAuth_tab").empty();
|
||||||
|
|
||||||
|
$.each(rel.data, function (index, val) {
|
||||||
|
$("#select_roleId_roleAuth_tab").append($("<option />").val(val.value).text(val.text));
|
||||||
|
});
|
||||||
|
|
||||||
|
//預設查詢第一個
|
||||||
|
$("#select_roleId_roleAuth_tab").val($("#select_roleId_roleAuth_tab option:first").val()).trigger('change');
|
||||||
|
|
||||||
|
//更新角色權限DataTable
|
||||||
|
if (selected_tab == "#tab-role-auth") {
|
||||||
|
roleAuthTable.ajax.reload();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$("#select_roleId_roleAuth_tab").empty();
|
||||||
|
$("#select_roleId_roleAuth_tab").append('<option value="0" disabled>請先新增角色</option>');
|
||||||
|
|
||||||
|
$("#select_roleId_roleAuth_tab").val($("#select_roleId_roleAuth_tab option:first").val()).trigger('change');
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//更新角色管理DataTable
|
||||||
|
if (selected_tab == "#tab-role-manager") {
|
||||||
|
roleTable.ajax.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
<th>公司</th>
|
<th>公司</th>
|
||||||
<th>角色</th>
|
<th>角色</th>
|
||||||
<th>功能名稱</th>
|
<th>功能名稱</th>
|
||||||
|
<th>功能細項名稱</th>
|
||||||
<th>建立人</th>
|
<th>建立人</th>
|
||||||
<th>建立時間</th>
|
<th>建立時間</th>
|
||||||
<th>功能</th>
|
<th>功能</th>
|
||||||
@ -68,6 +69,7 @@
|
|||||||
</th>
|
</th>
|
||||||
<th>功能大項</th>
|
<th>功能大項</th>
|
||||||
<th>功能名稱</th>
|
<th>功能名稱</th>
|
||||||
|
<th>功能細項名稱</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -14,6 +14,17 @@
|
|||||||
"Root": "mWlR2HshQNhRRE34jg4kdg==",
|
"Root": "mWlR2HshQNhRRE34jg4kdg==",
|
||||||
"Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
"Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
||||||
},
|
},
|
||||||
|
//"DBConfig": {
|
||||||
|
// "Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
||||||
|
// "port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
||||||
|
// "Database": "CEyYZnO8B5+yTXQcFSsiBA==",
|
||||||
|
// "Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
||||||
|
// "Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||||
|
//},
|
||||||
|
"BackgroundServiceCron": {
|
||||||
|
"CalcPowerStationJob": "0 5 * * * ?",
|
||||||
|
"CalcAvgPowerStationJob": "0 0 2 * * ?"
|
||||||
|
},
|
||||||
"SMTPConfig": {
|
"SMTPConfig": {
|
||||||
"Host": "smtp.gmail.com",
|
"Host": "smtp.gmail.com",
|
||||||
"Port": 25,
|
"Port": 25,
|
||||||
|
|||||||
@ -8,12 +8,19 @@
|
|||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"LoginExpireMinute": 60, //登入到期時間,單位(分)
|
"LoginExpireMinute": 60, //登入到期時間,單位(分)
|
||||||
|
//"DBConfig": {
|
||||||
|
// "Server": "MVgHWzR3rGDgD57TUoFunA==",
|
||||||
|
// "port": "r4AoXMUDodcQjIzofGNCcg==",
|
||||||
|
// "Database": "Lxlx7Hae506yu/zopo2npw==",
|
||||||
|
// "Root": "mWlR2HshQNhRRE34jg4kdg==",
|
||||||
|
// "Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
||||||
|
//},
|
||||||
"DBConfig": {
|
"DBConfig": {
|
||||||
"Server": "MVgHWzR3rGDgD57TUoFunA==",
|
"Server": "AVXfxd+IRlLtJ0MCi9HU1g==",
|
||||||
"port": "r4AoXMUDodcQjIzofGNCcg==",
|
"port": "CrEmevYrUsSo7Mkb7Gxn8A==",
|
||||||
"Database": "Lxlx7Hae506yu/zopo2npw==",
|
"Database": "CEyYZnO8B5+yTXQcFSsiBA==",
|
||||||
"Root": "mWlR2HshQNhRRE34jg4kdg==",
|
"Root": "Aph7AzoiwAmmBHCfS1rqeQ==",
|
||||||
"Password": "y4uPqlH9ncTgR/I07qpwaA=="
|
"Password": "8WMHBEWuT0XoAB4kzduQHA=="
|
||||||
},
|
},
|
||||||
"SMTPConfig": {
|
"SMTPConfig": {
|
||||||
"Host": "smtp.gmail.com",
|
"Host": "smtp.gmail.com",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user