diff --git a/SolarPower/Models/Overview.cs b/SolarPower/Models/Overview.cs
index 7e12750..5c19206 100644
--- a/SolarPower/Models/Overview.cs
+++ b/SolarPower/Models/Overview.cs
@@ -199,7 +199,8 @@ namespace SolarPower.Models
public string errMsg { get; set; }//錯誤原因
public string PowerStationName { get; set; }//電站名稱
public int PowerStationId { get; set; }//電站流水號
- public string normalTime { get; set; }
+ public string normalTime { get; set; }//賦歸時間
+ public string errMsgT { get; set; } //errMsgType
}
public class UserPowerStationTo
diff --git a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
index 217919f..79a6381 100644
--- a/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
+++ b/SolarPower/Quartz/Jobs/ExceptionSchedule.cs
@@ -53,8 +53,12 @@ namespace SolarPower.Quartz.Jobs
$"設備編號:{Exception.errDevice}" + "
" +
$"異常ID編號:{Exception.id}" + "
" +
$"異常類別:{Exception.alarmClassName}" + "
" +
- $"設備訊息:{Exception.errMsg}" + "
" +
- $"發生時間:{Exception.dev_time}";
+ $"設備訊息:{Exception.errMsg}" + "
";
+ if(Exception.errMsgT == "d")
+ {
+ Content += $"當前數值:{Exception.errValue}" + "
";
+ }
+ Content += $"發生時間:{Exception.dev_time}";
foreach (var user in UserListWithPowerstation)
{
NoticeSchedule DaySchedule = new NoticeSchedule()
diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs
index f314d9f..7e13d05 100644
--- a/SolarPower/Repository/Implement/OverviewRepository.cs
+++ b/SolarPower/Repository/Implement/OverviewRepository.cs
@@ -663,7 +663,7 @@ namespace SolarPower.Repository.Implement
select a.id, site_id, `timestamp`, FROM_UNIXTIME((`timestamp` / 1000), '%Y-%m-%d %H:%i:%s') dev_time , a.sourceState err_status, FROM_UNIXTIME( (a.normalTime / 1000), '%Y-%m-%d %H:%i:%s') normalTime,
a.alarmClass, b.alarmClass as alarmClassName,ps.Name as PowerStationName,ps.Id as PowerStationId,
errDevice, err_valueKind, errValue, FROM_UNIXTIME( (a.lastUpdate / 1000), '%Y-%m-%d %H:%i:%s') lastUpdate,
- case when c.errMsg_tw is null then d.errMsg_tw else c.errMsg_tw end errMsg
+ case when c.errMsg_tw is null then d.errMsg_tw else c.errMsg_tw end errMsg ,case when c.errMsg is null then d.errMsg else c.errMsg end errMsgT
from err_main a
join alarmorion_orionalarmclass b on a.alarmclass = b.id
left join ref_err_device c on trim(b.alarmClass) = c.deviceType