Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
| | |
| | | f.Delete(); |
| | | } |
| | | |
| | | traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ) { |
| | | traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) { |
| | | targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() ); |
| | | targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = tdd.StockingPointID() ); |
| | | info( tdd.SalesSegmentName() ); |
| | |
| | | tdd.UnitOfMeasureName(), |
| | | 0.0, |
| | | false, |
| | | false |
| | | ); |
| | | false ); |
| | | forcest.Origin( tdd.Origin() ); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute PackagingCapacity |
| | | { |
| | | #keys: '3[415754.0.111003142][415754.0.111003141][415754.0.111003143]' |
| | | Description: 'å
è£
容é' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute PlannedInventory |
| | | { |
| | | #keys: '3[415754.0.111003178][415754.0.111003177][415754.0.111003179]' |
| | | ValueType: Real |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcNumberOfEmptyShelves |
| | | { |
| | | TextBody: |
| | | [* |
| | | // vwedadmin Aug-20-2024 (created) |
| | | |
| | | value := guard( [Number] ( this.TotalQuantityOfMaterialRacks() - ( this.PlannedInventory() / this.PackagingCapacity() ) ), 0 ); |
| | | |
| | | this.NumberOfEmptyShelves( value ); |
| | | *] |
| | | } |
| | |
| | | macroPlan.CC_EngineRackRow( relflush ); |
| | | macroPlan.CC_EngineRackColumn( relflush ); |
| | | |
| | | // å建è¡EVO5 MLB, EVO5 MQB, GEN3 MLB, GEN3 MQB |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MLB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "EVO5", MLB_MQB := "MQB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MLB" ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := "GEN3", MLB_MQB := "MQB" ); |
| | | // åå»ºè¡ |
| | | genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() ); |
| | | mqbmlbs := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() ); |
| | | traverse ( genrations, Elements, g, g.ToUpper() = "EVO5" or g.ToUpper() = "GEN3" ) { |
| | | traverse ( mqbmlbs, Elements, m, m.ToUpper() = "MLB" or m.ToUpper() = "MQB" ) { |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := g, MLB_MQB := m ); |
| | | } |
| | | } |
| | | |
| | | // å建å |
| | | indexDate := macroPlan.StartOfPlanning().Date().StartOfMonth(); |
| | |
| | | |
| | | // å建åå
æ ¼ |
| | | traverse ( macroPlan, CC_EngineRackRow, ccerr ) { |
| | | |
| | | // å卿ºææ¬åæ° |
| | | lce := select( macroPlan, LogisticsCostEngine, tempLCE, tempLCE.Generation() = ccerr.Generation() and tempLCE.MLB_MQB() = ccerr.MLB_MQB() and tempLCE.Factory() = "é¿æ¥å·¥å" ); |
| | | |
| | | // ææ¶ææ¬åæ° |
| | | lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "é¿æ¥å·¥å" ); |
| | | |
| | | traverse ( macroPlan, CC_EngineRackColumn, ccerc ) { |
| | | cell := ccerr.CC_EngineRackCell( relnew ); |
| | | |
| | | // ç©ºææ¶æ°éï¼é¿æ¥å该产åçææ¶æ»æ°é - å卿ºåºå / å
è£
容é ï¼ |
| | | lastDayOfThisMonth := ccerc.StartDate().StartOfNextMonth() - 1; |
| | | plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().ParentID() = "产æå" and |
| | | tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = "é¿æ¥å¤ç§åº" and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().Generation() = ccerr.Generation() and |
| | | tempPISPIP.ProductInStockingPoint_MP().Product_MP().MQBMLB() = ccerr.MLB_MQB() and |
| | | tempPISPIP.Start().Date() = lastDayOfThisMonth, |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.PackagingCapacity( guard( lce.PackagingCapacity(), 0 ) ); |
| | | cell.PlannedInventory( plannedInventory ); |
| | | |
| | | // å¤ç§åºå
¥åºè´¹ç¨ï¼å卿ºéé / å
è£
容é[åä¸åæ´] * ææ¶å
¥åºåä»·ï¼ |
| | | engineSales := sum( macroPlan, FSImportData, tempFSID, |
| | | tempFSID.Unit() = "é¿æ¥å·¥å" and |
| | | tempFSID.Generation() = ccerr.Generation() and |
| | | tempFSID.MqbMlb() = ccerr.MLB_MQB() and |
| | | tempFSID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFSID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFSID.Quantity() ); |
| | | cell.StorageFeesForRentedWarehouses( guard( [Number] ( engineSales / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.WarehousingPrice(), 0 ), 0 ) ); |
| | | |
| | | // å¤ç§åºåºåºè´¹ç¨ï¼å卿ºäº§é / å
è£
容é[åä¸åæ´] * ææ¶åºåºåä»·ï¼ |
| | | engineProductions := sum( macroPlan, FPImportData, tempFPID, |
| | | tempFPID.Unit() = "é¿æ¥å·¥å" and |
| | | tempFPID.Generation() = ccerr.Generation() and |
| | | tempFPID.MqbMlb() = ccerr.MLB_MQB() and |
| | | tempFPID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFPID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFPID.Quantity() ); |
| | | cell.OutboundExpensesForRentedWarehouses( guard( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 0 ) ) * guard( lcmr.OutboundPrice(), 0 ), 0 ) ); |
| | | |
| | | // å¤ç§åºè¿è¾è´¹ç¨ï¼å卿ºè¿è¾é/å
è£
容é/è£
载容éï¼åä¸åæ´ï¼*ææ¶è¿è¾åä»· |
| | | // å¤ç§åºä»å¨è´¹ç¨ï¼ææ¶æ»æ°é-å卿ºåºå/å
è£
容éï¼åä¸åæ´ï¼ï¼åä¹ä»¥ç©ºææ¶ä»å¨åä»·å¾å°ç©ºææ¶ä»å¨è´¹ç¨ãå卿ºåºååActual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼ææ¶æ»æ°ééè¦æå¨ç»´æ¤ã |
| | | // æ¸
æ´è´¹ç¨ï¼å卿ºå
¥åºé/å
è£
容é*ææ¶æ¸
æ´åä»·ãå卿ºå
¥åºéåå卿ºééï¼å
è£
容éåèªå卿ºææ¬è¡¨ãææ¶æ¸
æ´åä»·åææ¶ææ¬è¡¨ã |
| | | |
| | | cell.CC_EngineRackColumn( relset, ccerc ); |
| | | } |
| | | } |
| | | *] |
| | |
| | | if( columnName = "å卿ºé¶ä»¶å·" ){ |
| | | row.ProductID( ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) ); |
| | | } |
| | | if( columnName = "产å°" ){ |
| | | row.CustomName( row.ProductID() + " > " + ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) ); |
| | | if( columnName = "车å" ){ |
| | | row.CustomName( " > " + ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"空",compareVersionCell.Value()), baseVersionCell.Value()) ); |
| | | } |
| | | }else{ |
| | | row.LocalCell( relnew,LocalCell_DemandComparison,LocalColumn := column, |
| | |
| | | CompareVersion := ifexpr( isnull( compareVersionCell ), 0 ,[Real]compareVersionCell.Value() )); |
| | | } |
| | | } |
| | | row.CustomName( row.ProductID() + row.CustomName() ); |
| | | } |
| | | } |
| | | // åç»å é¤ |
| | |
| | | columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 ); |
| | | } |
| | | |
| | | traverse( owner,Unit,unit,unit.HasCapacityTypeTime()){ |
| | | traverse( owner,Unit,unit,unit.HasCapacityTypeTime() and not unit.HasChild()){ |
| | | // unit.AsEntity().DisplayNameForSelection() |
| | | row := table.MP_Row( relnew,CustomName := unit.ID(),Index := table.GetRowIndexCache() ); |
| | | throughput := sum( unit,Operation,operation,operation.Throughput() ) / unit.Operation( relsize ); |
| | |
| | | StaticMethod CreateFullTable ( |
| | | const MacroPlans owners, |
| | | RecycleBin recycleBin, |
| | | const Archive archive |
| | | const Archive archive, |
| | | const MacroPlan owner |
| | | ) as LocalTable |
| | | { |
| | | TextBody: |
| | | [* |
| | | // rislai Aug-7-2024 (created) |
| | | tables := construct( MP_Tables ); |
| | | traverse( owners,Elements,owner ){ |
| | | table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() ); |
| | | if( isnull( table )){ |
| | | table := MP_Cell_ScheduleSummary::Create( owner ); |
| | | } |
| | | tables.Add( table ); |
| | | } |
| | | tables := MP_Table::GetMP_Tables_ScheduleSummary( owners ); |
| | | |
| | | scheduleSummaryOutputDataIndexTree := NamedValueTree::Create(); |
| | | scheduleSummaryOutputDatas := selectset( archive,ScheduleSummaryOutputLine.ScheduleSummaryOutputData,data, |
| | |
| | | } |
| | | } |
| | | |
| | | //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 ); |
| | | //columnIndexTree := NamedValueTree::Create(); |
| | | //for( i := startDate;i < endDate; i := i + 1){ |
| | | // column := table.MP_Column( relnew,CustomDate := i ); |
| | | // columnHandle := columnIndexTree.GetHandle( i.AsQUILL() ); |
| | | // columns.Add( column ); |
| | | // columnIndexTree.Root().AddChild( columnHandle,columns.Size() - 1 ); |
| | | //} |
| | | |
| | | |
| | | return localTable; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // rislai Aug-7-2024 (created) |
| | | tables := construct( MP_Tables ); |
| | | traverse( owners,Elements,owner ){ |
| | | table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() ); |
| | | if( isnull( table )){ |
| | | table := MP_Cell_AnnualPlanReport::Create( owner ); |
| | | } |
| | | tables.Add( table ); |
| | | } |
| | | tables := MP_Table::GetMP_Tables_AnnualPlanReport( owners ); |
| | | |
| | | localTable := recycleBin.LocalTable( relnew,Name := MP_Cell_AnnualPlanReport::GetTableName() ); |
| | | startDate := minselect( tables,Elements.MP_Column,column,column.CustomDate() ).CustomDate(); |
| | |
| | | TypeSpecialization MP_Cell_AnnualPlanReport |
| | | { |
| | | #keys: '2[412672.1.107700065][412672.1.107700060]' |
| | | Description: 'å
¨å¹´è®¡åæ¥è¡¨' |
| | | Parent: MP_Cell |
| | | StructuredName: 'MP_Cell_AnnualPlanReports' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetMP_Tables_AnnualPlanReport ( |
| | | const MacroPlans owners |
| | | ) as owning MP_Tables |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Aug-19-2024 (created) |
| | | tables := construct( MP_Tables ); |
| | | traverse( owners,Elements,owner ){ |
| | | table := select( owner,MP_Table,table,table.Name() = MP_Cell_AnnualPlanReport::GetTableName() ); |
| | | if( isnull( table )){ |
| | | table := MP_Cell_AnnualPlanReport::Create( owner ); |
| | | }else{ |
| | | startDate := minselect( table,MP_Column,column,column.CustomDate() ).CustomDate(); |
| | | planStartDate := owner.StartOfPlanning().Date(); |
| | | if( startDate <> planStartDate ){ |
| | | table := MP_Cell_AnnualPlanReport::Create( owner ); |
| | | } |
| | | } |
| | | tables.Add( table ); |
| | | } |
| | | return &tables; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetMP_Tables_ScheduleSummary ( |
| | | const MacroPlans owners |
| | | ) as owning MP_Tables |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Aug-19-2024 (created) |
| | | tables := construct( MP_Tables ); |
| | | traverse( owners,Elements,owner ){ |
| | | table := select( owner,MP_Table,table,table.Name() = MP_Cell_ScheduleSummary::GetTableName() ); |
| | | if( isnull( table )){ |
| | | table := MP_Cell_ScheduleSummary::Create( owner ); |
| | | }else{ |
| | | startDate := minselect( table,MP_Column,column,column.CustomDate() ).CustomDate(); |
| | | planStartDate := owner.StartOfPlanning().Date(); |
| | | if( startDate <> planStartDate ){ |
| | | table := MP_Cell_ScheduleSummary::Create( owner ); |
| | | } |
| | | } |
| | | tables.Add( table ); |
| | | } |
| | | return &tables; |
| | | *] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | CC_EngineRackCell::CreateData( MacroPlan ); |
| | | |
| | | WebMessageBox::Success( Translations::A_VWED_Success() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | macroPlans := ApplicationMacroPlanner.GetMacroPlans(); |
| | | table := MP_Cell_ScheduleSummary::CreateFullTable( macroPlans,RecycleBin ,Archive); |
| | | table := MP_Cell_ScheduleSummary::CreateFullTable( macroPlans,RecycleBin ,Archive, MacroPlan ); |
| | | |
| | | dhComparisonData854.Data( table ); |
| | | *] |
| | |
| | | FormCC_EngineRackReport_MatrixEditor531 |
| | | { |
| | | gridColor: '#c4c4c4' |
| | | totalHeaderWidth: 200 |
| | | totalHeaderWidth: 500 |
| | | attributeHeaderWidthRatio: 0.6 |
| | | nameHeaderWidthRatio: 0.4 |
| | | columnWidth: 100 |