diff --git a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs index 8da7904..60b7e6a 100644 --- a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs +++ b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; namespace BO.BO.Bill { + [Serializable] [MapToTable("GradeAndWeight_Detail")] [KeyField("SID", KeyGenType.identity)] public class GradeAndWeight_Detail @@ -50,5 +51,7 @@ namespace BO.BO.Bill //掉猪 public bool IsDrop { get; set; } + + public string BarCode { get; set; } } } diff --git a/BO/Utils/AfterLoginUtil.cs b/BO/Utils/AfterLoginUtil.cs index 877acbb..b715ac9 100644 --- a/BO/Utils/AfterLoginUtil.cs +++ b/BO/Utils/AfterLoginUtil.cs @@ -20,9 +20,9 @@ namespace BO.Utils { #if DEBUG static List> roleToAssemblies = new List>(){new Tuple("排宰员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherOrder\bin\Debug\ButcherOrder"), - new Tuple("过磅员",@"C:\BwpB3Project\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), + new Tuple("过磅员",@"C:\B3\src\B3ButcherManageClient\ButcherWeight\bin\Debug\ButcherWeight"), new Tuple("验质员",@"C:\BwpB3Project\src\B3ButcherManageClient\QualityAndOrder\bin\Debug\QualityAndOrder"), - new Tuple("定级员",@"C:\BwpB3Project\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), + new Tuple("定级员",@"C:\B3\src\B3ButcherManageClient\WeighAndGrading\bin\Debug\WeighAndGrading"), new Tuple("窒晕员",@"C:\BwpB3Project\src\B3ButcherManageClient\OrderConfirm\bin\Debug\OrderConfirm"), new Tuple("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"), new Tuple("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"), diff --git a/BO/Utils/BillRpc/GradeAndWeightRpc.cs b/BO/Utils/BillRpc/GradeAndWeightRpc.cs index 4b91df4..24fce41 100644 --- a/BO/Utils/BillRpc/GradeAndWeightRpc.cs +++ b/BO/Utils/BillRpc/GradeAndWeightRpc.cs @@ -299,7 +299,8 @@ namespace BO.Utils.BillRpc { var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail))); query.Columns.Add(DQSelectColumn.Count()); - query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", false), DQCondition.EQ("Date", date))); + query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field("Technics")), DQCondition.EQ("Date", date))); + using (var session = LocalDmoSession.New()) { return Convert.ToInt32(session.ExecuteScalar(query)); diff --git a/ButcherManageClient/ButcherManageClient.csproj b/ButcherManageClient/ButcherManageClient.csproj index 499d098..9b580a2 100644 --- a/ButcherManageClient/ButcherManageClient.csproj +++ b/ButcherManageClient/ButcherManageClient.csproj @@ -126,6 +126,10 @@ {f06032a9-bc6c-4123-947b-ef078fab7a74} SegmentationWeight + + {bfc366e2-994c-433f-9ee2-5377dba9d948} + WeighAndGrading + diff --git a/ButcherManageClient/SettingForm.cs b/ButcherManageClient/SettingForm.cs index 0ad4dd7..abc1391 100644 --- a/ButcherManageClient/SettingForm.cs +++ b/ButcherManageClient/SettingForm.cs @@ -68,6 +68,7 @@ namespace ButcherManageClient list.Add("SegmentationWeight.dll"); list.Add("TrunksIousOutInStore.dll"); list.Add("SegmentationInStore.dll"); + list.Add("BO.dll"); return list; } diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index dfe6219..25e30db 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -115,8 +115,8 @@ namespace WeighAndGrading if (modifyDetail == null) { - StartPrintEntity(tech, null); - AddDetail(livestockTag); + var code=StartPrintEntity(tech, null); + AddDetail(livestockTag,code); } else { @@ -416,18 +416,19 @@ namespace WeighAndGrading historyGrid.Refresh(); } - void StartPrintEntity(string gongyijibie, int? index) + string StartPrintEntity(string gongyijibie, int? index) { - if (!isPrintCheckBox.Checked) - { - return; - } + if (string.IsNullOrWhiteSpace(gongyijibie)) { - return; + return ""; } var entity = CreatePrintEntity(gongyijibie, index); - WeightGradePrint.Print(entity); + if (isPrintCheckBox.Checked) + { + WeightGradePrint.Print(entity); + } + return entity.BarCode; } PrintEntity CreatePrintEntity(string jibie, int? index) @@ -477,7 +478,7 @@ namespace WeighAndGrading { return; } - StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index); + var code=StartPrintEntity(modifyDetail.Technics_Name, modifyDetail.Index); cancelBtn_Click(sender, EventArgs.Empty); } @@ -702,7 +703,7 @@ namespace WeighAndGrading #endregion static object _obj = new object(); - void AddDetail(CTuple livestock) + void AddDetail(CTuple livestock,string barCode) { lock (_obj) { @@ -732,7 +733,9 @@ namespace WeighAndGrading SetBtnUnCheck(disBtn); disBtn = null; } - LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight"); + + first.BarCode = barCode; + LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode"); var tag = details.FirstOrDefault(x => x.SID == first.SID); if (first != null) { @@ -751,6 +754,7 @@ namespace WeighAndGrading { maxIndex++; var entity = new GradeAndWeight_Detail(); + entity.BarCode = barCode; entity.Index = maxIndex; if (currentRow != null) {