yanweiyuan3
2023-09-26 96376f881d2511382f1063242206cff71781ea0b
Merge branch 'dev' into dev_yy
已重命名2个文件
已修改94个文件
已添加93个文件
已删除29个文件
4842 ■■■■■ 文件已修改
LibMacroPlannerOptimizer/BL/Type_CapacityPlanningSuboptimizer/Method_CapacityPlanningAlgorithmHandleFeasibleOperationDependentDemandInputG.qbl 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Export.qbl 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Import.qbl 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/EDI/Broker_GlobalOTDTable_CAR_Export.qbl 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_CapacityAllocationResult.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTD.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_H_CustomOrder_MacroPlan_MacroPlan_H_CustomOrder.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_BusinessType/StaticMethod_CreateData.qbl 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_BusinessType/StaticMethod_GetBusinessNameStr.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_Date.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_Description.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_ID.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_ManufacturedDate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_ProductID.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_StockingPointID.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/Attribute_UserQuantity.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/DeclarativeReferenceRelation_CalcCapacityAllocationResultsRuleConfiguration.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_Export.qbl 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_Division.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_ModuleMaterialCode.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialCode.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_StockingPointID.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Export.qbl 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Import.qbl 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/TypeIndex_CapacityAllocationResultsRuleConfigurationTypeIndex.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/_ROOT_Type_CapacityAllocationResultsRuleConfiguration.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CustomerOrder/Attribute_OrderTag.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FilllingCapacityOrderScheme/StaticMethod_CreateFillingCapacityOrderScheme.qbl 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_FilllingCapacityOrderScheme/StaticMethod_DeleteDetails.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFinishedGood.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFinishedGood.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFinishedGood.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_CustomOrder/_ROOT_Type_H_CustomOrder.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_NewStaticMethod.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo#1.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl 321 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_FunctionClass/StaticMethod_UpdateOrderForecastRealQty.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_CustomCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_CustomID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Department.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_ForecastQty.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Month.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_OrderCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_SKU.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_SKUName.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_StockingPointID.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Unit.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_H_OrderForecastRealQty/Attribute_VCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MPSync/Method_CapacityAndSaleBudgeExport.qbl 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MPSync/StaticMethod_TestData.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingSaleBudge/StaticMethod_ExpectedHeaders.qbl 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingSaleBudge/StaticMethod_Export.qbl 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingSaleBudge/StaticMethod_ExportFields.qbl 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Operation/Method_OnCommitCustom.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityFactor/StaticMethod_CheckNameValid.qbl 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityFactorDetails/StaticMethod_CreateTestData.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PriorityPolicy/StaticMethod_RollBackCalcStr.qbl 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Routing/Method_DoSanityCheckData.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Routing/Method_GetHasTianmaNonSupplierOperationWithNoInput.qbl 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart#95.qbl 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/StaticMethod_AvailableBusinessTypes.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuSalesFillingCapacity.def 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgTest.def 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef#1.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingCapac.def 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingS#360.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingSchem.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_abgTest_btnTest_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogBusinessType/Method_ClickBtnOk.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlActions.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlContent.def 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_Edit.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_New.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnCancel_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnOk_OnClick.def 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/_ROOT_Component_DialogCreateEditCapacityAllocationResultsRuleConfiguration.def 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditIssueWorkOrder/Response_pnlActions_btnOk_OnClick.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogFillingCustomerAndForecast/Component_pnlContent.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_PanelCapacityAllocationResults.def 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR#39.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_Export_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_ListCapacityAllocationResultsRuleConfiguration.def 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listActionBarPageCapacityAllocationResultsRuleConfiguration.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listContextMenuCapacityAllocationResultsRuleConfiguration.def 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataCh.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClic.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Export_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Import_OnClick.def 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/_ROOT_Component_FormCapacityAllocationResultsRuleConfiguration.def 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_ListSalesDemands.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_PanelAllSalesDemands.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_PanelSalesDemands.def 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/_ROOT_Component_FormCustomerOrders.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_ListSDIP.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_ListSalesDemands.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelAllSalesDemands.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelSDIP.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelSalesDemands.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuCopy_OnClick.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuCreate_OnClick#715.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuEdit_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/_ROOT_Component_FormCustomerOrders226.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFillingScheme/Response_ListFillingScheme_MenuDelete_OnClick.def 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormFillingScheme/Response_ListFillingScheme_OnSelectionChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormIssueWorkOrder/Component_ListIssueWorkOrder.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormIssueWorkOrder/Response_ListIssueWorkOrder_MenuEdit_OnClick.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuInitData_OnClick.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick#106.def 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Component_PanelPriorityPolicyCoefficient#902.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Component_PanelPriorityPolicyOperationButton#713.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicySelectBusinessType_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_ListPriorityPolicy_MenuDelete_OnClick.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_ListPriorityPolicy_OnUserSelectionChanged.def 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_ButtonAddPriorityPolicy_OnClick.def 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_ButtonRollBack_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnSelectionCh.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPriorityResult/_ROOT_Component_FormPriorityResult.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick#545.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick#549.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuEdit_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick#975.def 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_listActionBarPage963.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_listContextMenu687.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF#670.def 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick#222.def 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick#880.def 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick#971.def 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Query_FOF_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel383_btn_Query_FOF_OnClick.def 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Material_FOF_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_InitialData_OnClick.def 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_list_ForecastView_FOF_OnDoubleClick.def 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_list_ForecastView_FOF_OnSelectionChanged.def 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP订单_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/FillingCapacityOrder.vw 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/FillingCapacityOrderHistorical.vw 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/PriorityResults.vw 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Test.vw 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/填产方案列表.vw 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/FillingCapacityOrder.vw 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/FillingCapacityOrderHistorical.vw 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/Test.vw 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LibMacroPlannerOptimizer/BL/Type_CapacityPlanningSuboptimizer/Method_CapacityPlanningAlgorithmHandleFeasibleOperationDependentDemandInputG.qbl
@@ -9,7 +9,6 @@
  Description: 'Assign the optimal quantity from optimizer for dependent demand in input group.'
  TextBody:
  [*
    // Tianma fix 20230727
    // Dependent demand of input group fulfillment
    ptperiod := periodtaskoperation.UnitPeriod().Period_MP();
    operation := periodtaskoperation.Operation();
@@ -19,22 +18,24 @@
              dd, 
              dd.HasRegularProductForOptimizer() or dd.OperationInput().GetIsProductInOptimizerRun( runcontext.IsPostProcessing() ) )
    {
      pispipperiods := construct( Period_MPs, constcontent );
      if ( getfromperiodtask ) // in case we are able to get from period tasks, below method refinds periodtask for (operation, ptperiod) i.e. periodtaskoperation and then output dep.demand periods
      {
        traverse( periodtaskoperation, DependentDemand.ProductInStockingPointInPeriodPlanningLeaf.Period_MP, ddperiod )
        {
          pispipperiods.Add( ddperiod );
        }
      }
      else
      {
        CapacityPlanningSuboptimizer::GetOperationDependentDemandPeriods( ptperiod, operation, &pispipperiods, getfromperiodtask );
      }
      fulfilledqty := 0.0;
      
      fulfilledqty := 0.0;
      if( operation.HasLeadTime() )     // Get the dependent demands that is located at different period from the period of period task.
      {
        // compute dependent demand periods
        pispipperiods := construct( Period_MPs, constcontent );
        if ( getfromperiodtask ) // in case we are able to get from period tasks, below method refinds periodtask for (operation, ptperiod) i.e. periodtaskoperation and then output dep.demand periods
        {
          traverse( periodtaskoperation, DependentDemand.ProductInStockingPointInPeriodPlanningLeaf.Period_MP, ddperiod )
          {
            pispipperiods.Add( ddperiod );
          }
        }
        else
        {
          CapacityPlanningSuboptimizer::GetOperationDependentDemandPeriods( ptperiod, operation, &pispipperiods, getfromperiodtask );
        }
        fulfilledqty := sum( pispipperiods, Elements, pispipperiod,
                             this.GetOptimalValue( program.PartialOperationDemandQtyVariables().Get( dd.OperationInput(), pispipperiod, ptperiod ) ) );
        if ( runcontext.IsMetaIteration() and operation.IsBlending() ) // no filtering for numerical sensitive blending operation in meta optimizer
@@ -44,15 +45,15 @@
        }                     
      }
      else
      {
        fulfilledqty := sum( pispipperiods, Elements, pispipperiod,
                             this.GetOptimalValue( program.OperationDemandQtyVariables().Get( dd.OperationInput(), pispipperiod ) ) );
      {
        // note that in case there is no lead time then the set of dependent demand periods just equals the singleton set {ptperiod}
        fulfilledqty := this.GetOptimalValue( program.OperationDemandQtyVariables().Get( dd.OperationInput(), ptperiod ) );
        if( runcontext.IsMetaIteration() and operation.IsBlending() ) // no filtering for numerical sensitive blending operation in meta optimizer
        {
          fulfilledqty := sum( pispipperiods, Elements, pispipperiod,
                               this.GetOptimalValueUnfiltered( program.OperationDemandQtyVariables().Get( dd.OperationInput(), pispipperiod ) ) );
          fulfilledqty := this.GetOptimalValueUnfiltered( program.OperationDemandQtyVariables().Get( dd.OperationInput(), ptperiod ) );
        }
      }
      dd.OptimizerFulfilledQuantity( fulfilledqty );
    }
  *]
