Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
| | |
| | | |
| | | // è¿è¾ææ¬åæ° |
| | | lct := select( macroPlan, LogisticsCostTransport, tempLCT, |
| | | tempLCT.Product() = mlcrr.Category() and |
| | | tempLCT.Origin() = ifexpr( mlcrr.Factory() = "大è¿å·¥å", "é¿æ¥å¤ç§åº", "大è¿åå
åº" ) and |
| | | tempLCT.Destination() = ifexpr( mlcrr.Factory() = "大è¿å·¥å", "大è¿åºå
åº", "é¿æ¥å¤ç§åº" ) ); |
| | | tempLCT.Product() = mlcrr.Category() and |
| | | tempLCT.Origin() = mlcrr.Factory() + " " + mlcrr.Category() + "å¤ç§åº" and |
| | | tempLCT.Destination() = mlcrr.Factory() + " " + mlcrr.Category() + "线边åº" ); |
| | | lct1 := select( macroPlan, LogisticsCostTransport, tempLCT, |
| | | tempLCT.Product() = mlcrr.Category() and |
| | | tempLCT.Origin() = ifexpr( mlcrr.Factory() = "大è¿å·¥å", "大è¿åå
åº", "CC åå
åº" ) and |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute NewSupply |
| | | { |
| | | #keys: '3[415754.0.436130246][415754.0.436130245][415754.0.436130247]' |
| | | Description: 'ä¾åº' |
| | | ValueType: Real |
| | | } |
| | |
| | | |
| | | // 大è¿å·¥åè®¾ç½®å¼ |
| | | if ( factory = "大è¿å·¥å" ) { |
| | | // åéæ±&å©ä½åºå |
| | | // åéæ±&å©ä½åºå&ä¾åºé |
| | | cell.NetDemand( cell.NetDemand() + pispipl.DependentDemandAndSalesDemandQuantity() ); |
| | | cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() ); |
| | | cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() ); |
| | | } |
| | | |
| | | // é¿æ¥å·¥åè®¾ç½®å¼ |
| | | if ( factory = "é¿æ¥å·¥å" ) { |
| | | // å©ä½åºå |
| | | // å©ä½åºå&ä¾åºé |
| | | cell.EndingInventory( cell.EndingInventory() + pispipl.InventoryLevelEnd() ); |
| | | cell.NewSupply( cell.NewSupply() + pispipl.NewSupplyQuantity() ); |
| | | |
| | | // åéæ±ãåªå线边åºã&å
è£
åºå&éå
è£
åºå |
| | | if ( pisp.StockingPointID().Regex( "å¤ç§åº" ) ) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 设置æå
å¼ï¼ç¬¦ålotsizeå䏿¥æå¤§å
è£
éï¼ |
| | | traverse ( macroPlan, PackagingPlanRow, ppr/*, ppr.Factory() = "大è¿å·¥å" and ppr.ProductID() = "06K103011CM"*/ ) { |
| | | traverse ( ppr, PackagingPlanCell, ppcell/*, ppcell.StartDate() <= Date::Construct( 2025, 1, 4 )*/ ) { |
| | | // Product_MP |
| | | pmp := select( macroPlan, Product_MP, tempPMP, tempPMP.IsLeaf() and tempPMP.ID() = ppr.ProductID() ); |
| | | // å
è£
lotsize |
| | | ppls := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() = ppr.Factory() and |
| | | tempPPLS.ProductID() = ifexpr( exists( macroPlan, PackagingPlanLotSize, tempPPLS1, tempPPLS1.ProductID() = pmp.ID() ), |
| | | pmp.ID(), |
| | | pmp.ParentID() ) ); |
| | | // 䏿¥å
è£
容é |
| | | ppnc := select( macroPlan, PackagingPlanNewCapability, tempPPNC, tempPPNC.Factory() = ppr.Factory() and |
| | | tempPPNC.ProductID() = ifexpr( exists( macroPlan, PackagingPlanNewCapability, tempPPNC1, tempPPNC1.ProductID() = pmp.ID() ), |
| | | pmp.ID(), |
| | | pmp.ParentID() ) ); |
| | | // Unit |
| | | us := selectset( macroPlan, Unit, tempU, tempU.ID().Regex( ppr.FactoryAbbreviation() + " " + ppr.Category() ) ); |
| | | |
| | | // å½åéå
è£
åºå + ä¸ä¸å¤©çNewSupply < ä¸ä¸å¤©çåéæ± |
| | | if ( ppcell.UnpackagedInventory() < guard( ppcell.Next().NetDemand(), 0 ) and not isnull( ppls ) and not isnull( ppnc ) ) { |
| | | // éè¦å
è£
çæ°é |
| | | needPackagingQuantity := abs( ppcell.PackagingInventory() ).Round( 0 ); |
| | | // å
è£
å¼å§çç´¢å¼ |
| | | indexPPCell := ppcell.Previous(); |
| | | |
| | | // info( "产线个æ°ï¼", us.Size(), " å¼å§æ¶é´ï¼", ppcell.StartDate().Format( "Y-M2-D2" ), " å
è£
åºåæ°éï¼", ppcell.PackagingInventory(), " éè¦å
è£
çæ°éï¼", needPackagingQuantity, |
| | | // " å
è£
lotsizeï¼",guard( ppls.LotSize(), 0 ), " æå¤§å
è£
容éï¼", ppnc.MaximumDailyPackagingQuantity() ); |
| | | |
| | | while ( not isnull( indexPPCell ) and |
| | | indexPPCell.StartDate() >= plannedStartDate and |
| | | exists( us, Elements.UnitPeriod.astype( UnitPeriodTime ).ShiftPlan, tempSP, |
| | | tempSP.UnitPeriodTime().StartDate() = indexPPCell.StartDate(), |
| | | tempSP.Outcome() <> "" ) and |
| | | needPackagingQuantity > 0 ) { |
| | | // è½å
è£
çæ°é |
| | | canPackagingQuantity := ifexpr( ceil( needPackagingQuantity / ppls.LotSize() ) < floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ), |
| | | ceil( needPackagingQuantity / ppls.LotSize() ), |
| | | floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ) ) * ppls.LotSize(); |
| | | // info( "å¼å§å
è£
çæ¥æï¼", indexPPCell.StartDate().Format( "Y-M2-D2" ), " è½å
è£
çæ°é:", canPackagingQuantity ); |
| | | |
| | | indexPPCell.Package( canPackagingQuantity ); |
| | | Transaction::Transaction().Propagate( attribute( PackagingPlanCell, PackagingInventory ) ); |
| | | Transaction::Transaction().Propagate( attribute( PackagingPlanCell, UnpackagedInventory ) ); |
| | | |
| | | needPackagingQuantity := needPackagingQuantity - canPackagingQuantity; |
| | | indexPPCell := indexPPCell.Previous(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | TypeRepresentation PackagingPlanCell |
| | | { |
| | | AttributeRepresentation EndingInventory |
| | | { |
| | | AttributeKey: '[413988.0.1393320114]' |
| | | Synonym: 'Inventory end' |
| | | } |
| | | AttributeRepresentation NetDemand |
| | | { |
| | | AttributeKey: '[413988.0.1393320104]' |
| | | Synonym: 'Demand' |
| | | } |
| | | AttributeRepresentation NewSupply |
| | | { |
| | | AttributeKey: '[415754.0.436130245]' |
| | | Synonym: 'New supply' |
| | | } |
| | | AttributeRepresentation Out |
| | | { |
| | | AttributeKey: '[413988.0.1393320156]' |
| | | Synonym: 'Transport-out' |
| | | } |
| | | AttributeRepresentation Package |
| | | { |
| | | AttributeKey: '[413988.0.1393320188]' |
| | | Synonym: 'Package' |
| | | } |
| | | AttributeRepresentation PackagingInventory |
| | | { |
| | | AttributeKey: '[413988.0.1393320143]' |
| | | Synonym: 'Packaged' |
| | | } |
| | | AttributeRepresentation TransferIn |
| | | { |
| | | AttributeKey: '[413988.0.1393320166]' |
| | | Synonym: 'Transport-in' |
| | | } |
| | | AttributeRepresentation UnpackagedInventory |
| | | { |
| | | AttributeKey: '[413988.0.1393320130]' |
| | | Synonym: 'Unpackaged' |
| | | } |
| | | AttributeRepresentation Unpacking |
| | | { |
| | | AttributeKey: '[413988.0.1393320198]' |
| | | Synonym: 'Unpackage' |
| | | } |
| | | RelationRepresentation AsFirst { RelationKey: '[413988.0.1425205682]' Visibility: 'Normal' } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component abpContent |
| | | { |
| | | #keys: '[414996.1.144423201]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component cmContent |
| | | { |
| | | #keys: '[414996.1.144423206]' |
| | | BaseType: 'listContextMenu' |
| | | Children: |
| | | [ |
| | | Component mnDelete |
| | | { |
| | | #keys: '[414996.1.144423645]' |
| | | BaseType: 'WebMenu' |
| | | Properties: |
| | | [ |
| | | Image: 'DELETE' |
| | | Taborder: 3 |
| | | Title: 'Delete' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component lstContent |
| | | { |
| | | #keys: '[414996.1.144423198]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component deContent |
| | | { |
| | | #keys: '[414996.1.144423199]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'Archive' |
| | | Source: 'Archive' |
| | | Taborder: 0 |
| | | Transformation: 'ArchiveFile' |
| | | ] |
| | | } |
| | | #child: abpContent |
| | | Component dslContent |
| | | { |
| | | #keys: '[414996.1.144423204]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: cmContent |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FilePath","title":"FilePath","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FilePath"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DateTime","title":"DateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UserName","title":"UserName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UserName"}}]' |
| | | ContextMenu: 'cmContent' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | ResponseDefinitions: |
| | | [ |
| | | DelegatedResponseDefinition OnClick id:Responsedef_lstContent_WebMenu_OnClick |
| | | { |
| | | #keys: '[414996.1.144423479]' |
| | | Initiator: 'WebMenu' |
| | | IsInherited: false |
| | | ResponseType: 'OnClick' |
| | | Arguments: |
| | | [ |
| | | ResponseDefinitionArgument selection |
| | | { |
| | | #keys: '[267.0.23880229]' |
| | | Binding: 'this.Selection()' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component pnlContent |
| | | { |
| | | #keys: '[414996.1.144423160]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: lstContent |
| | | ] |
| | | Properties: |
| | | [ |
| | | Padding: 'true' |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Create () id:Method_DialogMaintainArchivedFiles_Create |
| | | { |
| | | #keys: '[414996.1.144423799]' |
| | | Body: |
| | | [* |
| | | ApplicationMacroPlanner.ShowFormModal( this ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: lstContent |
| | | Response OnClick ( |
| | | structured[ArchiveFile] selection |
| | | ) id:Response_lstContent_mnDelete_OnClick |
| | | { |
| | | #keys: '[414996.1.144423689]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /lstContent/Responsedef_lstContent_WebMenu_OnClick |
| | | GroupServerCalls: true |
| | | Initiator: 'mnDelete' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( WebMessageBox::Question( Translations::MessageBox_ConfirmDeletion( "this files" ),Translations::MessageBox_YesNo() ) = 0 ){ |
| | | traverse( selection,Elements,element ){ |
| | | element.Delete(); |
| | | } |
| | | } |
| | | *] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent DialogMaintainArchivedFiles |
| | | { |
| | | #keys: '[414996.1.144423158]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: pnlContent |
| | | ] |
| | | Properties: |
| | | [ |
| | | Alignment: 'trailing' |
| | | Description: 'Maintain archived files ' |
| | | ExcludeFromActiveComponent: true |
| | | Padding: 'false' |
| | | Title: 'Maintain archived files ' |
| | | ] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'å¼å§å¯¹æ¯' |
| | | Taborder: 2 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component dhXMLDataListener id:dhXMLDataListener_906 |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component bExport id:bExport_98 |
| | |
| | | [ |
| | | Image: 'EXPORT1' |
| | | Label: '导åº' |
| | | Taborder: 0 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | #child: pVersionInfomation |
| | | Component bMaintainArchivedFiles |
| | | { |
| | | #keys: '[414996.1.144423972]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Image: 'MAGAZINE_FOLDER' |
| | | Label: 'M' |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: pVersionInfomationBase |
| | | #child: pVersionInfomationCompare |
| | | Component dhCompareVersion |
| | | { |
| | | #keys: '[414996.1.137780879]' |
| | |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component lBaseVersionName |
| | | { |
| | | #keys: '[414996.1.144422027]' |
| | | BaseType: 'WebLabel' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'dhBaseVersion.Data.Name' |
| | | Label: 'åºåéæ±çæ¬ï¼' |
| | | NumberOfColumns: 50 |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component lCompareVersionName |
| | | { |
| | | #keys: '[414996.1.144422050]' |
| | | BaseType: 'WebLabel' |
| | | Properties: |
| | | [ |
| | | DataBinding: 'dhCompareVersion.Data.Name' |
| | | Label: '对æ¯éæ±çæ¬ï¼' |
| | | NumberOfColumns: 50 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | Taborder: 4 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelOperation_568/bMaintainArchivedFiles |
| | | Response OnClick () id:Response_PanelOperation_568_bMaintainArchivedFiles_OnClick |
| | | { |
| | | #keys: '[414996.1.144820904]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dlg := construct( DialogMaintainArchivedFiles ); |
| | | dlg.Create(); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | rows := selectset( dhTable.Data(),LocalRow,row,exists( dhFinelProduct.Data(),Elements,product,product.ID() = row.ProductID())); |
| | | columns := selectset( dhTable.Data( ),LocalColumn,column,true ); |
| | | columns := selectset( dhTable.Data( ),LocalColumn,column,not column.IsAttrbuteColumn() and dhStartDate.Data() <= column.Date() and dhEndDate.Data() > column.Date() ); |
| | | LocalCell_ProductionComparison::AsyncExport( RecycleBin, rows, columns, MacroPlan ); |
| | | *] |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'NetDemand;EndingInventory;UnpackagedInventory;PackagingInventory;Out;TransferIn;Package;Unpacking' |
| | | Attributes: 'NetDemand;NewSupply;EndingInventory;Out;TransferIn;UnpackagedInventory;PackagingInventory;Package;Unpacking' |
| | | Column: 'PackagingPlanColumn' |
| | | Row: 'PackagingPlanRow' |
| | | Taborder: 0 |