From 199e9a223c8a3e32b35a9ac878e96fd3a3f3bffc Mon Sep 17 00:00:00 2001 From: luanhui <1029149336@qq.com> Date: Wed, 15 Nov 2017 18:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3ClientService/B3ClientService.csproj | 1 + .../BO/Bill/SaleOutStore_/SaleOutStore.cs | 3 +- .../Rpcs/BillRpc/SaleOutStoreRpc.cs | 43 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 B3ClientService/Rpcs/BillRpc/SaleOutStoreRpc.cs diff --git a/B3ClientService/B3ClientService.csproj b/B3ClientService/B3ClientService.csproj index ae7c73f..51f147b 100644 --- a/B3ClientService/B3ClientService.csproj +++ b/B3ClientService/B3ClientService.csproj @@ -131,6 +131,7 @@ + diff --git a/B3ClientService/BO/Bill/SaleOutStore_/SaleOutStore.cs b/B3ClientService/BO/Bill/SaleOutStore_/SaleOutStore.cs index aebc1bd..c8d623e 100644 --- a/B3ClientService/BO/Bill/SaleOutStore_/SaleOutStore.cs +++ b/B3ClientService/BO/Bill/SaleOutStore_/SaleOutStore.cs @@ -36,11 +36,12 @@ namespace BWP.B3ClientService.BO public string BillState { get; set; } + [LogicName("送货线路")] + public string DeliverGoodsLine_Name { get; set; } [LogicName("销售出库明细ID")] public long SaleOutStoreDetail_ID { get; set; } - } diff --git a/B3ClientService/Rpcs/BillRpc/SaleOutStoreRpc.cs b/B3ClientService/Rpcs/BillRpc/SaleOutStoreRpc.cs new file mode 100644 index 0000000..a1c9398 --- /dev/null +++ b/B3ClientService/Rpcs/BillRpc/SaleOutStoreRpc.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BWP.B3ClientService.BO; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using Forks.EnterpriseServices.JsonRpc; +using Newtonsoft.Json; +using TSingSoft.WebPluginFramework; + +namespace BWP.B3ClientService.Rpcs.BillRpc +{ + [Rpc] + public static class SaleOutStoreRpc + { + [Rpc] + public static string SyncList(DateTime date, string customerName, string sendLineName, string billstate) + { + + var dmoquery = new DmoQuery(typeof(SaleOutStore)); + dmoquery.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("LoadTime", date)); + dmoquery.Where.Conditions.Add(DQCondition.LessThan("LoadTime", date.AddDays(1))); + + if (!string.IsNullOrWhiteSpace(customerName)) + { + dmoquery.Where.Conditions.Add(DQCondition.EQ("Customer_Name",customerName)); + } + + if (!string.IsNullOrWhiteSpace(sendLineName)) + { + dmoquery.Where.Conditions.Add(DQCondition.EQ("DeliverGoodsLine_Name", sendLineName)); + } + + if (!string.IsNullOrWhiteSpace(sendLineName)) + { + dmoquery.Where.Conditions.Add(DQCondition.EQ("BillState", billstate)); + } + + var list = dmoquery.EExecuteList().Cast().ToList(); + return JsonConvert.SerializeObject(list); + } + } +}