diff --git a/SolarPower/Views/StationOverview/_History.cshtml b/SolarPower/Views/StationOverview/_History.cshtml
index b6dbe1a..727039e 100644
--- a/SolarPower/Views/StationOverview/_History.cshtml
+++ b/SolarPower/Views/StationOverview/_History.cshtml
@@ -85,7 +85,7 @@
時間 |
發電量(kWh) |
有效日照時數 |
- 日照度(kWh/m2) |
+ 日照度(W/m2) |
PR(%) |
溫度(℃) |
diff --git a/solarApp/Service/procInvSvc.cs b/solarApp/Service/procInvSvc.cs
index e0d532b..169400c 100644
--- a/solarApp/Service/procInvSvc.cs
+++ b/solarApp/Service/procInvSvc.cs
@@ -547,6 +547,7 @@ ALTER TABLE `temp_invDay{_powerStationID}_s1` ADD INDEX `temp_indexs1` (report_d
#endregion
#region 先新增 inv_no01
+ string inv01 = _siteID01 + "0001";
sql = @$"
insert report_invday(`report_date`, `PowerStationID`, inv_01, `hourKWH`, `hourKWHp`, `irradiance`, `temperature`, `hourmoney`, `pr`, createTime)
select a.report_date, a.powerstationId , ifnull(round(a.kwh, 6), 0) inv_01, ifnull(b.KWH, 0) hourKWH,
@@ -554,7 +555,7 @@ select a.report_date, a.powerstationId , ifnull(round(a.kwh, 6), 0) inv_01, ifn
WHERE DATE_FORMAT(TIMESTAMP,'%Y-%m-%d') = '{_date1}' and powerstationid = {_powerStationID} ))*100,2)
, 0) 'hourKWHp', ifnull(d.irradiance, 0) 'irradiance', ifnull(d.Temperature, 0) 'temperature',
ifnull(b.money, 0) 'hourmoney', ifnull(round(b.PR, 2), 0) as pr, now() createTime
-from temp_invDay{_powerStationID}_s1 a left join
+from temp_invDay{_powerStationID}_s1 a join
( # 每小時加總 inv
select powerStationid, `TIMESTAMP` report_date, siteid, sitetype, round(KWH, 2) KWH,
round(TODAYKWH, 2) TODAYKWH,round(KWHKWP, 2) KWHKWP, round(PR, 2) PR, round(money, 2) money
@@ -568,7 +569,7 @@ from temp_invDay{_powerStationID}_s1 a left join
from sensor_history_hour
where powerstationid = {_powerStationID} and left(`TIMESTAMP`,10) = '{_date1}'
) d on a.powerStationid = d.powerStationid and a.`report_date` = d.report_date
- where right(a.inverterid, 4) = '0001'
+ where a.inverterid = '{inv01}' # right(a.inverterid, 4) = '0001'
GROUP BY left(a.report_date, 13)
order by a.report_date ;";
conn.Execute(sql);