From f9313b8c2dba3a643940a4019bf125de5af64c95 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Wed, 14 Mar 2018 13:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=EF=BC=8C=E5=85=BB?= =?UTF-8?q?=E6=AE=96=E6=88=B7=E4=BF=A1=E6=81=AF=20=E9=80=9A=E8=BF=87refere?= =?UTF-8?q?nceTo=E5=85=B3=E8=81=94=E6=A1=A3=E6=A1=88=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E4=B8=BAB3=E5=8F=AF=E8=83=BD=E4=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E7=9A=84=E9=93=B6=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E5=85=BB=E6=AE=96=E6=88=B7=E7=9A=84=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=20=E7=94=B5=E8=AF=9D=20=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E7=AD=89=E4=BF=A1=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3ClientService/BO/Bill/WeightBill/WeightBill.cs | 14 ++++++++++++++ B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/B3ClientService/BO/Bill/WeightBill/WeightBill.cs b/B3ClientService/BO/Bill/WeightBill/WeightBill.cs index fcd7e8f..7527370 100644 --- a/B3ClientService/BO/Bill/WeightBill/WeightBill.cs +++ b/B3ClientService/BO/Bill/WeightBill/WeightBill.cs @@ -31,8 +31,12 @@ namespace BWP.B3ClientService.BO public long? Supplier_ID { get; set; } + [ReferenceTo(typeof(Supplier), "Name")] + [Join("Supplier_ID", "ID")] public string Supplier_Name { get; set; } + [ReferenceTo(typeof(Supplier), "BankAccount")] + [Join("Supplier_ID", "ID")] public string BankAccount { get; set; } public long? Zone_ID { get; set; } @@ -65,12 +69,22 @@ namespace BWP.B3ClientService.BO public string Remark { get; set; } + public long? Farmer_ID { get; set; } + + [ReferenceTo(typeof(Farmer), "Name")] + [Join("Farmer_ID", "ID")] public string Farmer_Name { get; set; } + [ReferenceTo(typeof(Farmer), "IDCard")] + [Join("Farmer_ID", "ID")] public string Farmer_IDCard { get; set; } + [ReferenceTo(typeof(Farmer), "Tel")] + [Join("Farmer_ID", "ID")] public string Farmer_Tel { get; set; } + [ReferenceTo(typeof(Farmer), "Address")] + [Join("Farmer_ID", "ID")] public string Farmer_Address { get; set; } #endregion diff --git a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs index 46ce681..95c2da9 100644 --- a/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs +++ b/B3ClientService/Rpcs/BillRpc/WeightBillRpc.cs @@ -96,6 +96,11 @@ namespace BWP.B3ClientService.Rpcs.BillRpc { json = json.ESerializeDateTime(); var dmo = serializer.Deserialize(json); + var f = dmo.FarmerDetails.FirstOrDefault(x => !x.DeleteState); + if (f == null) + dmo.Farmer_ID = null; + else + dmo.Farmer_ID = f.Farmer_ID; recordDetail = recordDetail.ESerializeDateTime(); var records = serializer.Deserialize>(recordDetail); var result = new BackRpcObj();