Quintiq file version 2.0
|
#parent: #root
|
Method Generate (
|
DLEngineLogisticsCostSearch search,
|
Product_MPs products
|
)
|
{
|
TextBody:
|
[*
|
// 甄兰鸽 Jun-25-2024 (created)
|
table := selectobject( this, MacroPlan.DLEngineLogisticsCostReport, report, not report.IsShow() );
|
allunit := '<All>';
|
//清空之前存储的显示数据
|
this.Clear();
|
//过滤后的产品id
|
productids := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() )
|
and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() )
|
and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() );
|
sumrow := this.Row( relnew, Name := 'SUM', RowNr := table.Row( relsize ) );
|
traverse( table, Row, row ){
|
productid := construct( Strings );
|
productid.Add( row.Name() );
|
|
if( productids.ContainsAll( productid ) ){
|
showrow := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() );
|
|
traverse( row, Cell, cell ){
|
column := selectobject( this, Column, column, column.Name() = cell.Column().Name() );
|
|
sumcell := selectobject( column, Cell, c, c.Row() = sumrow );
|
if( isnull( sumcell ) ){
|
sumcell := sumrow.Cell( relnew, CCRentInCost := 0
|
, CCRentOutOfCost := 0
|
, CCLongTransCost := 0
|
, CCShorTransCost := 0
|
, CCRentStorCost := 0
|
, DLRentInCost := 0
|
, DLRentOutOfCost := 0
|
, WerkToDLRentTransCost := 0
|
, DLRentStorCost := 0 );
|
column.Cell( relinsert, sumcell );
|
}
|
|
showcell := showrow.Cell( relnew, CCRentInCost := cell.CCRentInCost()
|
, CCRentOutOfCost := cell.CCRentOutOfCost()
|
, CCLongTransCost := cell.CCLongTransCost()
|
, CCShorTransCost := cell.CCShorTransCost()
|
, CCRentStorCost := cell.CCRentStorCost()
|
, DLRentInCost := cell.DLRentInCost()
|
, DLRentOutOfCost := cell.DLRentOutOfCost()
|
, WerkToDLRentTransCost := cell.WerkToDLRentTransCost()
|
, DLRentStorCost := cell.DLRentStorCost() );
|
column.Cell( relinsert, showcell );
|
sumcell.CCRentInCost( cell.CCRentInCost() + sumcell.CCRentInCost() );
|
sumcell.CCRentOutOfCost( cell.CCRentOutOfCost() + sumcell.CCRentOutOfCost() );
|
sumcell.CCLongTransCost( cell.CCLongTransCost() + sumcell.CCLongTransCost() );
|
sumcell.CCShorTransCost( cell.CCShorTransCost() + sumcell.CCShorTransCost() );
|
sumcell.CCRentStorCost( cell.CCRentStorCost() + sumcell.CCRentStorCost() );
|
sumcell.DLRentInCost( cell.DLRentInCost() + sumcell.DLRentInCost() );
|
sumcell.DLRentOutOfCost( cell.DLRentOutOfCost() + sumcell.DLRentOutOfCost() );
|
sumcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumcell.WerkToDLRentTransCost() );
|
sumcell.DLRentStorCost( cell.DLRentStorCost() + sumcell.DLRentStorCost() );
|
}
|
}
|
}
|
info( '-------------------------g------------end---------------------------------' );
|
*]
|
}
|