|
|
@ -127,7 +127,7 @@ namespace BWP.Web.Pages.B3YunKen.Reports |
|
|
var query = new DQueryDom(finishData); |
|
|
var query = new DQueryDom(finishData); |
|
|
query.RegisterQueryTable(typeof(FinishData), new List<string> { "Date", "Goods_ID", "BrandItem_ID", "SumNumber", "SumSecondNumber", "ProductionUnit_Name", "Employee_Name", "GoodsBatch_ID" }, dom); |
|
|
query.RegisterQueryTable(typeof(FinishData), new List<string> { "Date", "Goods_ID", "BrandItem_ID", "SumNumber", "SumSecondNumber", "ProductionUnit_Name", "Employee_Name", "GoodsBatch_ID" }, dom); |
|
|
query.RegisterQueryTable(typeof(InStoreData), new List<string> { "Date", "Goods_ID", "BrandItem_ID", "SumNumber", "SumSecondNumber", "GoodsBatch_ID" }, GetInStoreQuery()); |
|
|
query.RegisterQueryTable(typeof(InStoreData), new List<string> { "Date", "Goods_ID", "BrandItem_ID", "SumNumber", "SumSecondNumber", "GoodsBatch_ID" }, GetInStoreQuery()); |
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(inStoreData), DQCondition.And(DQCondition.EQ(finishData, "Goods_ID", inStoreData, "Goods_ID"), DQExpression.Snippet("datediff(day,finiData.Date,inData.Date) = 1"), DQCondition.EQ(finishData, "BrandItem_ID", inStoreData, "BrandItem_ID"), DQCondition.EQ(finishData, "GoodsBatch_ID", inStoreData, "GoodsBatch_ID"))); |
|
|
|
|
|
|
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(inStoreData), DQCondition.And(DQCondition.EQ(finishData, "Goods_ID", inStoreData, "Goods_ID"), DQExpression.Snippet("datediff(day,finiData.Date,inData.Date) = 1"), DQCondition.EQ(finishData, "BrandItem_ID", inStoreData, "BrandItem_ID"), DQCondition.Or(DQCondition.EQ(finishData, "GoodsBatch_ID", inStoreData, "GoodsBatch_ID"),DQCondition.And(DQCondition.IsNull(DQExpression.Field(finishData,"GoodsBatch_ID")),DQCondition.IsNull(DQExpression.Field(inStoreData,"GoodsBatch_ID")))))); |
|
|
var goods1 = new JoinAlias("goods", typeof(Goods)); |
|
|
var goods1 = new JoinAlias("goods", typeof(Goods)); |
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(goods1), |
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(goods1), |
|
|
DQCondition.EQ(goods1, "ID", finishData, "Goods_ID")); |
|
|
DQCondition.EQ(goods1, "ID", finishData, "Goods_ID")); |
|
|
@ -250,7 +250,12 @@ namespace BWP.Web.Pages.B3YunKen.Reports |
|
|
if (!_productLine.IsEmpty) { |
|
|
if (!_productLine.IsEmpty) { |
|
|
query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(goods1, "ProductLine_ID"), _productLine.GetValues().Select(x => DQExpression.Value(x)).ToArray())); |
|
|
query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field(goods1, "ProductLine_ID"), _productLine.GetValues().Select(x => DQExpression.Value(x)).ToArray())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var miniDate = mQueryContainer.GetControl<DFDateInput>("MinFinishDate"); |
|
|
|
|
|
var maxDate = mQueryContainer.GetControl<DFDateInput>("MaxFinishDate"); |
|
|
|
|
|
if(!miniDate.IsEmpty) |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual(finishData,"Date",miniDate.Value)); |
|
|
|
|
|
if (!maxDate.IsEmpty) |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.LessThanOrEqual(finishData, "Date", maxDate.Value)); |
|
|
return query; |
|
|
return query; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -345,9 +350,11 @@ namespace BWP.Web.Pages.B3YunKen.Reports |
|
|
|
|
|
|
|
|
layoutManager.Add("Goods_ID", new SimpleLabel("存货"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_goods = QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["ID"], B3SaleDataSources.可销售存货), s => long.Parse(s)), "Goods_ID")); |
|
|
layoutManager.Add("Goods_ID", new SimpleLabel("存货"), mQueryContainer.AddLink(new ChoiceBoxMultiSelectLink(_goods = QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["ID"], B3SaleDataSources.可销售存货), s => long.Parse(s)), "Goods_ID")); |
|
|
layoutManager["Goods_ID"].NotAutoAddToContainer = true; |
|
|
layoutManager["Goods_ID"].NotAutoAddToContainer = true; |
|
|
|
|
|
layoutManager.Add("FinishDate", new SimpleLabel("完工时间"), QueryCreator.DateRange(mDFInfo.Fields["ID"], mQueryContainer, "MinFinishDate", "MaxFinishDate")); |
|
|
|
|
|
layoutManager["FinishDate"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
|
var config = new AutoLayoutConfig { Cols = 4 }; |
|
|
var config = new AutoLayoutConfig { Cols = 4 }; |
|
|
config.Add("Date"); |
|
|
|
|
|
|
|
|
config.Add("FinishDate"); |
|
|
config.Add("ProductionUnit_ID"); |
|
|
config.Add("ProductionUnit_ID"); |
|
|
config.Add("GoodsProperty_ID"); |
|
|
config.Add("GoodsProperty_ID"); |
|
|
config.Add("GoodsPropertyCatalog_ID"); |
|
|
config.Add("GoodsPropertyCatalog_ID"); |
|
|
|