From e89413752df1a5f8b3a17d5edd06223e263d05c5 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Mon, 6 Aug 2018 11:06:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SaleOutStore_/SaleOutStoreSimpleAnayse.cs | 18 +++++++++++++++++- .../SaleOutStore_/SaleOutStoreSimpleAnayse.xml | 4 ++++ .../SaleOutStoreSimpleAnaysePrint.cs | 10 ++++++++++ .../Pages/TypeIOCs/CarLoadingTypeIOC.cs | 2 +- .../SaleOutStorePrint/SaleOutStorePrintInfo.cs | 1 + 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs index fce9850..02652b4 100644 --- a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs +++ b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs @@ -123,6 +123,9 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ layout.Add("BillState", state); layout.Add("OrderDate", QueryCreator.TimeRange(_mainInfo.Fields["OrderDate"], mQueryContainer, "MinOrderDate", "MaxOrderDate")); + layout.Add("Store_ID", mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(deliverLineInput = QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Store_ID"], B3FrameworksConsts.DataSources.授权仓库全部), s => long.Parse(s)), "Store_ID")); + + layout["DeliverGoodsLine_ID"].NotAutoAddToContainer = true; _goodsPropertyCatalog = QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["GoodsPropertyCatalog_ID"], B3UnitedInfosConsts.DataSources.存货属性分类); layout.Add("GoodsPropertyCatalog_ID", new SimpleLabel("属性分类"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_goodsPropertyCatalog, s => long.Parse(s)), "GoodsPropertyCatalog_ID")); layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true; @@ -167,6 +170,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ var maxOrder = mQueryContainer.GetControl("MaxOrderDate"); var minOrder = mQueryContainer.GetControl("MinOrderDate"); var customer = mQueryContainer.GetControl("Customer_ID"); + var store = mQueryContainer.GetControl("Store_ID"); var take = mQueryContainer.GetControl>("TakeGoods_Type"); var info = new SaleOutStorePrintInfo(); if (!maxLoad.IsEmpty) @@ -196,6 +200,10 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ { info.TakeGoodsTypes = string.Join("|", take.GetValues().Select(x => x.Value)); } + if (!store.IsEmpty) + { + info.StoreID = store.Value; + } info.BillStates = string.Join("|", billStateInput.GetValues().Select(x => x.Value)); info.DeliverGoodsLines = deliverLineInput.Value; @@ -216,10 +224,11 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ var goods = new JoinAlias(typeof(SaleGoods)); var goodsProperty = new JoinAlias(typeof(GoodsProperty)); var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog)); + var lineDetail = new JoinAlias(typeof(DeliverGoodsLine_Detail)); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), DQCondition.EQ(detail, "SaleGoods_ID", goods, "ID")); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsProperty), DQCondition.EQ(goodsProperty, "ID", goods, "GoodsProperty_ID")); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID")); - + dom.From.AddJoin(JoinType.Left, new DQDmoSource(lineDetail), DQCondition.And(DQCondition.EQ(root, "DeliverGoodsLine_ID", lineDetail, "DeliverGoodsLine_ID"), DQCondition.EQ(root, "Customer_ID", lineDetail, "Customer_ID"))); dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID)); OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore)); @@ -263,6 +272,13 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ } + if (dom.OrderBy.Expressions.Count == 0) + { + dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("DeliverGoodsLine_ID")); + dom.OrderBy.Expressions.Add(DQOrderByExpression.Create(lineDetail, "SequenceNumber")); + dom.GroupBy.Expressions.Add(DQExpression.Field("DeliverGoodsLine_ID")); + dom.GroupBy.Expressions.Add(DQExpression.Field(lineDetail, "SequenceNumber")); + } } return dom; diff --git a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml index 741123b..55feda1 100644 --- a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml +++ b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml @@ -49,6 +49,10 @@ + + + + \ No newline at end of file diff --git a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs index 903edbc..1b2c180 100644 --- a/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs +++ b/B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs @@ -157,11 +157,13 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ var goods = new JoinAlias(typeof(SaleGoods)); var goodsProperty = new JoinAlias(typeof(GoodsProperty)); var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog)); + var lineDetail = new JoinAlias(typeof(DeliverGoodsLine_Detail)); dom.From.AddJoin(JoinType.Left, new DQDmoSource(detail), DQCondition.EQ(root, "ID", detail, "SaleOutStore_ID")); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goods), DQCondition.EQ(detail, "SaleGoods_ID", goods, "ID")); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsProperty), DQCondition.EQ(goodsProperty, "ID", goods, "GoodsProperty_ID")); dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsPropertyCatalog), DQCondition.EQ(goodsProperty, "GoodsPropertyCatalog_ID", goodsPropertyCatalog, "ID")); + dom.From.AddJoin(JoinType.Left, new DQDmoSource(lineDetail), DQCondition.And(DQCondition.EQ(root, "DeliverGoodsLine_ID", lineDetail, "DeliverGoodsLine_ID"), DQCondition.EQ(root, "Customer_ID", lineDetail, "Customer_ID"))); dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID)); OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore)); @@ -216,6 +218,10 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ { dom.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(root, "DeliverGoodsLine_ID"), info.DeliverGoodsLines.Split('|').Select(x => DQExpression.Value(x)).ToArray())); } + if (!string.IsNullOrEmpty(info.StoreID)) + { + dom.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(root, "Store_ID"), info.StoreID.Split('|').Select(x => DQExpression.Value(x)).ToArray())); + } if (!string.IsNullOrEmpty(info.GoodsPropertyCatalogs)) { @@ -245,6 +251,10 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_ } dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID)); + dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("DeliverGoodsLine_ID")); + dom.OrderBy.Expressions.Add(DQOrderByExpression.Create(lineDetail, "SequenceNumber")); + dom.GroupBy.Expressions.Add(DQExpression.Field("DeliverGoodsLine_ID")); + dom.GroupBy.Expressions.Add(DQExpression.Field(lineDetail, "SequenceNumber")); OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore)); diff --git a/B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs b/B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs index 31f5b90..9bf720b 100644 --- a/B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs +++ b/B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs @@ -188,7 +188,7 @@ namespace BWP.Web.Pages.TypeIOCs query.Columns.Add(DQSelectColumn.Field("ID", outstoreDetail, "SaleOutStore_Detail_ID")); query.Columns.Add(DQSelectColumn.Field("SaleOutStore_ID", outstoreDetail, "SaleOutStore_ID")); query.Where.Conditions.Add(DQCondition.EQ(bill,"ID", dmo.ID)); - + query.OrderBy.Expressions.Add(DQOrderByExpression.Create(detail, "ID")); if (StoreIDs != null && StoreIDs.Count > 0) { query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(outstore, "Store_ID"), StoreIDs.Select(x => DQExpression.Value(x)).ToArray())); diff --git a/B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs b/B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs index 91a3a26..cea7dc0 100644 --- a/B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs +++ b/B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs @@ -39,6 +39,7 @@ namespace BWP.B3QingDaoWanFu.BO public string GoodsPropertyCatalogs { get; set; } public string Customers { get; set; } public string TakeGoodsTypes { get; set; } + public string StoreID { get; set; } private static string CreateCacheKey(Type type) {