異常類型:d 額外新增 當前數值
This commit is contained in:
parent
0afb907944
commit
5d125c803e
@ -199,7 +199,8 @@ namespace SolarPower.Models
|
|||||||
public string errMsg { get; set; }//錯誤原因
|
public string errMsg { get; set; }//錯誤原因
|
||||||
public string PowerStationName { get; set; }//電站名稱
|
public string PowerStationName { get; set; }//電站名稱
|
||||||
public int PowerStationId { 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
|
public class UserPowerStationTo
|
||||||
|
|||||||
@ -53,8 +53,12 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
$"設備編號:{Exception.errDevice}" + "<br>" +
|
$"設備編號:{Exception.errDevice}" + "<br>" +
|
||||||
$"異常ID編號:{Exception.id}" + "<br>" +
|
$"異常ID編號:{Exception.id}" + "<br>" +
|
||||||
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
$"異常類別:{Exception.alarmClassName}" + "<br>" +
|
||||||
$"設備訊息:{Exception.errMsg}" + "<br>" +
|
$"設備訊息:{Exception.errMsg}" + "<br>";
|
||||||
$"發生時間:{Exception.dev_time}";
|
if(Exception.errMsgT == "d")
|
||||||
|
{
|
||||||
|
Content += $"當前數值:{Exception.errValue}" + "<br>";
|
||||||
|
}
|
||||||
|
Content += $"發生時間:{Exception.dev_time}";
|
||||||
foreach (var user in UserListWithPowerstation)
|
foreach (var user in UserListWithPowerstation)
|
||||||
{
|
{
|
||||||
NoticeSchedule DaySchedule = new NoticeSchedule()
|
NoticeSchedule DaySchedule = new NoticeSchedule()
|
||||||
|
|||||||
@ -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,
|
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,
|
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,
|
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
|
from err_main a
|
||||||
join alarmorion_orionalarmclass b on a.alarmclass = b.id
|
join alarmorion_orionalarmclass b on a.alarmclass = b.id
|
||||||
left join ref_err_device c on trim(b.alarmClass) = c.deviceType
|
left join ref_err_device c on trim(b.alarmClass) = c.deviceType
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user