From 80df794d4c56c8311c6f6db012b81bc66e34b1e0 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Tue, 8 Jun 2021 21:29:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8D=95No.157516=20?= =?UTF-8?q?=E3=80=90=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=AD=98=E8=B4=A7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=91=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=EF=BC=9A?= =?UTF-8?q?=E6=9A=82=E5=AD=98=E5=8C=BA=EF=BC=88=E6=80=BB=E7=A0=81=E6=BB=9E?= =?UTF-8?q?=E5=90=8E=EF=BC=89=E5=B9=B6=E5=88=A0=E9=99=A4=E3=80=90=E5=AD=98?= =?UTF-8?q?=E8=B4=A7=E3=80=91{=E6=A1=88=E7=BB=84=E6=97=A0=E6=80=BB?= =?UTF-8?q?=E7=A0=81}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs | 11 +++++------ ButcherFactory.BO/Bill/SegmentProduction.cs | 5 ++--- ButcherFactory.BO/LocalBL/SegmentProductionBL.cs | 11 ++++++++--- .../SegmentProductionAutoForm.cs | 12 ++++++------ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs b/ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs index 6e5ddec..95a1fee 100644 --- a/ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs +++ b/ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs @@ -51,11 +51,7 @@ namespace ButcherFactory.BO [ReferenceTo(typeof(Goods), "EachNumber")] [Join("Goods_ID", "ID")] - public int? EachNumber { get; set; } - - [ReferenceTo(typeof(Goods), "NoTotalCode")] - [Join("Goods_ID", "ID")] - public bool? NoTotalCode { get; set; } + public int? EachNumber { get; set; } public decimal? StandardWeight { get; set; } @@ -64,7 +60,10 @@ namespace ButcherFactory.BO public decimal? StandardWeightLow { get; set; } [DbColumn(DefaultValue = 0)] - public bool StandardPic { get; set; } + public bool StandardPic { get; set; } + + [DbColumn(DefaultValue = 0)] + public bool NoTotalCode { get; set; } [NonDmoProperty] public bool Selected { get; set; } diff --git a/ButcherFactory.BO/Bill/SegmentProduction.cs b/ButcherFactory.BO/Bill/SegmentProduction.cs index 021b25a..ae165af 100644 --- a/ButcherFactory.BO/Bill/SegmentProduction.cs +++ b/ButcherFactory.BO/Bill/SegmentProduction.cs @@ -63,9 +63,8 @@ namespace ButcherFactory.BO [Join("Goods_ID", "ID")] public short? GoodsType { get; set; } - [ReferenceTo(typeof(Goods), "NoTotalCode")] - [Join("Goods_ID", "ID")] - public bool? NoTotalCode { get; set; } + [DbColumn(DefaultValue = 0)] + public bool NoTotalCode { get; set; } public long? GroupID { get; set; } diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index cb09521..c065bfc 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -38,7 +38,8 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("TotalCode_ID")); query.Columns.Add(DQSelectColumn.Field("TotalCode_Code")); query.Columns.Add(DQSelectColumn.Field("CreateTime")); - query.Columns.Add(DQSelectColumn.Field("GoodsType")); + query.Columns.Add(DQSelectColumn.Field("GoodsType")); + query.Columns.Add(DQSelectColumn.Field("NoTotalCode")); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); if (submited) @@ -72,6 +73,7 @@ namespace ButcherFactory.BO.LocalBL entity.TotalCode_Code = (string)reader[14]; entity.CreateTime = (DateTime)reader[15]; entity.GoodsType = (short?)reader[16]; + entity.NoTotalCode = (bool)reader[17]; list.Add(entity); } } @@ -159,7 +161,7 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("NoTotalCode")); query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("CreateTime", date.Date)); query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", date.Date.AddDays(1))); - query.Where.Conditions.Add(DQCondition.And( DQCondition.EQ("Delete", false) )); + query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Delete", false) )); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("GoodsType")); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("NoTotalCode", true)); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID",true)); @@ -522,6 +524,7 @@ namespace ButcherFactory.BO.LocalBL query.Columns.Add(DQSelectColumn.Field("MsgID")); query.Columns.Add(DQSelectColumn.Field("StatisticNumber")); query.Columns.Add(DQSelectColumn.Field("TotalCode_Code")); + query.Columns.Add(DQSelectColumn.Field("NoTotalCode")); query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false), DQCondition.EQ("Delete", false))); query.Where.Conditions.Add(DQCondition.LessThan("CreateTime", DateTime.Now.AddMinutes(-1))); query.Range = SelectRange.Top(10); @@ -547,6 +550,7 @@ namespace ButcherFactory.BO.LocalBL obj.MsgID = (string)reader[11]; obj.StatisticNumber = (decimal?)reader[12]; obj.TotalCode_Code = (string)reader[13]; + obj.NoTotalCode = (bool)reader[14]; upload.Add(obj); } } @@ -681,7 +685,8 @@ namespace ButcherFactory.BO.LocalBL public bool StandardPic { get; set; } public string MsgID { get; set; } public decimal? StatisticNumber { get; set; } - public string TotalCode_Code { get; set; } + public string TotalCode_Code { get; set; } + public bool NoTotalCode { get; set; } } class TaskTemp diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index d15874d..fecedae 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -366,12 +366,12 @@ namespace ButcherFactory.SegmentProductionAuto_ rebuild = true; } } - else if (entity.GoodsType == 1 && entity.NoTotalCode == true) + else if (entity.GoodsType == 1 && entity.NoTotalCode) { entity.TotalCode_ID = _stayTotalCode.ID; thisTotal = _stayTotalCode; thisPanel = _stayPanel; - if (_totalCode.GoodsType != 1 || _totalCode.NoTotalCode != true) + if (_totalCode.GoodsType != 1 || !_totalCode.NoTotalCode) { foreach (var bt in codeButtons) { @@ -524,7 +524,7 @@ namespace ButcherFactory.SegmentProductionAuto_ flowLayoutPanel4.Controls.Clear(); foreach (var item in allCode) { - if (item.GoodsType == 0 || (item.GoodsType == 1 && item.NoTotalCode == true)) + if (item.GoodsType == 0 || (item.GoodsType == 1 && item.NoTotalCode)) { } @@ -612,7 +612,7 @@ namespace ButcherFactory.SegmentProductionAuto_ } continue; } - else if (d.GoodsType == 1 && d.NoTotalCode == true)//暂存区不删除总码 + else if (d.GoodsType == 1 && d.NoTotalCode)//暂存区不删除总码 { if (_stayPanel != null) { @@ -758,7 +758,7 @@ namespace ButcherFactory.SegmentProductionAuto_ MessageBox.Show("鲜品总码不允许删除"); return; } - else if (_totalCode.GoodsType == 1 && _totalCode.NoTotalCode == true) + else if (_totalCode.GoodsType == 1 && _totalCode.NoTotalCode) { MessageBox.Show("暂存区总码不允许删除"); return; @@ -881,7 +881,7 @@ namespace ButcherFactory.SegmentProductionAuto_ n.Text = "鲜品"; _freshPanel = n; } - else if (tCode.GoodsType == 1 && tCode.NoTotalCode == true) + else if (tCode.GoodsType == 1 && tCode.NoTotalCode) { n.Text = "暂存区"; _stayPanel = n;