合併衝突

This commit is contained in:
b110212000 2021-08-06 19:26:28 +08:00
commit fcc38fa127
51 changed files with 4181 additions and 709 deletions

View File

@ -38,7 +38,7 @@ namespace SolarPower.Controllers
}
else
{
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser.CompanyId);
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser);
}
var siteDBNamePowerStationId = new Dictionary<string, List<int>>();

View File

@ -37,7 +37,7 @@ namespace SolarPower.Controllers
}
else
{
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser.CompanyId);
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser);
}
var siteDBNamePowerStationId = new Dictionary<string, List<int>>();
@ -51,7 +51,7 @@ namespace SolarPower.Controllers
var powerStationDevices = await powerStationRepository.GetPowerStationDevice(siteDBNamePowerStationId, filter);
powerStationDevices = powerStationDevices.Where(x => x.DeviceId != null).ToList();
//powerStationDevices = powerStationDevices.Where(x => x.DeviceId != null).ToList();
var powerStationDevice_cityName_Group = powerStationDevices.GroupBy(x => x.CityName).ToList();
@ -78,9 +78,12 @@ namespace SolarPower.Controllers
var temp = new List<PowerStationDevice>();
temp.Add(powerStation);
foreach (var device in psName_Group)
{
if(!string.IsNullOrEmpty(device.DeviceId))
{
temp.Add(device);
}
}
deviceDic.Add(psName_Group.Key, temp);
}

View File

