using BO.BO; using Forks.JsonRpc.Client; using Forks.JsonRpc.Client.Data; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BO.Utils { public static class BaseInfoRpcUtil { public static List> GetBaseInfoEntity(string rpcName) { var list = RpcFacade.Call>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName), null, null, -1); var result = new List>(); foreach (RpcObject o in list) { var entity = new Tuple(o.Get("PhyName"), o.Get("DisplayName")); result.Add(entity); } return result; } public static List> GetSanctionList() { var list = RpcFacade.Call>("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetSanctionList"); var result = new List>(); foreach (RpcObject o in list) { var entity = new Tuple(o.Get("ID"), o.Get("AbnormalItem_ID"), o.Get("AbnormalItem_Name")); result.Add(entity); } return result; } } }