lazhen
2024-10-11 cbf2cc895f1d1e7dcf522a462e77709d92667747
_Main/BL/Type_DispatchShiftSchedulingInformation/StaticMethod_Dispatch.qbl
@@ -61,22 +61,29 @@
            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 );
        if( not isnull( shiftDayTime )){
          shiftSchedulingInformation.ShiftStartDate( shiftDayTime.StartDateTime() );
          shiftSchedulingInformation.ShiftEndDate( shiftDayTime.EndDateTIme() );
        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() );
          }
          if( not isnull( factory )){
            shiftSchedulingInformation.FactoryName( factory.Name() );
          }
        }
        if( not isnull( factory )){
          shiftSchedulingInformation.FactoryName( factory.Name() );
        }
      }
    }