|
|
|
@ -237,8 +237,11 @@ namespace CVDEMCS.Devices.Impl
|
|
|
|
|
{
|
|
|
|
|
var state = EquipmentState.Stop;
|
|
|
|
|
//如果运行状态比警告状态高,这里先判断运行状态,如果运行状态为false,在判断警告状态
|
|
|
|
|
//故障>运行>停止
|
|
|
|
|
if (maintain.GetValue<bool>())
|
|
|
|
|
//维护>运行>停止
|
|
|
|
|
if (maintain.GetValue<bool>()
|
|
|
|
|
||
|
|
|
|
|
//如果为手动模式且为维护状态,则当前状态为维护状态
|
|
|
|
|
(startStop.Model == EquipmentAlarmModel.Manual && startStop.IsMaintain))
|
|
|
|
|
{
|
|
|
|
|
state = EquipmentState.Maintain;
|
|
|
|
|
}
|
|
|
|
@ -250,14 +253,6 @@ namespace CVDEMCS.Devices.Impl
|
|
|
|
|
{
|
|
|
|
|
state = EquipmentState.Alarm;
|
|
|
|
|
}
|
|
|
|
|
//如果为报警状态,则判断是否设为手动,且为不报警,则屏蔽报警信号,不做记录
|
|
|
|
|
//if (state == EquipmentState.Alarm &&
|
|
|
|
|
// startStop.Model == EquipmentAlarmModel.Manual &&
|
|
|
|
|
// !startStop.IsAlarm)
|
|
|
|
|
//{
|
|
|
|
|
// continue;
|
|
|
|
|
//}
|
|
|
|
|
//equipmentRecordService.AddUpdateEquipmentRecord(id, state, DateTime.Now);
|
|
|
|
|
|
|
|
|
|
models.Add(new EquipmentRecordUpdateModel
|
|
|
|
|
{
|
|
|
|
|