| | |
| | | table.Delete(); |
| | | } |
| | | |
| | | zeroDuration := Duration::Construct( 0,0,0,0 ); |
| | | |
| | | table := owner.MP_Table( relnew,Name := MP_Cell_ScheduleSummary::GetTableName()); |
| | | |
| | | startDate := owner.StartOfPlanning().Date(); |
| | | |
| | | endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.TimeUnit() = Translations::MP_GlobalParameters_Day(),period.EndDate()).EndDate(); |
| | | |
| | | columns := construct( MP_Columns ); |
| | |
| | | columnHandle := columnIndexTree.GetHandle( unitPeriodTime.Period_MP().StartDate().AsQUILL() ); |
| | | columnIndex := guard( columnIndexTree.Root().Child( columnHandle ),null( NamedValue )); |
| | | if( not isnull( columnIndex )){ |
| | | |
| | | // 褰揳rrowedAvailableCapacity涓嶄负0锛屽伐浣滄棩 + 1 |
| | | arrowedAvailableCapacity := unitPeriodTime.TotalAvailableCapacity(); |
| | | zeroDuration := Duration::Construct( 0,0,0,0 ); |
| | | workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); |
| | | |
| | | if( workDay = 0 ){ |
| | | workDay := ifexpr( unitPeriodTime.ShiftPlan().Outcome() <> "",1,0 ); |
| | | } |
| | | |
| | | column := columns.Element( columnIndex.GetValueAsNumber() ); |
| | | |
| | |
| | | workHours := select( unitPeriodTime,ShiftPattern.ShiftDay,shifDay,shifDay.Day_MP().ID() = dayOfWeek ); |
| | | capacity := 0.0; |
| | | |
| | | workDay := ifexpr( arrowedAvailableCapacity <> zeroDuration, 1,0 ); |
| | | |
| | | if( not isnull( workHours )){ |
| | | capacity := workDay * throughput * workHours.Capacity().HoursAsReal() |
| | | } |
| | |
| | | unitIndex := guard( unitIndexTree.Root().Child( unitHandle ),null( NamedValue )); |
| | | if( not isnull( unitIndex )){ |
| | | unit := units.Element( unitIndex.GetValueAsNumber() ); |
| | | output := sum( unit,UnitPeriod.PeriodTask_MP.NewSupply,np, |
| | | output := sum( unit,UnitPeriod.astype( UnitPeriodTime ).PeriodTask_MP.NewSupply,np, |
| | | np.PeriodTask_MP().UnitPeriod().StartDate() >= localColumn.CustomDate() and |
| | | np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth(), |
| | | np.PeriodTask_MP().UnitPeriod().StartDate() < localColumn.CustomDate().StartOfNextMonth() and |
| | | np.PeriodTask_MP().UnitPeriod().Period_MP().TimeUnit() = "Day", |
| | | np.Quantity() ); |
| | | output := sum( unit,StockingPoint_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,pispip, |
| | | pispip.Period_MP().StartDate() >= localColumn.CustomDate() and |
| | | pispip.Period_MP().StartDate() < localColumn.CustomDate().StartOfNextMonth() and |
| | | pispip.Period_MP().TimeUnit() = "Day", |
| | | pispip.NewSupplyProductionQuantity()); |
| | | } |
| | | }else{ |
| | | scheduleSummaryOutputDataKey := row.Name() + localColumn.CustomDate().AsQUILL(); |
| | |
| | | } |
| | | } |
| | | |
| | | traverse( localTable,LocalRow.LocalCell.astype( LocalCell_ScheduleSummary ),cell ){ |
| | | cell.Capacity( cell.Capacity() / tables.Size() ); |
| | | cell.Output( cell.Output() / tables.Size() ); |
| | | } |
| | | |
| | | //startDate := owner.StartOfPlanning().Date() + 7; |
| | | //endDate := maxselect( owner,Unit.UnitPeriod.astype( UnitPeriodTime ).Period_MP,period,period.EndDate(),period.TimeUnit() = "Month" ).EndDate(); |
| | | //columns := construct( MP_Columns ); |
| | |
| | | Columns: 'MatrixEditorColumns391' |
| | | ContextMenu: 'matrixeditorContextMenuDemandComparison527' |
| | | Rows: 'MatrixEditorRows221' |
| | | Taborder: 2 |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'C_CLAMP' |
| | | Label: 'CreateFullTable' |
| | | Taborder: 1 |
| | | ] |
| | |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: 'Create' |
| | | Image: 'C_CLAMP' |
| | | Label: 'Create base data' |
| | | Taborder: 0 |
| | | Visible: false |
| | | ] |
| | | } |
| | | ] |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component dhComparisonData |
| | | { |
| | | #keys: '[412672.1.94121859]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'MP_Table' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhCheckedEntity |
| | | { |
| | | #keys: '[412672.1.94121860]' |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 5 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component dhFinelEntity |
| | |
| | | Databinding: 'structured[Entity]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 4 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | #child: MatrixEditor_715 |
| | | #child: MatrixEditor510 |
| | | Component dhComparisonData854 |
| | | { |
| | |
| | | Databinding: 'LocalTable' |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | |
| | | table := MP_Cell_ScheduleSummary::CreateFullTable( macroPlans,RecycleBin ,Archive, MacroPlan ); |
| | | |
| | | dhComparisonData854.Data( table ); |
| | | |
| | | WebMessageBox::Success( "Success" ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | table := MP_Cell_ScheduleSummary::Create( MacroPlan ); |
| | | |
| | | dhComparisonData.Data( table ); |
| | | MP_Table::CreateMP_Tables_ScheduleSummary( ApplicationMacroPlanner.GetMacroPlans() ); |
| | | WebMessageBox::Success( "Success" ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |