Quintiq file version 2.0
|
#parent: #root
|
StaticMethod NewStaticMethod (
|
const constcontent ShiftPlans shiftPlans,
|
RecycleBin owner
|
)
|
{
|
TextBody:
|
[*
|
// rislai Jul-4-2024 (created)
|
table := owner.LocalTable( relnew,Name := "");
|
|
column1 := table.LocalColumn( relnew,Name := "工厂" );
|
column2 := table.LocalColumn( relnew,Name := "产线" );
|
|
column3 := table.LocalColumn( relnew,Name := "生产天数" );
|
column4 := table.LocalColumn( relnew,Name := "加班时长" );
|
column5 := table.LocalColumn( relnew,Name := "欠工时长" );
|
column6 := table.LocalColumn( relnew,Name := "节假日加班时长" );
|
column7 := table.LocalColumn( relnew,Name := "加班费" );
|
column8 := table.LocalColumn( relnew,Name := "欠工费" );
|
column9 := table.LocalColumn( relnew,Name := "节假日加班费" );
|
|
unitIDs := selectuniquevalues( shiftPlans,Elements.UnitPeriodTime.Unit,unit,unit.ID() );
|
|
rows := construct( LocalRows );
|
rowIndexTree := NamedValueTree::Create();
|
|
cells := construct( LocalCell_Defaults );
|
cellIndexTree := NamedValueTree::Create();
|
|
traverse( unitIDs,Elements,element ){
|
row := table.LocalRow( relnew,Index := table.GetRowIndexCache() );
|
rowHandle := rowIndexTree.GetHandle( element );
|
rows.Add( row );
|
rowIndexTree.Root().AddChild( rowHandle,rows.Size() - 1 );
|
}
|
|
traverse( shiftPlans,Elements,shiftPlan ){
|
rowKey := shiftPlan.UnitPeriodTime().Unit().ID();
|
row := rows.Element( rowIndexTree.Root().Child( rowIndexTree.GetHandle( rowKey )).GetValueAsNumber() );
|
|
gongchangCell := LocalCell_Default::GetCell( rowKey + "工厂", cellIndexTree, cells, row, column1 );
|
chanxianxCell := LocalCell_Default::GetCell( rowKey + "产线", cellIndexTree, cells, row, column2 );
|
|
shengchanCell := LocalCell_Default::GetCell( rowKey + "生产天数", cellIndexTree, cells, row, column3 );
|
jiabanCell := LocalCell_Default::GetCell( rowKey + "加班时长", cellIndexTree, cells, row, column4 );
|
qiangongCell := LocalCell_Default::GetCell( rowKey + "欠工时长", cellIndexTree, cells, row, column5 );
|
jiejiariCell := LocalCell_Default::GetCell( rowKey + "节假日加班时长", cellIndexTree, cells, row, column6 );
|
|
jiabanfeiCell := LocalCell_Default::GetCell( rowKey + "加班费", cellIndexTree, cells, row, column7 );
|
qiangongfeiCell := LocalCell_Default::GetCell( rowKey + "欠工费", cellIndexTree, cells, row, column8 );
|
jiejiarifeiCell := LocalCell_Default::GetCell( rowKey + "节假日加班费", cellIndexTree, cells, row, column9 );
|
|
if( shiftPlan.Outcome() <> "" ){
|
|
}else{
|
|
}
|
|
}
|
*]
|
}
|