|
|
|
@ -261,13 +261,13 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools |
|
|
|
RegisgterAvaliableStorageSumTable(dom); |
|
|
|
dom.RegisterQueryTable(typeof(OrderTmp), new[] { "GoodsProperty_ID", "Number", "SecondNumber", "UnitNum", "AdjustNumber" }, GetOrderDQueryDom()); |
|
|
|
dom.RegisterQueryTable(typeof(OutputTmp), new[] { "GoodsProperty_ID", "Number", "MainNumber", "Date" }, GetOutputDQueryDom()); |
|
|
|
dom.RegisterQueryTable(typeof(OutputConfigTmp), new[] { "GoodsProperty_ID", "Number" }, GetOutputConfigureDom()); |
|
|
|
dom.RegisterQueryTable(typeof(OutputConfigTmp), new[] { "GoodsProperty_ID", "GoodsProperty_Name", "Number" }, GetOutputConfigureDom()); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(output), DQCondition.EQ(output, "GoodsProperty_ID", outputConfig, "GoodsProperty_ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(bill), DQCondition.EQ(bill, "GoodsProperty_ID", output, "GoodsProperty_ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(goodsProperty), DQCondition.EQ(output, "GoodsProperty_ID", goodsProperty, "ID")); |
|
|
|
dom.From.AddJoin(JoinType.Left, new DQDmoSource(storeDetail), DQCondition.EQ(output, "GoodsProperty_ID", storeDetail, "GoodsProperty_ID")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Field("GoodsProperty_ID", output)); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(output, "GoodsProperty_Name"), "存货属性名称")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(outputConfig, "GoodsProperty_Name"), "存货属性名称")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(outputConfig, "Number"), "单品测算数量")); |
|
|
|
dom.Columns.Add(DQSelectColumn.Create(DQExpression.Field(output, "MainNumber"), "牛头数")); |
|
|
|
//dom.Columns.Add(DQSelectColumn.Field("AdjustNum", bill));
|
|
|
|
@ -291,6 +291,8 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools |
|
|
|
{ |
|
|
|
public long GoodsProperty_ID { get; set; } |
|
|
|
|
|
|
|
public string GoodsProperty_Name { get; set; } |
|
|
|
|
|
|
|
[LogicName("主数量")] |
|
|
|
public Money<decimal>? Number { get; set; } |
|
|
|
|
|
|
|
@ -321,10 +323,12 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Tools |
|
|
|
AddGoodsCondition(goodsPropertyCatalog, goodsProperty, query); |
|
|
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("GoodsProperty_ID")); |
|
|
|
query.Columns.Add(DQSelectColumn.Field("GoodsProperty_Name")); |
|
|
|
query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.Field("Number")), "主数量")); |
|
|
|
|
|
|
|
query.GroupBy.Expressions.Add(DQExpression.Field("ID")); |
|
|
|
query.GroupBy.Expressions.Add(DQExpression.Field("GoodsProperty_ID")); |
|
|
|
query.GroupBy.Expressions.Add(DQExpression.Field("GoodsProperty_Name")); |
|
|
|
query.Where.Conditions.Add(DQCondition.EQ(bill, "ID", id)); |
|
|
|
query.Where.Conditions.Add(DQCondition.GreaterThan(detail, "GoodsProperty_ID", 0)); |
|
|
|
return query; |
|
|
|
|