LibMacroPlannerOptimizer/BL/Type_SelectorFullPuzzle/Method_SetOptimizerInput.qbl
@@ -175,10 +175,12 @@
      
      if ( ddperiodstotal.Size() > 0 ) 
      {
        minstart := min( ddperiodstotal, Elements, p, p.Start() );
        minstartperiods := min( periods, Elements, p, p.Start() );
        pispiptoadd := selectset( operation, 
                                  OperationInput.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning, 
                                  pispip,
                                  ddperiodstotal.Find( pispip.Period_MP() ) > 0
                                  pispip.Start() >= minstart and pispip.Start() < minstartperiods // must add the entire block. Don't want gaps in the pispip horizon
                                  and ( pispip.HasRegularProductForOptimizer() or pispip.GetProductIsIncludedInOptimizerRun( runcontext.IsPostProcessing() ) ) 
                                  and not scope.Contains( pispip.PISPIPInOptimizerRun() ) )
                                    
_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
Quintiq file version 2.0
#parent: #root
EDIBroker GlobalOTDTable_CARRC_Export
{
  MDSDefinition: GlobalOTDTable
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Source Source11
  {
    EDIMLTable CapacityAllocationResultsRuleConfiguration
    {
      PrimaryKeyColumns: ModuleMaterialCode
      PrimaryKeyColumns: PanelMaterialCode
      PrimaryKeyColumns: StockingPointID
      TargetType: CapacityAllocationResultsRuleConfiguration
      TypeIndex: CapacityAllocationResultsRuleConfigurationTypeIndex
      EDIMLColumn Division { Attribute: Division ValueType: String }
      EDIMLColumn ModuleMaterialCode { Attribute: ModuleMaterialCode ValueType: String }
      EDIMLColumn PanelMaterialCode { Attribute: PanelMaterialCode ValueType: String }
      EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
    }
  }
  EDITransformation.Transformation Transformation11
  {
    EDITableTransformation
    {
      InputTable: CapacityAllocationResultsRuleConfiguration
      OutputTable: CapacityAllocationResultsRuleConfiguration
      EDIColumnMatch { InputColumn: Division OutputColumn: Division }
      EDIColumnMatch { InputColumn: ModuleMaterialCode OutputColumn: ModuleMaterialCode }
      EDIColumnMatch { InputColumn: PanelMaterialCode OutputColumn: PanelMaterialCode }
      EDIColumnMatch { InputColumn: StockingPointID OutputColumn: StockingPointID }
    }
  }
  EDIXLSLink.Destination Destination12
  {
    FileName: 'Destination12'
    EDIXLSLinkTable CapacityAllocationResultsRuleConfiguration
    {
      Columns:
      [
        EDIXLSLinkColumn Division { ValueType: String }
        EDIXLSLinkColumn ModuleMaterialCode { ValueType: String }
        EDIXLSLinkColumn PanelMaterialCode { ValueType: String }
        EDIXLSLinkColumn StockingPointID { ValueType: String }
      ]
    }
  }
}
_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Import.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
Quintiq file version 2.0
#parent: #root
EDIBroker GlobalOTDTable_CARRC_Import
{
  MDSDefinition: GlobalOTDTable
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Destination Destination13
  {
    EDIMLTable CapacityAllocationResultsRuleConfiguration
    {
      PrimaryKeyColumns: ModuleMaterialCode
      PrimaryKeyColumns: PanelMaterialCode
      PrimaryKeyColumns: StockingPointID
      TargetType: CapacityAllocationResultsRuleConfiguration
      TypeIndex: CapacityAllocationResultsRuleConfigurationTypeIndex
      EDIMLColumn Division { Attribute: Division ValueType: String }
      EDIMLColumn ModuleMaterialCode { Attribute: ModuleMaterialCode ValueType: String }
      EDIMLColumn PanelMaterialCode { Attribute: PanelMaterialCode ValueType: String }
      EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
    }
  }
  EDITransformation.Transformation Transformation12
  {
    EDITableTransformation
    {
      InputTable: CapacityAllocationResultsRuleCo
      OutputTable: CapacityAllocationResultsRuleConfiguration
      EDIColumnMatch { InputColumn: Division OutputColumn: Division }
      EDIColumnMatch { InputColumn: ModuleMaterialCode OutputColumn: ModuleMaterialCode }
      EDIColumnMatch { InputColumn: PanelMaterialCode OutputColumn: PanelMaterialCode }
      EDIColumnMatch { InputColumn: StockingPointID OutputColumn: StockingPointID }
    }
  }
  EDIXLSLink.Source Source12
  {
    FileName: '产能分配结果规则.xlsx'
    EDIXLSLinkTable CapacityAllocationResultsRuleCo
    {
      Columns:
      [
        EDIXLSLinkColumn Division { ValueType: String }
        EDIXLSLinkColumn ModuleMaterialCode { ValueType: String }
        EDIXLSLinkColumn PanelMaterialCode { ValueType: String }
        EDIXLSLinkColumn StockingPointID { ValueType: String }
      ]
    }
  }
}
_Main/BL/EDI/Broker_GlobalOTDTable_CAR_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
Quintiq file version 2.0
#parent: #root
EDIBroker GlobalOTDTable_CAR_Export
{
  MDSDefinition: GlobalOTDTable
  TimeZone: 'ACT'
  UseOSTimeZone: false
  EDIModelLink.Source Source13
  {
    EDIMLTable CapacityAllocationResults
    {
      TargetType: CapacityAllocationResults
      EDIMLColumn Date { Attribute: Date ValueType: Date }
      EDIMLColumn Description { Attribute: Description ValueType: String }
      EDIMLColumn Division { Attribute: Division ValueType: String }
      EDIMLColumn ID { Attribute: ID ValueType: String }
      EDIMLColumn ManufacturedDate { Attribute: ManufacturedDate ValueType: Date }
      EDIMLColumn ModuleBase { Attribute: ModuleBase ValueType: String }
      EDIMLColumn ModuleMaterialCode { Attribute: ModuleMaterialCode ValueType: String }
      EDIMLColumn ModuleMeasurementUnit { Attribute: ModuleMeasurementUnit ValueType: String }
      EDIMLColumn NumberOfModules { Attribute: NumberOfModules ValueType: Real }
      EDIMLColumn NumberOfPanels { Attribute: NumberOfPanels ValueType: Real }
      EDIMLColumn PanelBase { Attribute: PanelBase ValueType: String }
      EDIMLColumn PanelMaterialCode { Attribute: PanelMaterialCode ValueType: String }
      EDIMLColumn PanelMeasurementUnit { Attribute: PanelMeasurementUnit ValueType: String }
      EDIMLColumn ProductID { Attribute: ProductID ValueType: String }
      EDIMLColumn RequirementDate { Attribute: RequirementDate ValueType: Date }
      EDIMLColumn StockingPointID { Attribute: StockingPointID ValueType: String }
      EDIMLColumn UserQuantity { Attribute: UserQuantity ValueType: Real }
      EDIMLColumn VersionNumber { Attribute: VersionNumber ValueType: String }
    }
  }
  EDITransformation.Transformation Transformation13
  {
    EDITableTransformation
    {
      InputTable: CapacityAllocationResults
      OutputTable: CapacityAllocationResults
      EDIColumnMatch { InputColumn: Date OutputColumn: Date }
      EDIColumnMatch { InputColumn: Description OutputColumn: Description }
      EDIColumnMatch { InputColumn: ID OutputColumn: ID }
      EDIColumnMatch { InputColumn: ManufacturedDate OutputColumn: ManufacturedDate }
      EDIColumnMatch { InputColumn: ProductID OutputColumn: ProductID }
      EDIColumnMatch { InputColumn: StockingPointID OutputColumn: StockingPointID }
      EDIColumnMatch { InputColumn: UserQuantity OutputColumn: UserQuantity }
    }
  }
  EDIXLSLink.Destination Destination14
  {
    FileName: 'Destination14'
    EDIXLSLinkTable CapacityAllocationResults
    {
      Columns:
      [
        EDIXLSLinkColumn Date { ValueType: Date }
        EDIXLSLinkColumn Description { ValueType: String }
        EDIXLSLinkColumn ID { ValueType: String }
        EDIXLSLinkColumn ProductID { ValueType: String }
        EDIXLSLinkColumn StockingPointID { ValueType: String }
        EDIXLSLinkColumn UserQuantity { ValueType: Real }
        EDIXLSLinkColumn ManufacturedDate { ValueType: Date }
      ]
    }
  }
}
_Main/BL/InfoMessages.qbl
@@ -10,4 +10,8 @@
  {
    DefaultText: 'Please input validate value !'
  }
}
  InfoMessage PriorityFactor_CheckNameValid
  {
    DefaultText: '该优先级因子名称已存在!'
  }
}
_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_CapacityAllocationResult.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CapacityAllocationResultsRuleConfiguration_CapacityAllocationResults_CapacityAllocationResults_CapacityAllocationResultsRuleConfiguration
{
  #keys: '1[414702.0.387791788]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide CapacityAllocationResults
  {
    #keys: '3[414702.0.387791790][414702.0.387791789][414702.0.387791791]'
    Cardinality: '1toN'
    ObjectDefinition: CapacityAllocationResultsRuleConfiguration
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CapacityAllocationResultsRuleConfiguration
  {
    #keys: '3[414702.0.387791793][414702.0.387791792][414702.0.387791794]'
    Cardinality: '0to1'
    ObjectDefinition: CapacityAllocationResults
    OwningSide: 'Reference'
  }
}
_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTD.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTDTable_CapacityAllocationResultsRuleConfiguration
{
  #keys: '1[414702.0.374991408]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide GlobalOTDTable
  {
    #keys: '3[414702.0.374991410][414702.0.374991409][414702.0.374991411]'
    Cardinality: '0to1'
    ObjectDefinition: CapacityAllocationResultsRuleConfiguration
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CapacityAllocationResultsRuleConfiguration
  {
    #keys: '3[414702.0.374991413][414702.0.374991412][414702.0.374991414]'
    Cardinality: '1toN'
    ObjectDefinition: GlobalOTDTable
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_H_CustomOrder_MacroPlan_MacroPlan_H_CustomOrder.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation H_CustomOrder_MacroPlan_MacroPlan_H_CustomOrder
{
  #keys: '1[414724.0.177854649]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MacroPlan
  {
    #keys: '3[414724.0.177854651][414724.0.177854650][414724.0.177854652]'
    Cardinality: '0to1'
    ObjectDefinition: H_CustomOrder
    OwningSide: 'Reference'
  }
  RelationSide.RightSide H_CustomOrder
  {
    #keys: '3[414724.0.177854654][414724.0.177854653][414724.0.177854655]'
    Cardinality: '1toN'
    ObjectDefinition: MacroPlan
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_BusinessType/StaticMethod_CreateData.qbl
@@ -2,6 +2,7 @@
#parent: #root
StaticMethod CreateData (
  GlobalOTDTable owner,
  MacroPlan macroPlan,
  String businessName
)
{
_Main/BL/Type_BusinessType/StaticMethod_GetBusinessNameStr.qbl
@@ -25,7 +25,7 @@
    }
    
    // æµ‹è¯•数据
    result := "集团面板;专业显示事业部;外卖CELL;非显;运动健康;运动健康事业部;手机事业部;特种显示;汽车电子事业部;车载显示事业部;IT事业部";
    //result := "集团面板;专业显示事业部;外卖CELL;非显;运动健康;运动健康事业部;手机事业部;特种显示;汽车电子事业部;车载显示事业部;IT事业部";
    
    return result;
  *]
_Main/BL/Type_CapacityAllocationResults/Attribute_Date.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Date
{
  #keys: '3[414702.0.388471426][414702.0.388471425][414702.0.388471427]'
  ValueType: Date
}
_Main/BL/Type_CapacityAllocationResults/Attribute_Description.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Description
{
  #keys: '3[414702.0.388471436][414702.0.388471435][414702.0.388471437]'
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResults/Attribute_ID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ID
{
  #keys: '3[414702.0.388471446][414702.0.388471445][414702.0.388471447]'
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResults/Attribute_ManufacturedDate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ManufacturedDate
{
  #keys: '3[414702.0.388471486][414702.0.388471485][414702.0.388471487]'
  ValueType: Date
}
_Main/BL/Type_CapacityAllocationResults/Attribute_ProductID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductID
{
  #keys: '3[414702.0.388471456][414702.0.388471455][414702.0.388471457]'
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResults/Attribute_StockingPointID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute StockingPointID
{
  #keys: '3[414702.0.388471466][414702.0.388471465][414702.0.388471467]'
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResults/Attribute_UserQuantity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute UserQuantity
{
  #keys: '3[414702.0.388471476][414702.0.388471475][414702.0.388471477]'
  ValueType: Real
}
_Main/BL/Type_CapacityAllocationResults/DeclarativeReferenceRelation_CalcCapacityAllocationResultsRuleConfiguration.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
DeclarativeReferenceRelation CalcCapacityAllocationResultsRuleConfiguration
{
  #keys: '1[414702.0.388304510]'
  Expression:
  [*
    targetCapacityAllocationResultsRuleConfiguration := select( this.GlobalOTDTable(), CapacityAllocationResultsRuleConfiguration, tempCARRC,
                                                                tempCARRC.ModuleMaterialCode() = this.ModuleMaterialCode() and
                                                                tempCARRC.PanelMaterialCode() = this.PanelMaterialCode() );
    return targetCapacityAllocationResultsRuleConfiguration;
  *]
  Relation: CapacityAllocationResultsRuleConfiguration
}
_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl
@@ -2,27 +2,32 @@
#parent: #root
StaticMethod CreateDate (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan
  MacroPlan macroPlan,
  Scenario scenario
)
{
  TextBody:
  [*
    globalOTDTable.CapacityAllocationResults( relflush );
    
    finaleProduct_MPs := CapacityAllocationResults::ObtainTheFinalOutputProduct( macroPlan );
    finaleProductInStockingPoint_MPs := CapacityAllocationResults::ObtainTheFinalOutputProduct( macroPlan, globalOTDTable );
    
    period_MPS := null( Period_MPs );
    traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
      period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
    }
    
    traverse ( finaleProduct_MPs, Elements, fpmp/*, fpmp.ID() = "ProXOver 1 D2.6 A"*/ ) {
      traverse ( fpmp, ProductInStockingPoint_MP, pisp, /*pisp.Name() = "ProXOver 1 D2.6 A in Finished Cars (France)" and*/ not pisp.IsSystem() ) {
        traverse ( period_MPS, Elements, pmp ) {
          CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() );
        }
    //    info( pisp.Name() );
    traverse ( finaleProductInStockingPoint_MPs, Elements, fpispmp ) {
      capacityAllocationResultsRuleConfigurations := selectset( globalOTDTable, CapacityAllocationResultsRuleConfiguration, tempCARRC, tempCARRC.ModuleMaterialCode() = fpispmp.ProductID() and tempCARRC.StockingPointID() = fpispmp.StockingPointID() );
    //  info( "生产的产品:", fpispmp.ProductID(), "------产品在库存点-------:", fpispmp.StockingPointID() );
      traverse ( period_MPS, Elements, pmp ) {
        // CapacityAllocationResults::IterativeGeneration( globalOTDTable, pisp, 1, null( NewSupply ), -1.0, pmp.StartDate() ); è€ç‰ˆ
        CapacityAllocationResults::IterativeGeneration2( globalOTDTable, fpispmp, pmp.StartDate(), capacityAllocationResultsRuleConfigurations, 0, null( NewSupply ), 0.0 );
      }
    }
    traverse ( globalOTDTable, CapacityAllocationResults, car ) {
      car.VersionNumber( scenario.Name() );
    }
  *]
}
_Main/BL/Type_CapacityAllocationResults/StaticMethod_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Export (
  GlobalOTDTable globalOTDTable
) as BinaryValue
{
  TextBody:
  [*
    binaryData := globalOTDTable.GlobalOTDTable_CAR_Export().ExecuteToXLS( true );
    return binaryData.AsBinaryValue();
  *]
}
_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
Quintiq file version 2.0
#parent: #root
StaticMethod IterativeGeneration2 (
  GlobalOTDTable globalOTDTable,
  ProductInStockingPoint_MP pisp,
  Date targetDate,
  CapacityAllocationResultsRuleConfigurations carrcs,
  Number numberOfLayers,
  NewSupply firstLevelSupply,
  Real currentLayerDependentDemandQuantity
)
{
  TextBody:
  [*
    numberOfLayers++;
    //info( "目标时间:", targetDate.Format( "Y-M2-D2" ) );
    info( pisp.Name() );
    traverse ( pisp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, pispippl.Start().Date() = targetDate ) {
      traverse ( pispippl, NewSupply, ns, ns.Quantity() > 0 ) {
        if ( numberOfLayers = 1 ) {
          firstLevelSupply := ns;
        }
        ontype( ns.PeriodTask_MP() ) {
          PeriodTaskOperation as pto : {
    //        info( "Operation周期任务..." );
            traverse ( ns, PeriodTask_MP.astype( PeriodTaskOperation ).DependentDemand, dd ) {
              if ( numberOfLayers = 1 ) {
                currentLayerDependentDemandQuantity := ns.Quantity();
              }
              currentLayerDependentDemandQuantity := currentLayerDependentDemandQuantity                     *
                                                     ns.ProcessOutput().astype( OperationOutput ).Quantity() *
                                                     dd.ProcessInput().astype( OperationInput ).Quantity();
    //          info( "层数:", numberOfLayers, "    å½“前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    æ€»ä¾›åº”值:", ns.Quantity(), "    éœ€è¦ä¾›åº”值:", currentLayerDependentDemandQuantity,
    //                "    å½“前需求pisp:", dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    éœ€æ±‚值:", currentLayerDependentDemandQuantity );
    //          info( "-----------------------------------------------------------------------------------------------------------------" );
              CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                               dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),
                                                               targetDate,
                                                               carrcs,
                                                               numberOfLayers,
                                                               firstLevelSupply,
                                                               currentLayerDependentDemandQuantity
                                                              );
            }
            carrc := select( carrcs, Elements, carrc, carrc.PanelMaterialCode() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
            if ( not isnull( carrc ) ) {
    //          info( "找到面板物料..." );
              globalOTDTable.CapacityAllocationResults( relnew,
                                                        PanelBase             := pto.Operation().UnitID(),
                                                        PanelMaterialCode     := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
                                                        NumberOfPanels        := currentLayerDependentDemandQuantity,
                                                        PanelMeasurementUnit  := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().UnitOfMeasureName(),
                                                        ModuleMaterialCode    := firstLevelSupply.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
                                                        NumberOfModules       := firstLevelSupply.Quantity(),
                                                        ModuleMeasurementUnit := firstLevelSupply.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().UnitOfMeasureName(),
                                                        ModuleBase            := guard( firstLevelSupply.PeriodTask_MP().astype( PeriodTaskOperation ).Operation().UnitID(), "车道运输" ),
                                                        Division              := carrc.Division(),
                                                        RequirementDate       := ns.Start().Date(),
                                                        Date                  := ns.Start().Date(),
                                                        Description           := "",
                                                        ID                    := OS::GenerateGUIDAsString(),
                                                        ProductID             := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
                                                        StockingPointID       := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().StockingPointID(),
                                                        UserQuantity          := currentLayerDependentDemandQuantity,
                                                        ManufacturedDate      := Date::MinDate()
                                                       );
            }
            info( "-----------------------------------------------------------------------------------------------------------------" );
          }
          PeriodTaskLaneLeg as ptll : {
            targetDependentDemand := select( ptll, DependentDemand, dd, dd.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() );
            currentLayerDependentDemandQuantity := ifexpr( numberOfLayers = 1, targetDependentDemand.Quantity(), currentLayerDependentDemandQuantity );
    //        info( "层数:", numberOfLayers,"    å½“前供应的pisp:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    æ€»ä¾›åº”值:", ns.Quantity(), "    éœ€è¦ä¾›åº”值:", currentLayerDependentDemandQuantity,
    //              "    å½“前需求pisp:", targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), "    éœ€æ±‚值:", currentLayerDependentDemandQuantity );
    //        info( "LaneLeg周期任务..." );
            info( "-----------------------------------------------------------------------------------------------------------------" );
            CapacityAllocationResults::IterativeGeneration2( globalOTDTable,
                                                             targetDependentDemand.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP(),
                                                             targetDate,
                                                             carrcs,
                                                             numberOfLayers,
                                                             firstLevelSupply,
                                                             currentLayerDependentDemandQuantity
                                                            );
          }
        }
        if ( numberOfLayers = 1 ) {
          firstLevelSupply := null( NewSupply );
        }
      }
    }
  *]
}
_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl
@@ -1,25 +1,30 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ObtainTheFinalOutputProduct (
  MacroPlan macroPlan
) as owning Product_MPs
  MacroPlan macroPlan,
  GlobalOTDTable globalOTDTable
) as owning ProductInStockingPoint_MPs
{
  TextBody:
  [*
    finaleProducts := construct( Product_MPs );
    //finaleProducts := construct( Product_MPs );
    //
    //traverse ( macroPlan, Product_MP, pmp, pmp.IsLeaf() ) {
    //  flag := true;
    //  traverse ( macroPlan, Routing.RoutingStep.Operation.OperationInput, oi, flag ) {
    //    if ( pmp = oi.ProductInStockingPoint_MP().Product_MP() ) {
    //      flag := false;
    //    }
    //  }
    //  if ( flag ) {
    //    finaleProducts.Add( pmp );
    //  }
    //}
    
    traverse ( macroPlan, Product_MP, pmp, pmp.IsLeaf() ) {
      flag := true;
      traverse ( macroPlan, Routing.RoutingStep.Operation.OperationInput, oi, flag ) {
        if ( pmp = oi.ProductInStockingPoint_MP().Product_MP() ) {
          flag := false;
        }
      }
      if ( flag ) {
        finaleProducts.Add( pmp );
      }
    }
    finaleProductInStockingPoint_MPs := selectset( macroPlan, Product_MP.ProductInStockingPoint_MP, tempPISPMP,
                                                   exists( globalOTDTable, CapacityAllocationResultsRuleConfiguration, tempCARRC, tempCARRC.ModuleMaterialCode() = tempPISPMP.ProductID() and tempCARRC.StockingPointID() = tempPISPMP.StockingPointID() )
                                                  );
    
    return &finaleProducts;
    return &finaleProductInStockingPoint_MPs;
  *]
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_Division.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Division
{
  #keys: '3[414702.0.374991447][414702.0.374991446][414702.0.374991448]'
  Description: '事业部'
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_ModuleMaterialCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute ModuleMaterialCode
{
  #keys: '3[414702.0.374991437][414702.0.374991436][414702.0.374991438]'
  Description: '模组物料编码'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute PanelMaterialCode
{
  #keys: '3[414702.0.374991427][414702.0.374991426][414702.0.374991428]'
  Description: '面板物料编码'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_StockingPointID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#parent: #root
Attribute StockingPointID
{
  #keys: '3[414702.0.375010145][414702.0.375010144][414702.0.375010146]'
  Description: '模组产成品库存点ID'
  IsReadOnly: true
  ValueType: String
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Export (
  GlobalOTDTable globalOTDTable
) as BinaryValue
{
  TextBody:
  [*
    // hongjli Sep-25-2023 (created)
    binaryValue := globalOTDTable.GlobalOTDTable_CARRC_Export().ExecuteToXLS( true ).AsBinaryValue();
    return binaryValue;
  *]
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Import.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Import (
  GlobalOTDTable globalOTDTable,
  String base64String
)
{
  TextBody:
  [*
    binaryData := BinaryData::FromBase64EncodedString( base64String );
    globalOTDTable.GlobalOTDTable_CARRC_Import().ExecuteFromXLS( &binaryData, true );
  *]
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/TypeIndex_CapacityAllocationResultsRuleConfigurationTypeIndex.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
TypeIndex CapacityAllocationResultsRuleConfigurationTypeIndex
{
  Attributes:
  [
    TypeIndexAttribute
    {
      ModelElement: ModuleMaterialCode
    }
    TypeIndexAttribute
    {
      ModelElement: PanelMaterialCode
    }
    TypeIndexAttribute
    {
      ModelElement: StockingPointID
    }
  ]
}
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/_ROOT_Type_CapacityAllocationResultsRuleConfiguration.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type CapacityAllocationResultsRuleConfiguration
{
  #keys: '5[414702.0.374991403][414702.0.374991401][0.0.0][414702.0.374991402][414702.0.374991404]'
  BaseType: Object
  Description: '产能分配结果,规则配置'
  StructuredName: 'CapacityAllocationResultsRuleConfigurations'
}
_Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl
@@ -10,7 +10,7 @@
    // yypsybs Sep-15-2023 (created)
    existList := selectuniquevalues( parent, CapacityAndSaleBudgeFilterYear, item, item.YearNo() );
    nowYear := Date::Today().Year();
    for( i := nowYear - 10; i <= nowYear; i++ ) {
    for( i := nowYear - 10; i <= nowYear + 5; i++ ) {
      if( existList.Find( i ) = -1 ) {
        parent.CapacityAndSaleBudgeFilterYear( relnew, 
                                               YearNo := i );
_Main/BL/Type_CustomerOrder/Attribute_OrderTag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute OrderTag
{
  #keys: '3[414724.0.177854629][414724.0.177854628][414724.0.177854630]'
  Description: '订单状态,冲减后赋值,纯预测,有预测,无预测,反签,授权'
  ValueType: String
}
_Main/BL/Type_FilllingCapacityOrderScheme/StaticMethod_CreateFillingCapacityOrderScheme.qbl
@@ -8,7 +8,7 @@
  TextBody:
  [*
    // NBoTk Sep-14-2023 (created)
    info('test' )
    fillingCapacityOrders := selectset( owner,FillingCapacityOrder,fillingOrder,
                                        not fillingOrder.IsFilling()
                                        );
@@ -43,27 +43,35 @@
    {
      e.SchemeName(schemeName);
      e.IsFilling(true);
      filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, e);
    }
    // ç‰ˆæœ¬å·
    verNoOrder := select( filllingCapacityOrderScheme,FillingCapacityOrder,o,
                                 o.VerNo() <> ''
                                 )
    
    // éœ€è¦å°†é”€å”®è®¢å•和预售订单同时保存到方案中
    traverse( owner,CustomerAndForecastOrder,order)
    {
         fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := order.BusinessType(),Customer := order.Customer(),CustomerID := order.CustomerID(),
                                                                           DemandDate := order.DemandDate(),ForecastDemandDate := order.ForecastDemandDate(),IsFilling := true,
                                                                           OrderType := '提拉',PanelBigSheetQuantity := order.PanelBigSheetQuantity(),ProductID := order.ProductID(),
                                                                           Quantity := order.Quantity(),SalesSegmentName := order.SalesSegmentName(),SalesAmount := order.SalesAmount(),
                                                                           SchemeName := schemeName,StockingPointID := order.StockingPointID(),UnitOfMeasureName := order.UnitOfMeasureName(),
                                                                           VerNo := verNoOrder.VerNo()
                                                                           );
        filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    }
    //traverse( owner,CustomerAndForecastOrder,order)
    //{
    //
    //     fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := order.BusinessType(),Customer := order.Customer(),CustomerID := order.CustomerID(),
    //                                                                       DemandDate := order.DemandDate(),ForecastDemandDate := order.ForecastDemandDate(),IsFilling := true,
    //                                                                       OrderType := '提拉',PanelBigSheetQuantity := order.PanelBigSheetQuantity(),ProductID := order.ProductID(),
    //                                                                       Quantity := order.Quantity(),SalesSegmentName := order.SalesSegmentName(),SalesAmount := order.SalesAmount(),
    //                                                                       SchemeName := schemeName,StockingPointID := order.StockingPointID(),UnitOfMeasureName := order.UnitOfMeasureName(),
    //                                                                       VerNo := order.VerNo()
    //                                                                       );
    //
    //    filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    //}
    //// æ–°å¢žåç­¾/授权订单 è®¢å•信息加入填产
    //traverse( owner,H_Forecast,hf)
    //{
    //          fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := hf.Department(),Customer := hf.CustomName(),CustomerID := hf.CustomCode(),
    //                                                                       DemandDate := Date::Today(),ForecastDemandDate := Date::Today(),IsFilling := true,
    //                                                                       OrderType := '提拉',PanelBigSheetQuantity := 0,ProductID := '',
    //                                                                       Quantity := hf.ForecastQty(),SalesSegmentName := '',SalesAmount := 0,
    //                                                                       SchemeName := schemeName,StockingPointID := '',UnitOfMeasureName := hf.Util(),
    //                                                                       VerNo := ''
    //                                                                       );
    //
    //    filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    //}
  *]
}
_Main/BL/Type_FilllingCapacityOrderScheme/StaticMethod_DeleteDetails.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: #root
StaticMethod DeleteDetails (
  MacroPlan owner,
  String schemeName
)
{
  TextBody:
  [*
    // NBoTk Sep-25-2023 (created)
    details := selectset( owner,FillingCapacityOrder,f,true);
    traverse( details,Elements,e)
    {
      owner.FillingCapacityOrder(reldelete,e);
    }
  *]
}
_Main/BL/Type_GlobalDTOTable/Method_SetIsLinkedWithFinishedGoodAttributes.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
Quintiq file version 2.0
#parent: #root
Method SetIsLinkedWithFinishedGoodAttributes
{
  Description: 'Method to traverse the supply chain to determine if there are any products that are not used to produce finished goods.'
  TextBody:
  [*
    // Reset IsLinkedWithFinishedGood
    traverse( this, Global_MappingProduct_MP, instance )
    {
      instance.IsLinkedWithFinishedGood( false );
    }
    traverse( this, Global_MappingOperation, instance )
    {
      instance.IsLinkedWithFinishedGood( false );
    }
    traverse( this, Global_MappingOperationBOM, instance )
    {
      instance.IsLinkedWithFinishedGood( false );
    }
    productspool := selectset( this, Global_MappingProduct_MP, product,
                               product.ProductMajorType() <> "成品" );
    operationspool := this.Global_MappingOperation( relget );
    operationbomspool := this.Global_MappingOperationBOM( relget );
    // Traverse each finished good and search for linked products/operations/lanes
    traverse( this, Global_MappingProduct_MP, product,
              product.ProductMajorType() = "成品" )
    {
      product.SetIsLinkedWithFinishedGoodAttributes_Recursive( 0, // depth
                                                               100, // maxdepth
                                                               productspool,
                                                               operationspool,
                                                               operationbomspool );
    }
  *]
}
_Main/BL/Type_Global_MappingOperation/Attribute_IsLinkedWithFinishedGood.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsLinkedWithFinishedGood
{
  #keys: '3[157968.0.1145180207][157968.0.1145180206][157968.0.1145180208]'
  Description: 'Updated procedurally for checking whether this object is used to produce a finished good.'
  ValueType: Boolean
}
_Main/BL/Type_Global_MappingOperationBOM/Attribute_IsLinkedWithFinishedGood.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsLinkedWithFinishedGood
{
  #keys: '3[157968.0.1145180190][157968.0.1145180189][157968.0.1145180191]'
  Description: 'Updated procedurally for checking whether this object is used to produce a finished good.'
  ValueType: Boolean
}
_Main/BL/Type_Global_MappingProduct_MP/Attribute_IsLinkedWithFinishedGood.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute IsLinkedWithFinishedGood
{
  #keys: '3[157968.0.1145180168][157968.0.1145180167][157968.0.1145180169]'
  Description: 'Updated procedurally for checking whether this product is used to produce a finished good.'
  ValueType: Boolean
}
_Main/BL/Type_Global_MappingProduct_MP/Method_SetIsLinkedWithFinishedGoodAttributes_Recursive.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,83 @@
Quintiq file version 2.0
#parent: #root
Method SetIsLinkedWithFinishedGoodAttributes_Recursive (
  Number depth,
  Number maxdepth,
  Global_MappingProduct_MPs productspool,
  Global_MappingOperations operationspool,
  Global_MappingOperationBOMs operationbomspool
)
{
  Description: 'Method to traverse the supply chain recursively to determine if there are any products that are not used to produce finished goods.'
  TextBody:
  [*
    if( not this.IsLinkedWithFinishedGood() )
    {
      depth := depth + 1;
      this.IsLinkedWithFinishedGood( true );
      if( depth <= maxdepth )
      {
        operations := selectset( operationspool, Elements, operation,
                                 not operation.IsLinkedWithFinishedGood()
                                 and operation.BusinessType() = this.BusinessType()
                                 and operation.ProductID() = this.ID() );
        operationspool.Remove( operations );
        traverse( operations, Elements, operation )
        {
          operation.IsLinkedWithFinishedGood( true );
          operationboms := selectset( operationbomspool, Elements, operationbom,
                                      not operationbom.IsLinkedWithFinishedGood()
                                      and operationbom.BusinessType() = operation.BusinessType()
                                      and operationbom.OrganCode() = operation.OrganCode()
                                      and operationbom.ProcessSection() = operation.ProcessSection()
                                      and operationbom.ProductCode() = operation.ProductID() );
          operationbomspool.Remove( operationboms );
          traverse( operationboms, Elements, operationbom )
          {
            operationbom.IsLinkedWithFinishedGood( true );
            componentproduct := Global_MappingProduct_MP::FindTypeIndexIDAndBusinessType( operationbom.ComponentCode(),
                                                                                          operationbom.BusinessType() );
            if( guard( not componentproduct.IsLinkedWithFinishedGood(), false ) )
            {
              productspool.Remove( componentproduct );
              componentproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive( depth,
                                                                                maxdepth,
                                                                                productspool,
                                                                                operationspool,
                                                                                operationbomspool );
            }
            if( operationbom.AlternativeMaterialCode() <> ""
                and operationbom.AlternativeMaterialCode() <> operationbom.ComponentCode() )
            {
              alternativeproduct := Global_MappingProduct_MP::FindTypeIndexIDAndBusinessType( operationbom.AlternativeMaterialCode(),
                                                                                              operationbom.BusinessType() );
              if( guard( not alternativeproduct.IsLinkedWithFinishedGood(), false ) )
              {
                productspool.Remove( alternativeproduct );
                alternativeproduct.SetIsLinkedWithFinishedGoodAttributes_Recursive( depth,
                                                                                    maxdepth,
                                                                                    productspool,
                                                                                    operationspool,
                                                                                    operationbomspool );
              }
            }
          }
        }
      }
      else
      {
        debuginfo( "Product:", this.ID(),
                   "| BusinessType:", this.BusinessType(),
                   "| Max depth reached, stop searching... (", depth, ")" );
      }
    }
  *]
}
_Main/BL/Type_H_CustomOrder/_ROOT_Type_H_CustomOrder.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type H_CustomOrder
{
  #keys: '5[414724.0.177854646][414724.0.177854644][0.0.0][414724.0.177854645][414724.0.177854647]'
  BaseType: Object
  Description: '重建后的订单'
  StructuredName: 'H_CustomOrders'
}
_Main/BL/Type_H_FunctionClass/StaticMethod_NewStaticMethod.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl
@@ -1,17 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SM_GetBOMBySKU (
  MacroPlan Owner,
  GlobalOTDTable GlobData,
  String SKU
) as MappingBOM
) as Global_MappingOperationBOM
{
  Description: '根据SKU获取BOM'
  TextBody:
  [*
    Obj :=null( MappingBOM,constcontent );
    if( not isnull( Owner) and SKU.Length()>0)
    Obj :=null( Global_MappingOperationBOM,constcontent );
    if( not isnull( GlobData) and SKU.Length()>0)
    {
      Obj := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU);
      Obj := select( GlobData,Global_MappingOperationBOM,ObjM,ObjM.ProductCode()=SKU);
    }
    return Obj;
  *]
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl
@@ -6,7 +6,8 @@
  Number ProductQty,
  String ForecastId,
  String VCode,
  Date NDate
  Date NDate,
  GlobalOTDTable GlobData
) as owning JSON
{
  Description: '获取物料信息'
@@ -26,15 +27,15 @@
      if( Owner.MappingBOM(relsize )>0)
      {
        // å¾—到下一级数据
        AllData:= selectset( Owner, MappingBOM,object,object.ComponentCode()=ParentSKU);
        ObjProduct := null( MappingProduct,constcontent );
        AllData:= selectset( GlobData, Global_MappingOperationBOM,object,object.ComponentCode()=ParentSKU);
        ObjProduct := null( Product_MP,constcontent );
        ObjUnit := null( Unit,constcontent );
        MaterialType:="";
        MaterialName:="-";
        StockPoint := "";
        NRate:=1.0;
        NComponentsUsed :=0.0;
        ObjBOM := H_FunctionClass::SM_GetBOMBySKU( Owner,ParentSKU);
        ObjBOM := H_FunctionClass::SM_GetBOMBySKU(GlobData,ParentSKU);
        if(not isnull( ObjBOM))
        {
          NRate := ObjBOM.ComponentOutputRate();
@@ -56,10 +57,10 @@
              // ç‰©æ–™ç±»åž‹
              MaterialType := Obj.ProductType();
              // å¾—到物料信息
              ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner, Obj.ProductCode());
              ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner,Obj.ProductCode());
              if( not isnull( ObjProduct))
              {
                MaterialType:= ObjProduct.ProductMajorType();
                MaterialType:= ObjProduct.ParentID();
                MaterialName:=ObjProduct.Name();
              }
              ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ProductCode());
@@ -87,6 +88,10 @@
                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "原材料",NeedDate := NDate
                                    ,NeedQty := [Number](ProductQty*0.8).Round( 0),Unit := "PCS"
                                    ,StockPoint :="测试",MaterialName := "测试数据" );
        Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU_M"+ (nCount+1).AsQUILL() ,ForecastID := ForecastId,OrgCode := "ORG_000",VCode := VCode
                                    ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := "半成品",NeedDate := NDate
                                    ,NeedQty := [Number](ProductQty*0.8).Round( 0),Unit := "PCS"
                                    ,StockPoint :="测试",MaterialName := "测试数据" );
      }
      bStatus := true;
      strMsg :="";
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo#1.qbl
@@ -3,16 +3,17 @@
StaticMethod SM_GetProductInfo (
  MacroPlan Owner,
  String SKU
) as MappingProduct
) as Product_MP
{
  Description: '根据SKU获取物料信息'
  TextBody:
  [*
    // æ ¹æ®SKU获取物料信息
    Obj := null( MappingProduct,constcontent );
    // æ³¨æ„ï¼šç‰©æ–™ç±»åž‹å– ParentID
    Obj := null( Product_MP,constcontent );
    if( not isnull( Owner) and SKU.Length()>0)
    {
      Obj:= select( Owner,MappingProduct,ObjMP,ObjMP.ID()=SKU);
      Obj:= select( Owner,Product_MP,ObjMP,ObjMP.ID()=SKU);
    }
    return Obj;
  *]
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl
@@ -2,7 +2,8 @@
#parent: #root
StaticMethod SM_InitialForcastDataEx (
  MacroPlan Owner,
  Boolean IsNew
  Boolean IsNew,
  String VersionCode
) as owning JSON
{
  Description: '初始化订单预测信息'
@@ -11,36 +12,46 @@
    /**********************************初始化订单预测信息***************************************
    *注:未确定上游预测订单更新逻辑和数据有效性,这里进行二次处理,新生成一个列表,避免上游信息变动严重
    *    å½±å“åŠŸèƒ½
    *
    *参数:IsNew æ˜¯å¦æ—¶å…¨æ–°æ•°æ®ï¼Œå…¨æ–°æ•°æ®ä¼šå°†æ—§çš„æ•°æ®æ¸…除,然后重新填充,不是全新数据,将累计和更新
    *****************************************************************************************/
    // åˆå§‹åŒ–结果
    bStatus := false;
    strMsg :="";
    
    try{
      // æ¸…除旧数据,重新拉取
      if(Owner.H_Forecast(relget ).Size()>0)
      // 20230925 ä¼˜åŒ–的业务逻辑,如果时新数据,则预测数据全部干掉,然后重新生成
      if( IsNew)
      {
        traverse( Owner,H_Forecast,Obj,not isnull( Obj))
        if( Owner.H_OrderForecastRealQty(relsize )>0)
        {
          Owner.H_Forecast(reldelete, Obj);
          traverse( Owner,H_OrderForecastRealQty,Obj,not isnull( Obj))
          {
            Owner.H_OrderForecastRealQty(reldelete, Obj);
          }
        }
      }
      
      // èŽ·å–é¢„æµ‹è®¢å•ï¼šå½“æœˆå’Œä¹‹åŽçš„3个月预测数据 ä¸”预测数量>0的
      AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object,object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth()
                           and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
      AllData:= selectset( Owner, Product_MP.SalesDemand.astype( Forecast ),object,
                           object.EndDate().DateTime().Date() >= Date::ActualDate().StartOfMonth()
                           // éœ€æ±‚给未来4个月的数据,但可能并不准确,暂时注释掉,四个月限制
                           //and object.EndDate().DateTime().Date() <= Date::ActualDate().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth().StartOfNextMonth()
                           and object.Quantity()>0 );
      
      CustomName:="";
      DepartMent:="";
      idx:=0;
      strOrderCode:="";
      RQty:=0;
      ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent );
    //  ObjPruduct :=null( MappingProduct,constcontent );
      SKU:="";
      SKUName := "";
      traverse( AllData,Elements,Obj,not isnull(Obj))
      {
        // æ²¡æœ‰å®¢æˆ·ä¿¡æ¯å’Œéƒ¨é—¨ä¿¡æ¯ï¼ŒSalesSegmentName=事业部+“-”+客户名称
        CustomName := Obj.SalesSegmentName();
        DepartMent := Obj.SalesSegmentName();
        SKU :=Obj.ProductID();
        // è¿™é‡Œç”¨æŸ¥æ‰¾åŽæˆªå–,因为不确定有几个横线,以第一个为准
        idx:=Obj.SalesSegmentName().FindString( "-",0);
        if(idx>0)
@@ -48,61 +59,40 @@
          DepartMent:=Obj.SalesSegmentName().SubString( 0,idx);
          CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1));
        }
        else
        // èŽ·å–ç‰©æ–™ä¿¡æ¯
        ObjMaterial := H_FunctionClass::SM_GetProductInfo( Owner,Obj.ProductID());
        if(not isnull( ObjMaterial))
        {
          CustomName :=Obj.SalesSegmentName();
          DepartMent := "部门数据获取失败!"
          SKUName := ObjMaterial.Name();
        }
    //    // ä»Žç‰©æ–™è¡¨èŽ·å–ç‰©æ–™ä¿¡æ¯
    //    ObjPruduct := H_FunctionClass::SM_GetProductInfo( Owner,Obj.ProductID());
    //    if( not isnull( ObjPruduct))
    //    {
    //
    //    }
         // å†™å…¥é¢„测订单信息表
         strOrderCode:=H_FunctionClass::SM_GenerateID( "OF");
         Owner.H_Forecast(relnew,OrderCode := strOrderCode,
                                SKU := Obj.ProductID(),
                               CustomCode := CustomName,
                               CustomName := CustomName,
                               Util:=Obj.UnitOfMeasureName(),
                               NeedTime:=Obj.EndDate(),
                               ForecastQty:=[Number]Obj.Quantity().Round( 0),
                               StockingPointID := Obj.StockingPointID(),
                               Department:=DepartMent);
         // å†™å…¥é¢„测实时信息
         ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomID()=CustomName and ObjO.SKU()=Obj.ProductID()
         // æ›´æ–°é¢„测信息,非新数据更新信息。
         ObjOrderRealQty := select( Owner,H_OrderForecastRealQty,ObjO,ObjO.CustomCode()=CustomName and ObjO.SKU()=Obj.ProductID()
                                    and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() )
         if( isnull( ObjOrderRealQty))
         if( IsNew or isnull( ObjOrderRealQty))
         {
             Owner.H_OrderForecastRealQty(relnew,CustomID := CustomName,CustomName := CustomName,ForecatsQty := [Number]Obj.Quantity().Round( 0)
                                           ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR")
                                           ,Month := Obj.EndDate(),OrderCode := strOrderCode,SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName());
           Owner.H_OrderForecastRealQty(relnew,CustomCode := CustomName,CustomName := CustomName,ForecastQty := [Number]Obj.Quantity().Round( 0)
                                         ,ForecatsRealQty := [Number]Obj.Quantity().Round( 0),ID := H_FunctionClass::SM_GenerateID( "OR")
                                         ,Month := Obj.EndDate(),SKU := Obj.ProductID(),Unit := Obj.UnitOfMeasureName()
                                         ,Department := DepartMent,VCode := VersionCode,SKUName := SKUName);
         }
         else
         {
           if( IsNew)
           {
              ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0));
              ObjOrderRealQty.ForecatsRealQty([Number]Obj.Quantity().Round( 0));
           }
           else
           {
              if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecatsQty())
              {
                    RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecatsQty();
                    RQty := ObjOrderRealQty.ForecatsRealQty() + RQty;
                    if( RQty<0)
                    {
                        RQty :=0;
                    }
                    ObjOrderRealQty.ForecatsQty([Number]Obj.Quantity().Round( 0));
                    ObjOrderRealQty.ForecatsRealQty(RQty);
              }
           }
           // æ›´æ–°äº†é¢„测数据,则计算实时数据增减
            if( [Number]Obj.Quantity().Round( 0)<> ObjOrderRealQty.ForecastQty())
            {
                  RQty := [Number]Obj.Quantity().Round( 0) - ObjOrderRealQty.ForecastQty();
                  RQty := ObjOrderRealQty.ForecatsRealQty() + RQty;
                  if( RQty<0)
                  {
                      RQty :=0;
                  }
                  ObjOrderRealQty.ForecastQty([Number]Obj.Quantity().Round( 0));
                  ObjOrderRealQty.ForecatsRealQty(RQty);
            }
         }
      }
      
      bStatus := true;
      strMsg :="订单预测初始化成功!";
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_MaterialReverse.qbl
@@ -39,7 +39,7 @@
        nNoHaveForecastQty:=0;//五预测数量
        // èŽ·å–é¢„æµ‹æ•°é‡ï¼ˆå®¢æˆ·+SKU+月份 ç†è®ºæ˜¯æ²¡æœ‰ç‰©æ–™é¢„测)
        OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU 
                                              and Obj.CustomID() = CustomerCode
                                              and Obj.CustomCode() = CustomerCode
                                              and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2"));                                   
        if ( not isnull(OrderForecast))
        {
@@ -195,10 +195,9 @@
          {
            Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := SKU,
                                                                                            Month := Date::ActualDate(),
                                                                                            CustomID := CustomerCode,
                                                                                            CustomCode := CustomerCode,
                                                                                            CustomName := "客户表获取",
                                                                                            OrderCode := "-",
                                                                                            ForecatsQty :=0,
                                                                                            ForecastQty := 0,
                                                                                            ForecatsRealQty :=nForecastQtyNew,
                                                                                            Unit := "SKU åˆ°ç‰©æ–™è¡¨èŽ·å–");
          } 
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl
@@ -26,161 +26,198 @@
      if( not isnull( Owner))
      {
        // åˆå§‹åŒ–预测信息
        JResult := H_FunctionClass::SM_InitialForcastDataEx( Owner,IsNew);
        JResult := H_FunctionClass::SM_InitialForcastDataEx( Owner,IsNew,"--");
        // é¢„测初始化完成
        if( JResult.Get( "Status").GetBoolean())
        {
          traverse( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder,not isnull( ObjOrder))
          nForecastQtyOld := 0; //原预测数量
          nReverseQtyOld :=0;   //原反签数量
          nAuthorizeQtyOld :=0; //原授权数量
          nForecastQtyNew :=0;  //计算后的预测数量
          nReverseQtyNew :=0;   //计算后的反签数量
          nAuthorizeQtyNew :=0; //计算后的授权数量
          nHaveForecastQty :=0; //有预测数量
          nNoHaveForecastQty:=0;//五预测数量
          OrderQuantity := 0;   //剩余订单数量
          traverse( Owner,SalesDemand.astype( CustomerOrder ),ObjOrder)
          {
            //----------------------------------------以下后去预测 åç­¾ æŽˆæƒæ•°æ®ä¿¡æ¯----------------
            nForecastQtyOld := 0; //原预测数量
            nReverseQtyOld :=0;   //原反签数量
            nAuthorizeQtyOld :=0; //原授权数量
            nForecastQtyNew :=0;  //计算后的预测数量
            nReverseQtyNew :=0;   //计算后的反签数量
            nAuthorizeQtyNew :=0; //计算后的授权数量
            nHaveForecastQty :=0; //有预测数量
            nNoHaveForecastQty:=0;//五预测数量
            OrderQuantity := 0;   //剩余订单数量
            // èŽ·å–é¢„æµ‹æ•°é‡ï¼ˆå®¢æˆ·+SKU+月份 ç†è®ºæ˜¯æ²¡æœ‰ç‰©æ–™é¢„测)
            OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
                                                  and Obj.CustomID() = ObjOrder.CustomerName()
                                                  and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2"));
            if ( not isnull(OrderForecast))
            // ç›´æŽ¥åˆ é™¤æœ¬æœˆä¹‹å‰çš„订单
            if( ObjOrder.EndDate()<Date::ActualDate().StartOfMonth())
            {
                nForecastQtyOld := OrderForecast.ForecatsRealQty();
                nForecastQtyNew := nForecastQtyOld;
            }
            // èŽ·å–åç­¾æ•°é‡ï¼ˆåªåˆ¤æ–­SKU)
            ObjReverse := select(Owner, H_ReverseRealQty , Obj, Obj.SKU() = ObjOrder.ProductID());
            if ( not isnull(ObjReverse))
            {
                nReverseQtyOld := ObjReverse.ReverseRealQty();
                nReverseQtyNew := nReverseQtyOld;
            }
            // èŽ·å–æŽˆæƒæ•°é‡ï¼ˆå®¢æˆ·ID+SKU)
            ObjAuthorize := select(Owner, H_AuthorizeRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
                                                                    and Obj.CustomID() = ObjOrder.CustomerName());
            if ( not isnull(ObjAuthorize))
            {
                nAuthorizeQtyOld := ObjAuthorize.AuthorizeRealQty();
                nAuthorizeQtyNew :=nAuthorizeQtyOld;
            }
            //-----------------------------以下订单冲减--------------------
            // æŽˆæƒè®°å½•ID
            AQID := H_FunctionClass::SM_GenerateID( "AQ");
            // è®¢å•剩余数量
            OrderQuantity := [Number]ObjOrder.Quantity().Round( 0);
            // 1 å…ˆå†²æŽˆæƒ
            if( OrderQuantity>0 and nAuthorizeQtyOld>0)
            {
               OrderQuantity := OrderQuantity-nAuthorizeQtyOld;
               nAuthorizeQtyNew :=0;
               if( OrderQuantity<0)
               {
                 nAuthorizeQtyNew := abs(OrderQuantity);
                 OrderQuantity :=0;
               }
            }
            // 2 å†å†²åç­¾
            if( OrderQuantity>0 and nReverseQtyOld>0)
            {
               OrderQuantity := OrderQuantity-nReverseQtyOld;
               nReverseQtyNew :=0;
               if( OrderQuantity<0)
               {
                 nReverseQtyNew := abs(OrderQuantity);
                 OrderQuantity :=0;
               }
            }
            // 3 æœ€åŽå†²é¢„测
            if( OrderQuantity>0 and nForecastQtyOld>0)
            {
               //默认订单数量>预测数量
               OrderQuantity := OrderQuantity-nForecastQtyOld;
               nForecastQtyNew :=0;
               nHaveForecastQty := nForecastQtyOld;
               nNoHaveForecastQty := OrderQuantity;
               if( OrderQuantity<0)
               {
                 nForecastQtyNew := abs(OrderQuantity);
                 OrderQuantity :=0;
                 nHaveForecastQty := nForecastQtyOld - nForecastQtyNew;
                 nNoHaveForecastQty := 0;
               }
            }
            // è®°å½•动作
            Owner.H_OrderRecord(relnew,
                                   ID := AQID,
                                   VCode:=VCode,
                                   SKU:=ObjOrder.ProductID(),
                                   ReverseQty := nReverseQtyNew,
                                   CustomerCode := ObjOrder.CustomerName(),
                                   CustomerName := ObjOrder.CustomerName(),
                                   ForecastQty := nForecastQtyNew,
                                   OrderDateTime := ObjOrder.EndDate(),
                                   OrderQty := [Number]ObjOrder.Quantity().Round( 0),
                                   OrderCode:=ObjOrder.OrderID(),
                                   AuthorizeQty := nAuthorizeQtyNew,
                                   ReverseDeductQty := nReverseQtyOld - nReverseQtyNew,
                                   AuthorizeDeductQty := 0,
                                   ForecastHitQty :=nHaveForecastQty,
                                   ForecastNoHitQty :=nNoHaveForecastQty,
                                   OperateType := OperatorType,
                                   Operator := Operator,
                                   Unit := ObjOrder.UnitOfMeasureName(),
                                   OperateQty := [Number]ObjOrder.Quantity().Round( 0),
                                   OperateTime := DateTime::ActualTime());
            // æ›´æ–°å½“前反签数量
            if( not isnull( ObjReverse))
            {
              ObjReverse.ReverseRealQty(nReverseQtyNew);
               ObjOrder.Delete();
            }
            else
            {
              Owner.H_ReverseRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "RQ"),SKU := ObjOrder.ProductID(),Unit := ObjOrder.UnitOfMeasureName()
                                      ,ReverseRealQty := nReverseQtyNew);
            }
            // æ›´æ–°æŽˆæƒ
            if( not isnull( ObjAuthorize))
            {
              ObjAuthorize.AuthorizeRealQty(nAuthorizeQtyNew);
              //----------------------------------------以下后去预测 åç­¾ æŽˆæƒæ•°æ®ä¿¡æ¯----------------
              nForecastQtyOld := 0; //原预测数量
              nReverseQtyOld :=0;   //原反签数量
              nAuthorizeQtyOld :=0; //原授权数量
              nForecastQtyNew :=0;  //计算后的预测数量
              nReverseQtyNew :=0;   //计算后的反签数量
              nAuthorizeQtyNew :=0; //计算后的授权数量
              nHaveForecastQty :=0; //有预测数量
              nNoHaveForecastQty:=0;//五预测数量
              OrderQuantity := 0;   //剩余订单数量
              // èŽ·å–é¢„æµ‹æ•°é‡ï¼ˆå®¢æˆ·+SKU+月份 ç†è®ºæ˜¯æ²¡æœ‰ç‰©æ–™é¢„测)
              OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
                                                    and Obj.CustomCode() = ObjOrder.CustomerName()
                                                    and Obj.Month().Format( "YM2") =ObjOrder.EndDate().Format( "YM2"));
              if ( not isnull(OrderForecast))
              {
                  nForecastQtyOld := OrderForecast.ForecatsRealQty();
                  nForecastQtyNew := nForecastQtyOld;
              }
              // èŽ·å–åç­¾æ•°é‡ï¼ˆåªåˆ¤æ–­SKU)
              ObjReverse := select(Owner, H_ReverseRealQty , Obj, Obj.SKU() = ObjOrder.ProductID());
              if ( not isnull(ObjReverse))
              {
                  nReverseQtyOld := ObjReverse.ReverseRealQty();
                  nReverseQtyNew := nReverseQtyOld;
              }
              // èŽ·å–æŽˆæƒæ•°é‡ï¼ˆå®¢æˆ·ID+SKU)
              ObjAuthorize := select(Owner, H_AuthorizeRealQty , Obj, Obj.SKU() = ObjOrder.ProductID()
                                                                      and Obj.CustomID() = ObjOrder.CustomerName());
              if ( not isnull(ObjAuthorize))
              {
                  nAuthorizeQtyOld := ObjAuthorize.AuthorizeRealQty();
                  nAuthorizeQtyNew :=nAuthorizeQtyOld;
              }
              //-----------------------------以下订单冲减--------------------
              // æŽˆæƒè®°å½•ID
              AQID := H_FunctionClass::SM_GenerateID( "AQ");
              // è®¢å•剩余数量
              OrderQuantity := [Number]ObjOrder.Quantity().Round( 0);
              // 1 å…ˆå†²æŽˆæƒ
              if( OrderQuantity>0 and nAuthorizeQtyOld>0)
              {
                 OrderQuantity := OrderQuantity-nAuthorizeQtyOld;
                 nAuthorizeQtyNew :=0;
                 if( OrderQuantity<0)
                 {
                   nAuthorizeQtyNew := abs(OrderQuantity);
                   OrderQuantity :=0;
                 }
              }
              // 2 å†å†²åç­¾
              if( OrderQuantity>0 and nReverseQtyOld>0)
              {
                 OrderQuantity := OrderQuantity-nReverseQtyOld;
                 nReverseQtyNew :=0;
                 if( OrderQuantity<0)
                 {
                   nReverseQtyNew := abs(OrderQuantity);
                   OrderQuantity :=0;
                 }
              }
              // 3 æœ€åŽå†²é¢„测
              if( OrderQuantity>0)
              {
                 //默认订单数量>预测数量
                 OrderQuantity := OrderQuantity-nForecastQtyOld;
                 nForecastQtyNew :=0;
                 nHaveForecastQty := nForecastQtyOld;
                 nNoHaveForecastQty := OrderQuantity;
                 if( OrderQuantity<0)
                 {
                   nForecastQtyNew := abs(OrderQuantity);
                   OrderQuantity :=0;
                   nHaveForecastQty := nForecastQtyOld - nForecastQtyNew;
                   nNoHaveForecastQty := 0;
                 }
              }
              // è®°å½•动作
              Owner.H_OrderRecord(relnew,
                                     ID := AQID,
                                     VCode:=VCode,
                                     SKU:=ObjOrder.ProductID(),
                                     ReverseQty := nReverseQtyNew,
                                     CustomerCode := ObjOrder.CustomerName(),
                                     CustomerName := ObjOrder.CustomerName(),
                                     ForecastQty := nForecastQtyNew,
                                     OrderDateTime := ObjOrder.EndDate(),
                                     OrderQty := [Number]ObjOrder.Quantity().Round( 0),
                                     OrderCode:=ObjOrder.OrderID(),
                                     AuthorizeQty := nAuthorizeQtyNew,
                                     ReverseDeductQty := nReverseQtyOld - nReverseQtyNew,
                                     AuthorizeDeductQty := 0,
                                     ForecastHitQty :=nHaveForecastQty,
                                     ForecastNoHitQty :=nNoHaveForecastQty,
                                     OperateType := OperatorType,
                                     Operator := Operator,
                                     Unit := ObjOrder.UnitOfMeasureName(),
                                     OperateQty := [Number]ObjOrder.Quantity().Round( 0),
                                     OperateTime := DateTime::ActualTime());
              // çº¯é¢„测订单
              if( nForecastQtyNew>0)
              {
                FOrder := ObjOrder.Copy();
                FOrder.OrderTag("纯预测");
                FOrder.Quantity(nForecastQtyNew);
              }
              // æœ‰é¢„测订单
              if(nHaveForecastQty>0)
              {
                HFOrder := ObjOrder.Copy();
                HFOrder.OrderTag("有预测");
                HFOrder.Quantity(nHaveForecastQty);
              }
              // æ— é¢„测
              if(nNoHaveForecastQty>0)
              {
                NHFOrder := ObjOrder.Copy();
                NHFOrder.OrderTag("无预测");
                NHFOrder.Quantity(nNoHaveForecastQty);
              }
              // ERP反签授权订单-接口未提供
              // æ›´æ–°å½“前反签数量
              if( not isnull( ObjReverse))
              {
                ObjReverse.ReverseRealQty(nReverseQtyNew);
              }
              else
              {
                Owner.H_ReverseRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "RQ"),SKU := ObjOrder.ProductID(),Unit := ObjOrder.UnitOfMeasureName()
                                        ,ReverseRealQty := nReverseQtyNew);
              }
              // æ›´æ–°æŽˆæƒ
              if( not isnull( ObjAuthorize))
              {
                ObjAuthorize.AuthorizeRealQty(nAuthorizeQtyNew);
              }
              else
              {
                Owner.H_AuthorizeRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "AR"),SKU := ObjOrder.ProductID(),
                                                                                                Month := ObjOrder.EndDate(),
                                                                                                CustomID := ObjOrder.CustomerName(),
                                                                                                CustomName := ObjOrder.CustomerName(),
                                                                                                OrderCode := "-",
                                                                                                AuthorizeRealQty :=nAuthorizeQtyNew,
                                                                                                Unit := ObjOrder.UnitOfMeasureName());
              }
              // æ›´æ–°é¢„测
              if( not isnull( OrderForecast))
              {
                OrderForecast.ForecatsRealQty(nForecastQtyNew);
              }
              else
              {
                Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := ObjOrder.ProductID(),
                                                                                                Month := ObjOrder.EndDate(),
                                                                                                CustomCode := ObjOrder.CustomerName(),
                                                                                                CustomName := ObjOrder.CustomerName(),
                                                                                                ForecastQty := 0,
                                                                                                ForecatsRealQty :=nForecastQtyNew,
                                                                                                Unit := ObjOrder.UnitOfMeasureName());
              }
              ObjOrder.Delete();
            }
            else
            {
              Owner.H_AuthorizeRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "AR"),SKU := ObjOrder.ProductID(),
                                                                                              Month := ObjOrder.EndDate(),
                                                                                              CustomID := ObjOrder.CustomerName(),
                                                                                              CustomName := ObjOrder.CustomerName(),
                                                                                              OrderCode := "-",
                                                                                              AuthorizeRealQty :=nAuthorizeQtyNew,
                                                                                              Unit := ObjOrder.UnitOfMeasureName());
            }
            // æ›´æ–°é¢„测
            if( not isnull( OrderForecast))
            {
              OrderForecast.ForecatsRealQty(nForecastQtyNew);
            }
            else
            {
              Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := ObjOrder.ProductID(),
                                                                                              Month := ObjOrder.EndDate(),
                                                                                              CustomID := ObjOrder.CustomerName(),
                                                                                              CustomName := ObjOrder.CustomerName(),
                                                                                              OrderCode := "-",
                                                                                              ForecatsQty :=0,
                                                                                              ForecatsRealQty :=nForecastQtyNew,
                                                                                              Unit := ObjOrder.UnitOfMeasureName());
            }
          }
        }
        else
        {
          strMsg:="预测订单信息加载失败,请联系系统管理员!";
        }
        }
      }
    }
    onerror
