天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

179 lines
4.5 KiB

using System;
using QMAPP.Entity;
using QMFrameWork.Data.Attributes;
using System.Data;
namespace QMAPP.FJC.Entity.EnergyManage
{
[DBTable(TableName = "T_EM_METER")]
public class Meter : BaseEntity
{
///<summary>
///����
///</summary>
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
///<summary>
///��Դ������
///</summary>
[DBColumn(ColumnName = "METER_CODE", DataType = DbType.String)]
public string METER_CODE { get; set; }
///<summary>
///��Դ������
/// ��ʱ���豸��
///</summary>
[DBColumn(ColumnName = "METER_NAME", DataType = DbType.String)]
public string METER_NAME { get; set; }
///<summary>
///��Դ������
///</summary>
[DBColumn(ColumnName = "METER_TYPE", DataType = DbType.String)]
public string METER_TYPE { get; set; }
public string METER_TYPE_TXT { get; set; }
///<summary>
///��Դ��������ַ
///</summary>
[DBColumn(ColumnName = "NET_ADDR", DataType = DbType.String)]
public string NET_ADDR { get; set; }
///<summary>
///��Դ��������ʶ
///</summary>
[DBColumn(ColumnName = "NET_ID", DataType = DbType.String)]
public string NET_ID { get; set; }
///<summary>
///��ȡ��ʽ 1 �Զ� 2 �ֶ�
///</summary>
[DBColumn(ColumnName = "STATE", DataType = DbType.String)]
public string STATE { get; set; }
public string STATE_TXT { get; set; }
///<summary>
///��������
///</summary>
[DBColumn(ColumnName = "FACTORY_CODE", DataType = DbType.String)]
public string FACTORY_CODE { get; set; }
///<summary>
///�豸����
///</summary>
[DBColumn(ColumnName = "EQPT_CODE", DataType = DbType.String)]
public string EQPT_CODE { get; set; }
public string MACHINENAME { get; set; }
///<summary>
///����������
///</summary>
[DBColumn(ColumnName = "RATIO", DataType = DbType.String)]
public Double RATIO { get; set; }
public string CONSUME { get; set; }
public string WORKCENTER_CODE { get; set; }
public DateTime ONLINETIMESTART;
public DateTime ONLINETIMEEND;
public string EQPT_NAME { get; set; }
#region ������չ����
/// <summary>
/// ����ϵͳ��
/// </summary>
public Int16 SysNum
{
get
{
if (NET_ID != null)
{
string[] MeterAddr = NET_ID.Split(',');
if (MeterAddr.Length > 0)
return Int16.Parse(MeterAddr[0]);
}
return 0;
}
}
/// <summary>
/// ������
/// </summary>
public Int16 MeterNum
{
get
{
if (NET_ID != null)
{
string[] MeterAddr = NET_ID.Split(',');
if (MeterAddr.Length > 1)
return Int16.Parse(MeterAddr[1]);
}
return 0;
}
}
/// <summary>
/// �û���
/// </summary>
public byte UserNum
{
get
{
if (NET_ID != null)
{
string[] MeterAddr = NET_ID.Split(',');
if (MeterAddr.Length > 2)
return byte.Parse(MeterAddr[2]);
}
return 0;
}
}
/// <summary>
/// IP��ַ
/// </summary>
public string IPAddr
{
get
{
if (NET_ADDR!=null)
{
string[] NET_ADDRArray = NET_ADDR.Split(':');
if (NET_ADDRArray.Length > 0)
return NET_ADDRArray[0];
}
return "0";
}
}
/// <summary>
/// �˿ں�
/// </summary>
public int Port
{
get
{
if (NET_ADDR != null)
{
string[] NET_ADDRArray = NET_ADDR.Split(':');
if (NET_ADDRArray.Length > 1)
return int.Parse(NET_ADDRArray[1]);
}
return 0;
}
}
#endregion
}
}