diff --git a/B3ClientService/B3ClientService.csproj b/B3ClientService/B3ClientService.csproj index fc33379..f4c5952 100644 --- a/B3ClientService/B3ClientService.csproj +++ b/B3ClientService/B3ClientService.csproj @@ -48,6 +48,7 @@ + diff --git a/B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs b/B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs index 827dff4..2989d5c 100644 --- a/B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs +++ b/B3ClientService/RpcBO/Bill/WeightBill/RpcWeightBill.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; namespace BWP.B3ClientService.RpcBO { - [RpcObject] public class RpcWeightBill { public SWeightBill Bill { get; set; } diff --git a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs index d4d3936..1c9a50f 100644 --- a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs +++ b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs @@ -99,10 +99,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc } [Rpc] - public static List GetWeightBillList(DateTime date) + public static List GetWeightBillList(DateTime date, long? carID, long? supplierID) { var query = new DmoQuery(typeof(WeightBill)); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("DeleteState", false), DQCondition.Between("WeighTime", date.Date, date.Date + new TimeSpan(23, 59, 29)))); + if (carID.HasValue) + query.Where.Conditions.Add(DQCondition.EQ("Car_ID", carID)); + if (supplierID.HasValue) + query.Where.Conditions.Add(DQCondition.EQ("Supplier_ID", supplierID)); return query.EExecuteList().Cast().ToList(); } diff --git a/B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs b/B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs index 86393b3..b583d96 100644 --- a/B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs +++ b/B3ClientService/Tasks/UpdateLoad/UpLoadWeightBill.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Web.Script.Serialization; using TSingSoft.WebPluginFramework; using TSingSoft.WebPluginFramework.BWPClients; @@ -19,6 +20,7 @@ namespace BWP.B3ClientService.Tasks.UpdateLoad { public static void Execute(string uri) { + var serializer = new JavaScriptSerializer(); //获取所有未上传的数据 var allBill = GetAllNeedSyncBill(); @@ -38,7 +40,7 @@ namespace BWP.B3ClientService.Tasks.UpdateLoad } #endregion - var sync = CreateRpcWeightBill(item); + var sync = serializer.Serialize(CreateRpcWeightBill(item)); var back = bwpClient.Call("/MainSystem/B3ButcherManage/Rpcs/WeighBillRpc/UpdateOrInsert", sync); #region 同步完了要清理掉删除的明细(当前实体和数据库)