_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl
@@ -42,7 +42,7 @@
        nNoHaveForecastQty:=0;//五预测数量
        // èŽ·å–é¢„æµ‹æ•°é‡ï¼ˆå®¢æˆ·+SKU+月份 ç†è®ºæ˜¯æ²¡æœ‰ç‰©æ–™é¢„测)
        OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU 
                                              and Obj.CustomID() = CustomerCode
                                              and Obj.CustomCode() = CustomerCode
                                              and Obj.Month().Format( "YM2") = Date::ActualDate().Format( "YM2"));
        if ( not isnull(OrderForecast))
        {
@@ -189,10 +189,9 @@
          {
            Owner.H_OrderForecastRealQty(relnew,ID := H_FunctionClass::SM_GenerateID( "OF"),SKU := SKU,
                                                                                            Month := Date::ActualDate(),
                                                                                            CustomID := CustomerCode,
                                                                                            CustomCode := CustomerCode,
                                                                                            CustomName := CustomName,
                                                                                            OrderCode := "-",
                                                                                            ForecatsQty :=0,
                                                                                            ForecastQty := 0,
                                                                                            ForecatsRealQty :=nForecastQtyNew,
                                                                                            Unit := Unit);
          } 
_Main/BL/Type_H_FunctionClass/StaticMethod_UpdateOrderForecastRealQty.qbl
@@ -24,7 +24,7 @@
        for ( x := 1; x <= 10; x := x + 1 )
        {
            Owner.H_OrderForecastRealQty(relnew,ID := "AAAAA_"+ x.AsQUILL(),SKU := "OTN-01-ACC-00"+ x.AsQUILL() , Month := Date::ActualDate(),CustomName := "小米",
                                          CustomID := "XM0001",OrderCode:="OD0001",ForecatsQty:=1000,ForecatsRealQty:=1000, Unit := "PCS");
                                          CustomCode := "XM0001",ForecastQty := 1000,ForecatsRealQty:=1000, Unit := "PCS");
        }
      }
      //H_FunctionClass := Owner.H_FunctionClass(relnew,VCode_Material := VCode,UpdateTime_Material := Date::ActualDate());
