SingleForkSSRMV132Analysis.cs
1.05 KB
using HHECS.BllModel;
using HHECS.DAQHandle.Dto;
using HHECS.DAQShared.Common.Enums;
using HHECS.DAQShared.Common.Utils;
using HHECS.DAQShared.Models;
namespace HHECS.DAQHandle.EquipmentHandle
{
internal class SingleForkSSRMV132Analysis : SRMAnalysisBase
{
public SingleForkSSRMV132Analysis(AnalysisParameter parameter) : base(parameter) { }
protected override BllResult<EquipmentStatus> GetEquipmentStatus(EquipmentExtend equipment, EquipmentDataRecord record)
{
try
{
var tagResult = JsonConvertToTagList(record.Tags);
if (!tagResult.Success)
{
return BllResultFactory.Error<EquipmentStatus>(tagResult.Msg);
}
return EquipmentStatusHelper.GetEquipmentStatus(EquipmentTypeConst.SingleForkSSRMV132, equipment.EquipmentProps, tagResult.Data);
}
catch (Exception ex)
{
return BllResultFactory.Error<EquipmentStatus>(ex.Message);
}
}
}
}