xiaoding721
2024-11-22 8efa02c57ec252109a3d8bd9e72482ae353816ab
_Main/BL/Type_ArchiveShiftPlanCell/StaticMethod_Archive.qbl
@@ -52,6 +52,8 @@
      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 ));
@@ -60,8 +62,10 @@
          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 );
@@ -85,6 +89,8 @@
      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() );
    }
  *]
}