| | |
| | | unitIndexTree.Root().AddChild( unitHandle,i ); |
| | | } |
| | | |
| | | // productLines := selectuniquevalues( offlinePlan,NewOfflinePlanRow,row,row.ProductionLine() ); |
| | | productLinesQuantityNameValueTree := NamedValueTree::Create(); |
| | | traverse( offlinePlan,NewOfflinePlanRow,row ){ |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | productLinesQuantityHandle := productLinesQuantityNameValueTree.GetHandle( row.ProductionLine() + cell.NewOfflinePlanColumn().StartDate().AsQUILL() ); |
| | | productLinesQuantity := guard( productLinesQuantityNameValueTree.Root().Child( productLinesQuantityHandle ),null( NamedValue )); |
| | | if( not isnull( productLinesQuantity )){ |
| | | productLinesQuantity.SetValue( productLinesQuantity.GetValueAsReal() + cell.Quantity() ); |
| | | }else{ |
| | | productLinesQuantityNameValueTree.Root().AddChild( productLinesQuantityHandle, cell.Quantity() ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | traverse( offlinePlan,NewOfflinePlanRow,row ){ |
| | | productID := row.ProductID(); |
| | | productLine := row.ProductionLine(); |
| | |
| | | factory := temp2; |
| | | } |
| | | } |
| | | traverse( row,NewOfflinePlanCell,cell ,startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | productLinesQuantityHandle := productLinesQuantityNameValueTree.GetHandle( row.ProductionLine() + cell.NewOfflinePlanColumn().StartDate().AsQUILL() ); |
| | | productLinesQuantity := guard( productLinesQuantityNameValueTree.Root().Child( productLinesQuantityHandle ).GetValueAsReal(),0.0 ); |
| | | |
| | | shiftDate := cell.NewOfflinePlanColumn().StartDate(); |
| | | shiftName := cell.ShiftPatternName(); |
| | | shiftVolume := cell.Quantity(); |
| | |
| | | } |
| | | } |
| | | if( shiftVolume <> 0 ){ |
| | | shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume ); |
| | | shiftSchedulingInformations := DispatchShiftSchedulingInformation::SplitShifts( owner,shiftName,shiftVolume,productLinesQuantity ); |
| | | |
| | | traverse( shiftSchedulingInformations,Elements,shiftSchedulingInformation ){ |
| | | shiftSchedulingInformation.InterfaceTime( now ); |
| | |
| | | StaticMethod SplitShifts ( |
| | | RecycleBin owner, |
| | | String shiftName, |
| | | Real shiftVolume |
| | | Real shiftVolume, |
| | | Real productLinesQuantity |
| | | ) 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 ); |
| | | shiftQuantity := productLinesQuantity / 3 ; |
| | | |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := ifexpr( shiftVolume >= shiftQuantity, shiftQuantity, shiftVolume ) ); |
| | | shiftSchedulingInformation1.SingleShiftName( "鐧界彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation1 ); |
| | | |
| | | shiftSchedulingInformation2 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 3 ); |
| | | shiftVolume := shiftVolume - shiftQuantity; |
| | | |
| | | shiftSchedulingInformation2 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := ifexpr( shiftVolume >= shiftQuantity, shiftQuantity, shiftVolume ) ); |
| | | shiftSchedulingInformation2.SingleShiftName( "浜岀彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation2 ); |
| | | |
| | | shiftSchedulingInformation3 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 3 ); |
| | | shiftVolume := shiftVolume - shiftQuantity; |
| | | |
| | | shiftSchedulingInformation3 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := ifexpr( shiftVolume >= shiftQuantity, shiftQuantity, shiftVolume ) ); |
| | | shiftSchedulingInformation3.SingleShiftName( "涓夌彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation3 ); |
| | | }else if( shiftName = "2" ){ |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 2 ); |
| | | shiftQuantity := productLinesQuantity / 2 ; |
| | | |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := ifexpr( shiftVolume >= shiftQuantity, shiftQuantity, shiftVolume )); |
| | | shiftSchedulingInformation1.SingleShiftName( "鐧界彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation1 ); |
| | | |
| | | shiftSchedulingInformation2 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 2 ); |
| | | shiftVolume := shiftVolume - shiftQuantity; |
| | | |
| | | shiftSchedulingInformation2 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := ifexpr( shiftVolume >= shiftQuantity, shiftQuantity, shiftVolume ) ); |
| | | shiftSchedulingInformation2.SingleShiftName( "浜岀彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation2 ); |
| | | }else if( shiftName = "1" ){ |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 1 ); |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume ); |
| | | shiftSchedulingInformation1.SingleShiftName( "鐧界彮" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation1 ); |
| | | }else{ |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume / 1 ); |
| | | shiftSchedulingInformation1 := owner.DispatchShiftSchedulingInformation( relnew ,ID := IDHolder::GetGUID(),ShiftName := shiftName,ShiftVolume := shiftVolume ); |
| | | shiftSchedulingInformation1.SingleShiftName( "" ); |
| | | shiftSchedulingInformations.Add( shiftSchedulingInformation1 ); |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'external[RecycleBin]' |
| | | DataType: 'RecycleBin' |
| | | FilterArguments: 'checkedUnits:QMacroPlanner::FormDispatchShiftSchedulingInformation.dhFinalUnits' |
| | | FixedFilter: 'exists( checkedUnits,Elements,unit,unit.DisplayName() = object.ProductLine())' |
| | | Source: 'RecycleBin' |
| | | Taborder: 0 |
| | | Transformation: 'DispatchShiftSchedulingInformation' |
| | |
| | | Children: |
| | | [ |
| | | #child: ListData |
| | | Component dhFinalUnits |
| | | { |
| | | #keys: '[414996.1.167251230]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[Entity]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhCheckUnits |
| | | { |
| | | #keys: '[414996.1.167251252]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[Entity]*' |
| | | Children: |
| | | [ |
| | | Component deCheckUnits |
| | | { |
| | | #keys: '[414996.1.167251253]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[Entity]' |
| | | Source: 'ApplicationMacroPlanner.DataHolderCheckedEntities' |
| | | Taborder: 0 |
| | | Transformation: 'Elements' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelData/dhCheckUnits |
| | | Response OnDataChanged () id:Response_PanelDemandComparison_634_dhCheckUnits_OnDataChanged |
| | | { |
| | | #keys: '[414996.1.167251250]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnDataChanged' |
| | | GroupServerCalls: true |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( this.Data().Size() <> 0 ){ |
| | | units := selectset( dhFinalUnits.Data(),Elements,element,exists( this.Data(),Elements,entity,entity = element )); |
| | | dhFinalUnits.Data( &units ); |
| | | }else{ |
| | | dhFinalUnits.Data( DataHolderEntities.Data().Copy() ); |
| | | } |
| | | *] |
| | | } |
| | | } |
对比新文件 |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelData/dhFinalUnits |
| | | Response OnCreated () id:Response_PanelDemandComparison_634_dhFinalUnits_OnCreated |
| | | { |
| | | #keys: '[414996.1.167251228]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | GroupServerCalls: true |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dhFinalUnits.Data( DataHolderEntities.Data().Copy() ); |
| | | *] |
| | | } |
| | | } |