|
|
|
@ -7,6 +7,11 @@ using B3_DongFangWanQi.BO; |
|
|
|
using BWP.B3Frameworks.BO.MoneyTemplate; |
|
|
|
using BWP.B3Sale.BO; |
|
|
|
using Forks.Utils; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
|
using Forks.EnterpriseServices.SqlDoms; |
|
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
using BWP.B3UnitedInfos.BO; |
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ |
|
|
|
{ |
|
|
|
@ -39,14 +44,15 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ |
|
|
|
str.Append("<div id='binghang'>"); |
|
|
|
AddSolidSType(str); |
|
|
|
str.Append(@"<table border='1' width='100%'>"); |
|
|
|
|
|
|
|
|
|
|
|
str.Append("<tr><td>订单号</td><td>发货时间</td><td>购货客户</td><td>存货</td><td>调整数量</td><td>规格</td><td>备注</td></tr>"); |
|
|
|
|
|
|
|
foreach (IGrouping<string, ProductionNotification_Detail> grouping in Dmo.Details.GroupBy(x=>x.Goods_Name)) |
|
|
|
var details = GetOrderDetail(); |
|
|
|
foreach (IGrouping<string, ProductionNotification_Detail> grouping in details.GroupBy(x=>x.GoodsProperty_Name)) |
|
|
|
{ |
|
|
|
|
|
|
|
foreach (ProductionNotification_Detail detail in grouping) |
|
|
|
{ |
|
|
|
str.Append("<tr><td>"+ detail.Order_ID+ "</td><td>"+detail.LoadTime.Value.Month+"/"+detail.LoadTime.Value.Day+"</td><td>"+detail.Customer_Name+"</td><td>"+detail.Goods_Name+"</td><td>"+detail.SendNumber + "</td><td>"+detail.Goods_Spec+"</td><td>"+detail.Remark+"</td></tr>"); |
|
|
|
str.Append("<tr><td>"+ detail.Order_ID+ "/"+detail.GoodsProperty_Name+"</td><td>"+detail.LoadTime.Value.Month+"/"+detail.LoadTime.Value.Day+"</td><td>"+detail.Customer_Name+"</td><td>"+detail.Goods_Name+"</td><td>"+detail.SendNumber + "</td><td>"+detail.Goods_Spec+"</td><td>"+detail.Remark+"</td></tr>"); |
|
|
|
} |
|
|
|
str.Append("<tr><td></td><td></td><td></td><td></td><td>"+(Money<二位小数>?)grouping.Sum(x=>(x.SendNumber??0).Value)+"</td><td></td><td></td></tr>"); |
|
|
|
} |
|
|
|
@ -54,6 +60,29 @@ namespace BWP.Web.Pages.B3_DongFangWanQi.Bills.ProductionNotification_ |
|
|
|
return str.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
private List<ProductionNotification_Detail> GetOrderDetail() |
|
|
|
{ |
|
|
|
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")); |
|
|
|
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.OrderBy.Expressions.Add(DQOrderByExpression.Create(configDetail, "OrderByProperty")); |
|
|
|
var r = dom.EExecuteDmoList<ProductionNotification_Detail>(); |
|
|
|
return r; |
|
|
|
} |
|
|
|
|
|
|
|
long GetConfigID() |
|
|
|
{ |
|
|
|
var dom = new DQueryDom(new JoinAlias(typeof(OutputConfigure))); |
|
|
|
dom.Columns.Add(DQSelectColumn.Max("ID")); |
|
|
|
var Id = dom.EExecuteScalar<long>(); |
|
|
|
return Id; |
|
|
|
} |
|
|
|
|
|
|
|
private string Get其他出库相同产品并行显示() |
|
|
|
{ |
|
|
|
var str = new StringBuilder(); |
|
|
|
|