| | |
| | | shiftDayTime := select( shiftPattern,ShiftDayTime,object,true ); |
| | | } |
| | | } |
| | | if( shiftVolume <> 0 ){ |
| | | shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume ); |
| | | |
| | | shiftSchedulingInformation := owner.DispatchShiftSchedulingInformation( relnew , |
| | | ID := IDHolder::GetGUID() , |
| | | InterfaceTime := now , |
| | | VersionName := macroPlan.MDSMacroPlan().Description(), |
| | | Product := productID, |
| | | ProductLine := productLine, |
| | | ShiftDate := shiftDate, |
| | | ShiftName := shiftName, |
| | | ShiftVolume := shiftVolume ); |
| | | traverse( shiftSchedulingInformations,Elements,shiftSchedulingInformation ){ |
| | | shiftSchedulingInformation.InterfaceTime( now ); |
| | | shiftSchedulingInformation.VersionName( macroPlan.MDSMacroPlan().Description() ); |
| | | shiftSchedulingInformation.Product( productID ); |
| | | shiftSchedulingInformation.ProductLine( productLine ); |
| | | shiftSchedulingInformation.ShiftDate( shiftDate ); |
| | | // shiftSchedulingInformation.InterfaceTime( now ); |
| | | // shiftSchedulingInformation.InterfaceTime( now ); |
| | | // shiftSchedulingInformation.InterfaceTime( now ); |
| | | // shiftSchedulingInformation.InterfaceTime( now ); |
| | | |
| | | |
| | | if( not isnull( shiftDayTime )){ |
| | | shiftSchedulingInformation.ShiftStartDate( shiftDayTime.StartDateTime() ); |
| | | shiftSchedulingInformation.ShiftEndDate( shiftDayTime.EndDateTIme() ); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SplitShifts ( |
| | | RecycleBin owner, |
| | | String shiftName, |
| | | Real shiftVolume |
| | | ) as owning DispatchShiftSchedulingInformations |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Oct-9-2024 (created) |
| | | shiftSchedulingInformations := construct( DispatchShiftSchedulingInformations ); |
| | | if( shiftName = "3" ){ |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 3 ); |
| | | shiftSchedulingInformation1.SingleShiftName( "1ç" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation1 ); |
| | | |
| | | shiftSchedulingInformation2 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 3 ); |
| | | shiftSchedulingInformation2.SingleShiftName( "2ç" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation2 ); |
| | | |
| | | shiftSchedulingInformation3 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 3 ); |
| | | shiftSchedulingInformation3.SingleShiftName( "3ç" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation3 ); |
| | | } |
| | | |
| | | |
| | | return &shiftSchedulingInformations; |
| | | *] |
| | | } |