diff --git a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs index cccbe6c..fe6d932 100644 --- a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs +++ b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationEdit.cs @@ -94,7 +94,7 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ _outdetailGrid.Columns.Add(new DFEditGridColumn("Goods_MainUnit")); _outdetailGrid.Columns.Add(new DFEditGridColumn("SecondNumber")); _outdetailGrid.Columns.Add(new DFEditGridColumn("Goods_SecondUnit")); - _outdetailGrid.Columns.Add(new DFEditGridColumn("TaxRate")); + _outdetailGrid.Columns.Add(new DFEditGridColumn("Remark")); } private void CreateAccDetailPanel(TitlePanel titlePanel) diff --git a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationPrint.cs b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationPrint.cs index c79d1b2..6a97fd8 100644 --- a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationPrint.cs +++ b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Bills/ProductionNotification_/ProductionNotificationPrint.cs @@ -12,6 +12,7 @@ using Forks.EnterpriseServices.DomainObjects2; using Forks.EnterpriseServices.SqlDoms; using TSingSoft.WebPluginFramework; using BWP.B3UnitedInfos.BO; +using Forks.EnterpriseServices.BusinessInterfaces; namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ { @@ -46,7 +47,10 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ str.Append(@""); str.Append(""); - var details = GetOrderDetail(); + var detailsnotnull = GetOrderDetail(false); + var detailsnull = GetOrderDetail(true); + var details = detailsnotnull.Concat(detailsnull); + foreach (IGrouping grouping in details.GroupBy(x=>x.GoodsProperty_Name)) { @@ -60,19 +64,69 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ return str.ToString(); } - private List GetOrderDetail() + private List GetOrderDetail(bool isordernull) { + var query = new DQueryDom(new JoinAlias(typeof(OutputConfigure_Detail))); + query.Where.Conditions.Add(DQCondition.EQ("OutputConfigure_ID", GetConfigID())); + query.Columns.Add(DQSelectColumn.Field("OrderByProperty")); + query.Columns.Add(DQSelectColumn.Field("GoodsProperty_ID")); var detail = new JoinAlias("dt",typeof(ProductionNotification_Detail)); var goods = new JoinAlias("goods", typeof(Goods)); - var configDetail = new JoinAlias("cdt",typeof(OutputConfigure_Detail)); - var dom = new DQueryDom(detail); - dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods),DQCondition.EQ(goods, "ID", detail, "Goods_ID")); + var configDetail = new JoinAlias("cdt",typeof(OutputConfigureDetailTmp)); + var dom = new DQueryDom(goods); + dom.From.AddJoin(JoinType.Left, new DQDmoSource(detail),DQCondition.EQ(goods, "ID", detail, "Goods_ID")); + dom.RegisterQueryTable(typeof(OutputConfigureDetailTmp),new List { "OrderByProperty", "GoodsProperty_ID"}, query); dom.From.AddJoin(JoinType.Left, new DQDmoSource(configDetail),DQCondition.EQ(configDetail, "GoodsProperty_ID", goods, "GoodsProperty_ID")); - dom.Where.Conditions.Add(DQCondition.EQ("ProductionNotification_ID",Dmo.ID)); - dom.Where.Conditions.Add(DQCondition.EQ(configDetail, "OutputConfigure_ID", GetConfigID())); + dom.Where.Conditions.Add(DQCondition.EQ(detail,"ProductionNotification_ID",Dmo.ID)); + if(isordernull) + dom.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field(configDetail, "OrderByProperty"))); + else + dom.Where.Conditions.Add(DQCondition.IsNotNull(DQExpression.Field(configDetail, "OrderByProperty"))); dom.OrderBy.Expressions.Add(DQOrderByExpression.Create(configDetail, "OrderByProperty")); - var r = dom.EExecuteDmoList(); - return r; + dom.Columns.Add(DQSelectColumn.Field("Order_ID", detail)); + dom.Columns.Add(DQSelectColumn.Field("LoadTime", detail)); + dom.Columns.Add(DQSelectColumn.Field("Customer_ID", detail)); + dom.Columns.Add(DQSelectColumn.Field("Customer_Name", detail)); + dom.Columns.Add(DQSelectColumn.Field("Goods_ID", detail)); + dom.Columns.Add(DQSelectColumn.Field("Goods_Spec", detail)); + dom.Columns.Add(DQSelectColumn.Field("Goods_Name", detail)); + dom.Columns.Add(DQSelectColumn.Field("GoodsProperty_ID", detail)); + dom.Columns.Add(DQSelectColumn.Field("GoodsProperty_Name", detail)); + dom.Columns.Add(DQSelectColumn.Field("SendNumber", detail)); + dom.Columns.Add(DQSelectColumn.Field("Remark",detail)); + dom.Columns.Add(DQSelectColumn.Field("ID", detail)); + var list = new List(); + using (var context = new TransactionContext()) + { + using (var reader = context.Session.ExecuteReader(dom)) + { + while (reader.Read()) + { + var det = new ProductionNotification_Detail() + { + Order_ID = (long)reader[0], + LoadTime = (DateTime?)reader[1], + Customer_ID = (long?)reader[2], + Customer_Name = (string)reader[3], + Goods_ID = (long?)reader[4], + Goods_Spec = (string)reader[5], + Goods_Name = (string)reader[6], + GoodsProperty_ID = (long?)reader[7], + GoodsProperty_Name = (string)reader[8], + SendNumber = (Money?)reader[9], + Remark = (string)reader[10], + ID=(long)reader[11] + }; + list.Add(det); + } + } + } + return list; + } + class OutputConfigureDetailTmp + { + public int? OrderByProperty { get; set; } + public long? GoodsProperty_ID { get; set; } } long GetConfigID() @@ -81,6 +135,9 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ dom.Columns.Add(DQSelectColumn.Max("ID")); var Id = dom.EExecuteScalar(); return Id; + + + } private string Get其他出库相同产品并行显示() @@ -90,13 +147,13 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ AddSolidSType(str); str.Append(@"
订单号发货时间购货客户存货调整数量规格备注
"); - str.Append(""); + str.Append(""); foreach (IGrouping grouping in Dmo.OutDetails.GroupBy(x => x.Goods_Name)) { foreach (ProductionNotificationOutStore_Detail detail in grouping) { - str.Append(""); + str.Append(""); } str.Append(""); } diff --git a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Tools/SaleOrderUpdateList.cs b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Tools/SaleOrderUpdateList.cs index 70407cd..41db3db 100644 --- a/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Tools/SaleOrderUpdateList.cs +++ b/B3_DongFangWanQi.Web/Pages/B3_DongFangWanQi/Tools/SaleOrderUpdateList.cs @@ -277,14 +277,14 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(output, "Number"), "分完数量")); dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(outputConfig, "StoreNum"), "当前库存")); dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(output, "Date"), "测算日期")); - dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(storeDetail, "Number").EAdd(DQExpression.Field(output, "Number")), "可用与预算合计")); + dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(outputConfig, "StoreNum").EAdd(DQExpression.Field(output, "Number")), "可用与预算合计")); dom.Columns.Add(DQSelectColumn.Field("UnitNum", bill)); dom.Columns.Add(DQSelectColumn.Create( - ESubtract(DQExpression.Field(storeDetail, "Number").EAdd(DQExpression.Field(output, "Number")), DQExpression.Field(bill, "UnitNum")), "预计剩余数量")); + ESubtract(DQExpression.Field(outputConfig, "StoreNum").EAdd(DQExpression.Field(output, "Number")), DQExpression.Field(bill, "UnitNum")), "预计剩余数量")); dom.Columns.Add(DQSelectColumn.Create( - ESubtract(DQExpression.Field(storeDetail, "Number").EAdd(DQExpression.Field(output, "Number")), DQExpression.Field(bill, "UnitNum")).ESafeDivide(DQExpression.Field(outputConfig, "Number")).ECastType?>(), "预计剩余头数")); + ESubtract(DQExpression.Field(outputConfig, "StoreNum").EAdd(DQExpression.Field(output, "Number")), DQExpression.Field(bill, "UnitNum")).ESafeDivide(DQExpression.Field(outputConfig, "Number")).ECastType?>(), "预计剩余头数")); return dom; } diff --git a/B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs b/B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs index 85896d2..0f6076a 100644 --- a/B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs +++ b/B3_DongFangWanQi/BL/ProductionNotificationBL_/ProductionNotificationBL.cs @@ -152,6 +152,7 @@ namespace B3_DongFangWanQi.BL Price = outstoreDetail.Price, SecondNumber = outstoreDetail.SecondNumber, TaxRate = outstoreDetail.TaxRate, + Remark = outstoreDetail.Remark }; dmo.OutDetails.Add(dmodetail); } diff --git a/B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotificationOutStore_Detail.cs b/B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotificationOutStore_Detail.cs index dcfe1b3..4f7dc63 100644 --- a/B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotificationOutStore_Detail.cs +++ b/B3_DongFangWanQi/BO/Bill/ProductionNotification_/ProductionNotificationOutStore_Detail.cs @@ -77,6 +77,9 @@ namespace B3_DongFangWanQi.BO [LogicName("辅单位数量")] public Money? SecondNumber { get; set; } + [LogicName("备注")] + public string Remark { get; set; } + }
其他出库单号存货规格数量主单位辅单位数量辅单位税率
其他出库单号存货规格数量主单位辅单位数量辅单位备注
" + detail.OtherOutStore_ID + "" + detail.Goods_Name +"" + detail.Goods_Spec + "" + detail.Number + "" + detail.Goods_MainUnit + "" + detail.SecondNumber + "" + detail.Goods_SecondUnit + "" + detail.TaxRate + "
" + detail.OtherOutStore_ID + "" + detail.Goods_Name +"" + detail.Goods_Spec + "" + detail.Number + "" + detail.Goods_MainUnit + "" + detail.SecondNumber + "" + detail.Goods_SecondUnit + "" + detail.Remark + "
合计" + (Money<二位小数>?)grouping.Sum(x => (x.Number ?? 0).Value)+ ""+ (Money<二位小数>?)grouping.Sum(x => (x.SecondNumber ?? 0).Value) + "