Browse Source

万福打印简称

master
yibo 5 years ago
parent
commit
b36726eb98
8 changed files with 35 additions and 11 deletions
  1. +5
    -1
      ButcherFactory.BO/BaseInfo/ClientGoodsSet.cs
  2. +3
    -1
      ButcherFactory.BO/BaseInfo/Goods.cs
  3. +4
    -0
      ButcherFactory.BO/Bill/SegmentProduction.cs
  4. +4
    -2
      ButcherFactory.BO/LocalBL/FormClientGoodsSetBL.cs
  5. +4
    -2
      ButcherFactory.BO/LocalBL/SegmentProductionBL.cs
  6. +2
    -1
      ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs
  7. +2
    -1
      ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs
  8. +11
    -3
      ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs

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

@ -43,7 +43,11 @@ namespace ButcherFactory.BO
[ReferenceTo(typeof(Goods), "MainUnit")]
[Join("Goods_ID", "ID")]
public string MainUnit { get; set; }
public string MainUnit { get; set; }
[ReferenceTo(typeof(Goods), "ShotPrintName")]
[Join("Goods_ID", "ID")]
public string ShotPrintName { get; set; }
public decimal? StandardWeight { get; set; }


+ 3
- 1
ButcherFactory.BO/BaseInfo/Goods.cs View File

@ -22,6 +22,8 @@ namespace ButcherFactory.BO
public decimal? DownWeight { get; set; }
public short? GoodsType { get; set; }
public short? GoodsType { get; set; }
public string ShotPrintName { get; set; }
}
}

+ 4
- 0
ButcherFactory.BO/Bill/SegmentProduction.cs View File

@ -71,6 +71,10 @@ namespace ButcherFactory.BO
[Join("Goods_ID", "ID")]
public string MainUnit { get; set; }
[ReferenceTo(typeof(Goods), "ShotPrintName")]
[Join("Goods_ID", "ID")]
public string ShotPrintName { get; set; }
public decimal? StatisticNumber { get; set; }
}


+ 4
- 2
ButcherFactory.BO/LocalBL/FormClientGoodsSetBL.cs View File

@ -69,7 +69,8 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("Goods_Code", detail));
query.Columns.Add(DQSelectColumn.Field("GoodsType", detail));
query.Columns.Add(DQSelectColumn.Field("StandardPic", detail));
query.Columns.Add(DQSelectColumn.Field("MainUnit", detail));
query.Columns.Add(DQSelectColumn.Field("MainUnit", detail));
query.Columns.Add(DQSelectColumn.Field("ShotPrintName", detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(main, "ID"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "ID"));
@ -92,7 +93,8 @@ namespace ButcherFactory.BO.LocalBL
entity.Goods_Code = (string)reader[7];
entity.GoodsType = (short?)reader[8];
entity.StandardPic = (bool)reader[9];
entity.MainUnit = (string)reader[10];
entity.MainUnit = (string)reader[10];
entity.ShotPrintName = (string)reader[11];
if (result.ContainsKey(key))
result[key].Add(entity);
else


+ 4
- 2
ButcherFactory.BO/LocalBL/SegmentProductionBL.cs View File

@ -32,7 +32,8 @@ namespace ButcherFactory.BO.LocalBL
query.Columns.Add(DQSelectColumn.Field("Goods_Spec"));
query.Columns.Add(DQSelectColumn.Field("StandardPic"));
query.Columns.Add(DQSelectColumn.Field("Goods_ID"));
query.Columns.Add(DQSelectColumn.Field("Goods_Code"));
query.Columns.Add(DQSelectColumn.Field("Goods_Code"));
query.Columns.Add(DQSelectColumn.Field("ShotPrintName"));
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)
@ -58,7 +59,8 @@ namespace ButcherFactory.BO.LocalBL
entity.Goods_Spec = (string)reader[7];
entity.StandardPic = (bool)reader[8];
entity.Goods_ID = (long)reader[9];
entity.Goods_Code = (string)reader[10];
entity.Goods_Code = (string)reader[10];
entity.ShotPrintName = (string)reader[11];
entity.Submited = submited;
list.Add(entity);
}


+ 2
- 1
ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs View File

@ -210,7 +210,8 @@ namespace ButcherFactory.SegmentProductionAuto_
entity.Goods_Code = detail.Goods_Code;
entity.Goods_Name = detail.Goods_Name;
entity.Goods_Spec = detail.Goods_Spec;
entity.MainUnit = detail.MainUnit;
entity.MainUnit = detail.MainUnit;
entity.ShotPrintName = detail.ShotPrintName;
GoodsLabel.Text = entity.Goods_Name;
historyList.Insert(0, entity);


+ 2
- 1
ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs View File

@ -156,7 +156,8 @@ namespace ButcherFactory.SegmentProduction_
var entity = SegmentProductionBL.Insert(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value);
entity.Goods_Name = detail.Goods_Name;
entity.Goods_Spec = detail.Goods_Spec;
entity.MainUnit = detail.MainUnit;
entity.MainUnit = detail.MainUnit;
entity.ShotPrintName = detail.ShotPrintName;
GoodsLabel.Text = entity.Goods_Name;
unSubmitList.Insert(0, entity);
historyList.Insert(0, entity);


+ 11
- 3
ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs View File

@ -21,8 +21,9 @@ namespace ButcherFactory.SegmentProduction_
if (AppContext.ConnectInfo.TraceBackUrl == "default")
throw new Exception("请先配置追溯服务器地址");
if (dt == null)
dt = DateTime.Today;
var dic = new Dictionary<string, string>();
dt = DateTime.Today;
var dic = new Dictionary<string, string>();
dic.Add("$ShotPrintName", entity.ShotPrintName);
dic.Add("$Goods_Name", entity.Goods_Name);
var info = string.Empty;
if (entity.StandardPic)
@ -43,7 +44,14 @@ namespace ButcherFactory.SegmentProduction_
var barImgUrl = string.Format(IMGFILE, id + "_bar");
BwpClientPrint.BwpClientWebPrint.CreateBarCode("69212203" + entity.Goods_Code, barImgUrl, new Size(120, 40));
dic.Add("$BarImg", barImgUrl);
dic.Add("$Weight", string.Format("{0:#0.##}{1}", entity.Weight, entity.MainUnit));
string unit = entity.MainUnit;
int rate =1;
if (unit.ToUpper() == "KG")
{
rate = 1000;
unit = "g";
}
dic.Add("$Weight", string.Format("{0:#0.##}{1}", entity.Weight * rate, unit));
BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE + template, dic);
AfterPrint();


Loading…
Cancel
Save