44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using Learun.Application.TwoDevelopment.Plugin;
|
|
using Learun.Application.TwoDevelopment.ZZDT_EC;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Department2
|
|
{
|
|
/// <summary>
|
|
/// 引用的copyLocal设置为false
|
|
/// </summary>
|
|
public class EnginedataPlugin : IEnginedataPlugin
|
|
{
|
|
public ec_enginedataEntity UpdatePixelAndPropExtra(ec_enginedataEntity TAG)
|
|
{
|
|
if (TAG == null)
|
|
{
|
|
return null;
|
|
}
|
|
else
|
|
{
|
|
var prop = TAG.EngineDataProperty.FirstOrDefault(X => X.PropertyName.StartsWith("设备参数"));
|
|
if (prop != null)
|
|
{
|
|
List<string> subProps = new List<string>();
|
|
var prop2 = TAG.EngineDataProperty.FirstOrDefault(X => X.PropertyName.StartsWith("额定电压"));
|
|
var prop3 = TAG.EngineDataProperty.FirstOrDefault(X => X.PropertyName.StartsWith("相数"));
|
|
var prop4 = TAG.EngineDataProperty.FirstOrDefault(X => X.PropertyName.StartsWith("功率"));
|
|
|
|
if (prop2 != null) subProps.Add(prop2.PropertyValue);
|
|
if (prop3 != null) subProps.Add(prop3.PropertyValue);
|
|
if (prop4 != null) subProps.Add(prop4.PropertyValue);
|
|
|
|
|
|
prop.PropertyValue = string.Join(",", subProps);
|
|
}
|
|
return TAG;
|
|
}
|
|
}
|
|
}
|
|
}
|