diff --git a/CowOutputClient/OperateWindow.xaml b/CowOutputClient/OperateWindow.xaml index 5fc0f31..a7b2dad 100644 --- a/CowOutputClient/OperateWindow.xaml +++ b/CowOutputClient/OperateWindow.xaml @@ -67,7 +67,9 @@ Property="HorizontalContentAlignment" Value="Center"> - + + + diff --git a/WeighBusiness/BL/ProductPlanBL.cs b/WeighBusiness/BL/ProductPlanBL.cs index 6d9c1f2..f2b1813 100644 --- a/WeighBusiness/BL/ProductPlanBL.cs +++ b/WeighBusiness/BL/ProductPlanBL.cs @@ -67,8 +67,8 @@ namespace WeighBusiness.BL if (butcherDetails.Count() > 0) { foreach (var detail in butcherDetails) { string insertSql = InsertUtil.GetInsertSql(TableNames.生产计划分割明细, - new string[] { "ProductPlan_ID", "DetailID", "Goods_Code", "Goods_Name", "Goods_Spec", "Goods_MainUnit", "Goods_ID", "PlanNumber", "IsFinish" }, - new string[] { detail.ProductPlan_ID.ToString(), detail.DetailID.ToString(), detail.Goods_Code, detail.Goods_Name, detail.Goods_Spec, detail.Goods_MainUnit, detail.Goods_ID.ToString(), detail.PlanNumber == null ? "null" : detail.PlanNumber.Value.ToString(),detail.IsFinish?"1":"0" }); + new string[] { "ProductPlan_ID", "DetailID", "Goods_Code", "Goods_Name", "Goods_Spec", "Goods_MainUnit", "Goods_ID", "PlanNumber", "IsFinish", "Department_Name", "Remark" }, + new string[] { detail.ProductPlan_ID.ToString(), detail.DetailID.ToString(), detail.Goods_Code, detail.Goods_Name, detail.Goods_Spec, detail.Goods_MainUnit, detail.Goods_ID.ToString(), detail.PlanNumber == null ? "null" : detail.PlanNumber.Value.ToString(),detail.IsFinish?"1":"0",detail.Department_Name,detail.Remark }); she.ExecuteNonQuery(insertSql, out success, out errorMessage); if (!success && !string.IsNullOrEmpty(errorMessage)) { she.Rollback(); @@ -239,6 +239,8 @@ namespace WeighBusiness.BL butcherDetail.Goods_MainUnit = detail.Get("Goods_MainUnit"); butcherDetail.Goods_ID = detail.Get("Goods_ID"); butcherDetail.PlanNumber = detail.Get("PlanNumber"); + butcherDetail.Department_Name = detail.Get("Department_Name"); + butcherDetail.Remark = detail.Get("Remark"); butcherList.Add(butcherDetail); } } @@ -301,7 +303,7 @@ namespace WeighBusiness.BL public static List GetButcherDetails(DateTime date, long planTeamID) { var list = new List(); - var sql = "select a.Goods_ID, a.Goods_Name,a.Goods_Spec,a.Goods_MainUnit,a.PlanNumber,a.DetailID,e.FinishNumber from {0} a inner join {1} b on a.ProductPlan_ID = b.ProductPlan_ID inner join {2} c on c.Goods_ID = a.Goods_ID inner join {3} d on c.ProductTeam_ID = d.ProductTeam_ID left outer join {4} e on a.DetailID = e.DetailID where b.PlanDate >='{5}' and b.PlanDate < '{6}' and a.IsFinish = 0 and d.ProductTeam_ID = {7}".FormatWith(TableNames.生产计划分割明细, TableNames.生产计划, TableNames.生产班组产出明细, TableNames.生产班组, TableNames.生产计划分割明细完工数量, date, date.AddDays(1), planTeamID); + var sql = "select a.Goods_ID, a.Goods_Name,a.Goods_Spec,a.Goods_MainUnit,a.PlanNumber,a.DetailID,e.FinishNumber,a.Department_Name,a.Remark from {0} a inner join {1} b on a.ProductPlan_ID = b.ProductPlan_ID inner join {2} c on c.Goods_ID = a.Goods_ID inner join {3} d on c.ProductTeam_ID = d.ProductTeam_ID left outer join {4} e on a.DetailID = e.DetailID where b.PlanDate >='{5}' and b.PlanDate < '{6}' and a.IsFinish = 0 and d.ProductTeam_ID = {7}".FormatWith(TableNames.生产计划分割明细, TableNames.生产计划, TableNames.生产班组产出明细, TableNames.生产班组, TableNames.生产计划分割明细完工数量, date, date.AddDays(1), planTeamID); if (!string.IsNullOrEmpty(sql)) { var table = SqlHelperEx.DoQuery(sql); foreach (DataRow row in table.Rows) { @@ -313,6 +315,8 @@ namespace WeighBusiness.BL outDetail.PlanNumber = DataTypeUtil.GetDecimalNum(row[4]); outDetail.DetailID = (long)((int)row[5]); outDetail.FinishNum = DataTypeUtil.GetDecimalNum(row[6]); + outDetail.Department_Name = (string)row[7]; + outDetail.Remark = (string)row[8]; list.Add(outDetail); } } @@ -328,7 +332,8 @@ namespace WeighBusiness.BL public string Goods_Spec { get; set; } public string Goods_MainUnit { get; set; } public decimal? PlanNumber { get; set; } - + public string Department_Name { get; set; } + public string Remark { get; set; } private decimal? mFinishNum; public decimal? FinishNum { diff --git a/WeighBusiness/BO/ButcherDetail.cs b/WeighBusiness/BO/ButcherDetail.cs index f710ff6..033a471 100644 --- a/WeighBusiness/BO/ButcherDetail.cs +++ b/WeighBusiness/BO/ButcherDetail.cs @@ -21,5 +21,7 @@ namespace WeighBusiness.BO public long Goods_ID { get; set; } public decimal? PlanNumber { get; set; } public bool IsFinish { get; set; } + public string Department_Name { get; set; } + public string Remark { get; set; } } } diff --git a/WeighBusiness/BO/CreateTables/CreateButcherDetail.cs b/WeighBusiness/BO/CreateTables/CreateButcherDetail.cs index 79464f4..bbb8781 100644 --- a/WeighBusiness/BO/CreateTables/CreateButcherDetail.cs +++ b/WeighBusiness/BO/CreateTables/CreateButcherDetail.cs @@ -22,6 +22,8 @@ namespace WeighBusiness.BO.CreateTables cth.AddField(new FieldInfo() { FieldName = "Goods_ID", FieldType = FBType.Integer, IsNotNull = true }); cth.AddField(new FieldInfo() { FieldName = "PlanNumber", FieldType = FBType.Decimal, FieldTypeParams = "(18, 6)" }); cth.AddField(new FieldInfo() { FieldName = "IsFinish", FieldType = FBType.Boolean, IsNotNull = true }); + cth.AddField(new FieldInfo() { FieldName = "Department_Name", FieldType = FBType.Varchar, FieldTypeParams = "(100)" }); + cth.AddField(new FieldInfo() { FieldName = "Remark", FieldType = FBType.Varchar, FieldTypeParams = "(100)" }); base.AddFields(cth); } }