From f56bc85d7c6b31ca080240e8a6d8d94245acf602 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Mon, 15 Jan 2018 17:09:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8A=A0=E9=93=B6?= =?UTF-8?q?=E8=A1=8C=E8=B4=A6=E5=8F=B7=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=AF=9B?= =?UTF-8?q?=E7=8C=AA=E8=BF=87=E7=A3=85=E6=98=BE=E7=A4=BA=E5=92=8C=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3ClientService/BO/BaseInfo/Supplier.cs | 1 + .../BO/Bill/WeightBill/WeightBill.cs | 2 ++ .../WeightBill/PrintWeightBill.cs | 2 ++ B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs | 11 +++++++++++ B3ClientService/Tasks/SyncInfoFromServer.cs | 17 ++++++++++++++++- 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/B3ClientService/BO/BaseInfo/Supplier.cs b/B3ClientService/BO/BaseInfo/Supplier.cs index 715d167..e1d63d4 100644 --- a/B3ClientService/BO/BaseInfo/Supplier.cs +++ b/B3ClientService/BO/BaseInfo/Supplier.cs @@ -10,5 +10,6 @@ namespace BWP.B3ClientService.BO [Serializable] public class Supplier : BaseInfo { + public string BankAccount { get; set; } } } diff --git a/B3ClientService/BO/Bill/WeightBill/WeightBill.cs b/B3ClientService/BO/Bill/WeightBill/WeightBill.cs index d486032..1a031e8 100644 --- a/B3ClientService/BO/Bill/WeightBill/WeightBill.cs +++ b/B3ClientService/BO/Bill/WeightBill/WeightBill.cs @@ -32,6 +32,8 @@ namespace BWP.B3ClientService.BO public string Supplier_Name { get; set; } + public string BankAccount { get; set; } + public long? Zone_ID { get; set; } public string Zone_Name { get; set; } diff --git a/B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs b/B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs index 46ccee4..522f5f7 100644 --- a/B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs +++ b/B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs @@ -38,6 +38,8 @@ namespace BWP.B3ClientService public decimal? DiscontMoney { get; set; } + public string BankAccount { get; set; } + private List _details = new List(); public List Details { get { return _details; } set { _details = value; } } } diff --git a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs index ff9ea9d..2d15ad1 100644 --- a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs +++ b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs @@ -286,6 +286,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc query.Columns.Add(DQSelectColumn.Field("ShackMoney")); query.Columns.Add(DQSelectColumn.Field("JingJianFee")); query.Columns.Add(DQSelectColumn.Field("DiscontMoney")); + query.Columns.Add(DQSelectColumn.Field("BankAccount")); query.Where.Conditions.Add(DQCondition.EQ(main, "ID", id)); var entity = new PrintWeightBill(); using (var session = Dmo.NewSession()) @@ -309,6 +310,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc entity.ShackMoney = (decimal?)reader[12]; entity.JingJianFee = (decimal?)reader[13]; entity.DiscontMoney = (decimal?)reader[14]; + entity.BankAccount = (string)reader[15]; } } } @@ -334,5 +336,14 @@ namespace BWP.B3ClientService.Rpcs.BillRpc WeightBillCheck.Insert(id, creator); return 1; } + + [Rpc] + public static string GetSupplierBankAccount(long id) + { + var query = new DQueryDom(new JoinAlias(typeof(Supplier))); + query.Columns.Add(DQSelectColumn.Field("BankAccount")); + query.Where.Conditions.Add(DQCondition.EQ("ID", id)); + return query.EExecuteScalar(); + } } } diff --git a/B3ClientService/Tasks/SyncInfoFromServer.cs b/B3ClientService/Tasks/SyncInfoFromServer.cs index 21d6f73..da42200 100644 --- a/B3ClientService/Tasks/SyncInfoFromServer.cs +++ b/B3ClientService/Tasks/SyncInfoFromServer.cs @@ -354,7 +354,22 @@ namespace BWP.B3ClientService.Tasks void SyncSupplier() { - SyncBaseInfo("GetSupplier"); + var list = RpcFacade.Call>("/MainSystem/B3ButcherManage/Rpcs/TouchScreenRpcs/GetSupplier"); + using (var context = new TransactionContext()) + { + var sql1 = @"truncate table [B3ClientService_Supplier];"; + context.Session.ExecuteSqlNonQuery(sql1); + foreach (RpcObject o in list) + { + var entity = new Supplier(); + entity.ID = o.Get("ID"); + entity.Name = o.Get("Name"); + entity.Spell = o.Get("Spell"); + entity.BankAccount = o.Get("BankAccount"); + context.Session.Insert(entity); + } + context.Commit(); + } } void SyncZone()