| | |
| | | archiveShiftPlanCellHandle := archiveShiftPlanCellIndexTree.GetHandle( shiftPlanCellKey ); |
| | | archiveShiftPlanCellIndex := guard( archiveShiftPlanCellIndexTree.Root().Child( archiveShiftPlanCellHandle ),null( NamedValue ) ); |
| | | if( isnull( archiveShiftPlanCellIndex )){ |
| | | factory := LocalTool::GetFactoryByUnit( shiftPlanCell.UnitPeriodTime().Unit() ); |
| | | |
| | | archiveShiftPlanRow := null( ArchiveShiftPlanRow ); |
| | | archiveShiftPlanRowHandle := archiveShiftPlanRowIndexTree.GetHandle( shiftPlanRowKey ); |
| | | archiveShiftPlanRowIndex := guard( archiveShiftPlanRowIndexTree.Root().Child( archiveShiftPlanRowHandle ),null( NamedValue )); |
| | |
| | | archiveShiftPlanRows.Add( archiveShiftPlanRow ); |
| | | archiveShiftPlanRowIndexTree.Root().AddChild( archiveShiftPlanRowHandle,archiveShiftPlanRows.Size() - 1 ); |
| | | }else{ |
| | | archiveShiftPlanRow := archiveShiftPlanRows.Element( archiveShiftPlanRowIndex.GetValueAsNumber() ); |
| | | archiveShiftPlanRow := archiveShiftPlanRows.Element( archiveShiftPlanRowIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | archiveShiftPlanRow.FactoryName( factory.ID() ); |
| | | |
| | | archiveShiftPlanColumn := null( ArchiveShiftPlanColumn ); |
| | | archiveShiftPlanColumnHandle := archiveShiftPlanColumnIndexTree.GetHandle( shiftPlanColumnKey ); |
| | |
| | | archiveShiftPlanCell.IsHoliday( shiftPlanCell.IsHoliday() ); |
| | | archiveShiftPlanCell.Outcome( shiftPlanCell.Outcome() ); |
| | | archiveShiftPlanCell.Remark( shiftPlanCell.Remark() ); |
| | | archiveShiftPlanCell.MacroPlanName( shiftPlanCell.UnitPeriodTime().MacroPlan().MDSMacroPlan().Description() ); |
| | | archiveShiftPlanCell.MacroPlanMDSID( shiftPlanCell.UnitPeriodTime().MacroPlan().MDSID() ); |
| | | } |
| | | *] |
| | | } |