_Main/BL/Type_H_OrderForecastRealQty/Attribute_CustomCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute CustomCode
{
  #keys: '3[414724.0.174571651][414724.0.174571650][414724.0.174571652]'
  Description: '客户ID,唯一建之一'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_CustomID.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Department.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Department
{
  #keys: '3[414724.0.174571661][414724.0.174571660][414724.0.174571662]'
  Description: '部门,没有价值,显示使用'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_ForecastQty.qbl
ÎļþÃû´Ó _Main/BL/Type_H_OrderForecastRealQty/Attribute_ForecatsQty.qbl ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
Attribute ForecatsQty
Attribute ForecastQty
{
  #keys: '3[414724.0.46380358][414724.0.46380357][414724.0.46380359]'
  Description: '预测数量'
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Month.qbl
@@ -3,6 +3,6 @@
Attribute Month
{
  #keys: '3[414724.0.46380308][414724.0.46380307][414724.0.46380309]'
  Description: '月份'
  Description: '月份,唯一键之一'
  ValueType: Date
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_OrderCode.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_H_OrderForecastRealQty/Attribute_SKU.qbl
@@ -3,6 +3,6 @@
Attribute SKU
{
  #keys: '3[414724.0.46380348][414724.0.46380347][414724.0.46380349]'
  Description: 'SKU编码'
  Description: 'SKU编码,唯一键之一'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_SKUName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute SKUName
{
  #keys: '3[414724.0.174572228][414724.0.174572227][414724.0.174572229]'
  Description: 'SKU名称'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_StockingPointID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute StockingPointID
{
  #keys: '3[414724.0.174571671][414724.0.174571670][414724.0.174571672]'
  Description: '库存点,没有价值,显示使用'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_Unit.qbl
@@ -3,6 +3,6 @@
Attribute Unit
{
  #keys: '3[414724.0.46380378][414724.0.46380377][414724.0.46380379]'
  Description: '单位'
  Description: '单位,没有价值,显示使用'
  ValueType: String
}
_Main/BL/Type_H_OrderForecastRealQty/Attribute_VCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute VCode
{
  #keys: '3[414724.0.174571641][414724.0.174571640][414724.0.174571642]'
  Description: '版本号,暂时不适用,默认-'
  ValueType: String
}
_Main/BL/Type_MPSync/Method_CapacityAndSaleBudgeExport.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,143 @@
Quintiq file version 2.0
#parent: #root
Method CapacityAndSaleBudgeExport () as BinaryValue
{
  Description: '导出比较结果'
  TextBody:
  [*
    // generate by generate_export.py
    info( "export start" );
    text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>年度产销预算</name>
    <column><name>删除标记</name><type>String</type></column>
    <column><name>年份</name><type>Number</type></column>
    <column><name>业务部门</name><type>String</type></column>
    <column><name>显示技术分类</name><type>String</type></column>
    <column><name>业务分类</name><type>String</type></column>
    <column><name>产品线/产品规格</name><type>String</type></column>
    <column><name>产品料号</name><type>String</type></column>
    <column><name>Array产地</name><type>String</type></column>
    <column><name>蒸镀产地</name><type>String</type></column>
    <column><name>分辨率</name><type>String</type></column>
    <column><name>出货形态</name><type>String</type></column>
    <column><name>切割数</name><type>String</type></column>
    <column><name>产能当量</name><type>String</type></column>
    <column><name>mask数</name><type>String</type></column>
    <column><name>1月产能(PCS)</name><type>Real</type></column>
    <column><name>2月产能(PCS)</name><type>Real</type></column>
    <column><name>3月产能(PCS)</name><type>Real</type></column>
    <column><name>4月产能(PCS)</name><type>Real</type></column>
    <column><name>5月产能(PCS)</name><type>Real</type></column>
    <column><name>6月产能(PCS)</name><type>Real</type></column>
    <column><name>7月产能(PCS)</name><type>Real</type></column>
    <column><name>8月产能(PCS)</name><type>Real</type></column>
    <column><name>9月产能(PCS)</name><type>Real</type></column>
    <column><name>10月产能(PCS)</name><type>Real</type></column>
    <column><name>11月产能(PCS)</name><type>Real</type></column>
    <column><name>12月产能(PCS)</name><type>Real</type></column>
    <column><name>年产能(PCS)</name><type>Real</type></column>
    <column><name>1月产能(实数大张)</name><type>Real</type></column>
    <column><name>2月产能(实数大张)</name><type>Real</type></column>
    <column><name>3月产能(实数大张)</name><type>Real</type></column>
    <column><name>4月产能(实数大张)</name><type>Real</type></column>
    <column><name>5月产能(实数大张)</name><type>Real</type></column>
    <column><name>6月产能(实数大张)</name><type>Real</type></column>
    <column><name>7月产能(实数大张)</name><type>Real</type></column>
    <column><name>8月产能(实数大张)</name><type>Real</type></column>
    <column><name>9月产能(实数大张)</name><type>Real</type></column>
    <column><name>10月产能(实数大张)</name><type>Real</type></column>
    <column><name>11月产能(实数大张)</name><type>Real</type></column>
    <column><name>12月产能(实数大张)</name><type>Real</type></column>
    <column><name>年产能(实数大张)</name><type>Real</type></column>
    <column><name>1月销售额(W)</name><type>Real</type></column>
    <column><name>2月销售额(W)</name><type>Real</type></column>
    <column><name>3月销售额(W)</name><type>Real</type></column>
    <column><name>4月销售额(W)</name><type>Real</type></column>
    <column><name>5月销售额(W)</name><type>Real</type></column>
    <column><name>6月销售额(W)</name><type>Real</type></column>
    <column><name>7月销售额(W)</name><type>Real</type></column>
    <column><name>8月销售额(W)</name><type>Real</type></column>
    <column><name>9月销售额(W)</name><type>Real</type></column>
    <column><name>10月销售额(W)</name><type>Real</type></column>
    <column><name>11月销售额(W)</name><type>Real</type></column>
    <column><name>12月销售额(W)</name><type>Real</type></column>
    <column><name>年销售额(W)</name><type>Real</type></column>
    </table>';
    xmlDOMImplementation := XMLDOMImplementation::Create();
    xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text );
    tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 );
    toExportList := selectsortedset( this, MappingCapacityAndSaleBudge, item, true, item.OrgCode() + "_" + item.PlaceOfProductionOfArray() );
    info( "export size : " + [String]toExportList.Size() );
    nowNo := 1;
    traverse ( toExportList, Elements, toExport ) {
      info( "nowNo : " + [String]nowNo );
      nowNo := nowNo + 1;
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, ifexpr( toExport.Deleted(), "Y", "N"), "删除标记" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.YearNo(), "年份" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.OrgCode(), "业务部门" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.DisplayTechnology(), "显示技术分类" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.BusinessType(), "业务分类" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.LineAndSpecification(), "产品线/产品规格" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ProductCode(), "产品料号" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.PlaceOfProductionOfArray(), "Array产地" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.PlaceOfProductionOfEvaporation(), "蒸镀产地" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.Resolution(), "分辨率" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.ShippingForm(), "出货形态" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.NumberOfCut(), "切割数" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.CapacityEquivalent(), "产能当量" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, toExport.NumberOfMask(), "mask数" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth1(), "1月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth2(), "2月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth3(), "3月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth4(), "4月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth5(), "5月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth6(), "6月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth7(), "7月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth8(), "8月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth9(), "9月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth10(), "10月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth11(), "11月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSInMonth12(), "12月产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInPCSTotal(), "年产能(PCS)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth1(), "1月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth2(), "2月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth3(), "3月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth4(), "4月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth5(), "5月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth6(), "6月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth7(), "7月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth8(), "8月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth9(), "9月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth10(), "10月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth11(), "11月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetInMonth12(), "12月产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.CapacityInSheetTotal(), "年产能(实数大张)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth1(), "1月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth2(), "2月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth3(), "3月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth5(), "4月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth4(), "5月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth6(), "6月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth7(), "7月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth8(), "8月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth9(), "9月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth10(), "10月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth11(), "11月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountInMonth12(), "12月销售额(W)" );
      ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, [String]toExport.SaleAmountTotal(), "年销售额(W)" );
    }
    xmlDOMSerializer := xmlDOMImplementation.CreateSerializer();
    xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument );
    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) );
    tableGroupHandle := TableGroupHandle::Create( "年度产销预算" );
    tableGroupHandle.Add( tableHandle );
    tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
    info( "export end" );
    return tableBinaryData.AsBinaryValue();
  *]
}
_Main/BL/Type_MPSync/StaticMethod_TestData.qbl
@@ -15,7 +15,7 @@
    info( "productCodeList : " + [String]productCodeList.Size() );
    
    mpSync.MappingCapacityAndSaleBudge( relflush );
    for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year(); year := year + 1 ) {
    for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) {
      for( i := 1; i <= productCodeList.Size(); i := i + 1 ) {
        productCode := productCodeList.Element( i - 1 );
        mappingCapacityAndSaleBudge := mpSync.MappingCapacityAndSaleBudge( relnew, 
@@ -41,7 +41,7 @@
    info( "test MappingCapacityAndSaleBudge size : " + [String]result1.Size() );
    
    mpSync.MappingAnnualBudget( relflush );
    for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year(); year := year + 1 ) {
    for( year := Date::ActualDate().Year() - 10; year <= Date::ActualDate().Year() + 5; year := year + 1 ) {
      for( i := 1; i <= productCodeList.Size(); i := i + 1 ) {
        productCode := productCodeList.Element( i - 1 );
        mappingAnnualBudget := mpSync.MappingAnnualBudget( relnew, 
_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
@@ -77,7 +77,7 @@
                                        0.0, 0.0, false, true );
        }
        
        ManufactureLTProcessSection::CreateOrUpdate( op );
    //    ManufactureLTProcessSection::CreateOrUpdate( op );
    }
    info( "========" )
    // éåކrouting,进行link
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
@@ -42,12 +42,13 @@
                          infinite, 
                          unitofmeasurename );
    
    Unit::CreateOrUpdate( this,
    supplyunit := Unit::CreateOrUpdate( this,
                          "供应商", 
                          "供应商", 
                          "天马集团", 
                          infinite, 
                          unitofmeasurename );
    supplyunit.IsSupplier(true);
    
    Unit::CreateOrUpdate( this, 
                          "整车运输", 
_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl
@@ -8,26 +8,26 @@
  Description: '移交控制权'
  TextBody:
  [*
    // yypsybs Aug-25-2023 (created)
    if( isnull( oldMP ) ) {
        info( "========transfer ManufactureLTImputations to macroPlan " + [String]newMP.MDSID() + "========" );
    } else {
        info( "========transfer ManufactureLTImputations from macroPlan " + [String]oldMP.MDSID() + " to macroPlan " + [String]newMP.MDSID() + "========" );
    }
    // æ¸…空新的,老的复制到新的,清空老的
    if( not isnull( oldMP ) and not isnull( newMP ) ) {
        info( "old ManufactureLTImputation size : " + [String]oldMP.ManufactureLTImputation( relsize ) )
        traverse( oldMP, ManufactureLTImputation, parent, true ) {
            traverse( parent, ManufactureLTProcessSection, child, true ) {
                  ManufactureLTProcessSection::CreateOrUpdate( newMP, parent.OrgCode(), parent.SkuID(), parent.Describe(),
                                                                child.ProcessSection(), child.Sequence(), child.Line(), child.SystemLT(),
                                                               child.Edited(), child.EditLT(), child.Describe() );
            }
        }
    }
    // å¤„理新的的operation
    traverse( newMP, Routing.RoutingStep.Operation, item ) {
         ManufactureLTProcessSection::CreateOrUpdate( item );
    }
    //// yypsybs Aug-25-2023 (created)
    //if( isnull( oldMP ) ) {
    //    info( "========transfer ManufactureLTImputations to macroPlan " + [String]newMP.MDSID() + "========" );
    //} else {
    //    info( "========transfer ManufactureLTImputations from macroPlan " + [String]oldMP.MDSID() + " to macroPlan " + [String]newMP.MDSID() + "========" );
    //}
    //// æ¸…空新的,老的复制到新的,清空老的
    //if( not isnull( oldMP ) and not isnull( newMP ) ) {
    //    info( "old ManufactureLTImputation size : " + [String]oldMP.ManufactureLTImputation( relsize ) )
    //    traverse( oldMP, ManufactureLTImputation, parent, true ) {
    //        traverse( parent, ManufactureLTProcessSection, child, true ) {
    //              ManufactureLTProcessSection::CreateOrUpdate( newMP, parent.OrgCode(), parent.SkuID(), parent.Describe(),
    //                                                            child.ProcessSection(), child.Sequence(), child.Line(), child.SystemLT(),
    //                                                           child.Edited(), child.EditLT(), child.Describe() );
    //        }
    //    }
    //}
    //// å¤„理新的的operation
    //traverse( newMP, Routing.RoutingStep.Operation, item ) {
    //     ManufactureLTProcessSection::CreateOrUpdate( item );
    //}
  *]
}
_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl
@@ -30,11 +30,11 @@
        line := operationNameSplit.Element( 2 );
    }
    child := null( ManufactureLTProcessSection );
    if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) {
        parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" );
        info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() );
        child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" );
    }
    //if( orgCode <> "" and productId <> "" and processStep <> "" and sequence <> "" ) {
    //    parent := ManufactureLTImputation::CreateOrUpdate( op.RoutingStep().Routing().MacroPlan(), orgCode, productId, "" );
    //    info( "DaysAsReal : " + [String]op.UserLeadTime().DaysAsReal() );
    //    child := ManufactureLTProcessSection::CreateOrUpdate( parent, processStep, false, sequence, line, op.UserLeadTime().DaysAsReal(), 0.0, "" );
    //}
    return child;
  *]
}
_Main/BL/Type_MappingSaleBudge/StaticMethod_ExpectedHeaders.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ExpectedHeaders () as owning Strings
{
  TextBody:
  [*
    // yypsybs Jun-30-2023 (created)
    value := construct( structured[String] );
    value.Add( "删除标记" );
    value.Add( "年份" );
    value.Add( "业务部门" );
    value.Add( "显示技术分类" );
    value.Add( "业务分类" );
    value.Add( "产品线/产品规格" );
    value.Add( "产品料号" );
    value.Add( "Array产地" );
    value.Add( "蒸镀产地" );
    value.Add( "分辨率" );
    value.Add( "出货形态" );
    value.Add( "切割数" );
    value.Add( "产能当量" );
    value.Add( "mask数" );
    value.Add( "1月产能(PCS)" );
    value.Add( "2月产能(PCS)" );
    value.Add( "3月产能(PCS)" );
    value.Add( "4月产能(PCS)" );
    value.Add( "5月产能(PCS)" );
    value.Add( "6月产能(PCS)" );
    value.Add( "7月产能(PCS)" );
    value.Add( "8月产能(PCS)" );
    value.Add( "9月产能(PCS)" );
    value.Add( "10月产能(PCS)" );
    value.Add( "11月产能(PCS)" );
    value.Add( "12月产能(PCS)" );
    value.Add( "年产能(PCS)" );
    value.Add( "1月产能(实数大张)" );
    value.Add( "2月产能(实数大张)" );
    value.Add( "3月产能(实数大张)" );
    value.Add( "4月产能(实数大张)" );
    value.Add( "5月产能(实数大张)" );
    value.Add( "6月产能(实数大张)" );
    value.Add( "7月产能(实数大张)" );
    value.Add( "8月产能(实数大张)" );
    value.Add( "9月产能(实数大张)" );
    value.Add( "10月产能(实数大张)" );
    value.Add( "11月产能(实数大张)" );
    value.Add( "12月产能(实数大张)" );
    value.Add( "年产能(实数大张)" );
    value.Add( "1月销售额(W)" );
    value.Add( "2月销售额(W)" );
    value.Add( "3月销售额(W)" );
    value.Add( "4月销售额(W)" );
    value.Add( "5月销售额(W)" );
    value.Add( "6月销售额(W)" );
    value.Add( "7月销售额(W)" );
    value.Add( "8月销售额(W)" );
    value.Add( "9月销售额(W)" );
    value.Add( "10月销售额(W)" );
    value.Add( "11月销售额(W)" );
    value.Add( "12月销售额(W)" );
    value.Add( "年销售额(W)" );
    return &value;
  *]
}
_Main/BL/Type_MappingSaleBudge/StaticMethod_Export.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Export (
  MPSync parent
) as String
{
  TextBody:
  [*
    // yypsybs Jul-1-2023 (created)
    xmlTemplate := '<?xml version="1.0" encoding="UTF-16"?>
    <table>
      <name>MappingCapacityAndSaleBudge</name>
    ';
    //---------------------------------------------------------------------------------------------
    exportFields := MappingCapacityAndSaleBudge::ExportFields();
    exportHeaders := MappingCapacityAndSaleBudge::ExpectedHeaders();
    if( exportFields.Size() <> exportHeaders.Size() ) {
      error( "fields and headers not match" );
    }
    info( "export start" );
    for( i := 0; i < exportFields.Size() ; i++ ) {
      header := exportHeaders.Element( i );
      fieldName := exportFields.Element( i );
      info( "header : " + header )
      info( "fieldName : " + fieldName )
      columnStr := "<column><name>" + header + "</name><type>String</type>";
      traverse( parent, MappingCapacityAndSaleBudge, oldRecord ) {
        field := Reflection::FindAttribute( "MappingCapacityAndSaleBudge", fieldName);
        if( not isnull( field ) ) {
          fieldValue := "";
          if( fieldValue = "" ) {
            fieldValue := guard( field.GetString( oldRecord ), "" );
          }
          if( fieldValue = "" ) {
            fieldValue := guard( [String]field.GetNumber( oldRecord ), "" );
          }
          if( fieldValue = "" ) {
            fieldValue := guard( [String]field.GetReal( oldRecord ), "" );
          }
          if( fieldValue = "" ) {
            fieldValue := guard( ifexpr( field.GetBoolean( oldRecord ), "Y", "N" ), "" );
          }
          if( fieldValue = "" ) {
            fileDateValue := guard( field.GetDate( oldRecord ), Date::MinDate() );
            if( fileDateValue <> Date::MinDate() ) {
              conv := DateTimeToString::StandardConverter();
              conv.SetCustomConversion();
              conv.CustomFormatString( 'yyyyMMdd' );
              fieldValue := conv.Convert( fileDateValue.DateTime() );
            }
          }
          cellStr := '<cell value="' + fieldValue + '"/>';
          columnStr := columnStr + cellStr;
        } else {
          error( "no field " + fieldName + " in type MappingCapacityAndSaleBudge");
        }
      }
      columnStr := columnStr + "</column>";
      xmlTemplate := xmlTemplate + columnStr;
    }
    //---------------------------------------------------------------------------------------------
    xmlTemplate := xmlTemplate + "</table>";
    info( xmlTemplate );
    tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ) );
    XLS::SaveTable( tableHandle, OS::TempPath() + "MappingCapacityAndSaleBudge.xlsx" );
    file := OSFile::Construct();
    file.Open( OS::TempPath() + "MappingCapacityAndSaleBudge.xlsx", "Read", true );
    data := file.ReadBinary()
    info( "export end" );
    return data.AsBase64EncodedString();
  *]
}
_Main/BL/Type_MappingSaleBudge/StaticMethod_ExportFields.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
Quintiq file version 2.0
#parent: #root
StaticMethod ExportFields () as owning Strings
{
  TextBody:
  [*
    // yypsybs Jun-30-2023 (created)
    value := construct( structured[String] );
    value.Add( "Deleted" );
    value.Add( "YearNo" );
    value.Add( "OrgCode" );
    value.Add( "DisplayTechnology" );
    value.Add( "BusinessType" );
    value.Add( "LineAndSpecification" );
    value.Add( "ProductCode" );
    value.Add( "PlaceOfProductionOfArray" );
    value.Add( "PlaceOfProductionOfEvaporation" );
    value.Add( "Resolution" );
    value.Add( "ShippingForm" );
    value.Add( "NumberOfCut" );
    value.Add( "CapacityEquivalent" );
    value.Add( "NumberOfMask" );
    value.Add( "CapacityInPCSInMonth1" );
    value.Add( "CapacityInPCSInMonth2" );
    value.Add( "CapacityInPCSInMonth3" );
    value.Add( "CapacityInPCSInMonth4" );
    value.Add( "CapacityInPCSInMonth5" );
    value.Add( "CapacityInPCSInMonth6" );
    value.Add( "CapacityInPCSInMonth7" );
    value.Add( "CapacityInPCSInMonth8" );
    value.Add( "CapacityInPCSInMonth9" );
    value.Add( "CapacityInPCSInMonth10" );
    value.Add( "CapacityInPCSInMonth11" );
    value.Add( "CapacityInPCSInMonth12" );
    value.Add( "CapacityInPCSTotal" );
    value.Add( "CapacityInSheetInMonth1" );
    value.Add( "CapacityInSheetInMonth2" );
    value.Add( "CapacityInSheetInMonth3" );
    value.Add( "CapacityInSheetInMonth4" );
    value.Add( "CapacityInSheetInMonth5" );
    value.Add( "CapacityInSheetInMonth6" );
    value.Add( "CapacityInSheetInMonth7" );
    value.Add( "CapacityInSheetInMonth8" );
    value.Add( "CapacityInSheetInMonth9" );
    value.Add( "CapacityInSheetInMonth10" );
    value.Add( "CapacityInSheetInMonth11" );
    value.Add( "CapacityInSheetInMonth12" );
    value.Add( "CapacityInSheetTotal" );
    value.Add( "SaleAmountInMonth1" );
    value.Add( "SaleAmountInMonth2" );
    value.Add( "SaleAmountInMonth3" );
    value.Add( "SaleAmountInMonth5" );
    value.Add( "SaleAmountInMonth4" );
    value.Add( "SaleAmountInMonth6" );
    value.Add( "SaleAmountInMonth7" );
    value.Add( "SaleAmountInMonth8" );
    value.Add( "SaleAmountInMonth9" );
    value.Add( "SaleAmountInMonth10" );
    value.Add( "SaleAmountInMonth11" );
    value.Add( "SaleAmountInMonth12" );
    value.Add( "SaleAmountTotal" );
    return &value;
  *]
}
_Main/BL/Type_Operation/Method_OnCommitCustom.qbl
@@ -5,7 +5,7 @@
  TextBody:
  [*
    // yypsybs Aug-25-2023 (created)
    info( "Operation::OnCommitCustom" )
    ManufactureLTProcessSection::CreateOrUpdate( this );
    //info( "Operation::OnCommitCustom" )
    //ManufactureLTProcessSection::CreateOrUpdate( this );
  *]
}
_Main/BL/Type_PriorityFactor/StaticMethod_CheckNameValid.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CheckNameValid (
  MacroPlan owner,
  String businessType,
  Real coefficient,
  String desc,
  String name
) as Boolean
{
  TextBody:
  [*
    // NBoTk Sep-22-2023 (created)
    value := true;
    // åç§°ç›¸åŒè·³è¿‡
    obj := selectobject( owner,PriorityFactor,p,
                        p.BusinessType() = businessType and p.Coefficient() = coefficient and p.Name() = name and p.Desc() = desc
                        );
    if(not isnull( obj) )
    {
        value := false;
    }
    return value;
  *]
}
_Main/BL/Type_PriorityFactor/StaticMethod_InitData.qbl
@@ -1,41 +1,34 @@
Quintiq file version 2.0
#parent: #root
StaticMethod InitData (
  MacroPlan owner
  MacroPlan owner,
  String businessType
)
{
  TextBody:
  [*
    // NBoTk Sep-15-2023 (created)
    info(" init PriorutyFactor");
    // businessType
    // result := "集团面板;专业显示事业部;外卖CELL;非显;运动健康;运动健康事业部;手机事业部;特种显示;汽车电子事业部;车载显示事业部;IT事业部";
    businessTypeList := construct( structured[String]);
    businessTypeList.Add( "集团面板");
    businessTypeList.Add( "专业显示事业部");
    businessTypeList.Add( "外卖CELL");
    businessTypeList.Add( "非显");
    businessTypeList.Add( "运动健康");
    businessTypeList.Add( "运动健康事业部");
    businessTypeList.Add( "手机事业部面板");
    businessTypeList.Add( "特种显示");
    businessTypeList.Add( "汽车电子事业部面板");
    businessTypeList.Add( "车载显示事业部");
    businessTypeList.Add( "IT事业部");
    // æ·»åŠ äº‹ä¸šéƒ¨å¯¹åº”çš„é¢„åˆ¶ä¼˜å…ˆçº§å› å­æ•°æ®
    owner.PriorityFactor(relnew,Name := "客户策略" ,Desc := "将事业部计算的优先级,按该细分项比例阶梯确定该项得分。如:81%≤X≤100% 5分,61%≤X≤80% 4分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "客户等级" ,Desc := "根据需求数据中客户,匹配客户等级",BusinessType := businessType);
    owner.PriorityFactor(relnew,Name := "大张盈利水平" ,Desc := "1、获取客户*SKU大张盈利数 2、定义客户*SKU大张盈利数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "细分市场等级" ,Desc := "1、获取客户*SKU对应细分市场等级 2、匹配需求数据中客户及SKU对应细分市场评分等级,得到对应阶梯得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "需求类型" ,Desc := "匹配不同需求种类,得到对应得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "订单下单时间" ,Desc := "根据需求订单中下单时间与需求时间差值,匹配阶梯得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "产品等级" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "DOI" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := businessType );
    owner.PriorityFactor(relnew,Name := "DSI" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := businessType );
    
    traverse( businessTypeList,Elements,b)
    // ä¼˜å…ˆçº§å› å­ç»†åˆ†
    priorityFactorList := selectset( owner,PriorityFactor,p,
                                     p.BusinessType() = businessType
                                     );
    traverse( priorityFactorList,Elements,e)
    {
        owner.PriorityFactor(relnew,Name := "客户策略" ,Desc := "将事业部计算的优先级,按该细分项比例阶梯确定该项得分。如:81%≤X≤100% 5分,61%≤X≤80% 4分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "客户等级" ,Desc := "根据需求数据中客户,匹配客户等级",BusinessType := b);
        owner.PriorityFactor(relnew,Name := "大张盈利水平" ,Desc := "1、获取客户*SKU大张盈利数 2、定义客户*SKU大张盈利数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "细分市场等级" ,Desc := "1、获取客户*SKU对应细分市场等级 2、匹配需求数据中客户及SKU对应细分市场评分等级,得到对应阶梯得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "需求类型" ,Desc := "匹配不同需求种类,得到对应得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "订单下单时间" ,Desc := "根据需求订单中下单时间与需求时间差值,匹配阶梯得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "产品等级" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "DOI" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := b );
        owner.PriorityFactor(relnew,Name := "DSI" ,Desc := "1、获取客户*SKU DOI&DSI数 2、定义客户*SKUDOI&DSI数阶梯得分 3、匹配需求数据中客户及SKU数据,得到对应阶梯得分", BusinessType := b );
        PriorityFactorDetails::InitData( owner,e);
    }
  *]
}
_Main/BL/Type_PriorityFactorDetails/StaticMethod_CreateTestData.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_PriorityFactorDetails/StaticMethod_InitData.qbl
@@ -1,35 +1,29 @@
Quintiq file version 2.0
#parent: #root
StaticMethod InitData (
  MacroPlan owner
  MacroPlan owner,
  PriorityFactor priorityFactor
)
{
  TextBody:
  [*
    // NBoTk Sep-17-2023 (created)
    
    info(" init PriorutyFactorDetails" );
    traverse( owner, PriorityFactor , p)
    isBusinessType := false;
    if( priorityFactor.BusinessType() <> "集团面板" )
    {
        isBusinessType := false;
        if( p.BusinessType() <> "集团面板" )
        {
            isBusinessType := true;
        }
        p.PriorityFactorDetails(relnew,BusinessType := p.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                     IsRange := false,GradingName := "大盈",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := p.Name());
        p.PriorityFactorDetails(relnew,BusinessType := p.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                     IsRange := false,GradingName := "小盈",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := p.Name());
        p.PriorityFactorDetails(relnew,BusinessType := p.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 0,
                                     IsRange := false,GradingName := "持平",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := p.Name());
        p.PriorityFactorDetails(relnew,BusinessType := p.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -3,
                                     IsRange := false,GradingName := "小亏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := p.Name());
        p.PriorityFactorDetails(relnew,BusinessType := p.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -5,
                                     IsRange := false,GradingName := "大亏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := p.Name());
        isBusinessType := true;
    }
    priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5,
                                            IsRange := false,GradingName := "大盈",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
    priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3,
                                            IsRange := false,GradingName := "小盈",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
    priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 0,
                                            IsRange := false,GradingName := "持平",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
    priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -3,
                                            IsRange := false,GradingName := "小亏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
    priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := -5,
                                            IsRange := false,GradingName := "大亏",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name());
  *]
}
_Main/BL/Type_PriorityPolicy/StaticMethod_RollBackCalcStr.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
Quintiq file version 2.0
#parent: #root
StaticMethod RollBackCalcStr (
  MacroPlan owner,
  String businessType,
  String stringData
) as String
{
  TextBody:
  [*
    // NBoTk Sep-21-2023 (created)
    value := stringData;
    symbolList := construct( structured[String]);
    symbolList.Add( "+")
    symbolList.Add( "-")
    symbolList.Add( "x")
    symbolList.Add( "/")
    symbolList.Add( "(")
    symbolList.Add( ")")
    traverse( symbolList,Elements,e)
    {
        if( stringData.EndsWith( e ))
        {
             end := stringData.Length() - e.Length();
             value := stringData.SubString( 0,end);
        }
    }
    nameList := PriorityFactor::GetDataByBusinessType(  owner,businessType);
    traverse( nameList,Elements,e)
    {
        nameText := e.Name() + "[" + [String]e.Coefficient() + "*L]"
        if( stringData.EndsWith( nameText))
        {
             end := stringData.Length() - nameText.Length();
             value := stringData.SubString( 0,end);
        }
    }
    return value;
  *]
}
_Main/BL/Type_Routing/Method_DoSanityCheckData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
Method DoSanityCheckData (
  output Strings feedback_o,
  output Strings sanitycheckfeedback_o
) declarative remote #extension
{
  TextBody:
  [*
    // Adhi Feb-10-2016 (created)
    isvalid := true;
    isvalid := this.GetHasValidInput( feedback_o, sanitycheckfeedback_o ) and isvalid;
    isvalid := this.GetHasTianmaNonSupplierOperationWithNoInput( feedback_o, sanitycheckfeedback_o ) and isvalid;
    return isvalid;
  *]
}
_Main/BL/Type_Routing/Method_GetHasTianmaNonSupplierOperationWithNoInput.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: #root
Method GetHasTianmaNonSupplierOperationWithNoInput (
  output Strings feedback_o,
  output Strings sanitycheckfeedback_o
) declarative remote as Boolean
{
  TextBody:
  [*
    // Tianma change 20230925: If the unit is not a supplier, raise a data issue if there's no input
    value := forall( this, RoutingStep.Operation, operation,
                     guard( operation.Unit().IsSupplier(), false )
                     or operation.OperationInput( relsize ) > 0 );
    if( not value )
    {
      // Add instance text
      routingname := MacroPlan::GetSubstituteName( this.Name() );
      instance := Translations::MP_Routing_Instance( routingname );
      feedback := SanityCheckMessage::GetFormattedMessage( instance,
                                                           "非供应商操作没有投入料。" );
      feedback_o.Add( feedback );
      sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning() );
    }
    return value;
  *]
}
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart#95.qbl
@@ -2,7 +2,7 @@
#parent: #root
Method CapacityAndSaleBudgeChart (
  MacroPlans macroPlans,
  Boolean isCapacity,
  String saleOrCapacity,
  String groupBy,
  String byBusinessTypeOrByOrgCode,
  CapacityAndSaleBudgeFilterBusinessTypes businessTypes,
@@ -19,7 +19,7 @@
  [*
    // yypsybs Sep-19-2023 (created)
    // true, false
    info( isCapacity );
    info( saleOrCapacity );
    // æœˆ;季度;半年;å¹´
    info( groupBy );
    // é¢æ¿åŸºåœ°;事业部
@@ -82,18 +82,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ),
                                                                     MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ),
                                                                       MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ),
                                                                       Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() )
                                                                       )
                                                   ); 
          }                    
