屠宰场客户端
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.

38 lines
1.2 KiB

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<Tuple<string, string>> GetBaseInfoEntity(string rpcName)
{
var list = RpcFacade.Call<List<RpcObject>>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName), null, null, -1);
var result = new List<Tuple<string, string>>();
foreach (RpcObject o in list)
{
var entity = new Tuple<string, string>(o.Get<string>("PhyName"), o.Get<string>("DisplayName"));
result.Add(entity);
}
return result;
}
public static List<Tuple<long, long, string>> GetSanctionList()
{
var list = RpcFacade.Call<List<RpcObject>>("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetSanctionList");
var result = new List<Tuple<long, long, string>>();
foreach (RpcObject o in list)
{
var entity = new Tuple<long, long, string>(o.Get<long>("ID"), o.Get<long>("AbnormalItem_ID"), o.Get<string>("AbnormalItem_Name"));
result.Add(entity);
}
return result;
}
}
}