add-添加报警停机记录

dev
liuwf 1 week ago
parent 1197e71c9d
commit 46975892d4

@ -174,7 +174,7 @@ namespace SlnMesnac.WPF.Page
RefreshWeight(realtimeStatusList);
//开关机时间采集
machineStatusDtos.ForEach(x => OeeCollection(x));
machineStatusDtos.ForEach(x => OeeCollection(x,1));
//报警采集
machineStatusDtos.ForEach(x => MachineWarnCollection(x));
@ -260,7 +260,7 @@ namespace SlnMesnac.WPF.Page
/// OEE设备关机采集
/// </summary>
/// <param name="machineStatusDto"></param>
private void OeeCollection(MachineStatusDto machineStatusDto)
private void OeeCollection(MachineStatusDto machineStatusDto,int shutType)
{
try
{
@ -272,8 +272,8 @@ namespace SlnMesnac.WPF.Page
{
DmsRecordShutDown newRecord = new DmsRecordShutDown();
newRecord.DeviceId = machineStatusDto.deviceId;
newRecord.ShutType = 1;
newRecord.ShutReason = "正常停机";
newRecord.ShutType = shutType;
newRecord.ShutReason = shutType==1 ? "正常停机" : "报警停机";
newRecord.ShutBeginTime = DateTime.Now;
newRecord.CreateBy = "SlnMesnac";
newRecord.CreateTime = DateTime.Now;
@ -376,6 +376,8 @@ namespace SlnMesnac.WPF.Page
#region 停止当前设备
StopAndMessageWarn(machineStatusDto.warnStatus);
//添加报警停机记录
OeeCollection(machineStatusDto, 2);
#endregion
}
else

Loading…
Cancel
Save