Browse Source

需求单No.157516 【客户端存货配置】增加字段:暂存区(总码滞后)并删除【存货】{案组无总码}

master
yibo 4 years ago
parent
commit
80df794d4c
4 changed files with 21 additions and 18 deletions
  1. +5
    -6
      ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs
  2. +2
    -3
      ButcherFactory.BO/Bill/SegmentProduction.cs
  3. +8
    -3
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  4. +6
    -6
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs

+ 5
- 6
ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs View File

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


+ 2
- 3
ButcherFactory.BO/Bill/SegmentProduction.cs View File

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


+ 8
- 3
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

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


+ 6
- 6
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

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


Loading…
Cancel
Save