diff --git a/B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs b/B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs index c01d466..78a944e 100644 --- a/B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs +++ b/B3ClientService/Rpcs/BillRpc/ClientGoodsSetRpc.cs @@ -18,16 +18,24 @@ namespace BWP.B3ClientService.Rpcs.BillRpc static JavaScriptSerializer serializer = new JavaScriptSerializer(); [Rpc] - public static string GetList() + public static string GetListByApplyClient(string applyClient) + { + var list = GetListDto().Where(x => x.ApplyClient == applyClient).ToList(); + var json = serializer.Serialize(list); + return json; + } + + static List GetListDto() { - var list=new List(); - var query=new DmoQuery(typeof(ClientGoodsSet)); + var list = new List(); + var query = new DmoQuery(typeof(ClientGoodsSet)); var clist = query.EExecuteList().Cast().ToList(); foreach (ClientGoodsSet set in clist) { foreach (ClientGoodsSet_Detail setDetail in set.Details) { var dto = new ClientGoodsSetDto(); + dto.ApplyClient = set.ApplyClient; dto.Name = set.Name; dto.Goods_ID = setDetail.Goods_ID; dto.Goods_Name = setDetail.Goods_Name; @@ -36,6 +44,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc list.Add(dto); } } + return list; + } + + + [Rpc] + public static string GetList() + { + var list = GetListDto(); var json = serializer.Serialize(list); return json; } diff --git a/B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs b/B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs index 9e6012a..b547364 100644 --- a/B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs +++ b/B3ClientService/Rpcs/RpcBO/Bill/ClientGoodsSetDto.cs @@ -8,6 +8,8 @@ namespace BWP.B3ClientService.Rpcs.RpcBO.Bill [Serializable] public class ClientGoodsSetDto { + + public string ApplyClient { get; set; } public string Name { get; set; } public long Goods_ID { get; set; } public string Goods_Name { get; set; }