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()