@@ -106,18 +106,18 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ),
                                                                       MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ),
                                                                       MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) )
                                                   );  
            // S&OP
            traverse( macroPlans, Elements, macroPlan ) {
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ),
                                                                         MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ),
                                                                         Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo )
                                                                         )
                                                     ); 
            }                    
@@ -134,9 +134,9 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ),
                                                                       MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ),
                                                                       MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) )
                                                   );  
      //      info( "productCodeList : " + [String]productCodeList.Size() );
            // S&OP
@@ -144,9 +144,9 @@
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ),
                                                                         MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) ,
                                                                         Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo )
                                                                         )
                                                     ); 
            }                    
@@ -162,18 +162,18 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "月-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ),
                                                                       MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ),
                                                                       MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) )
                                                   );  
            // S&OP
            traverse( macroPlans, Elements, macroPlan ) {
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "月-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ),
                                                                         MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ),
                                                                         Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() )
                                                                         )
                                                     ); 
            }
@@ -188,18 +188,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ),
                                                                     MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, year.YearNo() ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, year.YearNo() ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ),
                                                                       MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingCustomerOrder::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) ,
                                                                       Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() )
                                                                       )
                                                   ); 
          }                    
@@ -212,18 +212,18 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ),
                                                                       MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ),
                                                                       MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, year.YearNo(), halfNo ) )
                                                   );  
            // S&OP
            traverse( macroPlans, Elements, macroPlan ) {
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ),
                                                                         MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) ,
                                                                         Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo )
                                                                         )
                                                     ); 
            }                    
@@ -238,18 +238,18 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ),
                                                                       MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ),
                                                                       MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, year.YearNo(), seasonNo ) )
                                                   );  
            // S&OP
            traverse( macroPlans, Elements, macroPlan ) {
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ),
                                                                         MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ),
                                                                         Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo )
                                                                         )
                                                     ); 
            }                    
@@ -266,18 +266,18 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "月-目标",
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ),
                                                                       MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ),
                                                                       MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, year.YearNo(), month.MonthNo() ) )
                                                   );  
            // S&OP
            traverse( macroPlans, Elements, macroPlan ) {
              this.CapacityAndSaleBudgeChartElement( relnew, 
                                                     TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "月-" + macroPlan.ScenarioName(),
                                                     BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                     Quantity := ifexpr( isCapacity,
                                                                         Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ),
                                                                         MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() )
                                                     Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                         MappingCustomerOrder::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) ,
                                                                         Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() )
                                                                         )
                                                     ); 
            }            
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl
@@ -2,7 +2,7 @@
#parent: #root
Method CapacityAndSaleBudgeChart (
  MacroPlans macroPlans,
  Boolean isCapacity,
  String saleOrCapacity,
  String groupBy,
  String byBusinessTypeOrByOrgCode,
  String businessTypeChosen,
@@ -22,7 +22,7 @@
  [*
    // yypsybs Sep-19-2023 (created)
    // true, false
    info( isCapacity );
    info( saleOrCapacity );
    // æœˆ;季度;半年;å¹´
    info( groupBy );
    // é¢æ¿åŸºåœ°;事业部
@@ -61,20 +61,18 @@
        this.CapacityAndSaleBudgeChartElement( relnew, 
                                               TimeStringAndScenarioName := [String]year + "å¹´-目标",
                                               BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                               Quantity := ifexpr( isCapacity,
                                                                   MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ),
                                                                   // todo QID 23
                                                                   MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) )
                                               Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                   MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ),
                                                                   MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) )
                                               );  
        // S&OP
        traverse( macroPlans, Elements, macroPlan ) {
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(),
                                                 BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ),
                                                                     // todo
                                                                     0.0 )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     0.0,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) )
                                                 ); 
        }                    
      }
@@ -86,18 +84,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ),
                                                                     MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) )
                                                   ); 
          }                    
        }
@@ -113,9 +111,9 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ),
                                                                     MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) )
                                                 );  
    //      info( "productCodeList : " + [String]productCodeList.Size() );
          // S&OP
@@ -123,9 +121,9 @@
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) )
                                                   ); 
          }                    
        }
@@ -139,18 +137,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "月-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ),
                                                                     MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "月-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) )
                                                   ); 
          }                    
        }
@@ -163,18 +161,18 @@
        this.CapacityAndSaleBudgeChartElement( relnew, 
                                               TimeStringAndScenarioName := [String]year + "å¹´-目标",
                                               BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                               Quantity := ifexpr( isCapacity,
                                                                   MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ),
                                                                   MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) )
                                               Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                   MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ),
                                                                   MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) )
                                               );  
        // S&OP
        traverse( macroPlans, Elements, macroPlan ) {
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(),
                                                 BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ),
                                                                     0.0 )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     0.0,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) )
                                                 ); 
        }                    
      }
@@ -186,18 +184,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ),
                                                                     MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) )
                                                   ); 
          }                    
        }
@@ -210,18 +208,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ),
                                                                     MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) )
                                                   ); 
          }                    
        }
@@ -235,18 +233,18 @@
          this.CapacityAndSaleBudgeChartElement( relnew, 
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "月-目标",
                                                 BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                 Quantity := ifexpr( isCapacity,
                                                                     MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ),
                                                                     MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) )
                                                 Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                     MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ),
                                                                     MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) )
                                                 );  
          // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew, 
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + monthNoString + "月-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrPlaceOfProductionOfArray := businessType, 
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ),
                                                                       0.0 )
                                                   Quantity := ifexpr( saleOrCapacity = "销售额",
                                                                       0.0,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) )
                                                   ); 
          }                    
        }
_Main/BL/Type_ScenarioManager/StaticMethod_AvailableBusinessTypes.qbl
@@ -1,17 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod AvailableBusinessTypes () as String
StaticMethod AvailableBusinessTypes (
  GlobalOTDTable globalOTDTable
) as String
{
  TextBody:
  [*
    // yypsybs Aug-23-2023 (created)
    strings := "集团面板;专业显示事业部;外卖CELL;非显;运动健康;运动健康事业部;手机事业部;特种显示;汽车电子事业部;车载显示事业部;IT事业部;";
    //strings := "集团面板;专业显示事业部;外卖CELL;非显;运动健康;运动健康事业部;手机事业部;特种显示;汽车电子事业部;车载显示事业部;IT事业部;";
    
    //table := KB_BusinessTypesTable;
    //
    //if( strings.EndsWith( ";" ) ) {
    //    strings := strings.SubString( 0, strings.Length() - 1 );
    //}
    
    if( strings.EndsWith( ";" ) ) {
        strings := strings.SubString( 0, strings.Length() - 1 );
    }
    // ä½¿ç”¨businessType获取数据
    strings := BusinessType::GetBusinessNameStr( globalOTDTable);
    
    return strings;
  *]
_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl
@@ -7,7 +7,7 @@
  String parentunitid,
  String capacitytype,
  String unitofmeasurename
)
) as Unit
{
  TextBody:
  [*
@@ -21,7 +21,7 @@
    unit := Unit::FindById( owner, id );
    
    if( id="天马集团" and isnull( unit ) ){
      owner.Unit( relnew,
      unit := owner.Unit( relnew,
                 ID := id, 
                 Name := name, 
                 UnitOfMeasureName := unitofmeasurename, 
@@ -31,7 +31,7 @@
                 CapacityType := capacitytype );
      }else{
      if( isnull( unit ) ){
        owner.Unit( relnew, ID := id,
        unit := owner.Unit( relnew, ID := id,
                   Name := name, 
                   ParentUnitID := parentunitid, 
                   CapacityType := capacitytype, 
@@ -46,5 +46,7 @@
          unit.UnitOfMeasureName( unitofmeasurename );
          }
        }
    return unit;
  *]
}
_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def
@@ -5,7 +5,7 @@
  #keys: '[414702.0.340554926]'
  Body:
  [*
    CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan );
    CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan, SelectionScenario.Data() );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_ContextMenuSalesFillingCapacity.def
@@ -14,7 +14,7 @@
        Image: 'ELEMENT_BLUE'
        Taborder: 0
        Title: '外卖CELL'
        Tooltip: 'Filling Capacity Scheme List'
        Tooltip: '外卖CELL'
      ]
    }
    Component MenuSalesFillingSchemeDetail
@@ -26,6 +26,7 @@
        Image: 'ELEMENT_ORANGE'
        Taborder: 1
        Title: '填产方案列表'
        Tooltip: '填产方案列表'
      ]
    }
    Component MenuSalesFillingSchemeHistorical