@ -2032,8 +2032,24 @@ namespace SolarPower.Controllers
solaramount = await powerStationRepository.GetSolarByCity(myUser, cityid);
foreach (var solar in solaramount)
{
//判斷該檔案是否存在
if (!string.IsNullOrEmpty(solar.MainDisplay))
{
var fullFilePath = Directory.GetCurrentDirectory() + "/wwwroot" + Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
if (System.IO.File.Exists(fullFilePath))
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
List<int> deviceControllerid = await powerStationRepository.GetAllDeviceControllerId(solar.Id, solar.SiteDB);
var InverterTable = await powerStationRepository.InverterTable(deviceControllerid, solar.SiteDB);
solar.InverterAmount = InverterTable.Count;

View File

@ -6,11 +6,11 @@ using SolarPower.Models.PowerStation;
using SolarPower.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Globalization;
namespace SolarPower.Controllers
{
@ -51,9 +51,25 @@ namespace SolarPower.Controllers
solaramount = await overviewRepository.GetSolarByCity(myUser, post);
foreach (var solar in solaramount)
{
//判斷該檔案是否存在
if (!string.IsNullOrEmpty(solar.MainDisplay))
{
var fullFilePath = Directory.GetCurrentDirectory() + "/wwwroot" + Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
if (System.IO.File.Exists(fullFilePath))
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
apiResult.Data = solaramount;
}
@ -215,6 +231,7 @@ namespace SolarPower.Controllers
powerIrradianceTodayChart.Labels = powerIrradianceToday.Select(x => x.Label).ToList();
powerIrradianceTodayChart.PowerDatas = powerIrradianceToday.Select(x => x.PowerData).ToList();
powerIrradianceTodayChart.IrradianceDatas = powerIrradianceToday.Select(x => x.IrradianceData).ToList();
powerIrradianceTodayChart.TemperatureDatas = powerIrradianceToday.Select(x => x.TemperatureData).ToList();
chartUptoDate.ChartToday = powerIrradianceTodayChart;
//7日發電量日照度List
@ -224,24 +241,27 @@ namespace SolarPower.Controllers
powerIrradiance7dayChart.Labels = powerIrradiance7day.Select(x => x.Label).ToList();
powerIrradiance7dayChart.PowerDatas = powerIrradiance7day.Select(x => x.PowerData).ToList();
powerIrradiance7dayChart.IrradianceDatas = powerIrradiance7day.Select(x => x.IrradianceData).ToList();
powerIrradiance7dayChart.TemperatureDatas = powerIrradiance7day.Select(x => x.TemperatureData).ToList();
chartUptoDate.Chart7day = powerIrradiance7dayChart;
//本月發電量日照度List
var powerIrradianceMonth = await overviewRepository.GetListPowerIrradianceMonthByPowerStationId(id, nowDay);
//今日資料轉換
//本月資料轉換
PowerIrradianceChart powerIrradianceMonthChart = new PowerIrradianceChart();
powerIrradianceMonthChart.Labels = powerIrradianceMonth.Select(x => x.Label).ToList();
powerIrradianceMonthChart.PowerDatas = powerIrradianceMonth.Select(x => x.PowerData).ToList();
powerIrradianceMonthChart.IrradianceDatas = powerIrradianceMonth.Select(x => x.IrradianceData).ToList();
powerIrradianceMonthChart.TemperatureDatas = powerIrradianceMonth.Select(x => x.TemperatureData).ToList();
chartUptoDate.ChartMonth = powerIrradianceMonthChart;
//本年發電量日照度List
var powerIrradianceYear = await overviewRepository.GetListPowerIrradianceYearByPowerStationId(id, nowDay);
//今日資料轉換
//本月資料轉換
PowerIrradianceChart powerIrradianceYearChart = new PowerIrradianceChart();
powerIrradianceYearChart.Labels = powerIrradianceYear.Select(x => x.Label).ToList();
powerIrradianceYearChart.PowerDatas = powerIrradianceYear.Select(x => x.PowerData).ToList();
powerIrradianceYearChart.IrradianceDatas = powerIrradianceYear.Select(x => x.IrradianceData).ToList();
powerIrradianceYearChart.TemperatureDatas = powerIrradianceYear.Select(x => x.TemperatureData).ToList();
chartUptoDate.ChartYear = powerIrradianceYearChart;
apiResult.Code = "0000";
@ -434,7 +454,7 @@ namespace SolarPower.Controllers
{
a.Function = @$"<a href='javascript:;' class='waves-effect waves-themed mb-3 mr-2 edit-btn'>{a.FormId}</a>";
}
if(a.NormalTime == "1970-01-01 08:00:00")
if (a.NormalTime == "1970-01-01 08:00:00")
{
a.NormalTime = "";
}
@ -487,12 +507,12 @@ namespace SolarPower.Controllers
{
List<double> values = new List<double>();
foreach(var lable in inverterkwhBar.Labels)
foreach (var lable in inverterkwhBar.Labels)
{
var find = false;
foreach (var value in inverterHistory)
{
if(value.TIMESTAMP == lable)
if (value.TIMESTAMP == lable)
{
values.Add(value.KWH);
find = true;

View File

@ -7,6 +7,7 @@ using NPOI.SS.Util;
using NPOI.XSSF.UserModel;
using SolarPower.Models;
using SolarPower.Models.PowerStation;
using SolarPower.Models.Role;
using SolarPower.Repository.Interface;
using System;
using System.Collections.Generic;
@ -49,7 +50,7 @@ namespace SolarPower.Controllers
}
else
{
powerStations = await powerStationRepository.GetPowerStationsByCompanyIdWithfilter(myUser.CompanyId,filter);
powerStations = await powerStationRepository.GetPowerStationsByCompanyIdWithfilter(myUser,filter);
}
var siteDBNamePowerStationId = new Dictionary<string, List<PowerStationIdAndCity>>();

View File

@ -428,12 +428,12 @@ INSERT INTO `auth_page` (`AuthCode`, `MainName`, `SubName`, `TagName`, `ControlN
('L', '交叉分析', '合併電站', NULL, 'AnalysisStationCombine'),
('M', '交叉分析', '電站交叉分析', NULL, 'AnalysisStationInfo'),
('N', '交叉分析', '逆變器交叉分析', NULL, 'AnalysisInverter'),
('P', '報表查詢', '電站報表', NULL, 'CCC'),
('P', '報表查詢', '電站報表', NULL, 'StationReport'),
('Q', '報表查詢', '電廠發電效能統計', NULL, 'HHH'),
('R', '報表查詢', '輸入台電售電紀錄', NULL, 'JJJ'),
('R', '報表查詢', '輸入台電售電紀錄', NULL, 'ElectricitySoldRecord'),
('S', '報表查詢', '報告發送設定', NULL, 'JJJ'),
('T', '即時告警', '異常事件查詢', NULL, 'KKK'),
('U', '運維管理', '電站管理', NULL, 'PowerStationManager'),
('U', '運維管理', '電站管理', NULL, 'PowerStation'),
('V', '運維管理', '定期計畫建立', NULL, 'Operation'),
('W', '運維管理', '運維作業記錄', NULL, 'OperationRecord'),
('X', '系統管理', '公司管理', NULL, 'Company'),
@ -1262,7 +1262,7 @@ CREATE TABLE IF NOT EXISTS `weather_description` (
`WeatherValue` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '分類代碼',
`WeatherKey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'icon代號',
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣描述分類';
) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣描述分類';
-- 正在傾印表格 solar_power_test.weather_description 的資料:~0 rows (近似值)
DELETE FROM `weather_description`;
@ -1636,7 +1636,7 @@ CREATE TABLE IF NOT EXISTS `weather_forecast` (
`CreatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`Id`),
KEY `IDX_01` (`LocationName`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣預報';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣預報';
@ -1648,7 +1648,7 @@ CREATE TABLE IF NOT EXISTS `weather_observation` (
`Temp` double DEFAULT NULL COMMENT '溫度',
PRIMARY KEY (`Id`),
KEY `IDX_01` (`PowerStationId`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='天氣觀測';
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='天氣觀測';

View File

@ -27,6 +27,7 @@ namespace SolarPower.Models
public class Chartoutput
{
public double Irradiance { get; set; }
public double Temperature { get; set; }
public double KWH { get; set; }
public string Time { get; set; }
}

View File

@ -16,6 +16,7 @@ namespace SolarPower.Models
public string Attachment { get; set; }
public byte IsDelivery { get; set; }
public string DeliveryAt { get; set; }
public string Reason { get; set; }
}
public class OperationPersonnel

View File

@ -77,6 +77,7 @@ namespace SolarPower.Models
public string Label { get; set; }
public double PowerData { get; set; }
public double IrradianceData { get; set; }
public double TemperatureData { get; set; }
}
public class PowerIrradianceChart
@ -84,6 +85,7 @@ namespace SolarPower.Models
public List<string> Labels { get; set; }
public List<double> PowerDatas { get; set; }
public List<double> IrradianceDatas { get; set; }
public List<double> TemperatureDatas { get; set; }
}
public class ExceptionSent

View File

@ -42,7 +42,7 @@ namespace SolarPower.Quartz.Jobs
if (this.environment.IsDevelopment())
{
dateTime = DateTimeNow.AddHours(-1).ToString("yyyy-MM-dd HH");
dateTime = "2021-08-06 10";
}
logger.LogInformation("【CalcPowerStationJob】【任務開始】");
@ -170,10 +170,22 @@ namespace SolarPower.Quartz.Jobs
history.CARBON = history.KWH * carbonRate;
//總減碳量(總發電量 * (0.554/1000)[抓資料庫值]
calcPowerStation.Total_Carbon = history.TotalKWH * carbonRate;
if(lastmoneyhistorybyhour != null)
{
history.TODAYCARBON = lastmoneyhistorybyhour.TODAYCARBON + history.KWH * carbonRate;
history.TOTALCARBON = lastmoneyhistorybyhour.TOTALCARBON + history.KWH * carbonRate;
history.TODAYMONEY = lastmoneyhistorybyhour.TODAYMONEY + history.KWH * powerStation.PowerRate;
history.TOTALMONEY = lastmoneyhistorybyhour.TOTALMONEY + history.KWH * powerStation.PowerRate;
}
else
{
history.TODAYCARBON = history.KWH * carbonRate;
history.TOTALCARBON = history.KWH * carbonRate;
history.TODAYMONEY = history.KWH * powerStation.PowerRate;
history.TOTALMONEY = history.KWH * powerStation.PowerRate;
}
#endregion
#region
@ -194,7 +206,7 @@ namespace SolarPower.Quartz.Jobs
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的日照計設備資訊】", powerStation.Code, dateTime);
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的日照計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(deviceInfos));
if (deviceInfos != null)
if (deviceInfos != null && deviceInfos.Count() > 0)
{
//2. 計算該電站所有日照計設的每小時的平均在依照日照計數量平均
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的日照計的日照度】", powerStation.Code, dateTime);
@ -216,7 +228,7 @@ namespace SolarPower.Quartz.Jobs
var tempdeviceInfos = await powerStationRepository.GetListTempByPowerStationId(powerStation.Id, powerStation.SiteDB);
logger.LogInformation("【CalcPowerStationJob】【取得成功電站[{0}]在{1}的溫度計設備資訊】", powerStation.Code, dateTime);
logger.LogInformation("【CalcPowerStationJob】【電站[{0}]在{1}的溫度計設備資訊】 - {2}", powerStation.Code, dateTime, System.Text.Json.JsonSerializer.Serialize(tempdeviceInfos));
if (tempdeviceInfos != null)
if (tempdeviceInfos != null && tempdeviceInfos.Count() > 0)
{
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的溫度計的平均溫度】", powerStation.Code, dateTime);
var tempHistory = await powerStationRepository.GetPyrheliometerHistoryPerHour(dateTime, tempdeviceInfos, 1);
@ -244,7 +256,7 @@ namespace SolarPower.Quartz.Jobs
var full_inverter_table_name = String.Format("`{0}`.`{1}`", powerStation.SiteDB, inverter_table_name);
var exist_inverter_table = await powerStationRepository.ExistTable(powerStation.SiteDB, inverter_table_name);
if (!string.IsNullOrEmpty(exist_inverter_table))
if (!string.IsNullOrEmpty(exist_inverter_table) && inverterIds !=null && inverterIds.Count() > 0)
{
logger.LogInformation("【CalcPowerStationJob】【開始計算電站[{0}]在{1}的逆變器的資訊】", powerStation.Code, dateTime);
inverterHistories = await powerStationRepository.CalcInverterHisyortHourData(dateTime, powerStation.SiteDB, full_inverter_table_name, inverterIds);
@ -322,10 +334,11 @@ namespace SolarPower.Quartz.Jobs
{
if (Location.StationId == powerStation.WeathersStationId)
{
calcPowerStation.TodayWeatherTemp = Convert.ToDouble(Location.WeatherElement[0].ElementValue);
weatherObservation.PowerStationId = powerStation.Id;
weatherObservation.Temp = Convert.ToDouble(Location.WeatherElement[0].ElementValue);
weatherObservation.ObsTime = Location.Time.ObsTime.ToString();
weatherObservation.ObsTime = Convert.ToInt32(Location.Time.ObsTime.Substring(0, 4)) < 1970? null : Location.Time.ObsTime;
calcPowerStation.WeathersStationId = powerStation.WeathersStationId;
break;
}
@ -346,6 +359,8 @@ namespace SolarPower.Quartz.Jobs
}
#endregion
if (!this.environment.IsDevelopment())
{
#region step3. historiers INSERT power_station_history_hour
List<string> history_properties = new List<string>()
{
@ -479,7 +494,7 @@ namespace SolarPower.Quartz.Jobs
await powerStationRepository.AddInverterHistory(inverterHistories, inverter_history_properties);
#endregion
#region step6. sensoravg INSERT sensoravg_history_hour
#region step7. sensoravg INSERT sensoravg_history_hour
List<string> sensoravg_history_properties = new List<string>()
{
"PowerStationId",
@ -539,6 +554,7 @@ namespace SolarPower.Quartz.Jobs
await powerStationRepository.AddSensorAvgHistory(sensorAvgHistoryHour, sensoravg_history_properties);
#endregion
#region step8.
List<string> weather_observation_properties = new List<string>()
{
"PowerStationId",
@ -546,6 +562,10 @@ namespace SolarPower.Quartz.Jobs
"Temp"
};
await powerStationRepository.AddWeatherObservation(weatherObservations, weather_observation_properties);
#endregion
}
logger.LogInformation("【CalcPowerStationJob】【任務完成】");
}

View File

@ -55,7 +55,7 @@ namespace SolarPower.Quartz.Jobs
var result = Send(recipientEmails, notice.Subject, notice.Content, attachments);
if(result)
if (result.CompareTo("成功") == 0)
{
NoticeSchedule noticeSchedule = new NoticeSchedule();
noticeSchedule.Id = notice.Id;
@ -64,6 +64,16 @@ namespace SolarPower.Quartz.Jobs
updateNoticeSchedules.Add(noticeSchedule);
}
else
{
NoticeSchedule noticeSchedule = new NoticeSchedule();
noticeSchedule.Id = notice.Id;
noticeSchedule.IsDelivery = 2;
noticeSchedule.DeliveryAt = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
noticeSchedule.Reason = result;
updateNoticeSchedules.Add(noticeSchedule);
}
List<string> properties = new List<string>()
{
@ -83,8 +93,10 @@ namespace SolarPower.Quartz.Jobs
}
}
private bool Send(List<string> recipientEmails, string subject, string content, List<string> attachments)
private string Send(List<string> recipientEmails, string subject, string content, List<string> attachments)
{
var reason = string.Empty;
var CanDoSend = true;
MailMessage MyMail = new MailMessage();
MyMail.SubjectEncoding = System.Text.Encoding.UTF8;//郵件標題編碼
@ -100,16 +112,27 @@ namespace SolarPower.Quartz.Jobs
MyMail.Subject = subject; //主題
MyMail.Body = content; //設定信件內容
foreach(var attachment in attachments)
foreach (var attachment in attachments)
{
var directoryBase = Directory.GetCurrentDirectory();
var filePath = @$"{directoryBase}\wwwroot{attachment}";
if (File.Exists(filePath))
{
var data = new Attachment(filePath);
MyMail.Attachments.Add(data);
}
else
{
CanDoSend = false;
reason = "失敗 - 檔案遺失";
break;
}
}
//讀取 SMTP Config
if (CanDoSend)
{
SmtpClient MySMTP = new SmtpClient(smtp.Host, smtp.Port);
MySMTP.EnableSsl = smtp.EnableSsl;
MySMTP.Credentials = new System.Net.NetworkCredential(smtp.UserName, smtp.Password);
@ -119,7 +142,7 @@ namespace SolarPower.Quartz.Jobs
MySMTP.Dispose();
MyMail.Dispose(); //釋放資源
return true;
return "成功";
}
catch (Exception ex)
{
@ -128,7 +151,12 @@ namespace SolarPower.Quartz.Jobs
logger.LogError("【SendEmailJob】 - Emails:" + json);
logger.LogError("【SendEmailJob】 - Exception:" + ex.Message);
return false;
return "失敗 - " + ex.Message;
}
}
else
{
return reason;
}
}

View File

@ -159,7 +159,10 @@ namespace SolarPower.Repository.Implement
switch (post.SeacrhType)
{
case 0:
sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%h %p') AS `Time`,SUM(ps.KWH) AS KWH,SUM(sh.Irradiance) AS Irradiance
sql = $@"SELECT DATE_FORMAT(ps.TIMESTAMP,'%h %p') AS `Time`,
SUM(ps.KWH) AS KWH,
SUM(sh.Irradiance) AS Irradiance,
AVG(sh.Temperature) AS Temperature
FROM power_station_history_hour ps
LEFT JOIN sensor_history_hour sh
ON sh.TIMESTAMP = ps.TIMESTAMP AND sh.PowerStationId = ps.PowerStationId
@ -171,7 +174,8 @@ namespace SolarPower.Repository.Implement
sql = $@"SELECT
DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS `Time`,
SUM(ps.TODAYKWH) AS KWH,
SUM(sh.Irradiance) AS Irradiance
SUM(sh.Irradiance) AS Irradiance,
AVG(sh.Temperature) AS Temperature
FROM power_station_history_day ps
LEFT JOIN sensor_history_day sh
ON sh.TIMESTAMP = ps.TIMESTAMP
@ -182,7 +186,8 @@ namespace SolarPower.Repository.Implement
sql = $@"SELECT
DATE_FORMAT(ps.TIMESTAMP,'%Y-%m-%d') AS `Time`,
SUM(ps.TODAYKWH) AS KWH,
SUM(sh.Irradiance) AS Irradiance
SUM(sh.Irradiance) AS Irradiance,
AVG(sh.Temperature) AS Temperature
FROM power_station_history_day ps
LEFT JOIN sensor_history_day sh
ON sh.TIMESTAMP = ps.TIMESTAMP
@ -193,7 +198,8 @@ namespace SolarPower.Repository.Implement
sql = $@"SELECT
DATE_FORMAT(ps.TIMESTAMP,'%Y-%m') AS `Time`,
SUM(ps.MONTHKWH) AS KWH,
SUM(sh.Irradiance) AS Irradiance
SUM(sh.Irradiance) AS Irradiance,
AVG(sh.Temperature) AS Temperature
FROM power_station_history_month ps
LEFT JOIN sensor_history_month sh
ON sh.TIMESTAMP = ps.TIMESTAMP

View File

@ -110,11 +110,16 @@ namespace SolarPower.Repository.Implement
var dateNow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
var sql = @$"SELECT
w.Wx,
wf.Wx,
ps.*
FROM power_station ps
LEFT JOIN city c ON ps.CityId = c.Id
LEFT JOIN weather_forecast w ON c.Name = w.LocationName AND w.StartTime < @DateNow AND w.EndTime > @DateNow
LEFT JOIN (SELECT * FROM (
SELECT MAX(w.Id) AS aa FROM weather_forecast w
WHERE w.StartTime < @DateNow AND w.EndTime > @DateNow
GROUP BY w.LocationName
) A
LEFT JOIN weather_forecast B ON A.aa = B.Id) wf ON c.Name = wf.LocationName
WHERE ps.Id IN @PowerStationIds
";
@ -206,7 +211,7 @@ namespace SolarPower.Repository.Implement
{
try
{
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp,'%H %p') AS Label, ps.KWH AS PowerData, pyr.Irradiance AS IrradianceData
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp,'%H %p') AS Label, ps.KWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData
FROM power_station_history_hour ps
LEFT JOIN sensor_history_hour pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d %H') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d %H')
WHERE ps.PowerStationId = @PowerStationId
@ -231,7 +236,7 @@ namespace SolarPower.Repository.Implement
{
var startDay = Convert.ToDateTime(nowDay).AddDays(-7).ToString("yyyy-MM-dd");
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData
FROM power_station_history_day ps
LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d')
WHERE ps.PowerStationId = @PowerStationId
@ -256,7 +261,7 @@ namespace SolarPower.Repository.Implement
{
var startDay = Convert.ToDateTime(nowDay).ToString("yyyy-MM-01");
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m-%d') AS Label, ps.TODAYKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData
FROM power_station_history_day ps
LEFT JOIN sensor_history_day pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m-%d') = DATE_FORMAT(pyr.timestamp, '%Y-%m-%d')
WHERE ps.PowerStationId = @PowerStationId
@ -282,7 +287,7 @@ namespace SolarPower.Repository.Implement
{
var startyear = Convert.ToDateTime(nowDay).ToString("yyyy");
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.Irradiance AS IrradianceData
var sql_power = @$"SELECT DATE_FORMAT(ps.timestamp, '%Y-%m') AS Label, ps.MONTHKWH AS PowerData, pyr.Irradiance AS IrradianceData, pyr.Temperature AS TemperatureData
FROM power_station_history_month ps
LEFT JOIN sensor_history_month pyr ON ps.PowerStationId = pyr.PowerStationId AND DATE_FORMAT(ps.timestamp, '%Y-%m') = DATE_FORMAT(pyr.timestamp, '%Y-%m')
WHERE ps.PowerStationId = @PowerStationId

View File

@ -3287,7 +3287,7 @@ namespace SolarPower.Repository.Implement
FROM city c
LEFT JOIN weather_forecast wf ON wf.LocationName = c.`Name`
LEFT JOIN weather_description wd ON wd.WeatherName = wf.Wx
WHERE c.Priority = {CityId} AND '{now}' BETWEEN wf.StartTime AND wf.EndTime ORDER BY wf.CreatedAt desc";
WHERE c.Id = {CityId} AND '{now}' BETWEEN wf.StartTime AND wf.EndTime ORDER BY wf.CreatedAt desc";
result = await conn.QueryFirstOrDefaultAsync<NowWeather>(sql);
}
@ -3710,16 +3710,26 @@ namespace SolarPower.Repository.Implement
}
}
public async Task<List<PowerStation>> GetPowerStationsByCompanyId(int companyId)
public async Task<List<PowerStation>> GetPowerStationsByCompanyId(MyUser myUser)
{
List<PowerStation> result;
using (IDbConnection conn = this._databaseHelper.GetConnection())
{
try
{
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0 AND CompanyId = @CompanyId";
var sql = $"SELECT * FROM {tableName} ps";
result = (await conn.QueryAsync<PowerStation>(sql, new { CompanyId = companyId })).ToList();
if (myUser.Role.Layer == 2)
{
sql += " WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId ";
}
else
{
sql += @" LEFT JOIN power_station_operation_personnel op ON ps.Id = op.PowerStationId
WHERE ps.Deleted = 0 AND op.Deleted = 0 AND op.UserId = @UserId ";
}
result = (await conn.QueryAsync<PowerStation>(sql, new { CompanyId = myUser.CompanyId, UserId = myUser.Id })).ToList();
}
catch (Exception exception)
{
@ -3754,7 +3764,7 @@ namespace SolarPower.Repository.Implement
FROM power_station ps
LEFT JOIN `city` c ON ps.CityId = c.Id
LEFT JOIN {powerStationDic.Key}.controller con ON ps.Id = con.PowerStationId
LEFT JOIN {powerStationDic.Key}.inverter inv ON con.Id = inv.ControllerId
LEFT JOIN {powerStationDic.Key}.inverter inv ON con.Id = inv.ControllerId AND inv.Enabled = 1 AND inv.status != 0
WHERE ps.Deleted = 0
AND ps.Id IN ({powerStationIds})";
if (!string.IsNullOrEmpty(filter))
@ -4010,7 +4020,7 @@ namespace SolarPower.Repository.Implement
}
public async Task<List<PowerStationIdAndCity>> GetPowerStationsByCompanyIdWithfilter(int companyId, string filter)
public async Task<List<PowerStationIdAndCity>> GetPowerStationsByCompanyIdWithfilter(MyUser myUser, string filter)
{
List<PowerStationIdAndCity> result;
using (IDbConnection conn = this._databaseHelper.GetConnection())
@ -4018,14 +4028,23 @@ namespace SolarPower.Repository.Implement
try
{
var sql = $@"SELECT ps.Id AS PowerStationId , ps.`Name` AS PowerStationName,city.Name AS CityName FROM {tableName} ps
LEFT JOIN city ON city.Id = ps.CityId WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId ";
LEFT JOIN city ON city.Id = ps.CityId";
if (myUser.Role.Layer == 2)
{
sql += " WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId ";
}
else
{
sql += @" LEFT JOIN power_station_operation_personnel op ON ps.Id = op.PowerStationId
WHERE ps.Deleted = 0 AND op.Deleted = 0 AND op.UserId = @UserId ";
}
if (!string.IsNullOrEmpty(filter))
{
sql += @" AND ps.Name LIKE CONCAT('%', @Filter, '%')";
}
result = (await conn.QueryAsync<PowerStationIdAndCity>(sql, new { CompanyId = companyId, Filter = filter })).ToList();
result = (await conn.QueryAsync<PowerStationIdAndCity>(sql, new { CompanyId = myUser.CompanyId, UserId = myUser.Id, Filter = filter })).ToList();
}
catch (Exception exception)
{

View File

@ -546,13 +546,13 @@ namespace SolarPower.Repository.Interface
Task<SensorAvgHistory> CalcSensorAvgHistoryMonthDataByPowerStationId(string month, int powerStationId);
Task<int> AddSensorAvgHistoryMonthList(List<SensorAvgHistory> entity, List<string> properties);
Task<int> UpdateSensorAvgHistoryMonthList(List<SensorAvgHistory> entity);
Task<List<PowerStation>> GetPowerStationsByCompanyId(int companyId);
Task<List<PowerStation>> GetPowerStationsByCompanyId(MyUser myUser);
Task<List<PowerStationInverter>> GetPowerStationInverter(Dictionary<string, List<int>> dic, string filter);
Task<List<PowerStationDevice>> GetPowerStationDevice(Dictionary<string, List<int>> dic, string filter);
Task<List<InverterHistory>> GetInverterHistoryRowData(string nowDay, List<StationCodeWithInverterIds> entities);
Task<List<InverterHistory>> GetInverterHistoryByDate(string startDay, string endDay, List<StationIdWithInverterIds> entities);
Task<List<InverterHistory>> GetInverterHistoryByYear(string year, List<StationIdWithInverterIds> entities);
Task<List<PowerStationIdAndCity>> GetPowerStationsByCompanyIdWithfilter(int companyId, string filter);
Task<List<PowerStationIdAndCity>> GetPowerStationsByCompanyIdWithfilter(MyUser myUser, string filter);
Task<List<PowerStationIdAndCity>> GetPowerStationsAllWithfilter(string filter);
Task<List<Device>> GetDeviceByPowerStationIdAndDeviceIds(string db_name, int powerStationId, List<string> deviceIds);
Task<dynamic> GetSensorAvgByDevices(string date, byte searchType, List<Device> devices);

View File

@ -21,7 +21,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -217,7 +220,7 @@
PushSpecifyCurrentCompareCol(Single_day_compare_col);
})
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -225,7 +228,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
//#region 更換搜尋條件(日,日區間,月,年)
function changeType(type, e) {
@ -429,7 +432,7 @@
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.data.msg);
toast_error(rel.msg);
return;
}

View File

@ -6,24 +6,49 @@
@using SolarPower.Models.Role
@model RoleLayerEnum
<ol class="breadcrumb page-breadcrumb">
<div class="container-fluid">
<div class="row flex-nowrap wrapper">
<div class="col-md-2 col-1 pl-0 pr-0 collapse width border-right sidebar vh-100">
<div class="list-group border-0 card text-center text-md-left" id="sidebar">
<div class="border bg-light rounded-top">
<div class="form-group p-2 m-0 rounded-top">
<input type="text" class="form-control form-control-lg shadow-inset-2 m-0" id="js_list_accordion_filter" placeholder="">
</div>
<div id="js_list_accordion" class="accordion accordion-hover accordion-clean js-list-filter">
</div>
<span class="filter-message js-filter-message"></span>
</div>
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">交叉分析</a></li>
<li class="breadcrumb-item active">合併電站</li>
<li class="position-absolute pos-top pos-right d-none d-sm-block"><span class="js-get-date"></span></li>
</ol>
<div class="subheader">
</ol>
<div class="subheader">
<h1 class="subheader-title">
<i class='subheader-icon fal fa-globe'></i> 合併電站
</h1>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-xl-12">
<div id="panel-5" class="panel">
<div class="panel-container show">
<div class="panel-content">
<div class="row mb-3 d-flex align-items-center px-3">
@*<div class="row mb-3 d-flex align-items-center px-3">
<div class="pr-3">
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="Allcity()">全部縣市</button>
</div>
@ -49,7 +74,7 @@
</div>
</div>
</div>
</div>*@
<div class="row mb-5 d-flex align-items-top px-3">
<div class="pr-3">
@ -69,7 +94,7 @@
<div class="btn-group" id="js-demo-nesting" role="group" aria-label="Button group with nested dropdown">
<input type="date" class="form-control" id="DateGet" />
</div>
<div class="btn-group" id="DateGettextdiv" role="group" aria-label="Button group with nested dropdown" >
<div class="btn-group" id="DateGettextdiv" role="group" aria-label="Button group with nested dropdown">
<input type="text" class="form-control" id="DateGettext" />
</div>
</div>
@ -82,7 +107,7 @@
<div class="card">
<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>
<div class="ml-auto">kwh</div>
<div class="ml-auto">kW h</div>
</div>
<div class="card-body">
<div class="d-flex justify-content-between">
@ -114,15 +139,16 @@
<div class="card">
<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>有效日照時數</h4>
<div class="ml-auto">hr</div>
</div>
<div class="card-body">
<div class="d-flex justify-content-between">
<p>平均 kWh / kWp</p>
<p>平均有效日照時數</p>
<p><span class="color-info-700" id="total_kwhkwp">140.39</span></p>
</div>
<div class="d-flex justify-content-between">
<p>今日 kWh / kWp </p>
<p>今日有效日照時數 </p>
<p><span class="color-info-700" id="today_kwhkwp">4.53</span></p>
</div>
</div>
@ -130,6 +156,7 @@
<div class="card">
<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>
<div class="ml-auto">%</div>
</div>
<div class="card-body">
<div class="d-flex justify-content-between">
@ -193,9 +220,15 @@
</div>
</div>
</div>
</div>
</main>
</div>
</div>
@section Scripts{
<script>
var ids = new Array(0);//當前選擇縣市
@ -206,6 +239,8 @@
var datepicker;
var timerange;//選取時間
$(function () {
$('#collapse').trigger("click");
//#region 預設初始值
$('#DateGet').val(new Date().toISOString().substring(0, 10));
document.getElementById("DateGettextdiv").style.display = "none";//隱藏
@ -224,167 +259,13 @@
//#endregion
//#region 預設載入該使用者可以選擇的電站
var Nurl = "/PowerStation/GetSolarCitySummary";
$.post(Nurl, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
for (var i = 0; i < rel.data.length; i++) {
$('#city').append("<button type='button' class='btn btn-success waves-effect waves-themed ml-2' id='" + 'cityID_' + rel.data[i].cityId + "'>" +
rel.data[i].city +
"<span class= 'badge bg-success-700 ml-2' >" + rel.data[i].amount + "</span >" +
"</button >");
ids.push(String(rel.data[i].cityId));
Allids.push(String(rel.data[i].cityId));
}
var send_data = {
cityid: ids
}
ids.sort();
var Nurl = "/PowerStation/GetSolarByCity";
$.post(Nurl, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
$('#CheckPowerStation').empty();
$.each(rel.data, function (index, val) {
$('#CheckPowerStation').append("<div class='col-2 mb-2 custom-control custom-checkbox custom-control-inline' id='station_" + val.id + "' ></div>");
$('#station_' + val.id).append("<input type='checkbox' class='custom-control-input' id='check_" + val.id + "' checked>");
$('#station_' + val.id).append("<label class='custom-control-label' for='check_" + val.id + "'>" + val.name + "</label>");
powerids.push(String(val.id));
Allpowerids.push(String(val.id));
});
GetStationsCard();//5張卡片值
photoshow();//輪播圖片
})
})
//#region 載入左邊選單列表
GetPowerStationCollapse("");
//#endregion
})
//#region 選擇電站checkbox
$('#CheckPowerStation').on("click", "input", function () {
var clickid = $(this).attr('id');
var classid = clickid.split("_");
var job = document.getElementById(clickid);
if (job.checked == true) {
powerids.push(classid[1]);
}
else {
powerids.remove(classid[1]);
}
GetStationsCard();
})
//#endregion
//#region 縣市全選
function Allcity() {
var Newpowerids = new Array(0);
ids = [];
$.each(Allids, function (index, val) {
var cityid = 'cityID_' + val;
document.getElementById(cityid).setAttribute("class", 'btn btn-success waves-effect waves-themed ml-2');
ids.push(val);
});
var send_data = {
cityid: ids
}
var Nurl = "/PowerStation/GetSolarByCity";
$.post(Nurl, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
$('#CheckPowerStation').empty();
Allpowerids = [];
$.each(rel.data, function (index, val) {
if (powerids.includes(String(val.id))) {
$('#CheckPowerStation').append("<div class='col-2 mb-2 custom-control custom-checkbox custom-control-inline' id='station_" + val.id + "' > ");
$('#station_' + val.id).append("<input type='checkbox' class='custom-control-input' id='check_" + val.id + "' checked>");
$('#station_' + val.id).append("<label class='custom-control-label' for='check_" + val.id + "'>" + val.name + "</label>");
Newpowerids.push(String(val.id));
}
else {
$('#CheckPowerStation').append("<div class='col-2 mb-2 custom-control custom-checkbox custom-control-inline' id='station_" + val.id + "' > ");
$('#station_' + val.id).append("<input type='checkbox' class='custom-control-input' id='check_" + val.id + "'>");
$('#station_' + val.id).append("<label class='custom-control-label' for='check_" + val.id + "'>" + val.name + "</label>");
}
Allpowerids.push(String(val.id));
});
powerids = [];
powerids = Newpowerids;
})
GetStationsCard();
}
//#endregion
//#region 電站全選
function Allpowerstation() {
powerids = [];
$.each(Allpowerids, function (index, val) {
$('#check_' + val).prop("checked", true);
powerids.push(val);
})
GetStationsCard();
}
//#endregion
//#region 選擇縣市
$('#city').on("click", "button", function () {
var clickid = $(this).attr('id');
var classid = clickid.split("_");
var Newpowerids = new Array(0);
var value = document.getElementById(clickid).className;
ids.sort(function (a, b) {
return a - b;
});
var send_data = {
cityid: ids
}
if (value == 'btn btn-outline-success waves-effect waves-themed ml-2') { //選擇
document.getElementById(clickid).setAttribute("class", 'btn btn-success waves-effect waves-themed ml-2');
ids.push(classid[1]);
}
else { //取消
document.getElementById(clickid).setAttribute("class", 'btn btn-outline-success waves-effect waves-themed ml-2');
ids.remove(classid[1]);
}
ids.sort();
var Nurl = "/PowerStation/GetSolarByCity";
$.post(Nurl, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
$('#CheckPowerStation').empty();
Allpowerids = [];
$.each(rel.data, function (index, val) {
if (powerids.includes(String(val.id))) {
$('#CheckPowerStation').append("<div class='col-2 mb-2 custom-control custom-checkbox custom-control-inline' id='station_" + val.id + "' > ");
$('#station_' + val.id).append("<input type='checkbox' class='custom-control-input' id='check_" + val.id + "' checked>");
$('#station_' + val.id).append("<label class='custom-control-label' for='check_" + val.id + "'>" + val.name + "</label>");
Newpowerids.push(String(val.id));
}
else {
$('#CheckPowerStation').append("<div class='col-2 mb-2 custom-control custom-checkbox custom-control-inline' id='station_" + val.id + "' > ");
$('#station_' + val.id).append("<input type='checkbox' class='custom-control-input' id='check_" + val.id + "'>");
$('#station_' + val.id).append("<label class='custom-control-label' for='check_" + val.id + "'>" + val.name + "</label>");
}
Allpowerids.push(String(val.id));
});
powerids = [];
powerids = Newpowerids;
})
GetStationsCard();
})
//#endregion
//#region 更換搜尋條件(日,日區間,月,年)
function changeType(type, e) {
searchType = type;
@ -461,10 +342,8 @@
//#endregion
//#region 快速填入條件(EX.今昨天)
function quickSearch(day)
{
switch (searchType)
{
function quickSearch(day) {
switch (searchType) {
case 0:
if (day == 0) {
var today = new Date().toISOString().substring(0, 10);
@ -534,8 +413,7 @@
//#endregion
//#region 5張卡片值
function GetStationsCard()
{
function GetStationsCard() {
var send_data = {
stationIds: powerids,
timerange: timerange,
@ -567,8 +445,7 @@
//#endregion
//#region 圖片輪播
function photoshow()
{
function photoshow() {
var url_image = "/PowerStation/GetAllPowerStationsALLImage";
var send_data = {
powerStationId: powerids
@ -612,6 +489,7 @@
}
var listmonth = new Array(0);
var listirradiance = new Array(0);
var listtemperature = new Array(0);
var listkwh = new Array(0);
var Nurl = "/AnalysisStationCombine/GetChart";
@ -622,8 +500,9 @@
}
$.each(rel.data, function (index, val) {
listmonth.push(val.time);
listirradiance.push(val.irradiance);
listkwh.push(val.kwh);
listirradiance.push(val.irradiance.toFixed(2));
listkwh.push(val.kwh.toFixed(2));
listtemperature.push(val.temperature.toFixed(2));
})
$('#station-convas-div').empty();
$('#station-convas-div').append('<canvas id="station-convas"></canvas>');
@ -634,6 +513,16 @@
data: {
labels: listmonth,
datasets: [{
type: 'line',
label: '模組溫度(℃)',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointRadius: 4,
yAxisID: 'C',
fill: false,
data: listtemperature
},{
type: 'line',
label: '日照度(kWh/㎡)',
borderColor: 'rgb(190, 45, 45)',
@ -684,6 +573,17 @@
display: true,
labelString: 'kWh/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}
@ -693,5 +593,109 @@
}
//#endregion
//#region 左邊的搜索欄位
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
}
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}*@
$("#js_list_accordion_filter").change(function (e) {
GetPowerStationCollapse($(this).val());
});
$('#js_list_accordion').on("change", 'input[name="selectedPowerStationLayer2[]"]', function (event) {
if (this.checked) {
powerids.push(this.value);
} else {
powerids.splice($.inArray(this.value, powerids), 1);
}
GetStationsCard();//5張卡片值
photoshow();//輪播圖片
});
function GetPowerStationCollapse(filter) {
var url = "/StationReport/GetPowerStationNameList"
var send_data = {
Filter: filter
}
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
var powerStationCollapse = rel.data;
$('#js_list_accordion').empty();
var xxx = Object.keys(powerStationCollapse).length
if (Object.keys(powerStationCollapse).length <= 0) {
$('#js_list_accordion').append("<div>查無結果</div>");
}
var str = "";
Object.keys(powerStationCollapse).map(function (key, index) {
str += '<div class="card border-top-left-radius-0 border-top-right-radius-0" id="templateCard">' +
'<div class="card-header">' +
'<a href="javascript:void(0);" class="card-title collapsed" data-toggle="collapse" data-target="#js_list_accordion-' + index + '" aria-expanded="false" data-filter-tags="settings">' +
'<i class="fal fa-globe width-2 fs-xl"></i>' +
'<span class="city-name">' + key + '</span>' +
'<span class="ml-auto">' +
'<span class="collapsed-reveal"><i class="fal fa-chevron-up fs-xl"></i></span>' +
'<span class="collapsed-hidden"><i class="fal fa-chevron-down fs-xl"></i></span>' +
'</span>' +
'</a>' +
'</div>' +
'<div id="js_list_accordion-' + index + '" class="collapse" data-parent="#js_list_accordion-' + index + '" style="">' +
'<div class="card-body">' +
'<ul class="list-group list-group-flush">';
$.each(powerStationCollapse[key], function (index, powerStation) {
str += '<li class="list-group-item">' +
'<div class="d-flex justify-content-between">' +
'<h4 class="font-weight-bold"><i class="fal fa-charging-station"></i> ' + powerStation.powerStationName + '</h4>' +
'<div class="">' +
'<input type="checkbox" class="" name="selectedPowerStationLayer2[]" value="' + powerStation.powerStationId + '" valueName ="' + powerStation.powerStationName + '">' +
'</div>' +
'</div>' +
'</li>';
});
str += '</ul>';
str += '</div>';
str += '</div>';
});
$('#js_list_accordion').append(str);
$('#js_list_accordion').find('.card').first().addClass(" border-top-left-radius-0 border-top-right-radius-0");
if (powerids.length <= 0) {
$('input[name="selectedPowerStationLayer2[]"]').trigger("click");
}
$('input[name="selectedPowerStationLayer2[]"]').each(function () {
if ($.inArray(this.value, powerids) > -1) {
$(this).prop('checked', true);
}
});
$("#js_list_accordion .collapse").collapse('show');
}, 'json');
}
//#endregion
</script>
}

View File

@ -21,7 +21,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -166,7 +169,7 @@
//#endregion
})
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -174,7 +177,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
//#region 更換搜尋條件(日,日區間,月,年)
function changeType(type, e) {
@ -444,7 +447,7 @@
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.data.msg);
toast_error(rel.msg);
return;
}

View File

@ -967,7 +967,22 @@
$("#power_station_operation_personnel").select2();
var ps_company_text = $("#select_power_station_company").find(':selected').text();
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformUser)
{
<text>
Swal.fire(
{
title: "",
text: "你確定是否要將該電站加入至【" + ps_company_text + "】?",
type: "question",
icon: 'question',
showCancelButton: true,
confirmButtonText: "是",
cancelButtonText: "否"
}).then(function (result) {
if (result.value) {
var url = "/PowerStation/SavePowerStationInfo";
var send_data = {
@ -1016,6 +1031,64 @@
}
}, 'json');
}
});
</text>
}
else
{
<text>
var url = "/PowerStation/SavePowerStationInfo";
var send_data = {
Id: stationId,
CityId: $("#select_city").val(),
AreaId: $("#select_area").val(),
Address: $("#address_detail").val(),
Name: $("#power_station_name").val(),
IsEscrow: $('#check_escrow').is(':checked') ? 1 : 0,
ElectricityMeterAt: $("#electricity_meter_at").val(),
EstimatedRecoveryTime: $("#estimated_recovery_time").val(),
GeneratingCapacity: $("#generating_capacity").val(),
EscrowName: $('#check_escrow').is(':checked') ? $("#escrow_name").val() : "",
PowerRate: $("#power_rate").val(),
Coordinate: $("#coordinate").val(),
OperationPersonnelIds: $("#power_station_operation_personnel").val(),
InverterBrand: $("#inverter_brand").val(),
InverterProductModel: $("#inverter_product_model").val(),
InverterAmount: $("#inverter_amount").val(),
PhotovoltaicPanelBrand: $("#photovoltaic_panel_brand").val(),
PhotovoltaicPanelSpecification: $("#photovoltaic_panel_specification").val(),
PhotovoltaicPanelAmount: $("#photovoltaic_panel_amount").val(),
PhotovoltaicPanelProductModel: $("#photovoltaic_panel_product_model").val(),
SolarType: $("#select_solar_tpye").val(),
line_token: $("#line_token").val(),
Estimate_kwh: $("#estimate_kwh").val(),
EstimateEfficacy: $("#estimate_efficacy").val(),
CompanyId: $("#select_power_station_company").val(),
}
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
toast_ok(rel.msg);
if (stationId == "new") {
window.location = "/PowerStation/Edit?stationId=" + rel.data.id
} else {
//回填資料
powerStationData = rel.data;
SetStationInfo();
ChangeMode("station_info", "view");
}
}, 'json');
</text>
}
}
//#endregion
//#region 儲存能源局台電資料資訊

View File

@ -187,7 +187,7 @@
</div>
<div class="row">
<div class="row align-items-end">
@*
<div class="col-xl-6">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">逆變器</h5>
@ -216,31 +216,31 @@
</div>
</div>
*@
<div class="col-xl-6">
<div class="col-xl-8">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
<div class="row d-flex justify-content-between px-5">
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_brand_label" for="photovoltaic_panel_brand">廠牌</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_brand_text" class="color-info-600"></label>
<input type="text" id="photovoltaic_panel_brand" name="photovoltaic_panel_brand" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_specification_label" for="photovoltaic_panel_specification">規格</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_specification_text" class="color-info-600"></label>
<input type="text" id="photovoltaic_panel_specification" name="photovoltaic_panel_specification" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
<input type="number" step="1" id="photovoltaic_panel_amount" name="photovoltaic_panel_amount" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_product_model_label" for="photovoltaic_panel_product_model">型號</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_product_model_text" class="color-info-600"></label>

View File

@ -1252,8 +1252,8 @@
</div>
<!--Base JS-->
<script src="~/js/vendors.bundle.js"></script>
<script src="~/js/app.bundle.js"></script>
<script src="~/js/vendors.bundle.js" asp-append-version="true"></script>
<script src="~/js/app.bundle.js" asp-append-version="true"></script>
<!-- JQuery Validate -->
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation/dist/localization/messages_zh_TW.js"></script>

View File

@ -398,6 +398,7 @@
default:
console.log(`Sorry, we are out of ${val.solarType}.`);
}
$('#card_' + val.id).find('#editSolarUrl').find('#Solarimg').attr('src', val.mainDisplay);
$('#card_' + val.id).find('#stationtype').html(type);
var time = new Date(val.createdAt);
$('#card_' + val.id).find('#editSolarUrl').attr('href', localurl + '/Info?stationId=' + val.id);

View File

@ -303,7 +303,7 @@
label: '輸出功率',
yAxisID: 'A',
backgroundColor: 'rgb(103, 180, 172)',
order: 2,
order: 3,
data: chartToday.powerDatas
}, {
type: 'line',
@ -317,8 +317,22 @@
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
order: 1,
order: 2,
data: chartToday.irradianceDatas,
}, {
type: 'line',
label: '模組溫度',
yAxisID: 'C',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
order: 1,
data: chartToday.temperatureDatas,
}]
},
options: {
@ -353,6 +367,17 @@
display: true,
labelString: 'W/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}
@ -370,7 +395,7 @@
label: '輸出功率',
yAxisID: 'A',
backgroundColor: 'rgb(103, 180, 172)',
order: 2,
order: 3,
data: chart7day.powerDatas
}, {
type: 'line',
@ -383,9 +408,23 @@
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
order: 1,
order: 2,
fill: false,
data: chart7day.irradianceDatas,
}, {
type: 'line',
label: '模組溫度',
yAxisID: 'C',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
order: 1,
data: chart7day.temperatureDatas,
}]
},
options: {
@ -420,6 +459,17 @@
display: true,
labelString: 'W/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}
@ -437,7 +487,7 @@
label: '輸出功率',
yAxisID: 'A',
backgroundColor: 'rgb(103, 180, 172)',
order: 2,
order: 3,
data: chartMonth.powerDatas
}, {
type: 'line',
@ -450,9 +500,23 @@
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
order: 1,
order: 2,
fill: false,
data: chartMonth.irradianceDatas,
}, {
type: 'line',
label: '模組溫度',
yAxisID: 'C',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
order: 1,
data: chartMonth.temperatureDatas,
}]
},
options: {
@ -487,6 +551,17 @@
display: true,
labelString: 'W/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}
@ -520,6 +595,20 @@
order: 1,
fill: false,
data: chartYear.irradianceDatas,
}, {
type: 'line',
label: '模組溫度',
yAxisID: 'C',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
order: 1,
data: chartYear.temperatureDatas,
}]
},
options: {
@ -554,6 +643,17 @@
display: true,
labelString: 'W/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}
@ -2216,6 +2316,9 @@
var listcolor = new Array(0);
var listcolor2 = new Array(0);
var listirradiance = new Array(0);
var listtemperature = new Array(0);
var listsolarhour = new Array(0);
var listpr = new Array(0);
var color = rgba(1);
var color2 = rgba(2);
$.each(rel.data, function (index, val) {
@ -2241,10 +2344,13 @@
'<td>' + val.temp.toFixed(2) + '</td>' +
'</tr>');
listmonth.push(val.timestamp);
listkwh.push(val.kwh);
listkwh.push(val.kwh.toFixed(2));
listcolor.push(color);
listcolor2.push(color2);
listirradiance.push(val.irradiance);
listirradiance.push(val.irradiance.toFixed(2));
listtemperature.push(val.temp.toFixed(2));
listsolarhour.push(val.solarhour.toFixed(2));
listpr.push(val.pr.toFixed(2));
}
else
{
@ -2259,10 +2365,13 @@
'<td>' + val.temp.toFixed(2) + '</td>' +
'</tr>');
listmonth.push(val.timestamp);
listkwh.push(val.kwh);
listkwh.push(val.kwh.toFixed(2));
listcolor.push(color);
listcolor2.push(color2);
listirradiance.push(val.irradiance);
listirradiance.push(val.irradiance.toFixed(2));
listtemperature.push(val.temp.toFixed(2));
listsolarhour.push(val.solarhour.toFixed(2));
listpr.push(val.pr.toFixed(2));
}
@ -2280,15 +2389,48 @@
type: 'bar',
data: {
labels: listmonth,
datasets: [{
datasets: [
{
type: 'line',
label: '溫度(℃)',
yAxisID: 'E',
borderColor: 'rgb(255, 192, 0)',
pointBackgroundColor: 'rgb(255, 192, 0)',
pointBorderColor: 'rgb(255, 192, 0)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
data: listtemperature
}, {
type: 'line',
label: '日照度(kWh/㎡)',
borderColor: 'rgba(190, 45, 45,1)',
pointRadius: 4,
yAxisID: 'B',
borderColor: 'rgba(190, 45, 45,1)',
pointBackgroundColor: 'rgb(190, 45, 45,1)',
pointBorderColor: 'rgb(190, 45, 45,1)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
data: listirradiance
}, {
},{
type: 'bar',
label: 'PR(%)',
yAxisID: 'D',
backgroundColor: 'rgba(68, 114, 196)',
borderWidth: 1,
data: listpr
},{
type: 'bar',
label: '發電小時',
yAxisID: 'C',
backgroundColor: 'rgba(165, 165, 165)',
borderWidth: 1,
data: listsolarhour
},{
type: 'bar',
backgroundColor: 'rgba(103, 180, 172, 1)',
borderWidth: 1,
@ -2329,6 +2471,39 @@
display: true,
labelString: 'kWh/㎡'
}
}, {
id: 'C',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: 'hr'
}
}, {
id: 'D',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: 'PR(%)'
}
}, {
id: 'E',
type: 'linear',
position: 'right',
ticks: {
min: 0
},
scaleLabel: {
display: true,
labelString: '℃'
}
}]
}
}

View File

@ -157,29 +157,29 @@
</div>
<div class="row">
<div class="col-xl-6">
<div class="row align-items-end">
<div class="col-xl-8">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
<div class="row d-flex justify-content-between px-5">
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_brand_label" for="photovoltaic_panel_brand">廠牌</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_brand_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_specification_label" for="photovoltaic_panel_specification">規格</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_specification_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_product_model_label" for="photovoltaic_panel_product_model">型號</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_product_model_text" class="color-info-600"></label>

View File

@ -166,7 +166,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3" id="collapse"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -514,7 +517,7 @@
//#endregion
//#region 左邊的搜索欄位
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -522,7 +525,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
$("#js_list_accordion_filter").change(function (e) {
GetPowerStationCollapse($(this).val());
@ -562,7 +565,7 @@
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.data.msg);
toast_error(rel.msg);
return;
}

View File

@ -26,7 +26,7 @@
"CalcAvgPowerStationJob": "0 0 2 * * ?",
"OperationScheduleJob": "0 0 2 * * ?",
"CalcInverter15minJob": "0 2/15 * * * ?",
"SendEmailJob": "0 0 3 * * ?"
"SendEmailJob": "0 15 2 * * ?"
},
"SMTPConfig": {
"Host": "smtp.gmail.com",

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SolarPower", "SolarPower\SolarPower.csproj", "{6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "solarApp", "solarApp\solarApp.csproj", "{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C88BBD7-5A1F-47B8-BF46-9CBDC73EF2E9}.Release|Any CPU.Build.0 = Release|Any CPU
{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D54E7DA-4EF8-42A3-85D3-39DD08AC9A0C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

9
solarApp/App.config Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<!--<add name="mySql" connectionString="server=172.16.251.248;database=healthdep;user=idafenweb;password=P@ssw0rd;charset=utf8;" />-->
<!--<add name="mySql" connectionString="server=127.0.0.1;database=healthdep;user=root;password=zxcvb123;charset=utf8;" />-->
<add name="mySql" connectionString="server=60.251.164.103;user=webuser;Database=solar_master;Port=11306;password=FICadmin99;charset='utf8';pooling=true;sslmode=none;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
</configuration>

48
solarApp/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,48 @@

namespace solarApp
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1269, 751);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
}
}

21
solarApp/Form1.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace solarApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}

60
solarApp/Form1.resx Normal file
View File

@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

106
solarApp/Model/inv_hour.cs Normal file
View File

@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace solarApp.Model
{
//public class raw_inv
//{
// // public string ID { get; set; }
// // public string TIMESTAMP { get; set; }
// // public string SITEID { get; set; }
// // public string SITETYPE { get; set; }
// // public string CONTROLLERID { get; set; }
// public string INVERTERID { get; set; }
// public string reportdate { get; set; }
// //public double SN { get; set; }
// //public double AC1V { get; set; }
// //public double AC1A { get; set; }
// //public double AC1W { get; set; }
// //public double AC1F { get; set; }
// //public double AC1WH { get; set; }
// //public double AC2V { get; set; }
// //public double AC2A { get; set; }
// //public double AC2W { get; set; }
// //public double AC2F { get; set; }
// //public double AC2WH { get; set; }
// //public double AC3V { get; set; }
// //public double AC3A { get; set; }
// //public double AC3W { get; set; }
// //public double AC3F { get; set; }
// //public double AC3WH { get; set; }
// //public double ACRUNTIME { get; set; }
// //public double DC1V { get; set; }
// //public double DC1A { get; set; }
// //public double DC1W { get; set; }
// //public double DC1WH { get; set; }
// //public double DC2V { get; set; }
// //public double DC2A { get; set; }
// //public double DC2W { get; set; }
// //public double DC2WH { get; set; }
// //public double DC3V { get; set; }
// //public double DC3A { get; set; }
// //public double DC3W { get; set; }
// //public double DC3WH { get; set; }
// //public double DC4V { get; set; }
// //public double DC4A { get; set; }
// //public double DC4W { get; set; }
// //public double DC4WH { get; set; }
// //public double DC5V { get; set; }
// //public double DC5A { get; set; }
// //public double DC5W { get; set; }
// //public double DC5WH { get; set; }
// //public double DCRUNTIME { get; set; }
// public double WH { get; set; }
// public double TODAYKWH { get; set; }
// public double TOTALKWH { get; set; }
// public double PR { get; set; }
// public int ct { get; set; }
// //public double RA1 { get; set; }
// //public double RA2 { get; set; }
// //public double RA3 { get; set; }
// //public double RA4 { get; set; }
// //public double RA5 { get; set; }
//}
public class raw_inv
{
public string INVERTERID { get; set; }
public string reportdate { get; set; }
public double WH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
}
public class raw_inv_hour
{
public string INVERTERID { get; set; }
public string reportdate { get; set; }
public double KWH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
public int count { get; set; }
}
public class web_inv_hour
{
public string INVERTERID { get; set; }
public string reportdate { get; set; }
public double KWH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
}
public class web_inv_list
{
public string dbName { get; set; }
public string inverterid { get; set; }
}
}

View File

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace solarApp.Model
{
public class raw_statino
{
// public string siteid { get; set; }
public string reportdate { get; set; }
public double KWH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
public double SOLARHOUR { get; set; }
public double kwhkwp { get; set; }
}
public class raw_station_day
{
// public string siteid { get; set; }
public string reportdate { get; set; }
public double KWH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
public double SOLARHOUR { get; set; }
public double kwhkwp { get; set; }
public int count { get; set; }
}
public class web_station_hour
{
public string siteid { get; set; }
public string reportdate { get; set; }
public double KWH { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
public double SOLARHOUR { get; set; }
public double kwhkwp { get; set; }
//public double MONEY { get; set; }
//public double TODAYMONEY { get; set; }
//public double CARBON { get; set; }
//public double TODAYCARBON { get; set; }
}
public class web_station_day
{
public string siteid { get; set; }
public string reportdate { get; set; }
public double TODAYKWH { get; set; }
public double TOTALKWH { get; set; }
public double PR { get; set; }
public double SOLARHOUR { get; set; }
public double kwhkwp { get; set; }
}
public class station_list
{
public string id { get; set; }
public string CompanyID { get; set; }
public string SiteID { get; set; }
public string SiteDB { get; set; }
public string SiteName { get; set; }
}
}

23
solarApp/Program.cs Normal file
View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace solarApp
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new fmMain());
}
}
}

View File

@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using System.Text;
using MySql.Data.MySqlClient;
using Dapper;
using solarApp.Model;
using System.Configuration;
using System.Threading.Tasks;
namespace solarApp.Service
{
public class get_inv_svc
{
string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString;
/// <summary>
/// inverter 原始資料 - 5 min
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<raw_inv> Get_rawInv(string reportDate, string invID, string siteDB, string siteID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
//string sql = @"select ID, TIMESTAMP, SITEID, SITETYPE, CONTROLLERID, INVERTERID, SN, AC1V, AC1A, AC1W, AC1F, AC1WH, AC2V, AC2A, AC2W, AC2F, AC2WH, AC3V, AC3A, AC3W, AC3F, AC3WH, ACRUNTIME, DC1V, DC1A, DC1W, DC1WH, DC2V, DC2A, DC2W, DC2WH, DC3V, DC3A, DC3W, DC3WH, DC4V, DC4A, DC4W, DC4WH, DC5V, DC5A, DC5W, DC5WH, DCRUNTIME, WH, TODAYKWH, TOTALKWH, PR, RA1, RA2, RA3, RA4, RA5
// from solar_com0002.s02202000101_inv order by id desc limit 100; ";
string sql = @"select id , FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, inverterid, WH,round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH,round(PR, 2) PR, RA1
from " + siteDB + ".s" + siteID + @"_inv where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') , 10) = '" + reportDate + "' and inverterid = '" + invID + "'";
//List<raw_inv> ds = conn.Query<raw_inv>(sql, new { kind = kind }).ToList();
List<raw_inv> ds = conn.Query<raw_inv>(sql).AsList<raw_inv>();
conn.Close();
return ds;
}
}
/// <summary>
/// 每小時平均值 inverter 原始資料 - hour
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<raw_inv_hour> get_Inv_rawAvg(string reportDate, string invID, string siteDB, string siteID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
//string sql = @"select left(reportdate, 13)reportdate, inverterid, round((sum(WH)/1000), 2) KWH, round(max(TODAYKWH), 2) TODAYKWH,
// round(max(TOTALKWH), 2) TOTALKWH, round(max(PR), 2) PR, count(*) count
// from v_inv_temp where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + "' " +
// "group by left(reportdate, 13), inverterid"; //round(avg(PR), 2) PR,
string sql = @" select a.reportdate, a.inverterid, a.KWH, b.TODAYKWH, b.TOTALKWH, b.PR, a.count from
(
select left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') , 13)reportdate, inverterid
,round((sum(WH)/1000), 2) KWH, count(*) count
from " + siteDB + ".s" + siteID + @"_inv
where FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') = '" + reportDate + "' and inverterid = '" + invID + @"'
group by left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 13), inverterid
)a join (
select FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR
from " + siteDB + ".s" + siteID + @"_inv
where FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d') = '" + reportDate + @"' and right(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 2) = '55' and inverterid = '" + invID + @"'
)b on a.reportdate = left(b.reportdate, 13) and a.inverterid = b.inverterid ";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
/// <summary>
/// web 呈現值 每小時平均值 inverter - hour
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<web_inv_hour> get_web_Inv_hour(string reportDate, string invID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR
from inverter_history_hour where left(`TIMESTAMP`, 10) = '" + reportDate + "' and inverterid = '" + invID + "' ";
List<web_inv_hour> ds = conn.Query<web_inv_hour>(sql).AsList<web_inv_hour>();
conn.Close();
return ds;
}
}
public List<web_inv_hour> get_web_Inv_day(string reportDate, string invID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR
from inverter_history_day where left(`TIMESTAMP`, 10) = '" + reportDate + "' and inverterid = '" + invID + "' ";
List<web_inv_hour> ds = conn.Query<web_inv_hour>(sql).AsList<web_inv_hour>();
conn.Close();
return ds;
}
}
public List<web_inv_hour> get_web_Inv_month(string reportDate, string invID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"select `TIMESTAMP` reportdate, inverterid, KWH, TODAYKWH, TOTALKWH, round(PR, 2) PR
from inverter_history_month where left(`TIMESTAMP`, 7) = '" + reportDate + "' and inverterid = '" + invID + "' ";
List<web_inv_hour> ds = conn.Query<web_inv_hour>(sql).AsList<web_inv_hour>();
conn.Close();
return ds;
}
}
/// <summary>
///
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<web_inv_list> get_Inv_list(string siteDB, string siteID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"select dbname, inverterid from v_company_inv where dbname = @siteDB and left(inverterid, 9) = @siteID";
List<web_inv_list> ds = conn.Query<web_inv_list>(sql, new { siteDB = siteDB, siteID = siteID }).AsList<web_inv_list>();
conn.Close();
return ds;
}
}
}
}

View File

@ -0,0 +1,155 @@
using System;
using System.Collections.Generic;
using System.Text;
using MySql.Data.MySqlClient;
using Dapper;
using solarApp.Model;
using System.Configuration;
namespace solarApp.Service
{
/// <summary>
/// 電站原始資料 rawData
/// </summary>
public class getStationSvc
{
string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString;
/// <summary>
/// 電站 Raw Data
/// </summary>
/// <param name="reportDate"></param>
/// <param name="siteDB"></param>
/// <param name="siteID"></param>
/// <returns></returns>
public List<raw_statino> get_station_raw(string reportDate, string siteDB, string siteID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"select id , FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i') reportdate, siteid, round(KWH, 3) KWH, round(TODAYKWH, 3) TODAYKWH,
round(TOTALKWH, 3)TOTALKWH, round(PR, 3) PR, round(TODAYKWH, 3)SOLARHOUR , round(kwhkwp, 3) kwhkwp
from " + siteDB + ".s" + siteID + @"_station
where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) = @reportDate";
List<raw_statino> ds = conn.Query<raw_statino>(sql, new { reportDate = reportDate }).AsList<raw_statino>();
conn.Close();
return ds;
}
}
#region 使 view
public List<raw_station_day> create_v_station_inv(string date1, string date2)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @" select siteid, left(reportdate, 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH,
round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count
from v_station_temp
where left(reportdate, 10) between @date1 and @date2
group by siteid, left(reportdate, 10)";
List<raw_station_day> ds = conn.Query<raw_station_day>(sql, new { date1 = date1, date2 = date2 }).AsList<raw_station_day>();
conn.Close();
return ds;
}
}
#endregion
/// <summary>
/// 電站每天平均 from RawData
/// </summary>
/// <param name="date1"></param>
/// <param name="date2"></param>
/// <returns></returns>
public List<raw_station_day> get_station_rawAvg(string date1, string date2, string siteDB, string siteID)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
//string sql = @" select siteid, left(reportdate, 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH,
// round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count
// from v_station_temp
// where left(reportdate, 10) between @date1 and @date2
// group by siteid, left(reportdate, 10)";
string sql = @" select siteid, left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) reportdate, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH,
round((max(PR)), 2) PR, round((max(SOLARHOUR)), 2) SOLARHOUR, round((max(KWHKWP)), 2) KWHKWP, count(*) count
from " + siteDB+ ".s"+ siteID + @"_station
where left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10) between @date1 and @date2
group by siteid, left(FROM_UNIXTIME(`TIMESTAMP`/1000,'%Y-%m-%d %H:%i'), 10)";
List<raw_station_day> ds = conn.Query<raw_station_day>(sql, new { date1 = date1, date2 = date2 }).AsList<raw_station_day>();
conn.Close();
return ds;
}
}
/// <summary>
/// web 呈現值 station - hour
/// </summary>
/// <param name="reportDate"></param>
/// <returns></returns>
public List<web_station_hour> get_web_station_hour(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d %H') reportdate, siteid, round(KWH, 2) KWH, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH,
round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money
from power_station_history_hour where left(`TIMESTAMP`, 10) = '" + reportDate + "' ";
List<web_station_hour> ds = conn.Query<web_station_hour>(sql).AsList<web_station_hour>();
conn.Close();
return ds;
}
}
/// <summary>
/// web 呈現值 station - day
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<web_station_hour> get_web_station_day(string date1, string date2)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') reportdate, siteid, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH,
round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money
from power_station_history_day where left(`TIMESTAMP`, 10) between @date1 and @date2 ";
List<web_station_hour> ds = conn.Query<web_station_hour>(sql, new { date1 = date1, date2 = date2 }).AsList<web_station_hour>();
conn.Close();
return ds;
}
}
public List<web_station_hour> get_web_station_month(string date1, string date2)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @" select DATE_FORMAT(`TIMESTAMP`,'%Y-%m-%d') reportdate, siteid, round(TOTALKWH, 2) TOTALKWH, round(PR, 3) PR, round(KWHKWP, 3) KWHKWP, money
from power_station_history_month where left(`TIMESTAMP`, 7) between @date1 and @date2 ";
List<web_station_hour> ds = conn.Query<web_station_hour>(sql, new { date1 = date1, date2 = date2 }).AsList<web_station_hour>();
conn.Close();
return ds;
}
}
/// <summary>
/// 取得電站資訊
/// </summary>
/// <returns></returns>
public List<station_list> get_station_list()
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open(); // 01 控制器編號
string sql = @" select id, CompanyId, `code` , SerialNumber, CONCAT(`code` ,'01') SiteID, SiteDB, `name` SiteName
from power_station
where id in (1, 8)";
List<station_list> ds = conn.Query<station_list>(sql).AsList<station_list>();
conn.Close();
return ds;
}
}
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace solarApp.Service
{
//static class myHelper
//{
//}
public static class ListHelper
{
public static string ToSiteTable(this IList<String> list)
{
return string.Join(", ", list.ToArray());
}
}
}

View File

@ -0,0 +1,222 @@
using System;
using System.Collections.Generic;
using System.Text;
using MySql.Data.MySqlClient;
using Dapper;
using solarApp.Model;
using System.Configuration;
using System.Threading.Tasks;
namespace solarApp.Service
{
public class procInvSvc
{
string Connection1 = ConfigurationManager.ConnectionStrings["mySql"].ConnectionString;
/// <summary>
/// 每小時平均值 inverter 原始資料 - hour
/// </summary>
/// <param name="reportDate"></param>
/// <param name="invID"></param>
/// <returns></returns>
public List<raw_inv_hour> proc_Inv_hour(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
//string sql = @" select a.reportdate, a.inverterid, a.KWH, b.TODAYKWH, b.TOTALKWH, b.PR, a.count from
// (
// select left(reportdate, 13)reportdate, inverterid
// ,round((sum(WH)/1000), 2) KWH, count(*) count
// from v_inv_temp
// where left(reportdate, 10) = '" + reportDate + "' and inverterid = '" + invID + @"'
// group by left(reportdate, 13), inverterid
// )a join (
// select reportdate, round(TODAYKWH, 2) TODAYKWH, round(TOTALKWH, 2) TOTALKWH, inverterid, round(PR, 2) PR
// from v_inv_temp
// where left(reportdate, 10) = '" + reportDate + @"' and right(reportdate, 2) = '55' and inverterid = '" + invID + @"'
// )b on a.reportdate = left(b.reportdate, 13) and a.inverterid = b.inverterid ";
string sql = @"
INSERT INTO `solar_master`.`inverter_history_hour`(`PowerStationId`, `INVERTERID`, `TIMESTAMP`, Irradiance, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`,
`AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`,
`DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `ACKW`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`)
SELECT 1 powerStationID, a.INVERTERID, concat(a.reportDate,':00:00') reportDate, IFNULL(Irradiance, 0), a.AC1V, a.AC1A, a.AC1W, a.AC1F, a.AC1WH, a.AC2V, a.AC2A, a.AC2W, a.AC2F, a.AC2WH,
a.AC3V, a.AC3A, a.AC3W, a.AC3F, a.AC3WH, a.DC1V, a.DC1A, a.DC1W, a.DC1WH, a.DC2V, a.DC2A, a.DC2W, a.DC2WH, a.DC3V, a.DC3A, a.DC3W,
a.DC3WH, a.DC4V, a.DC4A, a.DC4W, a.DC4WH, a.DC5V, a.DC5A, a.DC5W, a.DC5WH, inv_pr.PR, a.RA1, a.RA2, a.RA3, a.RA4, a.RA5, a.KWH, a.TODAYKWH, a.TOTALKWH,
i.Capacity, (a.KWH / i.Capacity) AS KWHKWP
from
( -- KWH
SELECT FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, a.INVERTERID,
AVG(a.AC1V) AS AC1V, AVG(a.AC1A) AS AC1A, SUM(a.AC1W) AS AC1W,
AVG(a.AC1F) AS AC1F, SUM(a.AC1WH) AS AC1WH, AVG(a.AC2V) AS AC2V,
AVG(a.AC2A) AS AC2A, SUM(a.AC2W) AS AC2W, AVG(a.AC2F) AS AC2F,
SUM(a.AC2WH) AS AC2WH,AVG(a.AC3V) AS AC3V, AVG(a.AC3A) AS AC3A,
SUM(a.AC3W) AS AC3W, AVG(a.AC3F) AS AC3F, SUM(a.AC3WH) AS AC3WH,
AVG(a.DC1V) AS DC1V, AVG(a.DC1A) AS DC1A, SUM(a.DC1W) AS DC1W,
SUM(a.DC1WH) AS DC1WH, AVG(a.DC2V) AS DC2V, AVG(a.DC2A) AS DC2A,
SUM(a.DC2W) AS DC2W, SUM(a.DC2WH) AS DC2WH, AVG(a.DC3V) AS DC3V,
AVG(a.DC3A) AS DC3A, AVG(a.DC3W) AS DC3W, AVG(a.DC3WH) AS DC3WH,
AVG(a.DC4V) AS DC4V, AVG(a.DC4A) AS DC4A, SUM(a.DC4W) AS DC4W,
SUM(a.DC4WH) AS DC4WH,AVG(a.DC5V) AS DC5V, AVG(a.DC5A) AS DC5A,
SUM(a.DC5W) AS DC5W, SUM(a.DC5WH) AS DC5WH, #inv_pr.PR AS PR,
AVG(a.RA1) AS RA1, AVG(a.RA2) AS RA2, AVG(a.RA3) AS RA3,
AVG(a.RA4) AS RA4, AVG(a.RA5) AS RA5, # a.KWH,
MAX(a.TODAYKWH) AS TODAYKWH, MAX(a.TOTALKWH) AS TOTALKWH, (SUM(a.WH)/1000) AS KWH
FROM s02202000101_inv a
WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04'
GROUP BY left(FROM_UNIXTIME(a.TIMESTAMP/ 1000, '%Y-%m-%d %H'), 13), a.INVERTERID
) a
LEFT JOIN( -- PR
SELECT FROM_UNIXTIME(inv.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, inv.INVERTERID, inv.PR
FROM s02202000101_inv inv
WHERE left(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 10) = '2021-08-04'
and right(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 2) = '55'
GROUP BY FROM_UNIXTIME(inv.TIMESTAMP/ 1000, '%Y-%m-%d %H'), inv.INVERTERID
) inv_pr
ON a.reportDate = inv_pr.reportDate AND a.INVERTERID = inv_pr.INVERTERID
--
LEFT JOIN solar_com0002.inverter i ON a.INVERTERID = i.InverterId
-- ----------------------
left join (
select FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H') AS reportDate, round(avg(SENSORAVG01),3) Irradiance
from s02202000101_sensoravg a
where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0
group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H')
)irr on a.reportDate = irr.reportDate ;";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
public List<raw_inv_hour> proc_Inv_day(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"
INSERT INTO `solar_master`.`inverter_history_day`(`PowerStationId`, `INVERTERID`, `TIMESTAMP`, Irradiance, `AC1V`, `AC1A`, `AC1W`, `AC1F`, `AC1WH`, `AC2V`, `AC2A`, `AC2W`, `AC2F`, `AC2WH`,
`AC3V`, `AC3A`, `AC3W`, `AC3F`, `AC3WH`, `DC1V`, `DC1A`, `DC1W`, `DC1WH`, `DC2V`, `DC2A`, `DC2W`, `DC2WH`, `DC3V`, `DC3A`, `DC3W`,
`DC3WH`, `DC4V`, `DC4A`, `DC4W`, `DC4WH`, `DC5V`, `DC5A`, `DC5W`, `DC5WH`, `PR`, `RA1`, `RA2`, `RA3`, `RA4`, `RA5`, `ACKW`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`)
SELECT 1 powerStationID, a.INVERTERID, concat(a.reportDate,':00:00') reportDate, IFNULL(Irradiance, 0), a.AC1V, a.AC1A, a.AC1W, a.AC1F, a.AC1WH, a.AC2V, a.AC2A, a.AC2W, a.AC2F, a.AC2WH,
a.AC3V, a.AC3A, a.AC3W, a.AC3F, a.AC3WH, a.DC1V, a.DC1A, a.DC1W, a.DC1WH, a.DC2V, a.DC2A, a.DC2W, a.DC2WH, a.DC3V, a.DC3A, a.DC3W,
a.DC3WH, a.DC4V, a.DC4A, a.DC4W, a.DC4WH, a.DC5V, a.DC5A, a.DC5W, a.DC5WH, a.PR, a.RA1, a.RA2, a.RA3, a.RA4, a.RA5, a.KWH, a.TODAYKWH, a.TOTALKWH,
i.Capacity, (a.KWH / i.Capacity) AS KWHKWP
from
( -- KWH
SELECT FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, a.INVERTERID,
AVG(a.AC1V) AS AC1V, AVG(a.AC1A) AS AC1A, SUM(a.AC1W) AS AC1W,
AVG(a.AC1F) AS AC1F, SUM(a.AC1WH) AS AC1WH, AVG(a.AC2V) AS AC2V,
AVG(a.AC2A) AS AC2A, SUM(a.AC2W) AS AC2W, AVG(a.AC2F) AS AC2F,
SUM(a.AC2WH) AS AC2WH,AVG(a.AC3V) AS AC3V, AVG(a.AC3A) AS AC3A,
SUM(a.AC3W) AS AC3W, AVG(a.AC3F) AS AC3F, SUM(a.AC3WH) AS AC3WH,
AVG(a.DC1V) AS DC1V, AVG(a.DC1A) AS DC1A, SUM(a.DC1W) AS DC1W,
SUM(a.DC1WH) AS DC1WH, AVG(a.DC2V) AS DC2V, AVG(a.DC2A) AS DC2A,
SUM(a.DC2W) AS DC2W, SUM(a.DC2WH) AS DC2WH, AVG(a.DC3V) AS DC3V,
AVG(a.DC3A) AS DC3A, AVG(a.DC3W) AS DC3W, AVG(a.DC3WH) AS DC3WH,
AVG(a.DC4V) AS DC4V, AVG(a.DC4A) AS DC4A, SUM(a.DC4W) AS DC4W,
SUM(a.DC4WH) AS DC4WH,AVG(a.DC5V) AS DC5V, AVG(a.DC5A) AS DC5A,
SUM(a.DC5W) AS DC5W, SUM(a.DC5WH) AS DC5WH, #inv_pr.PR AS PR,
AVG(a.RA1) AS RA1, AVG(a.RA2) AS RA2, AVG(a.RA3) AS RA3,
AVG(a.RA4) AS RA4, AVG(a.RA5) AS RA5, # a.KWH,
AVG(a.PR) as PR,
MAX(a.TODAYKWH) AS TODAYKWH, MAX(a.TOTALKWH) AS TOTALKWH, (SUM(a.WH)/1000) AS KWH
FROM solar_com0002.s02202000101_inv a
WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04'
GROUP BY left(FROM_UNIXTIME(a.TIMESTAMP/ 1000, '%Y-%m-%d'), 10), a.INVERTERID
) a
-- LEFT JOIN( -- PR
-- SELECT FROM_UNIXTIME(inv.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, inv.INVERTERID, inv.PR
-- FROM s02202000101_inv inv
-- WHERE left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04'
-- and right(DATE_FORMAT(FROM_UNIXTIME(inv.TIMESTAMP / 1000), '%Y-%m-%d %H:%i'), 2) = '55'
-- GROUP BY FROM_UNIXTIME(inv.TIMESTAMP/ 1000, '%Y-%m-%d %H'), inv.INVERTERID
-- ) inv_pr
-- ON a.reportDate = inv_pr.reportDate AND a.INVERTERID = inv_pr.INVERTERID
--
LEFT JOIN solar_com0002.inverter i ON a.INVERTERID = i.InverterId
-- ----------------------
left join (
select FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d') AS reportDate, round(avg(SENSORAVG01),3) Irradiance
from s02202000101_sensoravg a
where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0
group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d')
)irr on a.reportDate = irr.reportDate ;";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
public List<raw_inv_hour> proc_station_hour(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"
INSERT INTO `solar_master`.`power_station_history_hour`(`PowerStationId`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `KWH`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `MONEY`, `TODAYMONEY`, `TOTALMONEY`, `CARBON`, `TODAYCARBON`, `TOTALCARBON`)
select 1 PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') reportdate, siteid, 0 SITETYPE, round((sum(KWH)), 2) KWH, round((max(TODAYKWH)), 2) TODAYKWH, round((max(TOTALKWH)), 2) TOTALKWH, round((max(KWHKWP)), 2) KWHKWP, round((max(PR)), 2) PR, 0 as MP, round((max(SOLARHOUR)), 2) SOLARHOUR,
0, 0 , 0, 0, 0 , 0
from solar_com0002.s02202000101_station
where FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d') = '2021-08-04'
group by siteid, FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H')";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
public List<raw_inv_hour> proc_station_day(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"
insert into solar_master.power_station_history_day(`PowerStationId`, `TIMESTAMP`, `SITEID`, `SITETYPE`, `TODAYKWH`, `TOTALKWH`, `KWHKWP`, `PR`, `MP`, `SOLARHOUR`, `MONEY`, `TOTALMONEY`, `CARBON`, `TOTALCARBON`)
SELECT 1 as PowerStationId, FROM_UNIXTIME(s.TIMESTAMP/1000, '%Y-%m-%d %H') AS reportDate, s.SITEID, s.SITETYPE,
s.TodayKWh, s.TotalKWH, s.KWHKWP, s.PR, s.MP, s.SolarHour, 0, 0, 0, 0
FROM solar_com0002.s02202000101_station s
WHERE DATE_FORMAT(FROM_UNIXTIME(s.TIMESTAMP/1000), '%Y-%m-%d') = '2021-08-04'
ORDER BY TIMESTAMP DESC
LIMIT 1 ";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
public List<raw_inv_hour> proc_sensor_hour(string reportDate)
{
using (MySqlConnection conn = new MySqlConnection(Connection1))
{
conn.Open();
string sql = @"
INSERT INTO `solar_master`.`sensor_history_hour`(`PowerStationId`, `TIMESTAMP`, `Irradiance`, `Temperature`)
select a.PowerStationId, a.reportDate, ifnull(b.Irradiance, 0) Irradiance, a.temperature
from
(#
select 1 as PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') AS reportDate,
0 Irradiance, round(avg(SENSORAVG02),3) temperature
from s02202000101_sensoravg a
where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04'
group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H')
)a left join (
#
select 1 as PowerStationId, concat(FROM_UNIXTIME(`TIMESTAMP`/1000, '%Y-%m-%d %H'), ':00:00') AS reportDate,
round(avg(SENSORAVG01),3) Irradiance, round(avg(SENSORAVG02),3) temperature
from s02202000101_sensoravg a
where left(FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d'), 10) = '2021-08-04' and SENSORAVG01 <> 0
group by FROM_UNIXTIME(a.TIMESTAMP / 1000, '%Y-%m-%d %H')
)b on a.reportDate = b.reportDate ;";
List<raw_inv_hour> ds = conn.Query<raw_inv_hour>(sql).AsList<raw_inv_hour>();
conn.Close();
return ds;
}
}
}
}

799
solarApp/fmArchive.Designer.cs generated Normal file
View File

@ -0,0 +1,799 @@

namespace solarApp
{
partial class fmArchive
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.tb2 = new System.Windows.Forms.TabPage();
this.sp_main_station = new System.Windows.Forms.SplitContainer();
this.label12 = new System.Windows.Forms.Label();
this.dtselect_station2 = new System.Windows.Forms.DateTimePicker();
this.lbMsg_station = new System.Windows.Forms.Label();
this.bt_find_station = new System.Windows.Forms.Button();
this.dtselect_station1 = new System.Windows.Forms.DateTimePicker();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.label13 = new System.Windows.Forms.Label();
this.sp_child_station = new System.Windows.Forms.SplitContainer();
this.gv_web_station_day = new System.Windows.Forms.DataGridView();
this.panel7 = new System.Windows.Forms.Panel();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.gv_web_station_hour = new System.Windows.Forms.DataGridView();
this.panel4 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.gv_fic_station_day = new System.Windows.Forms.DataGridView();
this.panel5 = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.gv_fic_station_raw = new System.Windows.Forms.DataGridView();
this.panel6 = new System.Windows.Forms.Panel();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.tb_inv = new System.Windows.Forms.TabPage();
this.sp_main_inv = new System.Windows.Forms.SplitContainer();
this.bt_inv_proc = new System.Windows.Forms.Button();
this.lbMsg_inv = new System.Windows.Forms.Label();
this.lbInverterID = new System.Windows.Forms.Label();
this.fp_inv = new System.Windows.Forms.FlowLayoutPanel();
this.bt_select1 = new System.Windows.Forms.Button();
this.sp_child_inv = new System.Windows.Forms.SplitContainer();
this.gv_web_inv_hour = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.lb_inv_hour = new System.Windows.Forms.Label();
this.gv_fic_inv_hour = new System.Windows.Forms.DataGridView();
this.panel3 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.gv_fic_inv_raw = new System.Windows.Forms.DataGridView();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.lb_raw_inv_hour = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tb2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).BeginInit();
this.sp_main_station.Panel1.SuspendLayout();
this.sp_main_station.Panel2.SuspendLayout();
this.sp_main_station.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).BeginInit();
this.sp_child_station.Panel1.SuspendLayout();
this.sp_child_station.Panel2.SuspendLayout();
this.sp_child_station.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).BeginInit();
this.panel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).BeginInit();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).BeginInit();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).BeginInit();
this.panel6.SuspendLayout();
this.tb_inv.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).BeginInit();
this.sp_main_inv.Panel1.SuspendLayout();
this.sp_main_inv.Panel2.SuspendLayout();
this.sp_main_inv.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).BeginInit();
this.sp_child_inv.Panel1.SuspendLayout();
this.sp_child_inv.Panel2.SuspendLayout();
this.sp_child_inv.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).BeginInit();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).BeginInit();
this.panel2.SuspendLayout();
this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
// tb2
//
this.tb2.Controls.Add(this.sp_main_station);
this.tb2.Location = new System.Drawing.Point(4, 28);
this.tb2.Name = "tb2";
this.tb2.Padding = new System.Windows.Forms.Padding(3);
this.tb2.Size = new System.Drawing.Size(1774, 921);
this.tb2.TabIndex = 1;
this.tb2.Text = " site ";
this.tb2.UseVisualStyleBackColor = true;
//
// sp_main_station
//
this.sp_main_station.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.sp_main_station.Dock = System.Windows.Forms.DockStyle.Fill;
this.sp_main_station.Location = new System.Drawing.Point(3, 3);
this.sp_main_station.Name = "sp_main_station";
//
// sp_main_station.Panel1
//
this.sp_main_station.Panel1.Controls.Add(this.label12);
this.sp_main_station.Panel1.Controls.Add(this.dtselect_station2);
this.sp_main_station.Panel1.Controls.Add(this.lbMsg_station);
this.sp_main_station.Panel1.Controls.Add(this.bt_find_station);
this.sp_main_station.Panel1.Controls.Add(this.dtselect_station1);
this.sp_main_station.Panel1.Controls.Add(this.flowLayoutPanel1);
//
// sp_main_station.Panel2
//
this.sp_main_station.Panel2.BackColor = System.Drawing.Color.OldLace;
this.sp_main_station.Panel2.Controls.Add(this.sp_child_station);
this.sp_main_station.Size = new System.Drawing.Size(1768, 915);
this.sp_main_station.SplitterDistance = 262;
this.sp_main_station.TabIndex = 0;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label12.Location = new System.Drawing.Point(13, 44);
this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(24, 24);
this.label12.TabIndex = 12;
this.label12.Text = "~";
//
// dtselect_station2
//
this.dtselect_station2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dtselect_station2.Location = new System.Drawing.Point(12, 76);
this.dtselect_station2.Name = "dtselect_station2";
this.dtselect_station2.Size = new System.Drawing.Size(234, 31);
this.dtselect_station2.TabIndex = 10;
//
// lbMsg_station
//
this.lbMsg_station.AutoSize = true;
this.lbMsg_station.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lbMsg_station.Location = new System.Drawing.Point(26, 162);
this.lbMsg_station.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbMsg_station.Name = "lbMsg_station";
this.lbMsg_station.Size = new System.Drawing.Size(22, 24);
this.lbMsg_station.TabIndex = 9;
this.lbMsg_station.Text = "...";
//
// bt_find_station
//
this.bt_find_station.Location = new System.Drawing.Point(12, 124);
this.bt_find_station.Name = "bt_find_station";
this.bt_find_station.Size = new System.Drawing.Size(94, 29);
this.bt_find_station.TabIndex = 7;
this.bt_find_station.Text = "查詢";
this.bt_find_station.UseVisualStyleBackColor = true;
//
// dtselect_station1
//
this.dtselect_station1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dtselect_station1.Location = new System.Drawing.Point(14, 8);
this.dtselect_station1.Name = "dtselect_station1";
this.dtselect_station1.Size = new System.Drawing.Size(234, 31);
this.dtselect_station1.TabIndex = 6;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.BackColor = System.Drawing.Color.Azure;
this.flowLayoutPanel1.Controls.Add(this.label13);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 270);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(262, 645);
this.flowLayoutPanel1.TabIndex = 8;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label13.Location = new System.Drawing.Point(4, 0);
this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(110, 24);
this.label13.TabIndex = 4;
this.label13.Text = "請選擇 電站";
//
// sp_child_station
//
this.sp_child_station.Dock = System.Windows.Forms.DockStyle.Fill;
this.sp_child_station.Location = new System.Drawing.Point(0, 0);
this.sp_child_station.Margin = new System.Windows.Forms.Padding(4);
this.sp_child_station.Name = "sp_child_station";
//
// sp_child_station.Panel1
//
this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_day);
this.sp_child_station.Panel1.Controls.Add(this.panel7);
this.sp_child_station.Panel1.Controls.Add(this.gv_web_station_hour);
this.sp_child_station.Panel1.Controls.Add(this.panel4);
//
// sp_child_station.Panel2
//
this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_day);
this.sp_child_station.Panel2.Controls.Add(this.panel5);
this.sp_child_station.Panel2.Controls.Add(this.gv_fic_station_raw);
this.sp_child_station.Panel2.Controls.Add(this.panel6);
this.sp_child_station.Size = new System.Drawing.Size(1502, 915);
this.sp_child_station.SplitterDistance = 727;
this.sp_child_station.SplitterWidth = 13;
this.sp_child_station.TabIndex = 1;
//
// gv_web_station_day
//
this.gv_web_station_day.AllowUserToAddRows = false;
this.gv_web_station_day.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure;
this.gv_web_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.gv_web_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_web_station_day.Dock = System.Windows.Forms.DockStyle.Fill;
this.gv_web_station_day.Location = new System.Drawing.Point(0, 583);
this.gv_web_station_day.Margin = new System.Windows.Forms.Padding(4);
this.gv_web_station_day.Name = "gv_web_station_day";
this.gv_web_station_day.ReadOnly = true;
this.gv_web_station_day.RowHeadersWidth = 51;
this.gv_web_station_day.RowTemplate.Height = 25;
this.gv_web_station_day.Size = new System.Drawing.Size(727, 332);
this.gv_web_station_day.TabIndex = 3;
//
// panel7
//
this.panel7.Controls.Add(this.label10);
this.panel7.Controls.Add(this.label11);
this.panel7.Dock = System.Windows.Forms.DockStyle.Top;
this.panel7.Location = new System.Drawing.Point(0, 545);
this.panel7.Margin = new System.Windows.Forms.Padding(4);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(727, 38);
this.panel7.TabIndex = 2;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label10.Location = new System.Drawing.Point(230, 8);
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(368, 24);
this.label10.TabIndex = 1;
this.label10.Text = "solar_master.power_station_history_day";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label11.Location = new System.Drawing.Point(35, 8);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(162, 24);
this.label11.TabIndex = 0;
this.label11.Text = "web: station 每天";
//
// gv_web_station_hour
//
this.gv_web_station_hour.AllowUserToAddRows = false;
this.gv_web_station_hour.AllowUserToDeleteRows = false;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.Azure;
this.gv_web_station_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
this.gv_web_station_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_web_station_hour.Dock = System.Windows.Forms.DockStyle.Top;
this.gv_web_station_hour.Location = new System.Drawing.Point(0, 38);
this.gv_web_station_hour.Margin = new System.Windows.Forms.Padding(4);
this.gv_web_station_hour.Name = "gv_web_station_hour";
this.gv_web_station_hour.ReadOnly = true;
this.gv_web_station_hour.RowHeadersWidth = 51;
this.gv_web_station_hour.RowTemplate.Height = 25;
this.gv_web_station_hour.Size = new System.Drawing.Size(727, 507);
this.gv_web_station_hour.TabIndex = 1;
//
// panel4
//
this.panel4.Controls.Add(this.label5);
this.panel4.Controls.Add(this.label6);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Margin = new System.Windows.Forms.Padding(4);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(727, 38);
this.panel4.TabIndex = 0;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label5.Location = new System.Drawing.Point(230, 8);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(379, 24);
this.label5.TabIndex = 1;
this.label5.Text = "solar_master.power_station_history_hour";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label6.Location = new System.Drawing.Point(35, 8);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(156, 24);
this.label6.TabIndex = 0;
this.label6.Text = "web: site 每小時 ";
//
// gv_fic_station_day
//
this.gv_fic_station_day.AllowUserToAddRows = false;
this.gv_fic_station_day.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.LightCyan;
this.gv_fic_station_day.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.gv_fic_station_day.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_fic_station_day.Dock = System.Windows.Forms.DockStyle.Fill;
this.gv_fic_station_day.Location = new System.Drawing.Point(0, 583);
this.gv_fic_station_day.Margin = new System.Windows.Forms.Padding(4);
this.gv_fic_station_day.Name = "gv_fic_station_day";
this.gv_fic_station_day.ReadOnly = true;
this.gv_fic_station_day.RowHeadersWidth = 51;
this.gv_fic_station_day.RowTemplate.Height = 25;
this.gv_fic_station_day.Size = new System.Drawing.Size(762, 332);
this.gv_fic_station_day.TabIndex = 4;
//
// panel5
//
this.panel5.Controls.Add(this.label7);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(0, 545);
this.panel5.Margin = new System.Windows.Forms.Padding(4);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(762, 38);
this.panel5.TabIndex = 3;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label7.Location = new System.Drawing.Point(15, 8);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(152, 24);
this.label7.TabIndex = 2;
this.label7.Text = "FIC: station 每天";
//
// gv_fic_station_raw
//
this.gv_fic_station_raw.AllowUserToAddRows = false;
this.gv_fic_station_raw.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.LightCyan;
this.gv_fic_station_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.gv_fic_station_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_fic_station_raw.Dock = System.Windows.Forms.DockStyle.Top;
this.gv_fic_station_raw.Location = new System.Drawing.Point(0, 38);
this.gv_fic_station_raw.Margin = new System.Windows.Forms.Padding(4);
this.gv_fic_station_raw.Name = "gv_fic_station_raw";
this.gv_fic_station_raw.ReadOnly = true;
this.gv_fic_station_raw.RowHeadersWidth = 51;
this.gv_fic_station_raw.RowTemplate.Height = 25;
this.gv_fic_station_raw.Size = new System.Drawing.Size(762, 507);
this.gv_fic_station_raw.TabIndex = 2;
//
// panel6
//
this.panel6.Controls.Add(this.label8);
this.panel6.Controls.Add(this.label9);
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Margin = new System.Windows.Forms.Padding(4);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(762, 38);
this.panel6.TabIndex = 1;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label8.Location = new System.Drawing.Point(255, 8);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(350, 24);
this.label8.TabIndex = 3;
this.label8.Text = "solar_com0002.s02202000101_station";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label9.Location = new System.Drawing.Point(15, 8);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(245, 24);
this.label9.TabIndex = 2;
this.label9.Text = "FIC: station 原始資料(hour)";
//
// tb_inv
//
this.tb_inv.BackColor = System.Drawing.Color.LightSkyBlue;
this.tb_inv.Controls.Add(this.sp_main_inv);
this.tb_inv.Location = new System.Drawing.Point(4, 28);
this.tb_inv.Name = "tb_inv";
this.tb_inv.Padding = new System.Windows.Forms.Padding(3);
this.tb_inv.Size = new System.Drawing.Size(1774, 921);
this.tb_inv.TabIndex = 0;
this.tb_inv.Text = " Inverter ";
//
// sp_main_inv
//
this.sp_main_inv.BackColor = System.Drawing.Color.LightSkyBlue;
this.sp_main_inv.Dock = System.Windows.Forms.DockStyle.Fill;
this.sp_main_inv.Location = new System.Drawing.Point(3, 3);
this.sp_main_inv.Name = "sp_main_inv";
//
// sp_main_inv.Panel1
//
this.sp_main_inv.Panel1.BackColor = System.Drawing.Color.LightSkyBlue;
this.sp_main_inv.Panel1.Controls.Add(this.bt_inv_proc);
this.sp_main_inv.Panel1.Controls.Add(this.lbMsg_inv);
this.sp_main_inv.Panel1.Controls.Add(this.lbInverterID);
this.sp_main_inv.Panel1.Controls.Add(this.fp_inv);
this.sp_main_inv.Panel1.Controls.Add(this.bt_select1);
//
// sp_main_inv.Panel2
//
this.sp_main_inv.Panel2.Controls.Add(this.sp_child_inv);
this.sp_main_inv.Size = new System.Drawing.Size(1768, 915);
this.sp_main_inv.SplitterDistance = 357;
this.sp_main_inv.TabIndex = 0;
//
// bt_inv_proc
//
this.bt_inv_proc.Location = new System.Drawing.Point(22, 83);
this.bt_inv_proc.Name = "bt_inv_proc";
this.bt_inv_proc.Size = new System.Drawing.Size(94, 29);
this.bt_inv_proc.TabIndex = 6;
this.bt_inv_proc.Text = "查詢";
this.bt_inv_proc.UseVisualStyleBackColor = true;
this.bt_inv_proc.Click += new System.EventHandler(this.bt_inv_proc_Click);
//
// lbMsg_inv
//
this.lbMsg_inv.AutoSize = true;
this.lbMsg_inv.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lbMsg_inv.Location = new System.Drawing.Point(136, 28);
this.lbMsg_inv.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbMsg_inv.Name = "lbMsg_inv";
this.lbMsg_inv.Size = new System.Drawing.Size(22, 24);
this.lbMsg_inv.TabIndex = 5;
this.lbMsg_inv.Text = "...";
//
// lbInverterID
//
this.lbInverterID.AutoSize = true;
this.lbInverterID.Dock = System.Windows.Forms.DockStyle.Bottom;
this.lbInverterID.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lbInverterID.Location = new System.Drawing.Point(0, 246);
this.lbInverterID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbInverterID.Name = "lbInverterID";
this.lbInverterID.Size = new System.Drawing.Size(105, 24);
this.lbInverterID.TabIndex = 3;
this.lbInverterID.Text = "待處理設備";
//
// fp_inv
//
this.fp_inv.BackColor = System.Drawing.Color.GhostWhite;
this.fp_inv.Dock = System.Windows.Forms.DockStyle.Bottom;
this.fp_inv.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.fp_inv.Location = new System.Drawing.Point(0, 270);
this.fp_inv.Margin = new System.Windows.Forms.Padding(4);
this.fp_inv.Name = "fp_inv";
this.fp_inv.Size = new System.Drawing.Size(357, 645);
this.fp_inv.TabIndex = 2;
//
// bt_select1
//
this.bt_select1.Location = new System.Drawing.Point(22, 23);
this.bt_select1.Name = "bt_select1";
this.bt_select1.Size = new System.Drawing.Size(94, 29);
this.bt_select1.TabIndex = 1;
this.bt_select1.Text = "查詢";
this.bt_select1.UseVisualStyleBackColor = true;
//
// sp_child_inv
//
this.sp_child_inv.Dock = System.Windows.Forms.DockStyle.Fill;
this.sp_child_inv.Location = new System.Drawing.Point(0, 0);
this.sp_child_inv.Margin = new System.Windows.Forms.Padding(4);
this.sp_child_inv.Name = "sp_child_inv";
//
// sp_child_inv.Panel1
//
this.sp_child_inv.Panel1.Controls.Add(this.gv_web_inv_hour);
this.sp_child_inv.Panel1.Controls.Add(this.panel1);
//
// sp_child_inv.Panel2
//
this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_hour);
this.sp_child_inv.Panel2.Controls.Add(this.panel3);
this.sp_child_inv.Panel2.Controls.Add(this.gv_fic_inv_raw);
this.sp_child_inv.Panel2.Controls.Add(this.panel2);
this.sp_child_inv.Size = new System.Drawing.Size(1407, 915);
this.sp_child_inv.SplitterDistance = 678;
this.sp_child_inv.SplitterWidth = 13;
this.sp_child_inv.TabIndex = 0;
//
// gv_web_inv_hour
//
this.gv_web_inv_hour.AllowUserToAddRows = false;
this.gv_web_inv_hour.AllowUserToDeleteRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.Azure;
this.gv_web_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.gv_web_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_web_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill;
this.gv_web_inv_hour.Location = new System.Drawing.Point(0, 38);
this.gv_web_inv_hour.Margin = new System.Windows.Forms.Padding(4);
this.gv_web_inv_hour.Name = "gv_web_inv_hour";
this.gv_web_inv_hour.ReadOnly = true;
this.gv_web_inv_hour.RowHeadersWidth = 51;
this.gv_web_inv_hour.RowTemplate.Height = 25;
this.gv_web_inv_hour.Size = new System.Drawing.Size(678, 877);
this.gv_web_inv_hour.TabIndex = 1;
//
// panel1
//
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.lb_inv_hour);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(678, 38);
this.panel1.TabIndex = 0;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label3.Location = new System.Drawing.Point(230, 8);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(321, 24);
this.label3.TabIndex = 1;
this.label3.Text = "solar_master.inverter_history_hour";
//
// lb_inv_hour
//
this.lb_inv_hour.AutoSize = true;
this.lb_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lb_inv_hour.Location = new System.Drawing.Point(35, 8);
this.lb_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_inv_hour.Name = "lb_inv_hour";
this.lb_inv_hour.Size = new System.Drawing.Size(151, 24);
this.lb_inv_hour.TabIndex = 0;
this.lb_inv_hour.Text = "web: inv 每小時 ";
//
// gv_fic_inv_hour
//
this.gv_fic_inv_hour.AllowUserToAddRows = false;
this.gv_fic_inv_hour.AllowUserToDeleteRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.LightCyan;
this.gv_fic_inv_hour.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.gv_fic_inv_hour.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_fic_inv_hour.Dock = System.Windows.Forms.DockStyle.Fill;
this.gv_fic_inv_hour.Location = new System.Drawing.Point(0, 583);
this.gv_fic_inv_hour.Margin = new System.Windows.Forms.Padding(4);
this.gv_fic_inv_hour.Name = "gv_fic_inv_hour";
this.gv_fic_inv_hour.ReadOnly = true;
this.gv_fic_inv_hour.RowHeadersWidth = 51;
this.gv_fic_inv_hour.RowTemplate.Height = 25;
this.gv_fic_inv_hour.Size = new System.Drawing.Size(716, 332);
this.gv_fic_inv_hour.TabIndex = 4;
//
// panel3
//
this.panel3.Controls.Add(this.label1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 545);
this.panel3.Margin = new System.Windows.Forms.Padding(4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(716, 38);
this.panel3.TabIndex = 3;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label1.Location = new System.Drawing.Point(15, 8);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(141, 24);
this.label1.TabIndex = 2;
this.label1.Text = "FIC: inv 每小時 ";
//
// gv_fic_inv_raw
//
this.gv_fic_inv_raw.AllowUserToAddRows = false;
this.gv_fic_inv_raw.AllowUserToDeleteRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.LightCyan;
this.gv_fic_inv_raw.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.gv_fic_inv_raw.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gv_fic_inv_raw.Dock = System.Windows.Forms.DockStyle.Top;
this.gv_fic_inv_raw.Location = new System.Drawing.Point(0, 38);
this.gv_fic_inv_raw.Margin = new System.Windows.Forms.Padding(4);
this.gv_fic_inv_raw.Name = "gv_fic_inv_raw";
this.gv_fic_inv_raw.ReadOnly = true;
this.gv_fic_inv_raw.RowHeadersWidth = 51;
this.gv_fic_inv_raw.RowTemplate.Height = 25;
this.gv_fic_inv_raw.Size = new System.Drawing.Size(716, 507);
this.gv_fic_inv_raw.TabIndex = 2;
//
// panel2
//
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.lb_raw_inv_hour);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(716, 38);
this.panel2.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.label2.Location = new System.Drawing.Point(255, 8);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(315, 24);
this.label2.TabIndex = 3;
this.label2.Text = "solar_com0002.s02202000101_inv";
//
// lb_raw_inv_hour
//
this.lb_raw_inv_hour.AutoSize = true;
this.lb_raw_inv_hour.Font = new System.Drawing.Font("Microsoft JhengHei UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.lb_raw_inv_hour.Location = new System.Drawing.Point(15, 8);
this.lb_raw_inv_hour.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lb_raw_inv_hour.Name = "lb_raw_inv_hour";
this.lb_raw_inv_hour.Size = new System.Drawing.Size(155, 24);
this.lb_raw_inv_hour.TabIndex = 2;
this.lb_raw_inv_hour.Text = "FIC: inv 原始資料";
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tb_inv);
this.tabControl1.Controls.Add(this.tb2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1782, 953);
this.tabControl1.TabIndex = 1;
//
// fmArchive
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1782, 953);
this.Controls.Add(this.tabControl1);
this.Name = "fmArchive";
this.Text = "fmArchive";
this.tb2.ResumeLayout(false);
this.sp_main_station.Panel1.ResumeLayout(false);
this.sp_main_station.Panel1.PerformLayout();
this.sp_main_station.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.sp_main_station)).EndInit();
this.sp_main_station.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.sp_child_station.Panel1.ResumeLayout(false);
this.sp_child_station.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.sp_child_station)).EndInit();
this.sp_child_station.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gv_web_station_day)).EndInit();
this.panel7.ResumeLayout(false);
this.panel7.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_web_station_hour)).EndInit();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_day)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_station_raw)).EndInit();
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
this.tb_inv.ResumeLayout(false);
this.sp_main_inv.Panel1.ResumeLayout(false);
this.sp_main_inv.Panel1.PerformLayout();
this.sp_main_inv.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.sp_main_inv)).EndInit();
this.sp_main_inv.ResumeLayout(false);
this.sp_child_inv.Panel1.ResumeLayout(false);
this.sp_child_inv.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.sp_child_inv)).EndInit();
this.sp_child_inv.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gv_web_inv_hour)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_hour)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gv_fic_inv_raw)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabPage tb2;
private System.Windows.Forms.SplitContainer sp_main_station;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.DateTimePicker dtselect_station2;
private System.Windows.Forms.Label lbMsg_station;
private System.Windows.Forms.Button bt_find_station;
private System.Windows.Forms.DateTimePicker dtselect_station1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.SplitContainer sp_child_station;
private System.Windows.Forms.DataGridView gv_web_station_day;
private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.DataGridView gv_web_station_hour;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.DataGridView gv_fic_station_day;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.DataGridView gv_fic_station_raw;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TabPage tb_inv;
private System.Windows.Forms.SplitContainer sp_main_inv;
private System.Windows.Forms.Button bt_inv_proc;
private System.Windows.Forms.Label lbMsg_inv;
private System.Windows.Forms.Label lbInverterID;
private System.Windows.Forms.FlowLayoutPanel fp_inv;
private System.Windows.Forms.Button bt_select1;
private System.Windows.Forms.SplitContainer sp_child_inv;
private System.Windows.Forms.DataGridView gv_web_inv_hour;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lb_inv_hour;
private System.Windows.Forms.DataGridView gv_fic_inv_hour;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridView gv_fic_inv_raw;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lb_raw_inv_hour;
private System.Windows.Forms.TabControl tabControl1;
}
}

23
solarApp/fmArchive.cs Normal file
View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace solarApp
{
public partial class fmArchive : Form
{
public fmArchive()
{
InitializeComponent();
}
private void bt_inv_proc_Click(object sender, EventArgs e)
{
}
}
}

60
solarApp/fmArchive.resx Normal file
View File

@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

1063
solarApp/fmMain.Designer.cs generated Normal file

File diff suppressed because it is too large Load Diff

173
solarApp/fmMain.cs Normal file
View File

@ -0,0 +1,173 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using solarApp.Service;
namespace solarApp
{
public partial class fmMain : Form
{
get_inv_svc inv_svc = new get_inv_svc();
getStationSvc stationSvc = new getStationSvc();
public fmMain()
{
InitializeComponent();
// init_GridView();
}
private async void button1_Click(object sender, EventArgs e)
{
lbMsg_inv.Text = "loading ... ";
string date1 = dtselect_inv.Value.ToString("yyyy-MM-dd");
gv_fic_inv_raw.DataSource = inv_svc.Get_rawInv(date1, lbInverterID.Text, lbSiteDB_inv.Text, lbSiteID_inv.Text);
gv_fic_inv_hour.DataSource = inv_svc.get_Inv_rawAvg(date1, lbInverterID.Text, lbSiteDB_inv.Text, lbSiteID_inv.Text);
gv_web_inv_hour.DataSource = inv_svc.get_web_Inv_hour(date1, lbInverterID.Text);
gv_web_inv_day.DataSource = inv_svc.get_web_Inv_day(date1, lbInverterID.Text);
gv_web_inv_month.DataSource = inv_svc.get_web_Inv_month( date1.Substring(0, 7), lbInverterID.Text);
lbMsg_inv.Text = " done " + System.DateTime.Now.ToShortTimeString();
}
private void fmMain_Load(object sender, EventArgs e)
{
dtselect_station1.Value = DateTime.Today.AddDays(-7);
dtselect_station2.Value = DateTime.Today.AddDays(-1);
dtselect_inv.Value = DateTime.Today.AddDays(-1);
// Cursor.Current = Cursors.Default;
tabControl1.SelectedTab = tabControl1.TabPages[1];
#region
int i = 0;
var site_list = stationSvc.get_station_list();
foreach (var item in site_list)
{
RadioButton rb = new RadioButton();
rb.Name = item.SiteID;
rb.Text = item.SiteName;
rb.Tag = item.SiteDB;
rb.Font = new Font(Font.FontFamily, 22);
rb.AutoSize = true;
rb.CheckedChanged += new EventHandler(rb_site_CheckedChanged);
fp_site.Controls.Add(rb);
if (i == 0) rb.Checked = true;
i++;
}
#endregion
#region list
//add_inv_list();
#endregion
}
private void rb_site_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
if (rb.Checked)
{
lbSiteDB_inv.Text = rb.Tag.ToString();
lbSiteName_inv.Text = rb.Text;
lbSiteID_inv.Text = rb.Name;
//顯示 table name on label
lbSiteRaw.Text = lbSiteName_inv.Text + " "+ lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Station";
lbInvRaw.Text = lbSiteName_inv.Text + " " + lbSiteDB_inv.Text + ".s" + lbSiteID_inv.Text + "_Inv";
add_inv_list(lbSiteDB_inv.Text, lbSiteID_inv.Text.Substring(0, 9));
}
}
/// <summary>
/// 顯示 Inventer 提供選擇
/// </summary>
/// <param name="siteDB"></param>
/// <param name="siteID"></param>
void add_inv_list(string siteDB, string siteID) {
fp_inv.Controls.Clear();
var inv_list = inv_svc.get_Inv_list(siteDB, siteID);
int i = 0;
foreach (var item in inv_list)
{
RadioButton rb = new RadioButton();
rb.Name = "rb" + item.inverterid;
rb.Text = item.inverterid;
//rb.Dock = DockStyle.Top;
rb.Width = 200;
rb.CheckedChanged += radio_inv_click;
if (i == 0) rb.Checked = true; //預設第一個勾選
fp_inv.Controls.Add(rb);
i++;
}
}
private void radio_inv_click(object sender, EventArgs e)
{
RadioButton rb = sender as RadioButton;
if (rb.Checked)
{
lbInverterID.Text = rb.Text;
lbMsg_inv.Text = "...";
}
}
private void gv_fic_inv_hour_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
//int rowindex = e.RowIndex; e.ColumnIndex
if (gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value != null && !string.IsNullOrWhiteSpace(gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value.ToString()))
{
if (gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Value.ToString() != "12")
{
gv_fic_inv_hour.Rows[e.RowIndex].Cells["count"].Style = new DataGridViewCellStyle { ForeColor = Color.Red, BackColor = Color.White };
}
}
//else
//{
// gv_fic_inv_hour.Rows[e.RowIndex].Cells[e.ColumnIndex].Style = gv_fic_inv_hour.DefaultCellStyle;
//}
}
private void dtselect_ValueChanged(object sender, EventArgs e)
{
lbMsg_inv.Text = "...";
}
/// <summary>
/// 電站
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void bt_find_station_Click(object sender, EventArgs e)
{
lbMsg_station.Text = "loading ... ";
string date1 = dtselect_station1.Value.ToString("yyyy-MM-dd");
string date2 = dtselect_station2.Value.ToString("yyyy-MM-dd");
gv_fic_station_raw.DataSource = stationSvc.get_station_raw(date1, lbSiteDB_inv.Text, lbSiteID_inv.Text);
gv_fic_station_day.DataSource = stationSvc.get_station_rawAvg(date1, date2, lbSiteDB_inv.Text, lbSiteID_inv.Text);
gv_web_station_hour.DataSource = stationSvc.get_web_station_hour( date1 );
gv_web_station_day.DataSource = stationSvc.get_web_station_day(date1, date2);
gv_web_station_month.DataSource = stationSvc.get_web_station_month(date1.Substring(0, 7), date2.Substring(0, 7));
lbMsg_station.Text = " done " + System.DateTime.Now.ToShortTimeString();
}
}
}

60
solarApp/fmMain.resx Normal file
View File

@ -0,0 +1,60 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

14
solarApp/solarApp.csproj Normal file
View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.90" />
<PackageReference Include="MySql.Data" Version="8.0.26" />
</ItemGroup>
</Project>

25
solarApp/solarApp.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31313.79
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "solarApp", "solarApp.csproj", "{1C20C2D4-3303-454C-AB7A-8E670527D3B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C20C2D4-3303-454C-AB7A-8E670527D3B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FD3EC354-1C59-4048-9617-5D0913EFB0F7}
EndGlobalSection
EndGlobal