Browse Source

供应商加银行账号,用于毛猪过磅显示和打印。

master
yibo 8 years ago
parent
commit
f56bc85d7c
5 changed files with 32 additions and 1 deletions
  1. +1
    -0
      B3ClientService/BO/BaseInfo/Supplier.cs
  2. +2
    -0
      B3ClientService/BO/Bill/WeightBill/WeightBill.cs
  3. +2
    -0
      B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs
  4. +11
    -0
      B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs
  5. +16
    -1
      B3ClientService/Tasks/SyncInfoFromServer.cs

+ 1
- 0
B3ClientService/BO/BaseInfo/Supplier.cs View File

@ -10,5 +10,6 @@ namespace BWP.B3ClientService.BO
[Serializable]
public class Supplier : BaseInfo
{
public string BankAccount { get; set; }
}
}

+ 2
- 0
B3ClientService/BO/Bill/WeightBill/WeightBill.cs View File

@ -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; }


+ 2
- 0
B3ClientService/ClientSerializerBo/WeightBill/PrintWeightBill.cs View File

@ -38,6 +38,8 @@ namespace BWP.B3ClientService
public decimal? DiscontMoney { get; set; }
public string BankAccount { get; set; }
private List<PWeightBill_SanctionDetail> _details = new List<PWeightBill_SanctionDetail>();
public List<PWeightBill_SanctionDetail> Details { get { return _details; } set { _details = value; } }
}


+ 11
- 0
B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs View File

@ -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<string>();
}
}
}

+ 16
- 1
B3ClientService/Tasks/SyncInfoFromServer.cs View File

@ -354,7 +354,22 @@ namespace BWP.B3ClientService.Tasks
void SyncSupplier()
{
SyncBaseInfo<Supplier>("GetSupplier");
var list = RpcFacade.Call<List<RpcObject>>("/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<long>("ID");
entity.Name = o.Get<string>("Name");
entity.Spell = o.Get<string>("Spell");
entity.BankAccount = o.Get<string>("BankAccount");
context.Session.Insert(entity);
}
context.Commit();
}
}
void SyncZone()


Loading…
Cancel
Save