From fad86c02673f9bfabac38985ace1d5e7732a38de Mon Sep 17 00:00:00 2001 From: wugang <1029149336@qq.com> Date: Tue, 7 Nov 2017 10:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=89=AF=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3ClientService/B3ClientService.csproj | 2 + .../ByProductWeightRecord.cs | 42 +++++++++++++++++++ .../Rpcs/BillRpc/ByProductWeightRecordRpc.cs | 26 ++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 B3ClientService/BO/ByProductWeightRecord_/ByProductWeightRecord.cs create mode 100644 B3ClientService/Rpcs/BillRpc/ByProductWeightRecordRpc.cs diff --git a/B3ClientService/B3ClientService.csproj b/B3ClientService/B3ClientService.csproj index a13003a..d0c916d 100644 --- a/B3ClientService/B3ClientService.csproj +++ b/B3ClientService/B3ClientService.csproj @@ -102,6 +102,7 @@ + @@ -118,6 +119,7 @@ + diff --git a/B3ClientService/BO/ByProductWeightRecord_/ByProductWeightRecord.cs b/B3ClientService/BO/ByProductWeightRecord_/ByProductWeightRecord.cs new file mode 100644 index 0000000..e3a2d5d --- /dev/null +++ b/B3ClientService/BO/ByProductWeightRecord_/ByProductWeightRecord.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using BWP.B3Frameworks.BO; +using Forks.EnterpriseServices.DomainObjects2; + +namespace BWP.B3ClientService.BO +{ + /// + /// 副产品称重 + /// + [Serializable] + public class ByProductWeightRecord : Base + { + private DateTime mCreateTime = DateTime.Now; + + [DbColumn(DbType = SqlDbType.DateTime)] + public DateTime CreateTime { get { return mCreateTime; } set { mCreateTime = value; } } + + public string BarCode { get; set; }//条码 + + public long Goods_ID { get; set; } + + public string Goods_Name { get; set; } + + public decimal PiWeight { get; set; }//皮重 + + public decimal MaoWeight { get; set; }//毛重 + + public decimal JingWeight { get; set; }//净重 + + public string CardBarCode { get; set; }//放产品的车的条码 + + public string BiaoShi { get; set; }//用来记录那个工作台或者哪台触摸屏做的 + public string CreateUserName { get; set; } + + [DbColumn(DefaultValue = false)] + public bool IsInStored { get; set; }//是否已经入库 + } +} diff --git a/B3ClientService/Rpcs/BillRpc/ByProductWeightRecordRpc.cs b/B3ClientService/Rpcs/BillRpc/ByProductWeightRecordRpc.cs new file mode 100644 index 0000000..b11deb3 --- /dev/null +++ b/B3ClientService/Rpcs/BillRpc/ByProductWeightRecordRpc.cs @@ -0,0 +1,26 @@ +using System; +using BWP.B3ClientService.BO; +using Forks.EnterpriseServices.DomainObjects2; +using Forks.EnterpriseServices.JsonRpc; +using Newtonsoft.Json; + +namespace BWP.B3ClientService.Rpcs.BillRpc +{ + [Rpc] + public static class ByProductWeightRecordRpc + { + [Rpc] + public static long Insert(string json) + { + var record = JsonConvert.DeserializeObject(json); + record.CreateTime = DateTime.Now; + using (var session = Dmo.NewSession()) + { + session.Insert(record); + session.Commit(); + } + return record.ID; + } + + } +}