using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.Service
|
{
|
/// <summary>
|
/// 业务对象
|
/// </summary>
|
public class LogicObject
|
{
|
/// <summary>
|
/// 获取业务名称
|
/// </summary>
|
public string GetLogicName(long CorpID, string LogicType, long LogicID)
|
{
|
var logicName = string.Empty;
|
switch (LogicType)
|
{
|
case ObjectType.LogicArea:
|
{
|
logicName = new Service.LogicArea().GetByID(CorpID, LogicID)?.Name;
|
}
|
break;
|
case ObjectType.Station:
|
{
|
logicName=new Service.Station().GetByID(CorpID, LogicID)?.Name;
|
}
|
break;
|
case ObjectType.Estate:
|
{
|
logicName=new Service.Estate().GetByID(CorpID, LogicID)?.Name;
|
}
|
break;
|
default:break;
|
}
|
return logicName;
|
}
|
|
/// <summary>
|
/// 获取描述
|
/// </summary>
|
public string GetDescription(long CorpID, string LogicType, long LogicID)
|
{
|
var logicName = string.Empty;
|
switch (LogicType)
|
{
|
case ObjectType.LogicArea:
|
{
|
logicName = new Service.LogicArea().GetByID(CorpID, LogicID)?.Description;
|
}
|
break;
|
case ObjectType.Station:
|
{
|
logicName = new Service.Station().GetByID(CorpID, LogicID)?.Description;
|
}
|
break;
|
case ObjectType.Estate:
|
{
|
logicName = new Service.Estate().GetByID(CorpID, LogicID)?.Description;
|
}
|
break;
|
default: break;
|
}
|
return logicName;
|
}
|
|
}
|
}
|