_Main/BL/Relations/Relation_InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDat.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,23 @@ Quintiq file version 2.0 #parent: #root Relation InterfaceProductionSchedulingPlanPush_InterfaceDataset_InterfaceDataset_InterfaceProductionSchedulingPlanPush { #keys: '1[415754.0.136725964]' DefaultRelationStrategy { } RelationSide.LeftSide InterfaceDataset { #keys: '3[415754.0.136725966][415754.0.136725965][415754.0.136725967]' Cardinality: '0to1' ObjectDefinition: InterfaceProductionSchedulingPlanPush OwningSide: 'Reference' } RelationSide.RightSide InterfaceProductionSchedulingPlanPush { #keys: '3[415754.0.136725969][415754.0.136725968][415754.0.136725970]' Cardinality: '1toN' ObjectDefinition: InterfaceDataset OwningSide: 'Owned' } } _Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,123 @@ Quintiq file version 2.0 #parent: #root StaticMethod Export ( MacroPlan macroPlan ) as BinaryValue { TextBody: [* xmlDOMI := XMLDOMImplementation::Create(); xmlDOM := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name></table>' ); tableElement := xmlDOM.GetElementByTagName( "table", 0 ); // 第ä¸åï¼åç§°ï¼ cerrs := selectsortedset( macroPlan, CC_EngineRackRow, tempCERR, true, tempCERR.Name() ); firstColumn := xmlDOM.CreateElement( "column" ); firstName := xmlDOM.CreateElement( "name" ); firstType := xmlDOM.CreateElement( "type" ); firstName.TextContent( "" ); firstType.TextContent( "String" ); firstColumn.AppendChild( firstName ); firstColumn.AppendChild( firstType ); traverse ( cerrs, Elements, cerr ) { firstCell := xmlDOM.CreateElement( "cell" ); firstCell.SetAttribute( "value", cerr.Name() ); firstColumn.AppendChild( firstCell ); for ( i := 0; i < 9; i++ ) { firstCell := xmlDOM.CreateElement( "cell" ); firstCell.SetAttribute( "value", "" ); firstColumn.AppendChild( firstCell ); } } tableElement.AppendChild( firstColumn ); // 第äºå attrs := construct( Strings ); attrs.Add( "ææ¶ç©ºæ°é" ); attrs.Add( "ç©ºææ¶æ°é" ); attrs.Add( "å¤ç§åºå ¥åºè´¹ç¨" ); attrs.Add( "å¤ç§åºåºåºè´¹ç¨" ); attrs.Add( "å¤ç§åºè¿è¾è´¹ç¨" ); attrs.Add( "å¤ç§åºä»å¨è´¹ç¨" ); attrs.Add( "æ¸ æ´è´¹ç¨" ); attrs.Add( "é¢è®¡æ»è´¹ç¨" ); attrs.Add( "ç³»æ°" ); attrs.Add( "æ»è´¹ç¨" ); secondColumn := xmlDOM.CreateElement( "column" ); secondName := xmlDOM.CreateElement( "name" ); secondType := xmlDOM.CreateElement( "type" ); secondName.TextContent( "" ); secondType.TextContent( "String" ); secondColumn.AppendChild( secondName ); secondColumn.AppendChild( secondType ); for ( i := 0; i < cerrs.Size(); i++ ) { traverse ( attrs, Elements, attr ) { secondCell := xmlDOM.CreateElement( "cell" ); secondCell.SetAttribute( "value", attr ); secondColumn.AppendChild( secondCell ); } } tableElement.AppendChild( secondColumn ); // æ¶é´å cercs := selectsortedset( macroPlan, CC_EngineRackColumn, tempCERC, true, tempCERC.StartDate() ); traverse ( cercs, Elements, cerc ) { cellColumn := xmlDOM.CreateElement( "column" ); cellName := xmlDOM.CreateElement( "name" ); cellType := xmlDOM.CreateElement( "type" ); cellName.TextContent( cerc.StartDate().Format( "M2/D2/Y" ) ); cellType.TextContent( "Number" ); cellColumn.AppendChild( cellName ); cellColumn.AppendChild( cellType ); cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Name() ); traverse ( cells, Elements, c ) { cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks() ); // ææ¶æ»æ°é cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves() ); // ç©ºææ¶æ°é cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.StorageFeesForRentedWarehouses() ); // å¤ç§åºå ¥åºè´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.OutboundExpensesForRentedWarehouses() ); // å¤ç§åºåºåºè´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.ExternalRentalWarehouseTransportationCosts() ); // å¤ç§åºè¿è¾è´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.RentalWarehouseStorageFees() ); // å¤ç§åºä»å¨è´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.CleaningCost() ); // æ¸ æ´è´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.EstimatedTotalCost() ); // é¢è®¡æ»è´¹ç¨ cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.Coefficient() ); // ç³»æ° cellColumn.AppendChild( cell ); cell := xmlDOM.CreateElement( "cell" ); cell.SetAttribute( "value", [String]c.TotalCost() ); // æ»è´¹ç¨ cellColumn.AppendChild( cell ); } tableElement.AppendChild( cellColumn ); } xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM ) //info( xmlString ); tableGroupHandle := TableGroupHandle::Create( "Sheet1" ); tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) ); tableGroupHandle.Add( tableHandle ); binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); return binaryData.AsBinaryValue(); *] } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Fac.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute Fac { #keys: '3[415754.0.136760165][415754.0.136760164][415754.0.136760166]' Description: 'å·¥åç®å' ValueType: String } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_FactoryName.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute FactoryName { #keys: '3[415754.0.136726097][415754.0.136726096][415754.0.136726098]' Description: 'å·¥ååç§°' ValueType: String } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningDate.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute PlanningDate { #keys: '3[415754.0.136726023][415754.0.136726022][415754.0.136726024]' Description: 'æäº§æ¥æ' ValueType: Date } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_PlanningQty.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute PlanningQty { #keys: '3[415754.0.136760128][415754.0.136760127][415754.0.136760129]' Description: 'å¯¹åºæ¥æçè®¡åæ°é' ValueType: Number } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_Product.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute Product { #keys: '3[415754.0.136725988][415754.0.136725987][415754.0.136725989]' Description: 'ç©æå·' ValueType: String } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionName.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,8 @@ Quintiq file version 2.0 #parent: #root Attribute VersionName { #keys: '3[415754.0.136726060][415754.0.136726059][415754.0.136726061]' Description: 'çæ¬åç§°' ValueType: String } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,26 @@ Quintiq file version 2.0 #parent: #root StaticMethod GenerateData ( MacroPlan macroPlan, InterfaceDataset interfaceDataset ) { TextBody: [* interfaceDataset.InterfaceProductionSchedulingPlanPush( relflush ); traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() and ( pispmp.StockingPointID() = "DL-MoMo" or pispmp.StockingPointID() = "CC-MoMo" ) ) { info( pispmp.Name() ); traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) { interfaceDataset.InterfaceProductionSchedulingPlanPush( relnew, Product := pispmp.ProductID(), PlanningDate := pispippl.Start().Date(), PlanningQty := [Number]pispippl.NewSupplyQuantity(), VersionName := macroPlan.ScenarioName(), FactoryName := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), "大è¿å·¥å", "é¿æ¥å·¥å" ), Fac := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ) ); } } *] } _Main/BL/Type_InterfaceProductionSchedulingPlanPush/_ROOT_Type_InterfaceProductionSchedulingPlanPush.qbl
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,9 @@ Quintiq file version 2.0 #root #parent: #DomainModel Type InterfaceProductionSchedulingPlanPush { #keys: '5[415754.0.136750146][415754.0.136750144][0.0.0][415754.0.136750145][415754.0.136750147]' BaseType: Object StructuredName: 'InterfaceProductionSchedulingPlanPushs' } _Main/BL/Type_LocalCell_Default/Method_SetBreakDayOverTimeDurction.qbl
@@ -9,21 +9,27 @@ // rislai Jul-10-2024 (created) overtime := 0.0; nextDayOvertime := 0.0; if( outcome = "ä¸ç" ){ overtime := 8.5; if( outcome = "1" ){ overtime := 8; nextDayOvertime := 0.0; }else if( outcome = "äºç" ){ overtime := 16; nextDayOvertime := 0.5; }else if( outcome = "2" ){ overtime := 15; nextDayOvertime := 1; }else if(outcome = "9+9"){ overtime := 16; nextDayOvertime := 2.5; nextDayOvertime := 2; }else if(outcome = "10+10"){ overtime := 16; nextDayOvertime := 4.5; }else if(outcome = "ä¸ç"){ overtime := 16; nextDayOvertime := 8; overtime := 17; nextDayOvertime := 3; }else if(outcome = "1(9)" or outcome = "1ï¼9ï¼"){ overtime := 9; nextDayOvertime := 0; }else if(outcome = "1(10)" or outcome = "1ï¼10ï¼"){ overtime := 10; nextDayOvertime := 0; }else if(outcome = "3"){ overtime := 15; nextDayOvertime := 7.5; } this.RealValue( this.RealValue() + overtime + nextDayOvertime ); *] _Main/BL/Type_LocalCell_Default/Method_SetOvertimeDurction.qbl
@@ -9,21 +9,27 @@ // rislai Jul-10-2024 (created) overtime := 0.0; nextDayOvertime := 0.0; if( outcome = "ä¸ç" ){ overtime := 0.5; if( outcome = "1" ){ overtime := 0; nextDayOvertime := 0.0; }else if( outcome = "äºç" ){ overtime := 8; nextDayOvertime := 0.5; }else if( outcome = "2" ){ overtime := 0; nextDayOvertime := 0.0; }else if(outcome = "9+9"){ overtime := 8; nextDayOvertime := 2.5; overtime := 1; nextDayOvertime := 1; }else if(outcome = "10+10"){ overtime := 8; nextDayOvertime := 4.5; }else if(outcome = "ä¸ç"){ overtime := 8; nextDayOvertime := 8; overtime := 2; nextDayOvertime := 2; }else if(outcome = "1(9)" or outcome = "1ï¼9ï¼"){ overtime := 1; nextDayOvertime := 0; }else if(outcome = "1(10)" or outcome = "1ï¼10ï¼"){ overtime := 2; nextDayOvertime := 0; }else if(outcome = "3"){ overtime := 0; nextDayOvertime := 0; } this.RealValue( this.RealValue() + overtime + nextDayOvertime ); *] _Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
@@ -9,7 +9,7 @@ Description: 'æ åå·¥æ¶å¶æ¥è¡¨' TextBody: [* // rislai Jul-4-2024 (created) // rislai Jul-4-2024 (created) table := owner.LocalTable( relnew,Name := "æ åå·¥æ¶å¶æ¥è¡¨"); //column1 := table.LocalColumn( relnew,Name := "å·¥å" ,CustomIndex := 1); _Main/BL/Type_LocalCell_ScheduleSummary/StaticMethod_Create.qbl
@@ -29,7 +29,7 @@ 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 ); throughput := guard( sum( unit,Operation,operation,operation.Throughput() ) / unit.Operation( relsize ) , 0 ); unitPeriodTimes := selectset( unit,UnitPeriod.astype( UnitPeriodTime ),unitPeriodTime, unitPeriodTime.Period_MP().StartDate() >= startDate _Main/BL/Type_UphillRouting/Attribute_isUsed.qbl
@@ -1,6 +1,6 @@ Quintiq file version 2.0 #parent: #root Attribute isUsed Attribute IsUsed { #keys: '3[414996.1.27011002][414996.1.27011001][414996.1.27011003]' ValueType: Boolean _Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl
@@ -3,5 +3,5 @@ DefaultValue { ISOValue: 'false' TargetAttribute: isUsed TargetAttribute: IsUsed } _Main/BL/Type_UphillRouting/Method_Use.qbl
@@ -5,7 +5,7 @@ TextBody: [* // Akari Aug-26-2024 (created) this.isUsed( true ); this.IsUsed( true ); copy_routing := this.Routing().Copy( this.Suffix() + this.StartDate().Format( "Y-M2-D2") ); _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuInterface.def
@@ -66,8 +66,18 @@ [ Description: 'Customer demand(PPA + IDS)' Image: 'FLAG_AMBER' Taborder: 5 Taborder: 6 Title: '客æ·éæ±ï¼PPA+IDSï¼-PPPS' ] } Component mInterfaceProductionSchedulingPlanPush { #keys: '[415754.0.140441770]' BaseType: 'WebMenu' Properties: [ Taborder: 5 Title: 'ç产æç¨è®¡åæ°æ®æ¨éæ¥å£æµè¯' ] } Component MenuIAssemblyOnlinePlanPPPS @@ -77,7 +87,7 @@ Properties: [ Image: 'DELIVERY_AMBER' Taborder: 6 Taborder: 7 Title: 'è£ é ä¸çº¿è®¡å-PPPS' ] } @@ -88,7 +98,7 @@ Properties: [ Image: 'DELIVERY_BLUE' Taborder: 7 Taborder: 8 Title: 'è£ é ä¸çº¿è®¡å+æºå ä¸çº¿è®¡å-PIR' ] } @@ -99,7 +109,7 @@ Properties: [ Image: 'DELIVERY_CYAN' Taborder: 8 Taborder: 9 Title: 'è£ é ä¸çº¿è®¡å+æºå ä¸çº¿è®¡å-MS64' ] } _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfacePlanInventoryDataPush_O.def
@@ -5,11 +5,17 @@ #keys: '[413988.0.1495640258]' CanBindMultiple: false DefinitionID: 'Responsedef_WebMenu_OnClick' Precondition: [* return not isnull( MacroPlan ) and not isnull( InterfaceDataset ); *] QuillAction { Body: [* InterfacePlanInventoryDataPush::GenerateData( MacroPlan, InterfaceDataset ); WebMessageBox::Success( "æ¨éæåï¼" ); *] GroupServerCalls: false } _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ Quintiq file version 2.0 #parent: ContextMenuInterface/mInterfaceProductionSchedulingPlanPush Response OnClick () id:Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPlanPush_OnClick { #keys: '[415754.0.141940525]' CanBindMultiple: false DefinitionID: 'Responsedef_WebMenu_OnClick' Precondition: [* return not isnull( MacroPlan ) and not isnull( InterfaceDataset ); *] QuillAction { Body: [* InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset ); WebMessageBox::Success( "æ¨éæåï¼" ); *] GroupServerCalls: false } } _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def
@@ -5,7 +5,7 @@ #keys: '[414996.1.26570568]' Body: [* traverse( dhRouting.Data(),UphillRouting,uphillRouting,not uphillRouting.isUsed() ){ traverse( dhRouting.Data(),UphillRouting,uphillRouting,not uphillRouting.IsUsed() ){ uphillRouting.Use(); } *] _Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_pHeader.def
@@ -15,6 +15,16 @@ Taborder: 0 ] } Component bExport { #keys: '[415754.0.151340681]' BaseType: 'WebButton' Properties: [ Image: 'EXPORT1' Taborder: 1 ] } ] Properties: [ _Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_pHeader_bExport_OnClick.def
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ Quintiq file version 2.0 #parent: pHeader/bExport Response OnClick () id:Response_pHeader_bExport_OnClick { #keys: '[415754.0.151312042]' CanBindMultiple: false DefinitionID: 'Responsedef_WebButton_OnClick' Precondition: [* return not isnull( MacroPlan ); *] QuillAction { Body: [* binaryValue := CC_EngineRackCell::Export( MacroPlan ); Application.Download( "é¿æ¥å卿ºææ¶æ¥è¡¨.xlsx", binaryValue.AsBinaryData() ); *] GroupServerCalls: false } }