lixiaojun
2022-08-04 e8d5f2b39db1e22f6ba940e4c7f28d5f9ce35bc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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;
        }
 
    }
}