Browse Source

修改。

master
yibo 7 years ago
parent
commit
e89413752d
5 changed files with 33 additions and 2 deletions
  1. +17
    -1
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs
  2. +4
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml
  3. +10
    -0
      B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs
  4. +1
    -1
      B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs
  5. +1
    -0
      B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs

+ 17
- 1
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.cs View File

@ -123,6 +123,9 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
layout.Add("BillState", state); layout.Add("BillState", state);
layout.Add("OrderDate", QueryCreator.TimeRange(_mainInfo.Fields["OrderDate"], mQueryContainer, "MinOrderDate", "MaxOrderDate")); 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.); _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.Add("GoodsPropertyCatalog_ID", new SimpleLabel("属性分类"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_goodsPropertyCatalog, s => long.Parse(s)), "GoodsPropertyCatalog_ID"));
layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true; layout["GoodsPropertyCatalog_ID"].NotAutoAddToContainer = true;
@ -167,6 +170,7 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
var maxOrder = mQueryContainer.GetControl<DFDateTimeInput>("MaxOrderDate"); var maxOrder = mQueryContainer.GetControl<DFDateTimeInput>("MaxOrderDate");
var minOrder = mQueryContainer.GetControl<DFDateTimeInput>("MinOrderDate"); var minOrder = mQueryContainer.GetControl<DFDateTimeInput>("MinOrderDate");
var customer = mQueryContainer.GetControl<DFChoiceBox>("Customer_ID"); var customer = mQueryContainer.GetControl<DFChoiceBox>("Customer_ID");
var store = mQueryContainer.GetControl<DFChoiceBox>("Store_ID");
var take = mQueryContainer.GetControl<DFNamedValueInput<>>("TakeGoods_Type"); var take = mQueryContainer.GetControl<DFNamedValueInput<>>("TakeGoods_Type");
var info = new SaleOutStorePrintInfo(); var info = new SaleOutStorePrintInfo();
if (!maxLoad.IsEmpty) if (!maxLoad.IsEmpty)
@ -196,6 +200,10 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
{ {
info.TakeGoodsTypes = string.Join("|", take.GetValues().Select(x => x.Value)); 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.BillStates = string.Join("|", billStateInput.GetValues().Select(x => x.Value));
info.DeliverGoodsLines = deliverLineInput.Value; info.DeliverGoodsLines = deliverLineInput.Value;
@ -216,10 +224,11 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
var goods = new JoinAlias(typeof(SaleGoods)); var goods = new JoinAlias(typeof(SaleGoods));
var goodsProperty = new JoinAlias(typeof(GoodsProperty)); var goodsProperty = new JoinAlias(typeof(GoodsProperty));
var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog)); 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(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(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(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)); dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID));
OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore)); 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; return dom;


+ 4
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnayse.xml View File

@ -49,6 +49,10 @@
<Field name="Customer_ID"/> <Field name="Customer_ID"/>
<QBE paramName="Customer_ID"/> <QBE paramName="Customer_ID"/>
</QBEIn> </QBEIn>
<QBEIn>
<Field name="Store_ID"/>
<QBE paramName="Store_ID"/>
</QBEIn>
</And> </And>
</Where> </Where>
</Select> </Select>

+ 10
- 0
B3QingDaoWanFu.Web/Pages/B3QingDaoWanFu/SaleOutStore_/SaleOutStoreSimpleAnaysePrint.cs View File

@ -157,11 +157,13 @@ namespace BWP.Web.Pages.B3QingDaoWanFu.SaleOutStore_
var goods = new JoinAlias(typeof(SaleGoods)); var goods = new JoinAlias(typeof(SaleGoods));
var goodsProperty = new JoinAlias(typeof(GoodsProperty)); var goodsProperty = new JoinAlias(typeof(GoodsProperty));
var goodsPropertyCatalog = new JoinAlias(typeof(GoodsPropertyCatalog)); 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(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(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(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(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)); dom.Where.Conditions.Add(DQCondition.EQ(root, "Domain_ID", DomainContext.Current.ID));
OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore)); 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())); 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)) 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.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)); OrganizationUtil.AddOrganizationLimit(dom, typeof(SaleOutStore));


+ 1
- 1
B3QingDaoWanFu.Web/Pages/TypeIOCs/CarLoadingTypeIOC.cs View File

@ -188,7 +188,7 @@ namespace BWP.Web.Pages.TypeIOCs
query.Columns.Add(DQSelectColumn.Field("ID", outstoreDetail, "SaleOutStore_Detail_ID")); query.Columns.Add(DQSelectColumn.Field("ID", outstoreDetail, "SaleOutStore_Detail_ID"));
query.Columns.Add(DQSelectColumn.Field("SaleOutStore_ID", outstoreDetail, "SaleOutStore_ID")); query.Columns.Add(DQSelectColumn.Field("SaleOutStore_ID", outstoreDetail, "SaleOutStore_ID"));
query.Where.Conditions.Add(DQCondition.EQ(bill,"ID", dmo.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) if (StoreIDs != null && StoreIDs.Count > 0)
{ {
query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(outstore, "Store_ID"), StoreIDs.Select(x => DQExpression.Value(x)).ToArray())); query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(outstore, "Store_ID"), StoreIDs.Select(x => DQExpression.Value(x)).ToArray()));


+ 1
- 0
B3QingDaoWanFu/BO/SaleOutStorePrint/SaleOutStorePrintInfo.cs View File

@ -39,6 +39,7 @@ namespace BWP.B3QingDaoWanFu.BO
public string GoodsPropertyCatalogs { get; set; } public string GoodsPropertyCatalogs { get; set; }
public string Customers { get; set; } public string Customers { get; set; }
public string TakeGoodsTypes { get; set; } public string TakeGoodsTypes { get; set; }
public string StoreID { get; set; }
private static string CreateCacheKey(Type type) private static string CreateCacheKey(Type type)
{ {


Loading…
Cancel
Save