@@ -37,6 +38,7 @@
        Image: 'ELEMENT_ORANGE'
        Taborder: 2
        Title: '填产历史订单列表'
        Tooltip: '填产历史订单列表'
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgTest.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
Quintiq file version 2.0
Component abgTest
{
  #keys: '[414702.0.358311816]'
  BaseType: 'WebActionBarGroup'
  Children:
  [
    Component btnTest
    {
      #keys: '[414702.0.358311907]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'WATER_FISH'
        Label: '测试视图'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Taborder: 4
    Title: 'TestView'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef#1.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
Component applicationDevelopmentActionBarPageDef id:applicationDevelopmentActionBarPageDef_1 #extension
{
  Children:
  [
    #child: abgTest
  ]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingCapac.def
@@ -10,9 +10,8 @@
    Body:
    [*
      // Open view
      //ApplicationMacroPlanner.OpenView( 'Filling Capacity Scheme List',ButtonSalesFillingCapacity);
      ApplicationMacroPlanner.OpenView( 'FillingCapacityOrder', ButtonSalesFillingCapacity );
      //ApplicationMacroPlanner.OpenView( 'FillingCapacityOrder', ButtonSalesFillingCapacity );
      ApplicationScope.ViewManager().ResetUserViewById( "FillingCapacityOrder",true);
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingS#360.def
@@ -10,8 +10,7 @@
    Body:
    [*
      // Open view
      //ApplicationMacroPlanner.OpenView( "FillingCapacitySchemeList",ButtonSalesFillingCapacity);
      ApplicationMacroPlanner.OpenView( "FillingCapacityOrderHistorical");
      ApplicationScope.ViewManager().ResetUserViewById( "FillingCapacityOrderHistorical",true);
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_ContextMenuSalesFillingCapacity_MenuSalesFillingSchem.def
@@ -10,8 +10,7 @@
    Body:
    [*
      // Open view
      //ApplicationMacroPlanner.OpenView( "FillingCapacitySchemeList",ButtonSalesFillingCapacity);
      ApplicationMacroPlanner.OpenView( "FillingCapacitySchemeList");
      ApplicationScope.ViewManager().ResetUserViewById( "FillingCapacitySchemeList",true);
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_abgTest_btnTest_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: abgTest/btnTest
Response OnClick () id:Response_TIANMA_JITUAN_abgTest_btnTest_OnClick
{
  #keys: '[414702.0.358346189]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      ApplicationScope.ViewManager().ResetUserViewById( "Test", true );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def
@@ -11,6 +11,7 @@
      [
        #child: ActionBarPageData
        #child: ActionBarPageSales
        #child: applicationDevelopmentActionBarPageDef_1
      ]
    }
    Component DataHolderCapacityAndSaleBudgeFilterItem
_Main/UI/MacroPlannerWebApp/Component_DialogBusinessType/Method_ClickBtnOk.def
@@ -12,13 +12,11 @@
    // OnOk
    this.ApplyChanges();
    
    businessType := DataHolderBusinessType.Data().BusinessTypeName();
    DataHolderBusinessType.Data().Commit();
    
    //if( not isnull( DataHolderForm.Data() ) )
    //{
    //  // Access the form, select the new assumption
    //  DataHolderForm.Data().ListAssumptions().SelectByKey( DataHolderDialogData.Data().WrappedInstance().Key() );
    //}
    // PriorityFactor
    PriorityFactor::InitData( MacroPlan,businessType);
    
    this.Close();
  *]
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlActions.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions
{
  #keys: '[414702.0.373821470]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[414702.0.373821474]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[414702.0.373821476]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
    Orientation: 'horizontal'
    Padding: 'true'
    Style: 'footer'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlContent.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
Quintiq file version 2.0
Component pnlContent
{
  #keys: '[414702.0.373821468]'
  BaseType: 'WebPanel'
  Children:
  [
    Component efPanelMaterialCode
    {
      #keys: '[414702.0.375722232]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.PanelMaterialCode'
        Label: '面板物料编码'
        Taborder: 0
      ]
    }
    Component efModuleMaterialCode
    {
      #keys: '[414702.0.375722245]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.ModuleMaterialCode'
        Label: '模板产成品ID'
        Taborder: 1
      ]
    }
    Component efDivision
    {
      #keys: '[414702.0.375722257]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.Division'
        Label: '事业部'
        Taborder: 2
      ]
    }
    Component efStockingPointID
    {
      #keys: '[414702.0.375874061]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'DataHolderDialogData.Data.StockingPointID'
        Label: '模组产成品库存点ID'
        Taborder: 3
      ]
    }
  ]
  Properties:
  [
    Padding: 'true'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_Edit.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method Edit (
  CapacityAllocationResultsRuleConfiguration selection
) id:Method_DialogCreateEditCapacityAllocationResultsRuleConfiguration_Edit
{
  #keys: '[414702.0.375759040]'
  Body:
  [*
    // Edits assumption
    data := shadow( selection );
    DataHolderDialogData.Data( &data );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_New.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
Method New () id:Method_DialogCreateEditCapacityAllocationResultsRuleConfiguration_New
{
  #keys: '[414702.0.375317354]'
  Body:
  [*
    capacityAllocationResultsRuleConfiguration := GlobalOTDTable.CapacityAllocationResultsRuleConfiguration( relshadow );
    DataHolderDialogData.Data( &capacityAllocationResultsRuleConfiguration );
    ApplicationMacroPlanner.ShowFormModal( this );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnCancel_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions/btnCancel
Response OnClick () id:Response_pnlActions_btnCancel_OnClick
{
  #keys: '[414702.0.373821480]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnOk_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[414702.0.373821479]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      Form.ApplyChanges();
      data := DataHolderDialogData.Data().WrappedInstance();
      if ( isnull( data ) ) {
        GlobalOTDTable.CapacityAllocationResultsRuleConfiguration( relnew,
                                                                   PanelMaterialCode  := efPanelMaterialCode.Text(),
                                                                   ModuleMaterialCode := efModuleMaterialCode.Text(),
                                                                   Division           := efDivision.Text(),
                                                                   StockingPointID    := efStockingPointID.Text()
                                                                  );
      } else {
        DataHolderDialogData.Data().PanelMaterialCode( efPanelMaterialCode.Text() );
        DataHolderDialogData.Data().ModuleMaterialCode( efModuleMaterialCode.Text() );
        DataHolderDialogData.Data().Division( efDivision.Text() );
        DataHolderDialogData.Data().StockingPointID( efStockingPointID.Text() );
        DataHolderDialogData.Data().Commit();
      }
      Form.Close();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/_ROOT_Component_DialogCreateEditCapacityAllocationResultsRuleConfiguration.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent DialogCreateEditCapacityAllocationResultsRuleConfiguration
{
  #keys: '[414702.0.373821466]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pnlContent
    #child: pnlActions
    Component DataHolderDialogData
    {
      #keys: '[414702.0.375413793]'
      BaseType: 'WebDataHolder'
      Databinding: 'shadow[CapacityAllocationResultsRuleConfiguration]*'
      Properties:
      [
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    Image: 'BEAR'
    Padding: 'false'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditIssueWorkOrder/Response_pnlActions_btnOk_OnClick.def
@@ -4,6 +4,16 @@
{
  #keys: '[414702.0.223820978]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    flag := guard( [Real]efPlannedQuantity.Text() > 0.0, false ) or DataHolderDialogDatas.Data().Size() > 1;
    if ( not flag ) {
      feedback := "请输入一个大于0的数字";
    }
    return flag;
  *]
  QuillAction
  {
    Body:
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactor/Response_pnlActions_btnOk_OnClick.def
@@ -7,10 +7,17 @@
  Precondition:
  [*
    feedback := Translations::FilllingCapacity_ValidateInput();
    checkValue := not Coefficient.Text() = ''
    
    return checkValue;
    if(not checkValue )
    {
      feedback := Translations::PriorityFactor_CheckNameValid();
      editData := DataHolderEditPriorityFactor.Data();
      checkValue := not PriorityFactor::CheckNameValid( MacroPlan,editData.BusinessType(),[Real]Coefficient.Text(),PriorityFactorName.Text(),Desc.Text());
    }
    return checkValue
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Component_pnlContent.def
@@ -36,6 +36,7 @@
        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.RangeMax'
        Label: '最大值'
        Taborder: 4
        Visible: false
      ]
    }
    Component RangeMin
@@ -46,7 +47,8 @@
      [
        DataBinding: 'DataHolderEditPriorityFactorDetails.Data.RangeMin'
        Label: '最小值'
        Taborder: 5
        ReadOnly: true
        Taborder: 6
      ]
    }
    Component GradeDesc
@@ -59,7 +61,7 @@
        FixedSize: false
        Label: '描述'
        SizeRatio: 3
        Taborder: 6
        Taborder: 8
      ]
    }
    Component PriorityFactorName
@@ -84,6 +86,27 @@
        Taborder: 1
      ]
    }
    Component RangeMaxTest
    {
      #keys: '[414382.0.523235618]'
      BaseType: 'WebLabel'
      Properties:
      [
        Label: '最大值'
        Taborder: 5
        Visible: false
      ]
    }
    Component RangeMinText
    {
      #keys: '[414382.0.523361009]'
      BaseType: 'WebLabel'
      Properties:
      [
        Label: '最小值'
        Taborder: 7
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlActions_btnOk_OnClick.def
@@ -12,7 +12,7 @@
    
    if( isRange.Checked() )
    {
       checkValue := not RangeMax.Text() = '' and not RangeMin.Text() = '';
       checkValue := not RangeMax.Text() = '' and not RangeMin.Text() = '' and RangeMax.Text() > RangeMin.Text();
    }
    
    return checkValue;
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnChanged.def
@@ -11,12 +11,18 @@
    [*
      if( this.Checked())
      {
          RangeMax.ReadOnly(false);
          RangeMin.ReadOnly(false)
          RangeMax.Visible(true);
          RangeMin.Visible(true);
          RangeMaxTest.Visible(false);
          RangeMinText.Visible(false);
      }
      else{
          RangeMax.ReadOnly(true);
          RangeMin.ReadOnly(true)
          RangeMax.Visible(false);
          RangeMin.Visible(false);
          RangeMaxTest.Visible(true)
          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMax());
          RangeMinText.Visible(true)
          RangeMinText.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMin());
      }
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Component_DialogEditPriorityFactorDetails/Response_pnlContent_isRange_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
#parent: pnlContent/isRange
Response OnCreated () id:Response_pnlContent_isRange_OnCreated
{
  #keys: '[414382.0.523105450]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      if( this.Checked())
      {
          RangeMax.Visible(true);
          RangeMin.Visible(true);
          RangeMaxTest.Visible(false);
          RangeMinText.Visible(false);
      }
      else{
          RangeMax.Visible(false);
          RangeMin.Visible(false);
          RangeMaxTest.Visible(true)
          RangeMaxTest.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMax());
          RangeMinText.Visible(true)
          RangeMinText.Text([String]DataHolderEditPriorityFactorDetails.Data().RangeMin());
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogFillingCapacityOrder/Component_pnlContent.def
@@ -13,8 +13,7 @@
      [
        AllowEmpty: true
        DataBinding: 'DataHolderFillingCapacityOrder.Data.ProductID'
        Label: 'ProductID'
        Strings: 'productID'
        Label: '商品编码'
        Taborder: 0
      ]
    }
@@ -26,8 +25,7 @@
      [
        AllowEmpty: true
        DataBinding: 'DataHolderFillingCapacityOrder.Data.SalesSegmentName'
        Label: 'SalesSegmentName'
        Strings: 'SalesSagmentName'
        Label: '销售部门'
        Taborder: 1
      ]
    }
@@ -39,8 +37,7 @@
      [
        AllowEmpty: true
        DataBinding: 'DataHolderFillingCapacityOrder.Data.StockingPointID'
        Label: 'StockPointID'
        Strings: 'StockPointID'
        Label: '库存点'
        Taborder: 2
      ]
    }
@@ -52,8 +49,7 @@
      [
        AllowEmpty: true
        DataBinding: 'DataHolderFillingCapacityOrder.Data.Customer'
        Label: 'Customer'
        Strings: 'Customer'
        Label: '客户'
        Taborder: 3
      ]
    }
@@ -64,7 +60,7 @@
      Properties:
      [
        DataBinding: 'DataHolderFillingCapacityOrder.Data.Quantity'
        Label: 'Quantity'
        Label: '数量'
        Mask: 'REAL'
        Taborder: 4
      ]
@@ -77,7 +73,7 @@
      [
        AllowEmpty: true
        DataBinding: 'DataHolderFillingCapacityOrder.Data.UnitOfMeasureName'
        Label: 'UnitOfMeasureName'
        Label: '数量单位'
        Strings: 'UnitName'
        Taborder: 5
      ]
@@ -89,7 +85,7 @@
      Properties:
      [
        DataBinding: 'DataHolderFillingCapacityOrder.Data.SalesAmount'
        Label: 'SalesAmount'
        Label: '销售额'
        Mask: 'NUMBER'
        Taborder: 6
      ]
@@ -101,7 +97,7 @@
      Properties:
      [
        DataBinding: 'DataHolderFillingCapacityOrder.Data.DemandDate'
        Label: 'Demand Date'
        Label: '需求日期'
        Taborder: 8
      ]
    }
@@ -112,7 +108,7 @@
      Properties:
      [
        DataBinding: 'DataHolderFillingCapacityOrder.Data.ForecastDemandDate'
        Label: 'Forecast Demand Date'
        Label: '预期需求日期'
        Taborder: 7
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_DialogFillingCustomerAndForecast/Component_pnlContent.def
@@ -12,7 +12,7 @@
      Properties:
      [
        DataBinding: 'DataHolderFilling.Data.VerNo'
        Label: 'VerNo'
        Label: '版本号'
        Taborder: 0
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def
@@ -1,26 +1,26 @@
Quintiq file version 2.0
Component ListCapacityAllocationResults
{
  #keys: '[414702.0.338762075]'
  #keys: '[414702.0.390053833]'
  BaseType: 'WebList'
  Children:
  [
    Component DataExtractorCapacityAllocationResults
    {
      #keys: '[414702.0.338762076]'
      #keys: '[414702.0.390053834]'
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'GlobalOTDTable'
        Source: 'GlobalOTDTable'
        DataType: 'structured[CapacityAllocationResultsRuleConfiguration]'
        Source: 'FormCapacityAllocationResultsRuleConfiguration.DataHolderSelectCapacityAllocationResultsRuleConfiguration'
        Taborder: 0
        Transformation: 'CapacityAllocationResults'
        Transformation: 'Elements.CapacityAllocationResults'
      ]
    }
    #child: listActionBarPageCapacityAllocationResults
    Component DataSetLevelCapacityAllocationResults
    {
      #keys: '[414702.0.338762081]'
      #keys: '[414702.0.390053839]'
      BaseType: 'WebDataSetLevel'
      Children:
      [
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionNumber","title":"VersionNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionNumber"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMeasurementUnit","title":"PanelMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMaterialCode","title":"PanelMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfPanels","title":"NumberOfPanels","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfPanels"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMeasurementUnit","title":"PanelMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMaterialCode","title":"ModuleMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NumberOfModules","title":"NumberOfModules","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NumberOfModules"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMeasurementUnit","title":"ModuleMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMeasurementUnit","title":"ModuleMeasurementUnit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMeasurementUnit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Division","title":"Division","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Division"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"RequirementDate","title":"RequirementDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"RequirementDate"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Date","title":"Date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Date"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Description","title":"Description","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Description"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UserQuantity","title":"UserQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UserQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ManufacturedDate","title":"ManufacturedDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ManufacturedDate"}}]'
        ContextMenu: 'listContextMenuCapacityAllocationResults'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_PanelCapacityAllocationResults.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
Quintiq file version 2.0
Component PanelCapacityAllocationResults
{
  #keys: '[414702.0.391687385]'
  BaseType: 'WebPanel'
  Children:
  [
    Component ButtonGenerateCapacityAllocationResults id:ButtonGenerateCapacityAllocationResults_570
    {
      #keys: '[414702.0.391717497]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'PROCESS'
        Label: '生成数据'
        Taborder: 0
      ]
    }
    Component Export id:Export_398
    {
      #keys: '[414702.0.392048461]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def
@@ -1,7 +1,7 @@
Quintiq file version 2.0
Component listActionBarPageCapacityAllocationResults
{
  #keys: '[414702.0.338762078]'
  #keys: '[414702.0.390053836]'
  BaseType: 'listActionBarPage'
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def
@@ -1,7 +1,7 @@
Quintiq file version 2.0
Component listContextMenuCapacityAllocationResults
{
  #keys: '[414702.0.338762083]'
  #keys: '[414702.0.390053841]'
  BaseType: 'listContextMenu'
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR#39.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelCapacityAllocationResults/ButtonGenerateCapacityAllocationResults_570
Response OnClick () id:Response_FormCapacityAllocationResults_ButtonGenerateCapacityAllocationResults_OnClick_39
{
  #keys: '[414702.0.391717496]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan, DataHolderActiveScenario.Data() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_Export_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelCapacityAllocationResults/Export_398
Response OnClick () id:Response_PanelCapacityAllocationResults_Export_OnClick
{
  #keys: '[414702.0.391791234]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      Application.Download( "产能分配结果.xlsx", CapacityAllocationResults::Export( GlobalOTDTable ).AsBinaryData() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def
@@ -8,17 +8,7 @@
  Children:
  [
    #child: ListCapacityAllocationResults
    Component ButtonGenerateCapacityAllocationResults
    {
      #keys: '[414702.0.340677556]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'PROCESS'
        Label: '生成数据'
        Taborder: 0
      ]
    }
    #child: PanelCapacityAllocationResults
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_ListCapacityAllocationResultsRuleConfiguration.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
Quintiq file version 2.0
Component ListCapacityAllocationResultsRuleConfiguration
{
  #keys: '[414702.0.375255758]'
  BaseType: 'WebList'
  Children:
  [
    Component DataExtractorCapacityAllocationResultsRuleConfiguration
    {
      #keys: '[414702.0.375255759]'
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'GlobalOTDTable'
        Source: 'GlobalOTDTable'
        Taborder: 0
        Transformation: 'CapacityAllocationResultsRuleConfiguration'
      ]
    }
    #child: listActionBarPageCapacityAllocationResultsRuleConfiguration
    Component DataSetLevelCapacityAllocationResultsRuleConfiguration
    {
      #keys: '[414702.0.375255764]'
      BaseType: 'WebDataSetLevel'
      Children:
      [
        #child: listContextMenuCapacityAllocationResultsRuleConfiguration
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PanelMaterialCode","title":"PanelMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PanelMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ModuleMaterialCode","title":"ModuleMaterialCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ModuleMaterialCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Division","title":"Division","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Division"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}}]'
        ContextMenu: 'listContextMenuCapacityAllocationResultsRuleConfiguration'
        Taborder: 2
      ]
    }
  ]
  Properties:
  [
    Taborder: 1
  ]
  ResponseDefinitions:
  [
    DelegatedResponseDefinition OnClick id:Responsedef_ListCapacityAllocationResultsRuleConfiguration_WebMenu_OnClick
    {
      #keys: '[414702.0.373845107]'
      Initiator: 'WebMenu'
      IsInherited: false
      ResponseType: 'OnClick'
      Arguments:
      [
        ResponseDefinitionArgument selection
        {
          #keys: '[811.0.13515064]'
          Binding: 'this.Selection()'
        }
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
Quintiq file version 2.0
Component PanelImportAndExport
{
  #keys: '[414702.0.391512140]'
  BaseType: 'WebPanel'
  Children:
  [
    Component Import
    {
      #keys: '[414702.0.390081531]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'IMPORT1'
        Label: '导入'
        Taborder: 0
      ]
    }
    Component Export
    {
      #keys: '[414702.0.391512453]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listActionBarPageCapacityAllocationResultsRuleConfiguration.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component listActionBarPageCapacityAllocationResultsRuleConfiguration
{
  #keys: '[414702.0.375255761]'
  BaseType: 'listActionBarPage'
  Properties:
  [
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listContextMenuCapacityAllocationResultsRuleConfiguration.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
Quintiq file version 2.0
Component listContextMenuCapacityAllocationResultsRuleConfiguration
{
  #keys: '[414702.0.375255766]'
  BaseType: 'listContextMenu'
  Children:
  [
    Component MenuNew
    {
      #keys: '[414702.0.373851234]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'BEAR'
        Taborder: 3
        Title: '创建规则'
      ]
    }
    Component MenuEdit
    {
      #keys: '[414702.0.376312130]'
      BaseType: 'WebMenu'
      Properties:
      [
        BindOnDoubleClick: true
        Image: 'MESSAGE_EDIT'
        Taborder: 4
        Title: '编辑'
      ]
    }
    Component MenuDelete
    {
      #keys: '[414702.0.382537902]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'DELETE'
        Taborder: 5
        Title: '删除'
      ]
    }
    Component MenuSelectAll
    {
      #keys: '[414702.0.382602953]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'DOCUMENT_SELECTION'
        Shortcut: 'Ctrl+A'
        Taborder: 6
        Title: '全选'
      ]
    }
  ]
  Properties:
  [
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataCh.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: DataHolderSelectCapacityAllocationResultsRuleConfiguration
Response OnDataChanged () id:Response_FormCapacityAllocationResultsRuleConfiguration_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataChanged
{
  #keys: '[414702.0.391379706]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      traverse ( this.Data(), Elements, e ) {
        info( "面板物料ID:", e.PanelMaterialCode() );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: ListCapacityAllocationResultsRuleConfiguration
Response OnClick (
  CapacityAllocationResultsRuleConfiguration selection
) id:Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick
{
  #keys: '[414702.0.381071285]'
  DefinitionID => /ListCapacityAllocationResultsRuleConfiguration/Responsedef_ListCapacityAllocationResultsRuleConfiguration_WebMenu_OnClick
  Initiator: 'MenuDelete'
  QuillAction
  {
    Body:
    [*
      selection.Delete();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: ListCapacityAllocationResultsRuleConfiguration
Response OnClick (
  CapacityAllocationResultsRuleConfiguration selection
) id:Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick
{
  #keys: '[414702.0.376349145]'
  CanBindMultiple: false
  DefinitionID => /ListCapacityAllocationResultsRuleConfiguration/Responsedef_ListCapacityAllocationResultsRuleConfiguration_WebMenu_OnClick
  Initiator: 'MenuEdit'
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCreateEditCapacityAllocationResultsRuleConfiguration );
      dlg.Edit( selection );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListCapacityAllocationResultsRuleConfiguration
Response OnClick () id:Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick
{
  #keys: '[414702.0.375256192]'
  CanBindMultiple: false
  DefinitionID => /ListCapacityAllocationResultsRuleConfiguration/Responsedef_ListCapacityAllocationResultsRuleConfiguration_WebMenu_OnClick
  Initiator: 'MenuNew'
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCreateEditCapacityAllocationResultsRuleConfiguration );
      dlg.New();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClic.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: ListCapacityAllocationResultsRuleConfiguration
Response OnClick () id:Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClick
{
  #keys: '[414702.0.381011855]'
  CanBindMultiple: false
  DefinitionID => /ListCapacityAllocationResultsRuleConfiguration/Responsedef_ListCapacityAllocationResultsRuleConfiguration_WebMenu_OnClick
  Initiator: 'MenuSelectAll'
  QuillAction
  {
    Body:
    [*
      this.SelectAll();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Export_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: PanelImportAndExport/Export
Response OnClick () id:Response_PanelImportAndExport_Export_OnClick
{
  #keys: '[414702.0.391658465]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      Application.Download( "产能分配结果规则.xlsx", CapacityAllocationResultsRuleConfiguration::Export( GlobalOTDTable ).AsBinaryData() );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Import_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
Quintiq file version 2.0
#parent: PanelImportAndExport/Import
Response OnClick () id:Response_PanelImportAndExport_Import_OnClick
{
  #keys: '[414702.0.391899822]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      try {
        uploadJsonString := Application.GetFile();
        if ( uploadJsonString <> "" ) {
          uploadJson := JSON::Parse( uploadJsonString );
          fileName := uploadJson.Get( "name" ).GetString();
          base64String := uploadJson.Get( "data" ).GetString();
          CapacityAllocationResultsRuleConfiguration::Import( GlobalOTDTable, base64String );
          WebMessageBox::Success( "上传成功", true );
        }
      } onerror {
        WebMessageBox::Error( e.GeneralInformation(), true );
      }
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/_ROOT_Component_FormCapacityAllocationResultsRuleConfiguration.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormCapacityAllocationResultsRuleConfiguration
{
  #keys: '[414702.0.373844315]'
  BaseType: 'WebForm'
  Children:
  [
    #child: ListCapacityAllocationResultsRuleConfiguration
    Component DataHolderSelectCapacityAllocationResultsRuleConfiguration
    {
      #keys: '[414702.0.390054479]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[CapacityAllocationResultsRuleConfiguration]*'
      Children:
      [
        Component DataExtractorSelectCapacityAllocationResultsRuleConfiguration
        {
          #keys: '[414702.0.391186862]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'CapacityAllocationResultsRuleConfiguration'
            ExtractionMode: 'Selected'
            Source: 'ListCapacityAllocationResultsRuleConfiguration'
            Taborder: 0
          ]
        }
      ]
      Properties:
      [
        Taborder: 2
      ]
    }
    #child: PanelImportAndExport
  ]
  Properties:
  [
    Image: 'DOCUMENT_CHECKS'
    Title: '产能分配结果报表-规则维护'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def
@@ -38,6 +38,6 @@
  ]
  Properties:
  [
    Taborder: 0
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: ButtonExportDetail
Response OnClick () id:Response_FormCapacityAndSaleBudge_ButtonExportDetail_OnClick
{
  #keys: '[414384.0.887310502]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MPSync );
  *]
  QuillAction
  {
    Body:
    [*
      //Application.Download( "年度产销预算详情.xlsx", MPSync.CapacityAndSaleBudgeExport().AsBinaryData() );
      base64 := MappingCapacityAndSaleBudge::Export( MPSync );
      Application.Download( "年度产销预算详情.xlsx", base64 );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def
@@ -12,6 +12,7 @@
    [*
      MPSync::TestData( MPSync, MacroPlan );
      GlobalOTDTable.InitTestData();
      MPSync.RefreshCapacityAndSaleBudgeFilter();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def
@@ -8,6 +8,17 @@
  Children:
  [
    #child: ListCapacityAndSaleBudge
    Component ButtonExportDetail
    {
      #keys: '[414384.0.887310503]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'EXPORT1'
        Label: '导出'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def
@@ -13,7 +13,7 @@
      CapacityAndSaleBudgeChartElement::TestData( ScenarioManager );
      
      ScenarioManager.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), 
                                                 CheckboxIsCapacity.Checked(),
                                                 DropDownSaleOrCapacity.Text(),
                                                 DropDownTimeGroup.Text(),
                                                 DropDownByBusinessTypeOrByOrgCode.Text(),
                                                 DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(),
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def
@@ -53,16 +53,6 @@
        Visible: false
      ]
    }
    Component CheckboxIsCapacity
    {
      #keys: '[414384.0.857770765]'
      BaseType: 'WebCheckbox'
      Properties:
      [
        Label: '产能'
        Taborder: 5
      ]
    }
    Component DropDownTimeGroup
    {
      #keys: '[414384.0.857771238]'
@@ -87,6 +77,18 @@
        Taborder: 0
      ]
    }
    Component DropDownSaleOrCapacity
    {
      #keys: '[414384.0.886240556]'
      BaseType: 'WebDropDownStringList'
      Properties:
      [
        InitialValue: '销售额'
        Label: '销售额/产能'
        Strings: '销售额;产能'
        Taborder: 5
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_ListSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
Component ListSalesDemands #extension
{
  Children:
  [
    Component DataSetLevelSalesDemands #extension
    {
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPoint_MP.ID","title":"Stocking point","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StockingPoint_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegment_MP.Name","title":"Sales segment","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SalesSegment_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"Customer name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerID","title":"Customer ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"Order ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderLineID","title":"Order line ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderLineID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Order date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product_MP.ID","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Product_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasure_MP.Name","title":"UoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"UnitOfMeasure_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FulfilledQuantity","title":"Fulfilled","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"FulfilledQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeChart","columnid":"Fulfillment","title":"Fulfillment","subtotals":"","tooltip":"","width":-1,"display":"shown","type":"stackbar","relative":true,"attributes":[{"name":"Unfulfilled demand","color":"rgb(232,123,0)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Unfulfilled demand","title":"Unfulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"maxvalue( object.Quantity() - object.FulfilledQuantity(), 0.0).Round( 2)"}},{"name":"Fulfilled demand","color":"rgb(87,184,71)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Fulfilled demand","title":"Fulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"object.FulfilledQuantity().Round( 2)"}}]}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsFirmed","title":"Is firmed","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsFirmed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsEligibleForNetting","title":"Is eligible for netting","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsEligibleForNetting"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PriceUoM","title":"PriceUoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"PriceUoM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderTag","title":"订单标签","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderTag"}}]'
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_PanelAllSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
Component PanelAllSalesDemands #extension
{
  Children:
  [
    #child: ListSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/Component_PanelSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
Component PanelSalesDemands #extension
{
  Children:
  [
    #child: PanelAllSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders/_ROOT_Component_FormCustomerOrders.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#root
#parent: LibMacroPlannerWebUI
OrphanComponent FormCustomerOrders #extension
{
  Children:
  [
    #child: PanelSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_ListSDIP.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
Component ListSDIP
{
  #keys: '[134266.1.1970512356]'
  BaseType: 'ListSDIP'
  IsDerived: true
  Children:
  [
    Component DataSetLevelSDIP
    {
      #keys: '[134266.1.1970512358]'
      BaseType: 'DataSetLevelSDIP'
      IsDerived: true
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsRestricted","title":"ImgIsRestricted","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsRestricted"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"Sales segment","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"Stocking point","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Start","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MasterSalesDemand.UnitOfMeasureName","title":"UoM","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MasterSalesDemand.UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"QuantityInSalesDemandUOM","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"QuantityInSalesDemandUOM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FulfilledQuantityInSalesDemandUOM","title":"Fulfilled","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"FulfilledQuantityInSalesDemandUOM"}},{"attribute":{"classtype":"WebApiDefinitionAttributeChart","columnid":"Fulfillment","title":"Fulfillment","subtotals":"","tooltip":"","width":-1,"display":"shown","type":"stackbar","relative":true,"attributes":[{"name":"Fulfilled demand","color":"rgb(87,184,71)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Fulfilled demand","title":"Fulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"object.FulfilledQuantity().Round( 2)"}},{"name":"Unfulfilled demand","color":"rgb(232,123,0)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Unfulfilled demand","title":"Unfulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"maxvalue( object.Quantity()-object.FulfilledQuantity(),0.0)"}}]}}]'
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_ListSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
Component ListSalesDemands
{
  #keys: '[134266.1.1970507083]'
  BaseType: 'ListSalesDemands'
  IsDerived: true
  Children:
  [
    Component DataExtractorSalesDemands
    {
      #keys: '[134266.1.1970507084]'
      BaseType: 'DataExtractorSalesDemands'
      IsDerived: true
      Properties:
      [
        Transformation: 'Elements.astype(CustomerOrder)'
      ]
    }
    Component DataSetLevelSalesDemands
    {
      #keys: '[134266.1.1970507085]'
      BaseType: 'DataSetLevelSalesDemands'
      IsDerived: true
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPoint_MP.ID","title":"Stocking point","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"StockingPoint_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegment_MP.Name","title":"Sales segment","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"SalesSegment_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"Customer name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerID","title":"Customer ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"Order ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderLineID","title":"Order line ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderLineID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"Order date","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product_MP.ID","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Product_MP.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasure_MP.Name","title":"UoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"UnitOfMeasure_MP.Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FulfilledQuantity","title":"Fulfilled","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"FulfilledQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeChart","columnid":"Fulfillment","title":"Fulfillment","subtotals":"","tooltip":"","width":-1,"display":"shown","type":"stackbar","relative":true,"attributes":[{"name":"Unfulfilled demand","color":"rgb(232,123,0)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Unfulfilled demand","title":"Unfulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"maxvalue( object.Quantity() - object.FulfilledQuantity(), 0.0).Round( 2)"}},{"name":"Fulfilled demand","color":"rgb(87,184,71)","expression":{"classtype":"WebApiDefinitionAttributeExpression","columnid":"Fulfilled demand","title":"Fulfilled demand","subtotals":"","tooltip":"","width":-1,"display":"shown","expressionbody":"object.FulfilledQuantity().Round( 2)"}}]}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsFirmed","title":"Is firmed","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsFirmed"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsEligibleForNetting","title":"Is eligible for netting","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsEligibleForNetting"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PriceUoM","title":"PriceUoM","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"PriceUoM"}}]'
      ]
    }
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelAllSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
Quintiq file version 2.0
Component PanelAllSalesDemands
{
  #keys: '[134266.1.1970497658]'
  BaseType: 'PanelAllSalesDemands'
  IsDerived: true
  Children:
  [
    #child: ListSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelSDIP.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
Component PanelSDIP
{
  #keys: '[134266.1.1970511019]'
  BaseType: 'PanelSDIP'
  IsDerived: true
  Children:
  [
    #child: ListSDIP
  ]
  Properties:
  [
    Title: 'Customer orders at planning level'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Component_PanelSalesDemands.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
Quintiq file version 2.0
Component PanelSalesDemands
{
  #keys: '[134266.1.1970506995]'
  BaseType: 'PanelSalesDemands'
  IsDerived: true
  Children:
  [
    #child: PanelSDIP
    #child: PanelAllSalesDemands
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuCopy_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListSalesDemands
Response OnClick () inherited id:Response_ListSalesDemands_MenuCopy_OnClick
{
  #keys: '[136682.1.799924425]'
  BaseType: 'Response_ListSalesDemands_MenuCopy_OnClick'
  DefinitionID: 'Responsedef_ListSalesDemands_WebMenu_OnClick'
  Initiator: 'MenuCopy'
  QuillAction
  {
    Body:
    [*
      // Copy sales demand
      data := selectset( selection, Elements.astype( CustomerOrder ), co, true, true );
      CustomerOrder::Copy( data );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuCreate_OnClick#715.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListSalesDemands
Response OnClick () inherited id:Response_ListSalesDemands_MenuCreate_OnClick_715
{
  #keys: '[136682.1.803262814]'
  BaseType: 'Response_ListSalesDemands_MenuCreate_OnClick_715'
  DefinitionID: 'Responsedef_ListSalesDemands_WebMenu_OnClick'
  Initiator: 'MenuCreate'
  QuillAction
  {
    Body:
    [*
      //Create new sales demand
      dlg := construct( DialogCreateEditCustomerOrder );
      dlg.New();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/Response_ListSalesDemands_MenuEdit_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: ListSalesDemands
Response OnClick () inherited id:Response_ListSalesDemands_MenuEdit_OnClick
{
  #keys: '[136682.1.803135245]'
  BaseType: 'Response_ListSalesDemands_MenuEdit_OnClick'
  DefinitionID: 'Responsedef_ListSalesDemands_WebMenu_OnClick'
  Initiator: 'MenuEdit'
  QuillAction
  {
    Body:
    [*
      //Edit sales demand
      dlg := construct( DialogCreateEditCustomerOrder );
      data := selectset( selection, Elements.astype( CustomerOrder ), f, true, true );
      dlg.Edit( data );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCustomerOrders226/_ROOT_Component_FormCustomerOrders226.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent FormCustomerOrders226
{
  #keys: '[414724.0.179160850]'
  Accessibility: 'Extensible'
  BaseType: 'FormSalesDemands'
  Children:
  [
    #child: PanelSalesDemands
  ]
  Properties:
  [
    Image: 'SALES_QUOTATION'
    Title: 'Customer orders'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormFillingScheme/Response_ListFillingScheme_MenuDelete_OnClick.def
@@ -21,7 +21,8 @@
  {
    Body:
    [*
      selection.Delete()
      FilllingCapacityOrderScheme::DeleteDetails( MacroPlan,selection.SchemeName());
      selection.Delete();
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormFillingScheme/Response_ListFillingScheme_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: ListFillingScheme
Response OnSelectionChanged (
  FilllingCapacityOrderScheme selection
) id:Response_ListFillingScheme_OnSelectionChanged
{
  #keys: '[414382.0.532640606]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      schemeName := selection.SchemeName();
      list := selectset( MacroPlan,FillingCapacityOrder,order,order.SchemeName() = selection.SchemeName());
      DataHolderFillingScheme.Data(&list);
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormIssueWorkOrder/Component_ListIssueWorkOrder.def
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductionWorkOrderNumber","title":"ProductionWorkOrderNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductionWorkOrderNumber"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductModel","title":"ProductModel","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductModel"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialDescription","title":"MaterialDescription","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialDescription"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlannedQuantity","title":"PlannedQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlannedQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WorkOrderType","title":"WorkOrderType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WorkOrderType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WorkOrderStatus","title":"WorkOrderStatus","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WorkOrderStatus"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductionWorkOrderNumber","title":"ProductionWorkOrderNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductionWorkOrderNumber"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductModel","title":"Product ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductModel"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialDescription","title":"MaterialDescription","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialDescription"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"PlannedQuantity","title":"PlannedQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"PlannedQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WorkOrderType","title":"WorkOrderType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WorkOrderType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WorkOrderStatus","title":"WorkOrderStatus","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WorkOrderStatus"}}]'
        ContextMenu: 'MenuIssueEdit'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Component_FormIssueWorkOrder/Response_ListIssueWorkOrder_MenuEdit_OnClick.def
@@ -8,13 +8,23 @@
  CanBindMultiple: false
  DefinitionID => /ListIssueWorkOrder/Responsedef_ListIssueWorkOrder_WebMenu_OnClick
  Initiator: 'MenuEdit'
  Precondition:
  [*
    flag := DataHolderCheckedMasterPlanReleaseWorkOrderTabulation.Data().Size() > 0;
    if ( not flag ) {
     feedback := "未选择数据";
    }
    return flag;
  *]
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogCreateEditIssueWorkOrder );
      
      dlg.Edit( selection );
      dlg.Edit( DataHolderCheckedMasterPlanReleaseWorkOrderTabulation.Data() );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def
@@ -32,8 +32,8 @@
  ]
  Properties:
  [
    Description: '天花'
    Description: '天华'
    Image: 'CANDLE'
    Title: '天花'
    Title: '天华'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Component_listContextMenuPriorityFactor.def
@@ -5,17 +5,6 @@
  BaseType: 'listContextMenu'
  Children:
  [
    Component MenuInitData
    {
      #keys: '[414382.0.482890505]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'GEAR'
        Taborder: 3
        Title: 'Init Data'
      ]
    }
    Component MenuEdit
    {
      #keys: '[414382.0.485622263]'
@@ -23,7 +12,7 @@
      Properties:
      [
        Image: 'GEAR_EDIT'
        Taborder: 4
        Taborder: 3
        Title: '编辑'
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: DataHolderPriorityFactorBusinessType
Response OnCreated () id:Response_FormPriorityFactor_DataHolderPriorityFactorBusinessType_OnCreated
{
  #keys: '[414382.0.539235155]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
      this.Data(&businessTypeList);
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DataHolderPriorityFactorBusinessType_OnDataChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: DataHolderPriorityFactorBusinessType
Response OnDataChanged () id:Response_FormPriorityFactor_DataHolderPriorityFactorBusinessType_OnDataChanged
{
  #keys: '[414382.0.539235291]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
  QuillAction
  {
    Body:
    [*
      businessTypeList := selectset( GlobalOTDTable,BusinessType,b,true);
      this.Data(&businessTypeList);
      strings := BusinessType::GetBusinessNameStr( GlobalOTDTable );
      DropDownStringListBusinessType.Strings(strings);
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnCreated.def
@@ -2,7 +2,7 @@
#parent: DropDownStringListBusinessType
Response OnCreated () id:Response_FormPriorityFactor_DropDownStringListBusinessType_OnCreated
{
  #keys: '[414382.0.461201807]'
  #keys: '[414382.0.539375553]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_DropDownStringListBusinessType_OnSelectionChanged.def
@@ -9,6 +9,7 @@
  {
    Body:
    [*
      info( "selection" );
      list := PriorityFactor::GetDataByBusinessType( MacroPlan, DropDownStringListBusinessType.Text());
      DataHolderPriorityFactorSelect.Data(&list);
    *]
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_MenuInitData_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnClick#106.def
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/Response_ListPriorityFactor_OnSelectionChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: ListPriorityFactor
Response OnSelectionChanged (
  PriorityFactor selection
) id:Response_ListPriorityFactor_OnSelectionChanged
{
  #keys: '[414382.0.541275298]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
  QuillAction
  {
    Body:
    [*
      info( "selecion change" );
      detaisls := PriorityFactorDetails::GetDataByPriorityFactor( selection, MacroPlan);
      DataHolderPriorityFactorDetailsSelect.Data(&detaisls);
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactor/_ROOT_Component_FormPriorityFactor.def
@@ -38,5 +38,19 @@
        Taborder: 3
      ]
    }
    Component DataHolderPriorityFactorBusinessType
    {
      #keys: '[414382.0.539205233]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[BusinessType]*'
      Properties:
      [
        Taborder: 4
      ]
    }
  ]
  Properties:
  [
    Title: '优先级因子'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityFactorGrading/_ROOT_Component_FormPriorityFactorGrading.def
@@ -33,4 +33,8 @@
    }
    #child: ListPriorityFactorGrading
  ]
  Properties:
  [
    Title: '优先级因子细分'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Component_PanelPriorityPolicyCoefficient#902.def
@@ -21,7 +21,7 @@
      BaseType: 'WebButton'
      Properties:
      [
        Label: '完成'
        Label: '保存'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Component_PanelPriorityPolicyOperationButton#713.def
@@ -11,7 +11,7 @@
      BaseType: 'WebButton'
      Properties:
      [
        Label: '添加因子'
        Label: '添加'
        Taborder: 1
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_DataHolderPriorityPolicySelectBusinessType_OnCreated.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_ListPriorityPolicy_MenuDelete_OnClick.def
@@ -12,6 +12,7 @@
  {
    Body:
    [*
      selection.Delete();
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_ListPriorityPolicy_OnUserSelectionChanged.def
@@ -17,11 +17,11 @@
      str := PriorityFactor::GetNameList( MacroPlan, businessType);
      DropDownStringList.Strings(str);
      
      LabelFormula.Text(selection.Formula());
      LabelCalculateValue.Text(selection.CalculateValue());
      data := shadow( selection );
      DataHolderEditPriorityPolicy.Data( &data );
      //coefficient := PriorityFactor::GetCoeffcientByName( MacroPlan,businessType,DropDownStringList.Text());
      //LabelPriorityPolicyCoefficient.Text([String]coefficient);
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_ButtonAddPriorityPolicy_OnClick.def
@@ -5,6 +5,12 @@
  #keys: '[414382.0.502145449]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    feedback := "该优先级因子已被选择."
    return not LabelFormula.Text() ~ DropDownStringList.Text();
  *]
  QuillAction
  {
    Body:
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_ButtonRollBack_OnClick.def
@@ -13,7 +13,7 @@
      formulaText := PriorityPolicy::RollBackStr( MacroPlan,businessType,LabelFormula.Text());
      LabelFormula.Text(formulaText);
      
      calculateTest := PriorityPolicy::RollBackStr( MacroPlan,businessType,LabelCalculateValue.Text());
      calculateTest := PriorityPolicy::RollBackCalcStr( MacroPlan,businessType,LabelCalculateValue.Text());
      LabelCalculateValue.Text(calculateTest);
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: PanelPriorityPolicyOperationButton/DropDownStringList
Response OnCreated () id:Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnCreated
{
  #keys: '[414382.0.539822108]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  QuillAction
  {
    Body:
    [*
      strs := PriorityFactor::GetNameList( MacroPlan,DropDownStringList.Text());
      this.Strings(strs);
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormPriorityPolicy/Response_PanelPriorityPolicyOperationButton_DropDownStringList_OnSelectionCh.def
@@ -9,11 +9,9 @@
  {
    Body:
    [*
      info( "select changeed" );
      businessType := PriorityPolicyBusinessType.Text();
      coefficient := PriorityFactor::GetCoeffcientByName( MacroPlan,businessType,DropDownStringList.Text());
      LabelPriorityPolicyCoefficient.Text([String]coefficient);
      info("coefficient := " + [String]coefficient  );
    *]
    GroupServerCalls: false
  }
_Main/UI/MacroPlannerWebApp/Component_FormPriorityResult/_ROOT_Component_FormPriorityResult.def
@@ -30,4 +30,8 @@
      ]
    }
  ]
  Properties:
  [
    Title: '优先级结果页面'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick#545.def
@@ -16,7 +16,7 @@
      dlg := construct( DialogCreateEditScenario );
      dlg.checkboxEnableSync().Visible( true );
      dlg.dropDownStringListGeneral().Visible( true );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( true );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( true );
      dlg.NewScenario( ScenarioManager, selection, true );
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenarioAndDoSync_OnClick.def
@@ -17,7 +17,7 @@
      dlg := construct( DialogCreateEditScenario );
      dlg.checkboxEnableSync().Visible( true );
      dlg.dropDownStringListGeneral().Visible( true );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( true );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( true );
      parent := selection.Element( 0 ).Parent();
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick#549.def
@@ -17,7 +17,7 @@
      dlg.checkboxEnableSync().Checked( false );
      dlg.checkboxEnableSync().Visible( false );
      dlg.dropDownStringListGeneral().Visible( false );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( false );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( false );
      dlg.NewScenario( ScenarioManager, selection );
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuCreateScenario_OnClick.def
@@ -18,7 +18,7 @@
      dlg.checkboxEnableSync().Checked( false );
      dlg.checkboxEnableSync().Visible( false );
      dlg.dropDownStringListGeneral().Visible( false );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( false );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( false );
      parent := selection.Element( 0 ).Parent();
_Main/UI/MacroPlannerWebApp/Component_FormScenarioManager/Response_ListScenario_MenuEdit_OnClick.def
@@ -18,7 +18,7 @@
      // Edit scenario
      dlg := construct( DialogCreateEditScenario );
      dlg.dropDownStringListGeneral().Visible( selection.EnableSync() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes() );
      dlg.dropDownStringListGeneral().Strings( ScenarioManager::AvailableBusinessTypes(GlobalOTDTable) );
      dlg.checkboxIsKeyProduct().Visible( selection.EnableSync() );
      dlg.checkboxCreatePurchaseSupplyProduct().Visible( selection.EnableSync() );
      
_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def
@@ -21,9 +21,12 @@
        {
          JInfo := JSON::Parse( SelectItem.ValueJsonString());
          lb_SUK_FAACM.Text(JInfo.Get( "ParentSKU").GetString());
          lb_SKUName_FAACM.Text(JInfo.Get( "ParentSKUName").GetString());
          lb_MaterialCode_FAACM.Text(JInfo.Get( "SKU").GetString());
          lb_MaterialName.Text(JInfo.Get( "MaterialName").GetString());
          lb_Unit_FAACM.Text(JInfo.Get( "Unit").GetString());
          lb_Operator_FAACM.Text(ApplicationMacroPlanner.GetUserName());
          lb_MaterialType_FAACM.Text(JInfo.Get( "MaterialType").GetString());
          txt_CustomID_FAACM.Text(JInfo.Get( "CustomCode").GetString());
          txt_CustomName_FAACM.Text(JInfo.Get( "CustomName").GetString());
        }
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def
@@ -13,19 +13,33 @@
    [*
      if( not isnull( selection))
      {
        // é¢„测订单基本信息
        CustomCode:="";
        CustomName:="";
        SKUName:="";
        SValueJsonString:="";
        // èŽ·å–å®¢æˆ·åç§°å’Œå®¢æˆ·ID
        if(txtSaveForecastData_FM.Text().Length()>0)
        {
           jForecast := JSON::Parse( txtSaveForecastData_FM.Text());
           CustomCode := jForecast.Get( "CustomCode").GetString();
           CustomName := jForecast.Get( "CustomName").GetString();
           SKUName := jForecast.Get( "SKUName").GetString();
        }
        if(selection.MaterialType()="半成品")
        {
          OrderCode:="";
          ForecastID:="";
          if( txtSaveForecastData_FM.Text().Length()>0)
          {
            JForecast := JSON::Parse( txtSaveForecastData_FM.Text());
            OrderCode := JForecast.Get( "OrderCode").GetString();
            JForecast := JSON::Parse(txtSaveForecastData_FM.Text());
            ForecastID := JForecast.Get( "ForecastID").GetString();
          }
         jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), OrderCode,"-",selection.NeedDate());
         jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), ForecastID,"-",selection.NeedDate(),GlobalOTDTable);
          if(jResult.Get( "Status").GetBoolean())
          {
                de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " +  selection.SKU().AsQUILL()
                                                + " and object.ForecastID() = " + OrderCode.AsQUILL()
                                                + " and object.ForecastID() = " + ForecastID.AsQUILL()
                                                );
          }
          else
@@ -35,7 +49,28 @@
        }
        else
        {
            // å¼¹å‡ºç‰©æ–™åç­¾æŽˆæƒ
          SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect");
          if(not isnull(selection))
          {
            SValueJsonString:= JSON::Object().Add( "SKU",selection.SKU())
                        .Add( "MaterialName",selection.MaterialName())
                        .Add( "MaterialType",selection.MaterialType())
                        .Add( "OrgCode",selection.OrgCode())
                        .Add( "Unit",selection.Unit())
                        .Add( "CustomCode",CustomCode)
                        .Add( "ParentSKU",lb_SUK_FM.Text())
                        .Add( "ParentSKUName",SKUName)
                        .Add( "CustomName",CustomName).Build().AsString();
          }
          if(isnull( SelectItem))
          {
            MacroPlan.H_MessagePassing(relnew,FKey := "FrmMaterial",ItemKey := "ListSelect", ValueJsonString:=SValueJsonString);
          }
          else
          {
            SelectItem.ValueJsonString( SValueJsonString);
          }
          Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal");
        }
      }
    *]
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def
@@ -17,11 +17,11 @@
      {
        if( SelectItem.ValueJsonString().Length()>0)
        {
          txtSaveForecastData_FM.Text(  SelectItem.ValueJsonString());
          JSelect := JSON::Parse( SelectItem.ValueJsonString());
          txtSaveForecastData_FM.Text(SelectItem.ValueJsonString());
          JSelect := JSON::Parse(SelectItem.ValueJsonString());
          lb_SUK_FM.Text(JSelect.Get( "SKU").GetString());
          de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " + JSelect.Get( "SKU").GetString().AsQUILL()
                                          + " and object.ForecastID() = " + JSelect.Get( "OrderCode").GetString().AsQUILL()
                                          + " and object.ForecastID() = " + JSelect.Get( "ForecastID").GetString().AsQUILL()
                                          );
        }
      }
_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick#975.def
@@ -20,12 +20,14 @@
      CustomName:="";
      SValue:="";
      SValueJsonString:="";
      SKUName:="";
      // èŽ·å–å®¢æˆ·åç§°å’Œå®¢æˆ·ID
      if(txtSaveForecastData_FM.Text().Length()>0)
      {
         jForecast := JSON::Parse( txtSaveForecastData_FM.Text());
         CustomCode := jForecast.Get( "CustomCode").GetString();
         CustomName := jForecast.Get( "CustomName").GetString();
         SKUName := jForecast.Get( "SKUName").GetString();
      }
      if(not isnull(selection))
      {
@@ -36,6 +38,7 @@
                    .Add( "Unit",selection.Unit())
                    .Add( "CustomCode",CustomCode)
                    .Add( "ParentSKU",lb_SUK_FM.Text())
                    .Add( "ParentSKUName",SKUName)
                    .Add( "CustomName",CustomName).Build().AsString();
      }
      if( isnull( SelectItem))
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def
@@ -11,9 +11,10 @@
      BaseType: 'WebButton'
      Properties:
      [
        ButtonSize: 'compact'
        Description: '订单新增反签/授权'
        Label: '订单新增反签/授权'
        Taborder: 1
        Taborder: 0
      ]
      ResponseDefinitions:
      [
@@ -39,9 +40,10 @@
      BaseType: 'WebButton'
      Properties:
      [
        ButtonSize: 'compact'
        Description: '原料新增反签/授权'
        Label: '原料新增反签/授权'
        Taborder: 2
        Taborder: 1
      ]
      ResponseDefinitions:
      [
@@ -61,30 +63,42 @@
        }
      ]
    }
    Component btn_InitialData778
    {
      #keys: '[414724.0.115504406]'
      BaseType: 'WebButton'
      Properties:
      [
        Description: '加载数据(假的,后续需要对接数据)'
        Label: '加载预测订单数据'
        Taborder: 0
        Visible: false
      ]
    }
    Component btn_OrderH_FOF
    {
      #keys: '[414724.0.165490408]'
      BaseType: 'WebButton'
      Properties:
      [
        ButtonSize: 'compact'
        Description: 'ERO订单冲减'
        Image: 'AMMUNITION_BOX_CLOSED'
        Label: 'ERP订单冲减'
        Taborder: 2
      ]
    }
    Component txt_QueryContent_FOF
    {
      #keys: '[414724.0.172390935]'
      BaseType: 'WebEditField'
      Properties:
      [
        PlaceHolder: '模糊搜索'
        Taborder: 3
      ]
    }
    Component btn_Query_FOF
    {
      #keys: '[414724.0.172390951]'
      BaseType: 'WebButton'
      Properties:
      [
        ButtonSize: 'compact'
        Description: '查询'
        Image: 'VIEW'
        Label: '查询'
        Taborder: 4
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel383.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel647.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel849.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_liH_Forecast.def
@@ -11,8 +11,8 @@
      BaseType: 'WebDataExtractor'
      Properties:
      [
        DataType: 'structured[H_Forecast]'
        Source: 'dh_FOF_H_Forecast'
        DataType: 'structured[H_OrderForecastRealQty]'
        Source: 'dh_FOF_H_OrderForecastRealQty'
        Taborder: 0
        Transformation: 'Elements'
      ]
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"订单编号","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU编码","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"预测数量","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedTime","title":"需求时间","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Util","title":"单位","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Util"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"客户名称","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"销售部门","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Month","title":"月份","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Month"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomName","title":"客户名称","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU编号","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecatsQty","title":"预测数量","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecatsQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecatsRealQty","title":"纯预测数量","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecatsRealQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"单位","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Department","title":"部门","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Department"}}]'
        ContextMenu: 'listContextMenu367'
        Taborder: 2
      ]
@@ -36,6 +36,6 @@
  ]
  Properties:
  [
    Taborder: 7
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_listActionBarPage963.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_listContextMenu687.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_list_ForecastView_FOF#670.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_OnCreated.def
@@ -9,13 +9,15 @@
  {
    Body:
    [*
      // åˆå§‹åŒ–查询参数月份
      ds_Month_FOF.Date(Date::ActualDate());
      // åˆå§‹åŒ–预测数据
      JResult := H_FunctionClass::SM_InitialForcastData( MacroPlan);
      JResult := H_FunctionClass::SM_InitialForcastDataEx( MacroPlan,true,"-");
      if(not JResult.Get( "Status").GetBoolean())
      {
          WebMessageBox::Warning( JResult.Get( "Msg").GetString());
        WebMessageBox::Warning( JResult.Get( "Msg").GetString());
      }
      else
      {
        WebMessageBox::Information( JResult.Get( "Msg").GetString());
      }
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick#222.def
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: Panel351/btn_Add_Material_FOF503
Response OnClick (
  H_Forecast selection
  H_OrderForecastRealQty selection
) id:Response_Panel351_btn_Add_Material_FOF503_OnClick_222
{
  #keys: '[414724.0.145178766]'
@@ -17,28 +17,28 @@
        if( isnull( SelectItem))
        {
           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
                                       Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
                                       ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                         .Add( "Util",selection.Util())
                                                                         .Add( "CustomCode",selection.CustomCode())
                                                                         .Add( "CustomName",selection.CustomName())
                                                                         .Add( "ForecastQty",selection.ForecastQty())
                                                                         .Add( "NeedTime",selection.NeedTime().AsQUILL())
                                                                         .Add( "OrderCode",selection.OrderCode()).Build().AsString());
                                                                       .Add( "SKUName",selection.SKUName())
                                                                       .Add( "Util",selection.Unit())
                                                                       .Add( "CustomCode",selection.CustomCode())
                                                                       .Add( "CustomName",selection.CustomName())
                                                                       .Add( "ForecastQty",selection.ForecastQty())
                                                                       .Add( "ForecastID",selection.ID())
                                                                       .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString());
        }
        else
        {
          SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
                                   .Add( "Util",selection.Util())
                                   .Add( "CustomCode",selection.CustomCode())
                                   .Add( "CustomName",selection.CustomName())
                                   .Add( "ForecastQty",selection.ForecastQty())
                                   .Add( "NeedTime",selection.NeedTime().AsQUILL())
                                   .Add( "OrderCode",selection.OrderCode()).Build().AsString());
                                                   .Add( "SKUName",selection.SKUName())
                                                   .Add( "Util",selection.Unit())
                                                   .Add( "CustomCode",selection.CustomCode())
                                                   .Add( "CustomName",selection.CustomName())
                                                   .Add( "ForecastQty",selection.ForecastQty())
                                                   .Add( "ForecastID",selection.ID())
                                                   .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString());
        }
        
        jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime());
        jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.ID(),"-",selection.Month(),GlobalOTDTable);
        if(jResult.Get( "Status").GetBoolean())
        {
            Application.OpenForm( "FrmMaterial","popout");
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Order_FOF449_OnClick#880.def
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: Panel351/btn_Add_Order_FOF449
Response OnClick (
  H_Forecast selection
  H_OrderForecastRealQty selection
) id:Response_Panel351_btn_Add_Order_FOF449_OnClick_880
{
  #keys: '[414724.0.141244111]'
@@ -16,20 +16,21 @@
        SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
        if( isnull( SelectItem))
        {
           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
                                       Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
                                       ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                         .Add( "Util",selection.Util())
                                                                         .Add( "CustomCode",selection.CustomCode())
                                                                         .Add( "CustomName",selection.CustomName()).Build().AsString());
                                      ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                       .Add( "Util",selection.Unit())
                                                                       .Add( "CustomCode",selection.CustomCode())
                                                                       .Add( "SKUName",selection.SKUName())
                                                                       .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        else
        {
          SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
                                   .Add( "Util",selection.Util())
                                   .Add( "CustomCode",selection.CustomCode())
                                   .Add( "CustomName",selection.CustomName()).Build().AsString());
                                                   .Add( "Util",selection.Unit())
                                                   .Add( "CustomCode",selection.CustomCode())
                                                   .Add( "SKUName",selection.SKUName())
                                                   .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal");  
      }
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_InitialData778_OnClick#971.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Query_FOF_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: Panel351/btn_Query_FOF
Response OnClick () id:Response_Panel351_btn_Query_FOF_OnClick
{
  #keys: '[414724.0.172390950]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      de_dh_FOF_H_Foecast.FixedFilter( "object.SKU().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )"
                                                   + " or " + "object.CustomName().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )"
                                                   + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )"
                                                   + " or " + "object.Department().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )"
                                                   + " or " + "object.StockingPointID().LikeUserLocale( " + txt_QueryContent_FOF.Text().AsQUILL() + " )"
                                      );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel383_btn_Query_FOF_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Material_FOF_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_Add_Order_FOF_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel647_btn_InitialData_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: liH_Forecast
Response OnDoubleClick (
  H_Forecast selection
  H_OrderForecastRealQty selection
) id:Response_liH_Forecast_OnDoubleClick
{
  #keys: '[414724.0.111761136]'
@@ -15,28 +15,28 @@
      if( isnull( SelectItem))
      {
         MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
                                     Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
                                     ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                       .Add( "Util",selection.Util())
                                                                       .Add( "SKUName",selection.SKUName())
                                                                       .Add( "Util",selection.Unit())
                                                                       .Add( "CustomCode",selection.CustomCode())
                                                                       .Add( "CustomName",selection.CustomName())
                                                                       .Add( "ForecastQty",selection.ForecastQty())
                                                                       .Add( "NeedTime",selection.NeedTime().AsQUILL())
                                                                       .Add( "OrderCode",selection.OrderCode()).Build().AsString());
                                                                       .Add( "ForecastID",selection.ID())
                                                                       .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString());
      }
      else
      {
        SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
        SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
                                 .Add( "Util",selection.Util())
                                 .Add( "CustomCode",selection.CustomCode())
                                 .Add( "CustomName",selection.CustomName())
                                 .Add( "ForecastQty",selection.ForecastQty())
                                 .Add( "NeedTime",selection.NeedTime().AsQUILL())
                                 .Add( "OrderCode",selection.OrderCode()).Build().AsString());
                                                 .Add( "SKUName",selection.SKUName())
                                                 .Add( "Util",selection.Unit())
                                                 .Add( "CustomCode",selection.CustomCode())
                                                 .Add( "CustomName",selection.CustomName())
                                                 .Add( "ForecastQty",selection.ForecastQty())
                                                 .Add( "ForecastID",selection.ID())
                                                 .Add( "NeedTime",selection.Month().AsQUILL()).Build().AsString());
      }
      
      jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime());
      jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.ID(),"-",selection.Month(),GlobalOTDTable );
      if(jResult.Get( "Status").GetBoolean())
      {
        Application.OpenForm( "FrmMaterial","popout");
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_list_ForecastView_FOF_OnDoubleClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_list_ForecastView_FOF_OnSelectionChanged.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/_ROOT_Component_FrmOrderForecast.def
@@ -7,100 +7,12 @@
  BaseType: 'WebForm'
  Children:
  [
    #child: Panel849
    #child: list_ForecastView_FOF
    Component dh_FOF_Data
    {
      #keys: '[414724.0.86151860]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[SalesDemandBase]*'
      Children:
      [
        Component de_dh_FOF_Data
        {
          #keys: '[414724.0.86151875]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[SalesDemandBase]'
            Source: 'dh_FOF_ChildrenData'
            Taborder: 0
            Transformation: 'Elements'
          ]
        }
        Component DataExtractor819
        {
          #keys: '[414724.0.107645127]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'MacroPlan'
            Source: 'MacroPlan'
            Taborder: 1
            Transformation: 'SalesDemand'
          ]
        }
      ]
      Properties:
      [
        Taborder: 4
      ]
    }
    #child: Panel961
    Component dh_FOF_ChildrenData
    {
      #keys: '[414724.0.106541535]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[SalesDemandBase]*'
      Children:
      [
        Component de_FOF_ChildrenData_0
        {
          #keys: '[414724.0.106541577]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[Product_MP]'
            Source: 'ApplicationMacroPlanner.DataHolderProduct'
            Taborder: 0
            Transformation: 'Elements.SalesDemand'
          ]
        }
        Component de_FOF_ChildrenData_1
        {
          #keys: '[414724.0.106541594]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[StockingPoint_MP]'
            Source: 'ApplicationMacroPlanner.DataHolderStockingPoint'
            Taborder: 1
            Transformation: 'Elements.SalesDemand'
          ]
        }
        Component de_FOF_ChildrenData_2
        {
          #keys: '[414724.0.106541611]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'structured[SalesSegment_MP]'
            Source: 'ApplicationMacroPlanner.DataHolderSalesSegment'
            Taborder: 2
            Transformation: 'Elements.SalesDemand'
          ]
        }
      ]
      Properties:
      [
        Taborder: 3
      ]
    }
    Component dh_FOF_H_Forecast
    Component dh_FOF_H_OrderForecastRealQty
    {
      #keys: '[414724.0.109053093]'
      BaseType: 'WebDataHolder'
      Databinding: 'structured[H_Forecast]*'
      Databinding: 'structured[H_OrderForecastRealQty]*'
      Children:
      [
        Component de_dh_FOF_H_Foecast
@@ -112,13 +24,13 @@
            DataType: 'MacroPlan'
            Source: 'MacroPlan'
            Taborder: 0
            Transformation: 'H_Forecast'
            Transformation: 'H_OrderForecastRealQty'
          ]
        }
      ]
      Properties:
      [
        Taborder: 6
        Taborder: 2
      ]
    }
    #child: liH_Forecast
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP¶©µ¥_OnClick.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Views/FillingCapacityOrder.vw
@@ -180,10 +180,10 @@
    userconfigurableinformation
    {
    }
    image: ''
    page: ''
    group: ''
    index: 14
    image: ''
    index: 0
    description: ''
  }
  formatversion: 2
_Main/UI/MacroPlannerWebApp/Views/FillingCapacityOrderHistorical.vw
@@ -2,10 +2,10 @@
{
  viewcontents
  {
    image: ''
    page: ''
    group: ''
    index: 0
    image: ''
    description: ''
  }
  formatversion: 2
_Main/UI/MacroPlannerWebApp/Views/PriorityResults.vw
@@ -2244,10 +2244,10 @@
    userconfigurableinformation
    {
    }
    image: ''
    page: ''
    group: ''
    index: 15
    image: ''
    index: 0
    description: ''
  }
  formatversion: 2
_Main/UI/MacroPlannerWebApp/Views/Test.vw
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,177 @@
Quintiq file version 2.0
{
  viewcontents
  {
    forms
    {
      form_FormCapacityAllocationResultsRuleConfiguration
      {
        title: 'QTIANMA_JITUAN::FormCapacityAllocationResultsRuleConfiguration'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormCapacityAllocationResultsRuleConfiguration'
        layout
        {
          mode: 'open'
          rowPosition: 1
          rowSpan: 15
          columnPosition: 1
          columnSpan: 4
        }
        components
        {
          FormCapacityAllocationResultsRuleConfiguration_PanelImportAndExport
          {
            sizeRatio: 1
          }
          FormCapacityAllocationResultsRuleConfiguration_ListCapacityAllocationResultsRuleConfiguration
          {
          }
          FormCapacityAllocationResultsRuleConfiguration_DataSetLevelCapacityAllocationResultsRuleConfiguration
          {
            groupDepth: -1
            column_PanelMaterialCode
            {
              columnId: 'PanelMaterialCode'
              dataPath: 'PanelMaterialCode'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_ModuleMaterialCode
            {
              columnId: 'ModuleMaterialCode'
              dataPath: 'ModuleMaterialCode'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_Division
            {
              columnId: 'Division'
              dataPath: 'Division'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_StockingPointID
            {
              columnId: 'StockingPointID'
              dataPath: 'StockingPointID'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
          }
        }
      }
      form_FormCapacityAllocationResults
      {
        title: 'QTIANMA_JITUAN::FormCapacityAllocationResults'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormCapacityAllocationResults'
        layout
        {
          mode: 'open'
          rowPosition: 1
          rowSpan: 15
          columnPosition: 5
          columnSpan: 8
        }
        components
        {
          FormCapacityAllocationResults_PanelCapacityAllocationResults
          {
            sizeRatio: 1
          }
          FormCapacityAllocationResults_ListCapacityAllocationResults
          {
          }
          FormCapacityAllocationResults_DataSetLevelCapacityAllocationResults
          {
            groupDepth: -1
            column_Date
            {
              columnId: 'Date'
              dataPath: 'Date'
              dataType: 'date'
              index: 0
              subtotals: ''
              width: 150
            }
            column_Description
            {
              columnId: 'Description'
              dataPath: 'Description'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_ID
            {
              columnId: 'ID'
              dataPath: 'ID'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_ProductID
            {
              columnId: 'ProductID'
              dataPath: 'ProductID'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
            column_StockingPointID
            {
              columnId: 'StockingPointID'
              dataPath: 'StockingPointID'
              dataType: 'string'
              index: 4
              subtotals: ''
              width: 150
            }
            column_UserQuantity
            {
              columnId: 'UserQuantity'
              dataPath: 'UserQuantity'
              dataType: 'real'
              index: 5
              subtotals: ''
              width: 150
            }
            column_ManufacturedDate
            {
              columnId: 'ManufacturedDate'
              dataPath: 'ManufacturedDate'
              dataType: 'date'
              index: 6
              subtotals: ''
              width: 150
            }
          }
        }
      }
    }
    userconfigurableinformation
    {
    }
    image: 'BEAR'
    page: ''
    group: ''
    index: 0
    description: ''
  }
  formatversion: 2
  id: 'Test'
  name: 'Test'
  isglobal: false
  isroot: true
}
_Main/UI/MacroPlannerWebApp/Views/Ìî²ú·½°¸Áбí.vw
@@ -180,10 +180,10 @@
    userconfigurableinformation
    {
    }
    group: ''
    index: 0
    image: ''
    page: ''
    group: ''
    description: ''
  }
  formatversion: 2
_Main/UI/MacroPlannerWebApp/_ROOT_Project_MacroPlannerWebApp.qp
@@ -5,7 +5,7 @@
  ProjectProperties
  {
    ApplicationComponentName: 'ApplicationMacroPlanner'
    BuildVersion: '2022.3.0.34'
    BuildVersion: '2022.3.0.32'
    Description: 'Quintiq Macro Planner'
    ProjectKind: 'WebClient'
  }
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/FillingCapacityOrder.vw
ÎļþÒÑɾ³ý
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/FillingCapacityOrderHistorical.vw
@@ -2,6 +2,9 @@
{
  viewcontents
  {
    userconfigurableinformation
    {
    }
    forms
    {
      form_FormCustomerAndForecastOrder
@@ -417,18 +420,11 @@
        }
      }
    }
    userconfigurableinformation
    {
    }
    page: ''
    group: ''
    index: 15
    image: ''
    description: ''
    index: 0
  }
  formatversion: 2
  id: 'FillingCapacityOrderHistorical'
  name: 'FillingCapacityOrderHistorical'
  isglobal: false
  isroot: true
  isroot: false
}
_var/_Main/ProjSettings/MacroPlannerWebApp/Views/Test.vw
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
Quintiq file version 2.0
{
  viewcontents
  {
    forms
    {
      form_FormCapacityAllocationResults
      {
        layout
        {
          rowSpan: 15
          columnPosition: 5
          columnSpan: 8
        }
      }
      form_FormCapacityAllocationResultsRuleConfiguration
      {
        title: 'QTIANMA_JITUAN::FormCapacityAllocationResultsRuleConfiguration'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormCapacityAllocationResultsRuleConfiguration'
        layout
        {
          mode: 'open'
          rowPosition: 1
          rowSpan: 15
          columnPosition: 1
          columnSpan: 4
        }
        components: null
      }
      form_FormPanelPullPlanReport
      {
        _removed: true
      }
    }
  }
  formatversion: 2
  id: 'Test'
  name: 'Test'
  isglobal: false
  isroot: false
}