From 76c7b6120bb5a3076a31f3c3eb7e068f290f68d3 Mon Sep 17 00:00:00 2001 From: limj <limj@taizhitech.com> Date: 星期一, 25 九月 2023 20:47:39 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj --- _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def | 19 _Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl | 4 _Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl | 5 _Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl | 2 _Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl | 7 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/_ROOT_Type_CapacityAllocationResultsRuleConfiguration.qbl | 10 _Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl | 10 _Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 2 _Main/UI/MacroPlannerWebApp/Views/OrderLock.vw | 451 ++++- _Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClic.def | 17 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def | 41 _Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl | 16 _Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl | 65 _Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def | 4 _Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl | 9 _var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc | 20 _Main/BL/Type_MacroPlan/StaticMethod_DoSync#618.qbl | 5 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl | 27 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def | 12 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def | 11 _Main/BL/Type_CapacityAllocationResults/Attribute_ProductID.qbl | 7 _Main/BL/Type_Operation/Method_GetHasValidOperationInputOutput.qbl | 38 _Main/UI/MacroPlannerWebApp/Views/Test.vw | 177 ++ _Main/BL/Type_MappingSaleBudge/StaticMethod_ExportFields.qbl | 64 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def | 4 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def | 5 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def | 23 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick.def | 18 LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd#969.qbl | 12 _Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_abgTest_btnTest_OnClick.def | 16 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def | 14 _Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl | 6 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_ListCapacityAllocationResultsRuleConfiguration.def | 59 _Main/BL/Type_Operation/Method_OnCommitCustom.qbl | 4 _Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl | 9 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Export.qbl | 14 _Main/BL/Type_CapacityAllocationResults/Attribute_Description.qbl | 7 _Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR#39.def | 16 _Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/_ROOT_Component_FormCapacityAllocationResultsRuleConfiguration.def | 43 _Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl | 6 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgTest.def | 25 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593#93.def | 38 _Main/BL/Type_CapacityAllocationResults/Attribute_ID.qbl | 7 _Main/BL/Type_MappingSaleBudge/StaticMethod_ExpectedHeaders.qbl | 64 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def | 1 _Main/BL/Type_Forecast/StaticMethod_DoSync.qbl | 9 _Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Export_OnClick.def | 16 _Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def | 10 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_New.def | 14 _Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl | 8 _Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl | 6 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def | 12 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def | 12 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_StockingPointID.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/_ROOT_Component_DialogCreateEditCapacityAllocationResultsRuleConfiguration.def | 32 _Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl | 21 _Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl | 45 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def | 2 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def | 16 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick#222.def | 21 _Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl | 13 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def | 15 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Import.qbl | 14 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def | 37 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnCancel_OnClick.def | 15 _Main/BL/Type_CapacityAllocationResults/DeclarativeReferenceRelation_CalcCapacityAllocationResultsRuleConfiguration.qbl | 15 _Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def | 11 _Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_CapacityAllocationResult.qbl | 23 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock#844.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def | 6 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick.def | 19 _Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl | 23 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl | 104 + _Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl | 6 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl | 200 ++ _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_Division.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def | 12 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def | 44 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def | 24 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def | 3 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart#95.qbl | 100 _Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def | 12 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_Export_OnClick.def | 16 _Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl | 2 _Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl | 15 _Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def | 2 _Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl | 11 _Main/BL/EDI/Broker_GlobalOTDTable_CAR_Export.qbl | 65 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def | 26 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def | 62 _Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl | 17 _Main/BL/Type_MPSync/Method_CapacityAndSaleBudgeExport.qbl | 143 + _Main/BL/Type_MappingSaleBudge/StaticMethod_Export.qbl | 73 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl | 18 _Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def | 2 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def | 26 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl | 22 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader#545.def | 16 _Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl | 2 _Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def | 2 _Main/BL/Type_CapacityAllocationResults/StaticMethod_Export.qbl | 13 _Main/BL/Type_MacroPlan/Method_MappingProductData.qbl | 11 _Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl | 5 _Main/BL/Type_CapacityAllocationResults/Attribute_ManufacturedDate.qbl | 7 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnOk_OnClick.def | 34 _Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTD.qbl | 23 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listContextMenuCapacityAllocationResultsRuleConfiguration.def | 59 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/TypeIndex_CapacityAllocationResultsRuleConfigurationTypeIndex.qbl | 20 _Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl | 9 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo#1.qbl | 19 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def | 21 _Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Export.qbl | 49 _Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_PanelCapacityAllocationResults.def | 37 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def | 10 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick#975.def | 32 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataCh.def | 18 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def | 2 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl | 50 _Main/BL/Type_CapacityAllocationResults/Attribute_StockingPointID.qbl | 7 _Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl | 23 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialCode.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def | 21 _Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def | 16 _Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl | 5 _Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def | 1 _Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def | 26 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP订单_OnClick.def | 16 _Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl | 35 _var/_Main/ProjSettings/MacroPlannerWebApp/Views/Test.vw | 42 _Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def | 20 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_Edit.def | 17 _Main/BL/Type_CapacityAllocationResults/Attribute_Date.qbl | 7 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def | 7 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl | 120 + _Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl | 8 _Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting#576.qbl | 5 _Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def | 19 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl | 15 _Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl | 10 _Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl | 42 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listActionBarPageCapacityAllocationResultsRuleConfiguration.def | 10 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def | 2 _Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl | 8 _Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_ModuleMaterialCode.qbl | 9 _Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def | 4 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl | 42 _Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl | 86 - _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def | 1 _Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl | 9 _Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def | 2 _Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl | 94 + _Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 11 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlContent.def | 58 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def | 2 _Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def | 2 _Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl | 8 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def | 22 _Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef#1.def | 8 _Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def | 10 _Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlActions.def | 40 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Import_OnClick.def | 29 _Main/BL/Type_MPSync/StaticMethod_TestData.qbl | 4 _Main/BL/Type_CapacityAllocationResults/Attribute_UserQuantity.qbl | 7 _Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def | 4 /dev/null | 20 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def | 10 _Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Import.qbl | 49 _Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl | 8 _Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl | 102 _Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick.def | 21 _Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def | 2 187 files changed, 3,896 insertions(+), 665 deletions(-) diff --git "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" index d91a09e..b5b095a 100644 --- "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" +++ "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" @@ -16,10 +16,14 @@ //get period of start ddstartperiod := select( gp.MacroPlan(), PlanningPeriod, pp, pp.Start() <= start and pp.End() > start ); - // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start - periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() ); - - value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart ); + // Tianma fix 20230920 + if( not isnull( ddstartperiod ) ) + { + // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start + periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() ); + + value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart ); + } } return value; diff --git a/_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Export.qbl b/_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Export.qbl new file mode 100644 index 0000000..d50d284 --- /dev/null +++ b/_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 } + ] + } + } +} diff --git a/_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Import.qbl b/_Main/BL/EDI/Broker_GlobalOTDTable_CARRC_Import.qbl new file mode 100644 index 0000000..e539ed2 --- /dev/null +++ b/_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 } + ] + } + } +} diff --git a/_Main/BL/EDI/Broker_GlobalOTDTable_CAR_Export.qbl b/_Main/BL/EDI/Broker_GlobalOTDTable_CAR_Export.qbl new file mode 100644 index 0000000..571fce9 --- /dev/null +++ b/_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 } + ] + } + } +} diff --git a/_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_CapacityAllocationResult.qbl b/_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_CapacityAllocationResult.qbl new file mode 100644 index 0000000..744cd1a --- /dev/null +++ b/_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' + } +} diff --git a/_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTD.qbl b/_Main/BL/Relations/Relation_CapacityAllocationResultsRuleConfiguration_GlobalOTDTable_GlobalOTD.qbl new file mode 100644 index 0000000..40be5f9 --- /dev/null +++ b/_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' + } +} diff --git a/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl b/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl new file mode 100644 index 0000000..075c195 --- /dev/null +++ b/_Main/BL/Relations/Relation_H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo.qbl @@ -0,0 +1,23 @@ +Quintiq file version 2.0 +#parent: #root +Relation H_MaterialInfo_MacroPlan_MacroPlan_H_MaterialInfo +{ + #keys: '1[414724.0.142347478]' + DefaultRelationStrategy + { + } + RelationSide.LeftSide MacroPlan + { + #keys: '3[414724.0.142347480][414724.0.142347479][414724.0.142347481]' + Cardinality: '0to1' + ObjectDefinition: H_MaterialInfo + OwningSide: 'Reference' + } + RelationSide.RightSide H_MaterialInfo + { + #keys: '3[414724.0.142347483][414724.0.142347482][414724.0.142347484]' + Cardinality: '1toN' + ObjectDefinition: MacroPlan + OwningSide: 'Owned' + } +} diff --git a/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl index 4ecdf63..cd44e09 100644 --- a/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl +++ b/_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl @@ -19,19 +19,22 @@ result := null(ConversionFactor ); if( isnull( source ) or isnull( target ) ) { - error( "can't find source or target unit of measure" ) + info( "can't find source or target unit of measure" ) } - if( productId <> "" ) { + + if( not isnull( source) and not isnull( target)){ + if( productId <> "" ) { product := Product_MP::FindById( macroPlan, productId ); - }else{ - result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable ) + }else{ + result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable ) } - if( isnull( product ) ) { - info( "invalid product id" ) + if( isnull( product ) ) { + info( "鍗曚綅杞崲鍑虹幇鏃犳晥id锛�"+productId ) }else{ result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable ); } + } return result; *] diff --git a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl b/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl index 0ee5894..915e3c2 100644 --- a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl @@ -1,16 +1,17 @@ Quintiq file version 2.0 #parent: #root StaticMethod DoSync ( - MacroPlan macroPlan + MacroPlan macroPlan, + GlobalOTDTable globalOTDTable ) { Description: '鍗曟鍚屾' TextBody: [* // yypsybs Aug-17-2023 (created) - info( "Product Finished, Start BaseConversionFactor Data Broker" ) - macroPlan.Broker_OTD_BaseConversionFactor().Execute(); + //info( "Product Finished, Start BaseConversionFactor Data Broker" ) + //macroPlan.Broker_OTD_BaseConversionFactor().Execute(); info( "BaseConversionFactor Data Broker Finished, Start BaseConversionFactor Mapping" ) - macroPlan.MappingBaseConversionFactorData(); + macroPlan.MappingBaseConversionFactorData(globalOTDTable); *] } diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_Date.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_Date.qbl new file mode 100644 index 0000000..a158e2b --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_Description.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_Description.qbl new file mode 100644 index 0000000..4d7f093 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ID.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ID.qbl new file mode 100644 index 0000000..3a52d76 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ManufacturedDate.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ManufacturedDate.qbl new file mode 100644 index 0000000..15ee01f --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_ProductID.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_ProductID.qbl new file mode 100644 index 0000000..ca7c6e4 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_StockingPointID.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_StockingPointID.qbl new file mode 100644 index 0000000..2a28f0d --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/Attribute_UserQuantity.qbl b/_Main/BL/Type_CapacityAllocationResults/Attribute_UserQuantity.qbl new file mode 100644 index 0000000..9c3d31c --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/DeclarativeReferenceRelation_CalcCapacityAllocationResultsRuleConfiguration.qbl b/_Main/BL/Type_CapacityAllocationResults/DeclarativeReferenceRelation_CalcCapacityAllocationResultsRuleConfiguration.qbl new file mode 100644 index 0000000..59c9af0 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl index ef9782f..119198c 100644 --- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_CreateDate.qbl +++ b/_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() ); + } *] } diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_Export.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_Export.qbl new file mode 100644 index 0000000..14045dd --- /dev/null +++ b/_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(); + *] +} diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl new file mode 100644 index 0000000..3f70ca5 --- /dev/null +++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl @@ -0,0 +1,94 @@ +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 ) { + currentLayerDependentDemandQuantity := currentLayerDependentDemandQuantity * + ns.ProcessOutput().astype( OperationOutput ).Quantity() * + dd.ProcessInput().astype( OperationInput ).Quantity(); + info( "灞傛暟锛�", numberOfLayers, " 褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), " 鎬讳緵搴斿�硷細", ns.Quantity(), " 闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity, + " 褰撳墠闇�姹俻isp锛�", 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 := "", + 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," 褰撳墠渚涘簲鐨刾isp锛�", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().Name(), " 鎬讳緵搴斿�硷細", ns.Quantity(), " 闇�瑕佷緵搴斿�硷細", currentLayerDependentDemandQuantity, + " 褰撳墠闇�姹俻isp锛�", 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 ); + } + } + } + *] +} diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl index 0db5a04..6501563 100644 --- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_ObtainTheFinalOutputProduct.qbl +++ b/_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; *] } diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_Division.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_Division.qbl new file mode 100644 index 0000000..2b0b5c3 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_ModuleMaterialCode.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_ModuleMaterialCode.qbl new file mode 100644 index 0000000..ca60799 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialCode.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_PanelMaterialCode.qbl new file mode 100644 index 0000000..02037a2 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_StockingPointID.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/Attribute_StockingPointID.qbl new file mode 100644 index 0000000..fb82a94 --- /dev/null +++ b/_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 +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Export.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Export.qbl new file mode 100644 index 0000000..4397413 --- /dev/null +++ b/_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; + *] +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Import.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_Import.qbl new file mode 100644 index 0000000..a4eddc6 --- /dev/null +++ b/_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 ); + *] +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/TypeIndex_CapacityAllocationResultsRuleConfigurationTypeIndex.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/TypeIndex_CapacityAllocationResultsRuleConfigurationTypeIndex.qbl new file mode 100644 index 0000000..ea74562 --- /dev/null +++ b/_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 + } + ] +} diff --git a/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/_ROOT_Type_CapacityAllocationResultsRuleConfiguration.qbl b/_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/_ROOT_Type_CapacityAllocationResultsRuleConfiguration.qbl new file mode 100644 index 0000000..7e012c9 --- /dev/null +++ b/_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' +} diff --git a/_Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl b/_Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl index 822bde4..7fa388c 100644 --- a/_Main/BL/Type_CapacityAndSaleBudgeFilterYear/StaticMethod_Initial.qbl +++ b/_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 ); diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl index e885859..e428bb7 100644 --- a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl +++ b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl @@ -38,23 +38,23 @@ } // 妫�鏌ヤ緷璧栭」 if( isnull( product) ) { - info( "product not found" ); + info( "product not found" + productId); } if( isnull( salesSegment) ) { - info( "sales segment not found" ); + info( "sales segment not found" + salesSegmentName); } if( isnull( stockingPoint) ) { - info( "stock point not found" ); + info( "stock point not found" + stockingPointId); } //if( isnull( currency) ) { // error( "currency not found" ); //} if( unitOfMeasureName <> "" and isnull( unitOfMeasure) ) { - info( "unit of measure not found" ); + info( "unit of measure not found" + unitOfMeasureName); } - if( priorityName <> "" and isnull( stockingPoint) ) { - info( "priority not found" ); - } + //if( priorityName <> "" and isnull( stockingPoint) ) { + // info( "priority not found" ); + //} // 鏂板/鏇存柊 result := CustomerOrder::FindById( macroPlan, id ); if( isnull( result ) ) { @@ -62,9 +62,34 @@ priorityName, salesSegmentName, currencyId, unitOfMeasureName, false, customerName, customerId, orderId, orderLineId, true, true, true ); } else { - result.Update( product, stockingPoint, orderDate, quantity, price, - priorityName, salesSegmentName, currencyId, unitOfMeasureName, - false, customerName, customerId, orderId, orderLineId, true, true, true ); + if( result.ProductID() = productId + and result.StockingPointID() = stockingPointId + and result.StartDate() = orderDate + and result.Quantity() = quantity + and result.Price() = price + and result.PriorityName() = priorityName + and result.SalesSegmentName() = salesSegmentName + and result.CurrencyID() = currencyId + and result.UnitOfMeasureName() = unitOfMeasureName + and result.CustomerName() = customerName + and result.CustomerID() = customerId + and result.OrderID() = orderId + and result.OrderLineID() = orderLineId ){ + info( "No need to update this order: " + id ); + }else{ + if( result.IsLocked() = true ){ + pispips := selectset( result, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ); + pispipLeafs := selectset( pispips, + Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), + pispip, + true ); + ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, false, true ); + } + result.Update( product, stockingPoint, orderDate, quantity, price, + priorityName, salesSegmentName, currencyId, unitOfMeasureName, + false, customerName, customerId, orderId, orderLineId, true, true, true ); + result.IsLocked( false ); + } } return result; *] diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl index ece7264..170d328 100644 --- a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl @@ -2,15 +2,16 @@ #parent: #root StaticMethod DoSync ( MacroPlan macroPlan, - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { TextBody: [* // yypsybs Aug-17-2023 (created) - info( "Forecast Finished, Start CustomerOrder Data Broker" ); - macroPlan.Broker_OTD_CustomerOrder().Execute(); + //info( "Forecast Finished, Start CustomerOrder Data Broker" ); + //macroPlan.Broker_OTD_CustomerOrder().Execute(); info( "CustomerOrder Data Broker Finished, Start CustomerOrder Mapping" ); - macroPlan.MappingCustomerOrderData( businessTypes ); + macroPlan.MappingCustomerOrderData( businessTypes,globalOTDTable ); *] } diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl index 755761e..3126a57 100644 --- a/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl +++ b/_Main/BL/Type_CustomerOrder/StaticMethod_LockUnlock.qbl @@ -20,7 +20,7 @@ owner.OrderLockLog( relnew, CustomerName := order.CustomerName(), End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), - EndDate := order.EndDate(), + EndDate := order.StartDate(), IsLocked := order.IsLocked(), LastModify := order.LastModify(), LastModifyTime := order.LastModifyTime(), @@ -41,7 +41,7 @@ owner.OrderLockLog( relnew, CustomerName := order.CustomerName(), End := order.First().AsPlanningBaseSalesDemandInPeriod().End().Date(), - EndDate := order.EndDate(), + EndDate := order.StartDate(), IsLocked := order.IsLocked(), LastModify := order.LastModify(), LastModifyTime := order.LastModifyTime(), diff --git a/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl index a5c8eb8..ac5c1bb 100644 --- a/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl +++ b/_Main/BL/Type_Forecast/StaticMethod_CreateOrUpdate.qbl @@ -33,23 +33,23 @@ } // 妫�鏌ヤ緷璧栭」 if( isnull( product ) ) { - error( "product not found" ); + info( "product not found" + productId); } if( isnull( salesSegment ) ) { - error( "sales segment not found" ); + info( "sales segment not found" + salesSegmentName); } if( isnull( stockingPoint ) ) { - error( "stock point not found" ); + info( "stock point not found" + stockingPointId); } if( isnull( currency ) ) { - error( "currency not found" ); + info( "currency not found" + currencyId); } if( unitOfMeasureName <> "" and isnull( unitOfMeasure) ) { - error( "unit of measure not found" ); + info( "unit of measure not found" + unitOfMeasureName ); } - if( priorityName <> "" and isnull( stockingPoint) ) { - error( "priority not found" ); - } + //if( priorityName <> "" and isnull( stockingPoint) ) { + // info( "priority not found" ); + //} // 鏂板/鏇存柊 result := Forecast::FindById( macroPlan, id ); if( isnull( result) ) { diff --git a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl b/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl index 401e158..1fdba27 100644 --- a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl @@ -2,15 +2,16 @@ #parent: #root StaticMethod DoSync ( MacroPlan macroPlan, - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { TextBody: [* // yypsybs Aug-17-2023 (created) - info( "OperationCost Finished, Start Forecast Data Broker" ); - macroPlan.Broker_OTD_Forecast().Execute(); + //info( "OperationCost Finished, Start Forecast Data Broker" ); + //macroPlan.Broker_OTD_Forecast().Execute(); info( "Forecast Data Broker Finished, Start Forecast Mapping" ); - macroPlan.MappingForecastData( businessTypes ); + macroPlan.MappingForecastData( businessTypes,globalOTDTable ); *] } diff --git a/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl b/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl new file mode 100644 index 0000000..0a72c14 --- /dev/null +++ b/_Main/BL/Type_Global_MappingOperation/StaticMethod_FindMinSeq.qbl @@ -0,0 +1,17 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod FindMinSeq ( + GlobalOTDTable globalOTDTable, + String orgCode, + String productId, + String processSection +) as Number +{ + TextBody: + [* + // renhao Sep-20-2023 (created) + return guard (min( globalOTDTable, Global_MappingOperation, item, + item.OrganCode() = orgCode and item.ProductID() = productId and item.ProcessSection() = processSection, + item.SequenceNumber() ), Number::MinNumber() ); + *] +} diff --git a/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl b/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl new file mode 100644 index 0000000..62a27b5 --- /dev/null +++ b/_Main/BL/Type_H_Forecast/Attribute_StockingPointID.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute StockingPointID +{ + #keys: '3[414724.0.149657552][414724.0.149657551][414724.0.149657553]' + Description: '搴撳瓨鐐�' + ValueType: String +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl new file mode 100644 index 0000000..5ab9f90 --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetALlBOM.qbl @@ -0,0 +1,27 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_GetALlBOM ( + MacroPlan Owner, + MappingBOM Material +) as Number +{ + Description: '鏍规嵁SKU鑾峰彇鏈熸牴閮ㄦ墍鏈夋暟鎹�' + TextBody: + [* + AllMaterials := selectset( Owner,MappingBOM,Obj,Obj.ComponentCode()=Material.ProductCode()) + if( AllMaterials.Size()>0) + { + traverse( AllMaterials,Elements,Obj,not isnull( Obj)) + { + H_FunctionClass::SM_GetALlBOM( Owner,Obj); + } + } + else + { + Owner.H_MaterialInfo(relnew,ID := H_FunctionClass::SM_GenerateID( "BM") + ,MaterialName := Material.ComponentType() ); + + } + return 0; + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl new file mode 100644 index 0000000..a10fbae --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetBOMBySKU.qbl @@ -0,0 +1,18 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_GetBOMBySKU ( + MacroPlan Owner, + String SKU +) as MappingBOM +{ + Description: '鏍规嵁SKU鑾峰彇BOM' + TextBody: + [* + Obj :=null( MappingBOM,constcontent ); + if( not isnull( Owner) and SKU.Length()>0) + { + Obj := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU); + } + return Obj; + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl new file mode 100644 index 0000000..3edc063 --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetMaterialData.qbl @@ -0,0 +1,104 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_GetMaterialData ( + MacroPlan Owner, + String ParentSKU, + Number ProductQty, + String ForecastId, + String VCode, + Date NDate +) as owning JSON +{ + Description: '鑾峰彇鐗╂枡淇℃伅' + TextBody: + [* + /**********************************鍒濆鍖栫墿鏂欎俊鎭�*************************************** + *鍒涘缓浜猴細yunying + *鍒涘缓鏃ユ湡锛�2023-09-21 + *鎻忚堪锛氭牴鎹甋KU鑾峰彇涓嬩竴灞傜墿鏂欐暟鎹�,杩欓噷涓嶆槸閬嶅巻寰楀埌鎵�鏈夛紝鏃惰Е鍙戜竴娆″緱鍒颁竴灞傦紝骞剁疮璁� + *鍙傛暟锛� + *****************************************************************************************/ + // 鍒濆鍖栫粨鏋� + bStatus := false; + strMsg :=""; + + try{ + if( Owner.MappingBOM(relsize )>0) + { + // 寰楀埌涓嬩竴绾ф暟鎹� + AllData:= selectset( Owner, MappingBOM,object,object.ComponentCode()=ParentSKU); + ObjProduct := null( MappingProduct,constcontent ); + ObjUnit := null( Unit,constcontent ); + MaterialType:=""; + MaterialName:="-"; + StockPoint := ""; + NRate:=1.0; + NComponentsUsed :=0.0; + ObjBOM := H_FunctionClass::SM_GetBOMBySKU( Owner,ParentSKU); + if(not isnull( ObjBOM)) + { + NRate := ObjBOM.ComponentOutputRate(); + NComponentsUsed := ObjBOM.UnitUsageOfComponents(); + // 浜у嚭姣斿紓甯告寜 100%浜у嚭璁$畻 + if( NRate <=0.0) + { + NRate :=1.0; + } + } + if( AllData.Size()>0) + { + traverse( AllData,Elements,Obj,not isnull( Obj)) + { + // 寰楀埌褰撳墠宸插瓨鍦ㄧ殑鐗╂枡淇℃伅锛堣鍗旾D + SKU锛� + ObjMaterial := select( Owner,H_MaterialInfo,ObjM,ObjM.ForecastID()=ForecastId and ObjM.SKU()=Obj.ProductCode()); + if( isnull( ObjMaterial)) + { + // 鐗╂枡绫诲瀷 + MaterialType := Obj.ProductType(); + // 寰楀埌鐗╂枡淇℃伅 + ObjProduct:= H_FunctionClass::SM_GetProductInfo(Owner, Obj.ProductCode()); + if( not isnull( ObjProduct)) + { + MaterialType:= ObjProduct.ProductMajorType(); + MaterialName:=ObjProduct.Name(); + } + ObjUnit:= H_FunctionClass::SM_GetUnitBySKU( Owner,Obj.ProductCode()); + if( not isnull( ObjUnit)) + { + StockPoint:= ObjUnit.Name(); + } + Owner.H_MaterialInfo(relnew,ParentSKU := Obj.ComponentCode(),SKU := Obj.ProductCode(),ForecastID := ForecastId,OrgCode := Obj.OrganCode(),VCode := VCode + ,ID := H_FunctionClass::SM_GenerateID( "MI"),MaterialType := MaterialType,NeedDate := NDate + ,NeedQty := [Number](ProductQty/NRate*NComponentsUsed).Round( 0),Unit := Obj.UnitOfMeasureName() + ,StockPoint :=StockPoint,MaterialName := MaterialName ); + } + else + { + // 鑰冭檻鏄惁瑕佹洿鏂版暟鎹紝鏆備笉澶勭悊 + } + } + } + } + // 娌℃湁BOM 娣诲姞娴嬭瘯鏁版嵁 + else + { + nCount :=Owner.H_MaterialInfo(relsize ); + Owner.H_MaterialInfo(relnew,ParentSKU := ParentSKU,SKU := "SKU"+ nCount.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 :=""; + } + onerror + { + strMsg :="鍔犺浇鐗╂枡澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛橈紒"; + Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData", + DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(), + GeneralInformation := e.GeneralInformation()); + } + return JSON::Object().Add( "Status",bStatus) + .Add( "Msg",strMsg).Build(); + *] +} diff --git "a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl" "b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl" new file mode 100644 index 0000000..2b1ed8f --- /dev/null +++ "b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetProductInfo\0431.qbl" @@ -0,0 +1,19 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_GetProductInfo ( + MacroPlan Owner, + String SKU +) as MappingProduct +{ + Description: '鏍规嵁SKU鑾峰彇鐗╂枡淇℃伅' + TextBody: + [* + // 鏍规嵁SKU鑾峰彇鐗╂枡淇℃伅 + Obj := null( MappingProduct,constcontent ); + if( not isnull( Owner) and SKU.Length()>0) + { + Obj:= select( Owner,MappingProduct,ObjMP,ObjMP.ID()=SKU); + } + return Obj; + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl new file mode 100644 index 0000000..cfa808a --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_GetUnitBySKU.qbl @@ -0,0 +1,22 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_GetUnitBySKU ( + MacroPlan Owner, + String SKU +) as Unit +{ + Description: '閫氳繃SKU鑾峰彇搴撳瓨鐐逛俊鎭�' + TextBody: + [* + Obj :=null( Unit,constcontent ); + if( not isnull( Owner) and SKU.Length()>0) + { + OrgCode := select( Owner,MappingBOM,ObjM,ObjM.ProductCode()=SKU); + if( not isnull( OrgCode)) + { + Obj := select( Owner,Unit,ObjU,ObjU.ID()= OrgCode.OrganCode()); + } + } + return Obj; + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl index 5bf028e..edf6c16 100644 --- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastData.qbl @@ -17,7 +17,7 @@ strMsg :=""; try{ - // 棰勬祴鏁版嵁2姝ゅ鐞嗭紙绛涢��+瀹㈡埛鍚嶇О鎻愬彇锛� + // 娓呴櫎鏃ф暟鎹紝閲嶆柊鎷夊彇 if(Owner.H_Forecast(relget ).Size()>0) { traverse( Owner,H_Forecast,Obj,not isnull( Obj)) @@ -25,6 +25,8 @@ Owner.H_Forecast(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() and object.Quantity()>0 ); @@ -32,8 +34,13 @@ CustomName:=""; DepartMent:=""; idx:=0; + strOrderCode:=""; + RQty:=0; + ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent ); + // ObjPruduct :=null( MappingProduct,constcontent ); traverse( AllData,Elements,Obj,not isnull(Obj)) { + // 杩欓噷鐢ㄦ煡鎵惧悗鎴彇锛屽洜涓轰笉纭畾鏈夊嚑涓í绾匡紝浠ョ涓�涓负鍑� idx:=Obj.SalesSegmentName().FindString( "-",0); if(idx>0) { @@ -43,18 +50,51 @@ else { CustomName :=Obj.SalesSegmentName(); - DepartMent := Obj.SalesSegmentName(); + DepartMent := "閮ㄩ棬鏁版嵁鑾峰彇澶辫触锛�" } - - Owner.H_Forecast(relnew,OrderCode := H_FunctionClass::SM_GenerateID( "OF"), + // // 浠庣墿鏂欒〃鑾峰彇鐗╂枡淇℃伅 + // 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, + 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() + and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() ) + if( 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()); + } + 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); + } + } } + + bStatus := true; strMsg :="璁㈠崟棰勬祴鍒濆鍖栨垚鍔�!"; } diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl new file mode 100644 index 0000000..524b723 --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_InitialForcastDataEx.qbl @@ -0,0 +1,120 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_InitialForcastDataEx ( + MacroPlan Owner, + Boolean IsNew +) as owning JSON +{ + Description: '鍒濆鍖栬鍗曢娴嬩俊鎭�' + TextBody: + [* + /**********************************鍒濆鍖栬鍗曢娴嬩俊鎭�*************************************** + *娉細鏈‘瀹氫笂娓搁娴嬭鍗曟洿鏂伴�昏緫鍜屾暟鎹湁鏁堟�э紝杩欓噷杩涜浜屾澶勭悊锛屾柊鐢熸垚涓�涓垪琛紝閬垮厤涓婃父淇℃伅鍙樺姩涓ラ噸 + * 褰卞搷鍔熻兘 + * + *****************************************************************************************/ + // 鍒濆鍖栫粨鏋� + bStatus := false; + strMsg :=""; + + try{ + // 娓呴櫎鏃ф暟鎹紝閲嶆柊鎷夊彇 + if(Owner.H_Forecast(relget ).Size()>0) + { + traverse( Owner,H_Forecast,Obj,not isnull( Obj)) + { + Owner.H_Forecast(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() + and object.Quantity()>0 ); + + CustomName:=""; + DepartMent:=""; + idx:=0; + strOrderCode:=""; + RQty:=0; + ObjOrderRealQty:=null( H_OrderForecastRealQty,constcontent ); + // ObjPruduct :=null( MappingProduct,constcontent ); + traverse( AllData,Elements,Obj,not isnull(Obj)) + { + // 杩欓噷鐢ㄦ煡鎵惧悗鎴彇锛屽洜涓轰笉纭畾鏈夊嚑涓í绾匡紝浠ョ涓�涓负鍑� + idx:=Obj.SalesSegmentName().FindString( "-",0); + if(idx>0) + { + DepartMent:=Obj.SalesSegmentName().SubString( 0,idx); + CustomName := Obj.SalesSegmentName().SubString( idx+1, Obj.SalesSegmentName().Length() - (idx+1)); + } + else + { + CustomName :=Obj.SalesSegmentName(); + DepartMent := "閮ㄩ棬鏁版嵁鑾峰彇澶辫触锛�" + } + // // 浠庣墿鏂欒〃鑾峰彇鐗╂枡淇℃伅 + // 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() + and ObjO.Month().StartOfMonth() = Obj.EndDate().StartOfMonth() ) + if( 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()); + } + 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); + } + } + } + } + + + bStatus := true; + strMsg :="璁㈠崟棰勬祴鍒濆鍖栨垚鍔�!"; + } + onerror + { + strMsg :="璁㈠崟棰勬祴鍒濆鍖栧け璐ワ紝鍙兘褰卞搷鍐插噺璁$畻锛岃鑱旂郴绯荤粺绠$悊鍛橈紒"; + Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData", + DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(), + GeneralInformation := e.GeneralInformation()); + } + return JSON::Object().Add( "Status",bStatus) + .Add( "Msg",strMsg).Build(); + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl new file mode 100644 index 0000000..c4c2894 --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedging.qbl @@ -0,0 +1,200 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_OrderHedging ( + MacroPlan Owner, + Boolean IsNew, + String Operator, + String OperatorType +) as owning JSON +{ + Description: '璁㈠崟鍐插噺璋冪敤鍑芥暟' + TextBody: + [* + /************************************璁㈠崟鍐插噺璋冪敤****************************** + *鍑芥暟鍚嶏細SM_OrderHedging + *鍒涘缓浜猴細yunying + *鍒涘缓鏃堕棿锛�20230-09-24 + *鎻忚堪锛氱郴缁熷唴璁㈠崟鍐插噺璋冪敤鍑芥暟锛孖sNew=true鏃讹紝閲嶆柊澶勭悊棰勬祴淇℃伅锛孖sNew=false鏃讹紝鐢ㄩ娴嬬疮璁′俊鎭�� + *****************************************************************************/ + // 鍒濆鍖栫粨鏋� + bStatus := false; + strMsg :=""; + // 鑾峰彇鐗堟湰鍙�,杩欓噷鏄惁闇�瑕佸拰鐗堟湰鍙峰姛鑳藉鎺� + VCode :=H_FunctionClass::SM_GenerateID("VC"); + + try{ + if( not isnull( Owner)) + { + // 鍒濆鍖栭娴嬩俊鎭� + 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; //鍓╀綑璁㈠崟鏁伴噺 + + // 鑾峰彇棰勬祴鏁伴噺锛堝鎴�+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)) + { + 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; + } + + // 鑾峰彇鎺堟潈鏁伴噺锛堝鎴稩D+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); + } + 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(), + CustomID := ObjOrder.CustomerName(), + CustomName := ObjOrder.CustomerName(), + OrderCode := "-", + ForecatsQty :=0, + ForecatsRealQty :=nForecastQtyNew, + Unit := ObjOrder.UnitOfMeasureName()); + } + } + } + else + { + strMsg:="棰勬祴璁㈠崟淇℃伅鍔犺浇澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛橈紒"; + } + } + } + onerror + { + strMsg :="璁㈠崟鍐插噺鍙戠敓閿欒锛岃鑱旂郴绯荤粺绠$悊鍛橈紒"; + // 杩欓噷鏄惁瑕佸垹闄ゅ凡鍒涘缓鐨勬暟鎹紵寰呭畾锛屽鏋滄寜鐗堟湰鍙峰彲浠ヤ笉鍒犻櫎 + + // 璁板綍閿欒鏃ュ織 + Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_InitialForcastData", + DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(), + GeneralInformation := e.GeneralInformation()); + } + return JSON::Object().Add( "Status",bStatus) + .Add( "VersionCode",VCode) + .Add( "Msg",strMsg).Build(); + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl b/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl index 6cb0560..b6727c8 100644 --- a/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl +++ b/_Main/BL/Type_H_FunctionClass/_ROOT_Type_H_FunctionClass.qbl @@ -5,6 +5,6 @@ { #keys: '5[414724.0.53669729][414724.0.53669727][0.0.0][414724.0.53669728][414724.0.53669730]' BaseType: Object - Description: '鍐插噺鎿嶄綔绫�' + Description: '鍐插噺鎿嶄綔鍏敤绫�' StructuredName: 'H_FunctionClasss' } diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl new file mode 100644 index 0000000..5c39ed3 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ForecastID.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute ForecastID +{ + #keys: '3[414724.0.150662643][414724.0.150662642][414724.0.150662644]' + Description: '棰勬祴ID' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl new file mode 100644 index 0000000..4115813 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ID.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute ID +{ + #keys: '3[414724.0.142347495][414724.0.142347494][414724.0.142347496]' + Description: '涓婚敭ID' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl new file mode 100644 index 0000000..90613a7 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialName.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute MaterialName +{ + #keys: '3[414724.0.142347535][414724.0.142347534][414724.0.142347536]' + Description: '鐗╂枡鍚嶇О' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl new file mode 100644 index 0000000..908d0f3 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_MaterialType.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute MaterialType +{ + #keys: '3[414724.0.142347525][414724.0.142347524][414724.0.142347526]' + Description: '鐗╂枡绫诲瀷锛氭垚鍝併�佸崐鎴愬搧銆佸師鏉愭枡锛燂紵锛燂紵' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl new file mode 100644 index 0000000..8be7117 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedDate.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute NeedDate +{ + #keys: '3[414724.0.143344655][414724.0.143344654][414724.0.143344656]' + Description: '闇�姹傛椂闂�' + ValueType: Date +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl new file mode 100644 index 0000000..e0c3a06 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_NeedQty.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute NeedQty +{ + #keys: '3[414724.0.142347555][414724.0.142347554][414724.0.142347556]' + Description: '闇�姹傛暟閲�' + ValueType: Number +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl new file mode 100644 index 0000000..f8a06f0 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_OrgCode.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute OrgCode +{ + #keys: '3[414724.0.142347565][414724.0.142347564][414724.0.142347566]' + Description: '缁勭粐浠g爜' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl new file mode 100644 index 0000000..9c6d50d --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_ParentSKU.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute ParentSKU +{ + #keys: '3[414724.0.142347515][414724.0.142347514][414724.0.142347516]' + Description: '鐖剁墿鏂橲KU' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl new file mode 100644 index 0000000..2299346 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_SKU.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute SKU +{ + #keys: '3[414724.0.142347505][414724.0.142347504][414724.0.142347506]' + Description: 'SKU(浜у搧銆佸崐鎴愬搧銆佺墿鏂欙級' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl new file mode 100644 index 0000000..1a3655c --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_StockPoint.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute StockPoint +{ + #keys: '3[414724.0.142347575][414724.0.142347574][414724.0.142347576]' + Description: '搴撳瓨鐐�' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl new file mode 100644 index 0000000..2ec2674 --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_Unit.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute Unit +{ + #keys: '3[414724.0.142347545][414724.0.142347544][414724.0.142347546]' + Description: '鍗曚綅' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl b/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl new file mode 100644 index 0000000..66f81ea --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/Attribute_VCode.qbl @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +#parent: #root +Attribute VCode +{ + #keys: '3[414724.0.142347585][414724.0.142347584][414724.0.142347586]' + Description: '鐗堟湰鍙�' + ValueType: String +} diff --git a/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl b/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl new file mode 100644 index 0000000..d2309be --- /dev/null +++ b/_Main/BL/Type_H_MaterialInfo/_ROOT_Type_H_MaterialInfo.qbl @@ -0,0 +1,10 @@ +Quintiq file version 2.0 +#root +#parent: #DomainModel +Type H_MaterialInfo +{ + #keys: '5[414724.0.142347475][414724.0.142347473][0.0.0][414724.0.142347474][414724.0.142347476]' + BaseType: Object + Description: '鐗╂枡淇℃伅' + StructuredName: 'H_MaterialInfos' +} diff --git a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl b/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl index 574ecd5..e210049 100644 --- a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl @@ -1,15 +1,16 @@ Quintiq file version 2.0 #parent: #root StaticMethod DoSync ( - MacroPlan macroPlan + MacroPlan macroPlan, + GlobalOTDTable globalOTDTable ) { TextBody: [* // yypsybs Aug-17-2023 (created) - info( "ActualPISPIP Finished, Start InventoryCost Data Broker" ); - macroPlan.Broker_OTD_InventoryCost().Execute(); + //info( "ActualPISPIP Finished, Start InventoryCost Data Broker" ); + //macroPlan.Broker_OTD_InventoryCost().Execute(); info( "InventoryCost Data Broker Finished, Start InventoryCost Mapping" ); - macroPlan.MappingInventoryValueAndCostData(); + macroPlan.MappingInventoryValueAndCostData(globalOTDTable); *] } diff --git a/_Main/BL/Type_MPSync/Method_CapacityAndSaleBudgeExport.qbl b/_Main/BL/Type_MPSync/Method_CapacityAndSaleBudgeExport.qbl new file mode 100644 index 0000000..0048b94 --- /dev/null +++ b/_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(); + *] +} diff --git a/_Main/BL/Type_MPSync/StaticMethod_TestData.qbl b/_Main/BL/Type_MPSync/StaticMethod_TestData.qbl index 87c2b27..541ab96 100644 --- a/_Main/BL/Type_MPSync/StaticMethod_TestData.qbl +++ b/_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, diff --git a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl index c71e147..ee48ee3 100644 --- a/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl +++ b/_Main/BL/Type_MacroPlan/Method_InitialUnitAndStockingPoint.qbl @@ -7,88 +7,12 @@ // Administrator Sep-1-2023 (created) //Set the Default values - unitofmeasurename := "PCS"; - currencyid := "CNY"; - startdate := Date::Date( 1900, 1, 1 ); - enddate := Date::Date( 9999, 12, 31 ); - capacitytype := "Transport quantity"; + //unitofMeasureName := "PCS"; + //currencyid := "CNY"; + //startdate := Date::Date( 1900, 1, 1 ); + //enddate := Date::Date( 9999, 12, 31 ); + //capacitytype := "Transport quantity"; - if( isnull( Unit::FindById( this, "绌鸿繍" ) ) ){ - this.Unit( relnew, - ID := "绌鸿繍", - Name := "绌鸿繍", - UnitOfMeasureName := unitofmeasurename, - CurrencyID := currencyid, - StartDate := startdate, - EndDate := enddate, - CapacityType := capacitytype ); - } - - if( isnull( Unit::FindById( this, "搴撳瓨浜嬪姟澶勭悊" ) ) ){ - this.Unit( relnew, - ID := "搴撳瓨浜嬪姟澶勭悊", - Name := "搴撳瓨浜嬪姟澶勭悊", - UnitOfMeasureName := unitofmeasurename, - CurrencyID := currencyid, - StartDate := startdate, - EndDate := enddate, - CapacityType := capacitytype ); - } - - unitofmeasurename := "PCS"; - name := "鎵嬪姩鍒涘缓搴撳瓨鐐�"; - currencyname := "CNY"; - isplannedinfinite := false; - datestart := Date::Construct(1900, 1, 1) ; - dateend := Date::Construct(9999, 12, 31); - groupname := " "; - description := " "; - isfromdb := true; - - if( isnull( StockingPoint_MP::FindById( this, "F13_FG_STOCK" ) ) ){ - StockingPoint_MP::Create( this, - "F13_FG_STOCK", - "F13", - name, - unitofmeasurename, - currencyname, - isplannedinfinite, - datestart, - dateend, - groupname, - description, - isfromdb ); - } - - if( isnull( StockingPoint_MP::FindById( this, "H10_SA_STOCK" ) ) ){ - StockingPoint_MP::Create( this, - "H10_SA_STOCK", - "H10", - name, - unitofmeasurename, - currencyname, - isplannedinfinite, - datestart, - dateend, - groupname, - description, - isfromdb ); - } - - if( isnull( StockingPoint_MP::FindById( this, "Q10_FG_STOCK" ) ) ){ - StockingPoint_MP::Create( this, - "Q10_FG_STOCK", - "Q10", - name, - unitofmeasurename, - currencyname, - isplannedinfinite, - datestart, - dateend, - groupname, - description, - isfromdb ); - } existcurrency := Currency_MP::FindById( this, "CNY" ); if( isnull( existcurrency ) ){ diff --git a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl index f9cd042..c6520fb 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl @@ -2,21 +2,21 @@ #parent: #root Method MappingActualPISPIPData ( Strings businessTypes, + GlobalOTDTable globalOTDTable, Boolean nuclear ) { TextBody: [* // renhao Aug-14-2023 (created) - date := Date :: Today(); - listtodeal := selectset( this,MappingActualPISPIP,actual,true ); + listtodeal := selectset( globalOTDTable,Global_MappingActualProductInStockingPointInPeriod,actual,actual.ActualInventoryLevelEnd() > 0 ); totalcount := listtodeal.Size(); info( "ActualPISPIP has " + totalcount.AsQUILL() + " rows in total" ); count := 0; traverse( listtodeal,Elements,actual){ count := count + 1; - if( count - [Number](count/100) * 100 = 0 or count = totalcount ){ + if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){ info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" ); } product := select( this,MappingProduct,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl index f0a87c2..e0357c1 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl @@ -1,19 +1,21 @@ Quintiq file version 2.0 #parent: #root -Method MappingBaseConversionFactorData +Method MappingBaseConversionFactorData ( + GlobalOTDTable globalOTDTable +) { Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�' TextBody: [* // yypsybs Aug-15-2023 (created) - traverse( this, MappingBaseConversionFactor, item ) { + traverse( globalOTDTable, Global_MappingConversionFactor, item ) { //濡傛灉ProductID涓嶄负绌猴紝涓斿尮閰嶄笉鍒癙roduct锛屽垯涓嶅垱寤猴紝杩斿洖涓虹┖ // info( item.ProductId().AsQUILL() ); BaseConversionFactor::CreateOrUpdate( this, item.SourceUnitOfMeasureName(), item.TargetUnitOfMeasureName(), item.IsEnabled(), - item.ProductId(), + item.ProductID(), item.Factor() ); } *] diff --git a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl index 7ec0576..bee6304 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl @@ -1,7 +1,8 @@ Quintiq file version 2.0 #parent: #root Method MappingCustomerOrderData ( - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { Description: 'ETL璁㈠崟棰勬祴' @@ -9,15 +10,15 @@ [* // yypsybs Aug-15-2023 (created) // 寰呭鐞嗘暟鎹� - listToDeal := construct( structured[MappingCustomerOrder] ); + listToDeal := construct( Global_MappingCustomOrders ); if( isnull( businessTypes ) or businessTypes.Size() = 0 ) { - listToDeal := selectset( this, MappingCustomerOrder, item, true ); + listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, true ); } else { - listToDeal := selectset( this, MappingCustomerOrder, item, businessTypes.Find( item.BusinessType() ) <> -1 ); + listToDeal := selectset( globalOTDTable, Global_MappingCustomOrder, item, businessTypes.Find( item.BusinessType() ) <> -1 ); } queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date(); queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() ); - listToDeal := selectset( listToDeal, Elements, item, item.OrderDate() >= queryStartDate /*and item.OrderDate() <= queryEndDate*/, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) ); + listToDeal := selectset( listToDeal, Elements, item, item.OrderDate() >= queryStartDate /*and item.OrderDate() <= queryEndDate*/, not isnull( Product_MP::FindById( this, item.ProductID() ) ) and not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) and not isnull( SalesSegment_MP::FindByName( this, item.SalesSegmentName() ) ) ); totalcount := listToDeal.Size(); info( "CustomerOrder has " + totalcount.AsQUILL() + " rows in total" ); @@ -35,7 +36,7 @@ CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(), item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(), priorityName, item.ProductID(), - item.StockPointID(), + item.StockingPointID(), item.SalesSegmentName(), item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable()); // }else{ diff --git a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl index ead549d..c6a2bcf 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl @@ -2,7 +2,8 @@ #parent: #root Method MappingExternalSupplyData ( Strings businessTypes, - Boolean nuclear + Boolean nuclear, + GlobalOTDTable globalOTDTable ) { TextBody: @@ -10,7 +11,7 @@ // renhao Aug-14-2023 (created) queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date(); queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() ); - listtodeal := selectset( this,MappingExternalSupply,externalSupply, externalSupply.UserQuantity()>0 and externalSupply.Date() >= queryStartDate /*and externalSupply.Date() <= queryEndDate*/); + listtodeal := selectset( globalOTDTable,Global_MappingInventorySupply,externalSupply, externalSupply.UserQuantity()>0 and externalSupply.Date() >= queryStartDate /*and externalSupply.Date() <= queryEndDate*/); totalcount := listtodeal.Size(); description := "鍦ㄩ�斿湪鍒�"; info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" ); @@ -21,7 +22,7 @@ if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){ info( "Now is dealing with the " + count.AsQUILL() + "ExternalSupply " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" ); } - product := select( this,MappingProduct,product,product.ID() = externalSupply.ProductID(),true); + product := select( globalOTDTable,Global_MappingProduct_MP,product,product.ID() = externalSupply.ProductID(),true); if( not isnull( product)){ diff --git a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl index 47e8597..21b752b 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl @@ -1,7 +1,8 @@ Quintiq file version 2.0 #parent: #root Method MappingForecastData ( - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { Description: 'ETL璁㈠崟棰勬祴' @@ -9,11 +10,11 @@ [* // yypsybs Aug-15-2023 (created) // 寰呭鐞嗘暟鎹� - listToDeal := construct( structured[MappingForecast] ); + listToDeal := construct( Global_MappingForecasts ); if( isnull( businessTypes ) or businessTypes.Size() = 0 ) { - listToDeal := selectset( this, MappingForecast, item, item.Quantity() > 0 ); + listToDeal := selectset( globalOTDTable, Global_MappingForecast, item, item.Quantity() > 0 ); } else { - listToDeal := selectset( this, MappingForecast, item, businessTypes.Find( item.BusinessType() ) <> -1 and item.Quantity()>0 ); + listToDeal := selectset( globalOTDTable, Global_MappingForecast, item, businessTypes.Find( item.BusinessType() ) <> -1 and item.Quantity()>0 ); } queryStartDate := guard( min( this, Period_MP, item, true, item.StartDate() ) - Duration::Days( 30 ), DateTime::MinDateTime() ).Date(); queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl index 0789263..833d887 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl @@ -1,11 +1,13 @@ Quintiq file version 2.0 #parent: #root -Method MappingInventoryValueAndCostData +Method MappingInventoryValueAndCostData ( + GlobalOTDTable globalOTDTable +) { TextBody: [* // yypsybs Aug-15-2023 (created) - listtodeal := selectset( this,MappingInventoryValueAndCost,item,true ); + listtodeal := selectset( globalOTDTable,Global_MappingStockingPointCost,item,true ); totalcount := listtodeal.Size(); info( "InventoryCost has " + totalcount.AsQUILL() + " rows in total" ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl index b807827..ca35281 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl @@ -3,7 +3,8 @@ Method MappingOperationBOMData ( Strings businessTypes, Boolean isKeyProduct, - Boolean createPurchaseSupplyMaterial + Boolean createPurchaseSupplyMaterial, + GlobalOTDTable globalOTDTable ) { TextBody: @@ -12,9 +13,9 @@ keyProductList := construct( Strings ); if( isKeyProduct ) { - keyProductList := selectuniquevalues( this, MappingProduct, item, item.ProductMajorType()="鎴愬搧" or item.ProductMajorType()="鍗婃垚鍝�", item.ID() ); + keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="鎴愬搧" or item.ProductMajorType()="鍗婃垚鍝�", item.ID() ); } - bomList := selectsortedset( this, MappingBOM, item, + bomList := selectsortedset( globalOTDTable, Global_MappingOperationBOM, item, ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0, true, // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 ) @@ -61,9 +62,9 @@ if( not isnull( stockingPoint)){ if( isKeyProduct){ keyRows := selectset( routingRows,Elements,routingrow,keyProductList.Find( routingrow.ComponentCode())>=0); - this.MappingOperationBOMDataRouting( routing,keyRows); + this.MappingOperationBOMDataRouting( routing,globalOTDTable,keyRows); }else{ - this.MappingOperationBOMDataRouting( routing,routingRows); + this.MappingOperationBOMDataRouting( routing,globalOTDTable,routingRows); } } diff --git "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" index e661d1f..c661b69 100644 --- "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" +++ "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" @@ -2,7 +2,8 @@ #parent: #root Method MappingOperationBOMDataRouting ( Routing routing, - MappingBOMs routingRows + GlobalOTDTable globalOTDTable, + Global_MappingOperationBOMs routingRows ) { TextBody: @@ -15,7 +16,7 @@ rows := selectset( routingRows, Elements, row, row.ProcessSection() = processSection ); firstRow := rows.Element( 0 ); // 鎵緊rgCode/productId/processSection鍖归厤涓攕equence鏈�灏忕殑涓�缁勬暟鎹� - minSeq := MappingOperation::FindMinSeq( this, firstRow.OrganCode(), firstRow.ProductCode(), processSection ); + minSeq := Global_MappingOperation::FindMinSeq( globalOTDTable, firstRow.OrganCode(), firstRow.ProductCode(), processSection ); routingStepId := processSection + "_" + [String]minSeq; // 鎵惧搴攔outingStep routingStep := RoutingStep::FindByName( routing, routingStepId ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl index 3713cc9..1e71d79 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl @@ -41,7 +41,10 @@ if( count - [Number](count/1000) * 1000 = 0 or count = totalcount ){ info( "Now is dealing with the " + count.AsQUILL() + "OperationCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" ); } - id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection() + "_" + item.Line(); + id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection(); + if( guard( item.Line(), "" ).Length() > 0 ) { + id := id + "_" + item.Line(); + } operation := Operation::FindOperationTypeIndex( id ); account := Account_MP::FindByName( this, "Operation cost" ); isfromdb := false; diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl index 07e9838..29e7e21 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl @@ -1,21 +1,22 @@ Quintiq file version 2.0 #parent: #root Method MappingOperationData ( - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { TextBody: [* // yypsybs Aug-18-2023 (created) // 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍 - toDealList := construct( MappingOperations ); + toDealList := construct( Global_MappingOperations ) ; if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) { - toDealList := selectsortedset( this, MappingOperation, item, + toDealList := selectsortedset( globalOTDTable, Global_MappingOperation, item, businessTypes.Find( item.BusinessType() ) >= 0, // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0, item.SequenceNumber() ); } else { - toDealList := selectsortedset( this, MappingOperation, item, + toDealList := selectsortedset( globalOTDTable, Global_MappingOperation, item, true, item.SequenceNumber() ); } @@ -76,7 +77,7 @@ 0.0, 0.0, false, true ); } - ManufactureLTProcessSection::CreateOrUpdate( op ); + // ManufactureLTProcessSection::CreateOrUpdate( op ); } info( "========" ) // 閬嶅巻routing锛岃繘琛宭ink diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl index 9a854ef..ab7398e 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl @@ -2,6 +2,7 @@ #parent: #root Method MappingProductData ( Strings businesstypes, + GlobalOTDTable globalOTDTable, Boolean iskeyproduct ) { @@ -11,21 +12,21 @@ // Administrator Aug-16-2023 (created) // list to deal info( "Get list to deal of product" ); - listToDeal := construct( structured[MappingProduct] ); + listToDeal := construct( Global_MappingProduct_MPs ); if( isnull( businesstypes ) or businesstypes.Size() = 0 ) { if( iskeyproduct = true ){ - listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true ); + listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true ); } else{ - listToDeal := selectset( this, MappingProduct, item, true ); + listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, true ); } } else { if( iskeyproduct = true ){ - listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true and businesstypes.Find( item.BusinessType()) >= 0 ); + listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, item.KeyProduct() = true and businesstypes.Find( item.BusinessType()) >= 0 ); } else{ - listToDeal := selectset( this, MappingProduct, item, businesstypes.Find( item.BusinessType()) >= 0 ); + listToDeal := selectset( globalOTDTable, Global_MappingProduct_MP, item, businesstypes.Find( item.BusinessType()) >= 0 ); } } totalcount := listToDeal.Size(); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl index 2d63310..5052dc6 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl @@ -1,13 +1,15 @@ Quintiq file version 2.0 #parent: #root -Method MappingProductInLaneData +Method MappingProductInLaneData ( + GlobalOTDTable globalOTDTable +) { Description: 'Get Product In Line data' TextBody: [* // Administrator Aug-17-2023 (created) // list to deal - listtodeal := selectset( this, MappingProductInLane, item ,true ); + listtodeal := selectset( globalOTDTable, Global_MappingProductInLane, item ,true ); totalcount := listtodeal.Size(); info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl index 5f5e1aa..cf459b5 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl @@ -1,7 +1,8 @@ Quintiq file version 2.0 #parent: #root Method MappingSalesSegmentData ( - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { Description: 'ETL閿�鍞儴闂�' @@ -9,11 +10,11 @@ [* // yypsybs Aug-15-2023 (created) // 寰呭鐞嗘暟鎹� - listToDeal := construct( structured[MappingSalesSegment] ); + listToDeal := construct( Global_MappingSalesSegment_MPs ); if( isnull( businessTypes ) or businessTypes.Size() = 0 ) { - listToDeal := selectset( this, MappingSalesSegment, item, true ); + listToDeal := selectset( globalOTDTable, Global_MappingSalesSegment_MP, item, true ); } else { - listToDeal := selectset( this, MappingSalesSegment, item, businessTypes.Find( item.BusinessType() ) <> -1 ); + listToDeal := selectset( globalOTDTable, Global_MappingSalesSegment_MP, item, businessTypes.Find( item.BusinessType() ) <> -1 ); } //nameList := construct( structured[String] ); //nameList := selectvalues( listToDeal, Elements, item, true, item.Name() ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl index 7c856ff..eeb6a49 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl @@ -1,7 +1,8 @@ Quintiq file version 2.0 #parent: #root Method MappingUnitData ( - Strings businesstypes + Strings businesstypes, + GlobalOTDTable globalOTDTable ) { Description: 'Get unit data from operation mapping' @@ -9,12 +10,12 @@ [* // Administrator Aug-21-2023 (created) // list to deal - listtodeal := construct( structured[MappingOperation] ); + listtodeal := construct( Global_MappingOperations); if( isnull( businesstypes ) or businesstypes.Size() = 0 ) { - listtodeal := selectset( this, MappingOperation, item, true ); + listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, true ); } else { - listtodeal := selectset( this, MappingOperation, item, + listtodeal := selectset( globalOTDTable, Global_MappingOperation, item, // businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 businesstypes.Find( item.BusinessType() ) >= 0 ); diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl index 2c4ce55..f3118cb 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl @@ -1,6 +1,8 @@ Quintiq file version 2.0 #parent: #root -Method MappingUnitOfMeasureData +Method MappingUnitOfMeasureData ( + GlobalOTDTable globalotdtable +) { Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�' TextBody: @@ -16,7 +18,7 @@ //error( "multi default unit of measure" ) } - traverse( this, MappingUnitOfMeasure, item ) { + traverse( globalotdtable, Global_MappingUnitOfMeasure_MP, item ) { UnitOfMeasure_MP::CreateOrUpdate( this, item.Name(), item.IsDefault() ); } *] diff --git "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" index c3d0398..9d29f63 100644 --- "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" +++ "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" @@ -4,7 +4,8 @@ MacroPlan macroPlan, String businessTypeStr, Boolean isKeyProduct, - Boolean createPurchaseSupplyMaterial + Boolean createPurchaseSupplyMaterial, + GlobalOTDTable globalOTDTable ) { Description: '鍗曟鍚屾' @@ -15,6 +16,6 @@ if( businessTypeStr.Length() > 0 ) { businessTypes := businessTypeStr.Tokenize( ',' ); } - MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ); + MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable); *] } diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl index 4609620..49fac75 100644 --- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl @@ -3,7 +3,8 @@ StaticMethod DoSync ( MacroPlan macroPlan, Boolean isKeyProduct, - Boolean createPurchaseSupplyMaterial + Boolean createPurchaseSupplyMaterial, + GlobalOTDTable globalOTDTable ) { Description: '鍗曟鍚屾' @@ -11,6 +12,6 @@ [* // yypsybs Aug-17-2023 (created) businessTypes := construct( Strings ); - MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ); + MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial ,globalOTDTable); *] } diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl index 1375c53..b4361d5 100644 --- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl +++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl @@ -4,7 +4,8 @@ MacroPlan macroPlan, Strings businessTypes, Boolean isKeyProduct, - Boolean createPurchaseSupplyMaterial + Boolean createPurchaseSupplyMaterial, + GlobalOTDTable globalOTDTable ) { Description: '鍗曟鍚屾' @@ -27,10 +28,17 @@ macroPlan.InitialUnitAndStockingPoint(); // 鍗曚綅-1 - UnitOfMeasure_MP::DoSync( macroPlan ); + UnitOfMeasure_MP::DoSync( globalOTDTable,macroPlan ); // 閿�鍞儴闂�-2 - SalesSegment_MP::DoSync( macroPlan, businessTypes ); + SalesSegment_MP::DoSync( macroPlan, businessTypes,globalOTDTable ); + + // Unit-9 + // 涓嶰peration涓�鍚屽鐞� + //info( "BaseConversionFactor Finished, Start Operation Data Broker" ); + //macroPlan.Broker_OTD_Operation().Execute(); + info( "Operation Data Broker Finished, Start Unit Mapping" ); + macroPlan.MappingUnitData( businessTypes ,globalOTDTable); // 搴撳瓨鐐�-3 info( "Sales Segment Finished, Start Get StockingPoint From Api" ) @@ -63,29 +71,22 @@ macroPlan.ApiCurencyRatesData( data ); // 浜у搧鐗╂枡-6 - info( "Get CurrencyRates From Api Finished, Start Product Data Broker" ) - macroPlan.Broker_OTD_Product().Execute(); + //info( "Get CurrencyRates From Api Finished, Start Product Data Broker" ) + //macroPlan.Broker_OTD_Product().Execute(); info( "Product Data Broker Finished, Start Product Mapping" ); //testproduct := construct( Strings ); - macroPlan.MappingProductData( businessTypes, isKeyProduct ); + macroPlan.MappingProductData( businessTypes, globalOTDTable,isKeyProduct ); //鍗曚綅杞崲-7 - BaseConversionFactor::DoSync( macroPlan ); - - // Unit-9 - // 涓嶰peration涓�鍚屽鐞� - info( "BaseConversionFactor Finished, Start Operation Data Broker" ); - macroPlan.Broker_OTD_Operation().Execute(); - info( "Operation Data Broker Finished, Start Unit Mapping" ); - macroPlan.MappingUnitData( businessTypes ); + BaseConversionFactor::DoSync( macroPlan ,globalOTDTable); // 宸ヨ壓璺嚎 + BOM-9 info( "Unit Finished, Start Operation Mapping" ); - macroPlan.MappingOperationData( businessTypes ); - info( "Operation Finished, Start BOM Data Broker" ); - macroPlan.Broker_OTD_BOM().Execute(); + macroPlan.MappingOperationData( businessTypes ,globalOTDTable); + //info( "Operation Finished, Start BOM Data Broker" ); + //macroPlan.Broker_OTD_BOM().Execute(); info( "BOM Data Broker Finished, Start BOM Mapping" ); - macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial ); + macroPlan.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial,globalOTDTable ); //杞﹂亾淇℃伅-10 info( "BOM Finished, Start Get Lanes From Api" ); @@ -108,37 +109,35 @@ macroPlan.ApiLaneLegsData( data ); // 渚涘簲缃戠粶锛堣溅閬擄級-12 - info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" ); - macroPlan.Broker_OTD_ProductInLane().Execute(); + //info( "Get Lanelegs From Api Finished, Start ProductInLane Data Broker" ); + //macroPlan.Broker_OTD_ProductInLane().Execute(); info( "ProductInLane Data Broker Finished, Start ProductInLane Mapping" ); - macroPlan.MappingProductInLaneData(); + macroPlan.MappingProductInLaneData(globalOTDTable); // 鍦ㄥ簱搴撳瓨鏁版嵁-13 - info( "ProductInLane Finished, Start ActualPISPIP Data Broker" ); - macroPlan.Broker_OTD_ActualPISPIP().Execute(); + //info( "ProductInLane Finished, Start ActualPISPIP Data Broker" ); + //macroPlan.Broker_OTD_ActualPISPIP().Execute(); info( "ActualPISPIP Data Broker Finished, Start ActualPISPIP Mapping" ); - //macroPlan.MappingActualPISPIPData( businessTypes, true ); - macroPlan.MappingActualPISPIPData( businessTypes, isKeyProduct ); + macroPlan.MappingActualPISPIPData( businessTypes, globalOTDTable,isKeyProduct ); // 鍦ㄩ�斿簱瀛�-14 - info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" ); - macroPlan.Broker_OTD_ExternalSupply().Execute(); - //macroPlan.MappingExternalSupplyData( businessTypes, true ); + //info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" ); + //macroPlan.Broker_OTD_ExternalSupply().Execute(); info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" ); - macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ); + macroPlan.MappingExternalSupplyData( businessTypes, isKeyProduct ,globalOTDTable); // 搴撳瓨鎴愭湰-15 - InventoryValueAndCost::DoSync( macroPlan ); + InventoryValueAndCost::DoSync( macroPlan,globalOTDTable ); // todo 鍒堕�犳垚鏈�-16 info( "InventoryCost Finished, Start OperationCost Mapping" ); - //macroPlan.MappingOperationCostData( businessTypes ); + macroPlan.MappingOperationCostData( businessTypes ); // 璁㈠崟棰勬祴-17 - Forecast::DoSync( macroPlan, businessTypes ); + Forecast::DoSync( macroPlan, businessTypes ,globalOTDTable); // 璁㈠崟闇�姹�-18 - CustomerOrder::DoSync( macroPlan, businessTypes ); + CustomerOrder::DoSync( macroPlan, businessTypes, globalOTDTable); //鍒犻櫎澶氫綑鎶ラ敊鏁版嵁-19 macroPlan.DeleteSnaityCheck(); diff --git a/_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl b/_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl index 650b697..ae70b83 100644 --- a/_Main/BL/Type_ManufactureLTImputation/StaticMethod_Transfer.qbl +++ b/_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() ); - } - } - } - // 澶勭悊鏂扮殑鐨刼peration - 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() ); + // } + // } + //} + //// 澶勭悊鏂扮殑鐨刼peration + //traverse( newMP, Routing.RoutingStep.Operation, item ) { + // ManufactureLTProcessSection::CreateOrUpdate( item ); + //} *] } diff --git a/_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl index 8d40621..fe55479 100644 --- a/_Main/BL/Type_ManufactureLTProcessSection/StaticMethod_CreateOrUpdate.qbl +++ b/_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; *] } diff --git a/_Main/BL/Type_MappingSaleBudge/StaticMethod_ExpectedHeaders.qbl b/_Main/BL/Type_MappingSaleBudge/StaticMethod_ExpectedHeaders.qbl new file mode 100644 index 0000000..d7275ba --- /dev/null +++ b/_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; + *] +} diff --git a/_Main/BL/Type_MappingSaleBudge/StaticMethod_Export.qbl b/_Main/BL/Type_MappingSaleBudge/StaticMethod_Export.qbl new file mode 100644 index 0000000..c469165 --- /dev/null +++ b/_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(); + *] +} diff --git a/_Main/BL/Type_MappingSaleBudge/StaticMethod_ExportFields.qbl b/_Main/BL/Type_MappingSaleBudge/StaticMethod_ExportFields.qbl new file mode 100644 index 0000000..58b6447 --- /dev/null +++ b/_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; + *] +} diff --git a/_Main/BL/Type_Operation/Method_GetHasValidOperationInputOutput.qbl b/_Main/BL/Type_Operation/Method_GetHasValidOperationInputOutput.qbl new file mode 100644 index 0000000..09ae8ea --- /dev/null +++ b/_Main/BL/Type_Operation/Method_GetHasValidOperationInputOutput.qbl @@ -0,0 +1,38 @@ +Quintiq file version 2.0 +#parent: #root +Method GetHasValidOperationInputOutput ( + output Strings feedback_o, + output Strings sanitycheckfeedback_o +) declarative remote #extension +{ + TextBody: + [* + // desmondt Oct-3-2014 (created) + feedback := ''; + sanitycheckfeedback := '' + + if( ( this.Unit().QuantityToProcess() = GlobalParameters_MP::GetQTProcessIn() + or not this.Unit().IsSupplier() ) // Tianma change 20230925: If the unit is not a supplier, raise a data issue if there's no input + and this.OperationInput( relsize ) = 0 ) + { + feedback := Translations::MP_Operation_ViolateHasValidOperationInputOutput_NoOperationInput(); + sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() ); + } + else if( this.Unit().QuantityToProcess() = GlobalParameters_MP::GetQTProcessOut() + and this.OperationOutput( relsize ) = 0 ) + { + feedback := Translations::MP_Operation_ViolateHasValidOperationInputOutput_NoOperationOutput(); + sanitycheckfeedback := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue(); + } + + if( not isnull( feedback_o ) and feedback <> '' ) + { + name := MacroPlan::GetSubstituteName( this.Name() ); // To avoid empty name/name too long + feedback_o.Add( SanityCheckMessage::GetFormattedMessage( Translations::MP_Process_Instance( this.DefinitionName(), name ), + feedback ) ); + sanitycheckfeedback_o.Add( sanitycheckfeedback ); + } + + return feedback = ''; + *] +} diff --git a/_Main/BL/Type_Operation/Method_OnCommitCustom.qbl b/_Main/BL/Type_Operation/Method_OnCommitCustom.qbl index b714ef0..650047b 100644 --- a/_Main/BL/Type_Operation/Method_OnCommitCustom.qbl +++ b/_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 ); *] } diff --git a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl index ef1ffae..cd9e1c1 100644 --- a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl @@ -2,15 +2,16 @@ #parent: #root StaticMethod DoSync ( MacroPlan macroPlan, - Strings businessTypes + Strings businessTypes, + GlobalOTDTable globalOTDTable ) { TextBody: [* // yypsybs Aug-17-2023 (created) - info( "UnitOfMeasure_MP Finished, Start Sales Segment Data Broker" ) - macroPlan.Broker_OTD_SalesSegment().Execute(); + //info( "UnitOfMeasure_MP Finished, Start Sales Segment Data Broker" ) + //macroPlan.Broker_OTD_SalesSegment().Execute(); info( "Sales Segment Data Broker Finished, Start Sales Segment Mapping" ) - macroPlan.MappingSalesSegmentData( businessTypes ); + macroPlan.MappingSalesSegmentData( businessTypes,globalOTDTable ); *] } diff --git "a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart\04395.qbl" "b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart\04395.qbl" index 2c07b9d..c543694 100644 --- "a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart\04395.qbl" +++ "b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart\04395.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 ); // 鏈�;瀛e害;鍗婂勾;骞� 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 + "瀛e害-鐩爣", 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 + "瀛e害-" + 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 + "瀛e害-鐩爣", 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 + "瀛e害-" + 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() ) ) ); } diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl index 2f62201..fbb2caf 100644 --- a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl +++ b/_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 ); // 鏈�;瀛e害;鍗婂勾;骞� 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 + "瀛e害-鐩爣", 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 + "瀛e害-" + 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 + "瀛e害-鐩爣", 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 + "瀛e害-" + 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 ) ) ); } } diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl index a441cd3..d5d4352 100644 --- a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl +++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl @@ -72,7 +72,9 @@ info( "dealing 闈㈡澘鍒嗛厤閲�" ) if( CapacityAndSaleBudgeFilterItem::Contains( items, "闈㈡澘鍒嗛厤閲�" ) ) { traverse( years, Elements, year ) { + info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞�" ); // 鍘嗗彶鏁版嵁 + info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞村巻鍙叉暟鎹�" ); traverse( months, Elements, month ) { columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "闈㈡澘鍒嗛厤閲�-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { @@ -87,6 +89,7 @@ cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); } + info( "闈㈡澘鍒嗛厤閲�" + [String]year.YearNo() + "骞碨&OP鏁版嵁" ); // S&OP鏁版嵁 traverse( macroPlans, Elements, macroPlan ) { traverse( months, Elements, month ) { @@ -112,7 +115,9 @@ info( "dealing 閿�鍞" ) if( CapacityAndSaleBudgeFilterItem::Contains( items, "閿�鍞" ) ) { traverse( years, Elements, year ) { + info( "閿�鍞" + [String]year.YearNo() + "骞�" ); // 鍘嗗彶鏁版嵁 + info( "閿�鍞" + [String]year.YearNo() + "骞村巻鍙叉暟鎹�" ); traverse( months, Elements, month ) { columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "瀵瑰閿�鍞-" + [String]year.YearNo() + "骞�-" + [String]month.MonthNo() + "鏈�-骞村害棰勭畻" ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { @@ -127,6 +132,7 @@ cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); } + info( "閿�鍞" + [String]year.YearNo() + "骞村巻鍙叉暟鎹甋&OP鏁版嵁" ); // S&OP鏁版嵁 traverse( macroPlans, Elements, macroPlan ) { traverse( months, Elements, month ) { @@ -151,7 +157,7 @@ info( "dealing 澶у紶鐩堝埄棰�" ) traverse( years, Elements, year ) { // 鍘嗗彶鏁版嵁 - columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-骞村害棰勭畻" ); + columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�-骞村害棰勭畻" ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { // todo // QID 23 @@ -160,7 +166,7 @@ } // S&OP鏁版嵁 traverse( macroPlans, Elements, macroPlan ) { - columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�" ); + columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "澶у紶鐩堝埄棰�-" + [String]year.YearNo() + "骞�-" + macroPlan.ScenarioName() ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) ); cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); @@ -171,16 +177,15 @@ info( "dealing 浜у搧鐩堝埄棰�" ) traverse( years, Elements, year ) { // 鍘嗗彶鏁版嵁 - columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-骞村害棰勭畻" ); + columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�-骞村害棰勭畻" ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { // todo - // QID 23 cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) ); cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); } // S&OP鏁版嵁 traverse( macroPlans, Elements, macroPlan ) { - columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�" ); + columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "浜у搧鐩堝埄棰�-" + [String]year.YearNo() + "骞�-" + macroPlan.ScenarioName() ); traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { // todo cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) ); diff --git a/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl new file mode 100644 index 0000000..44dab2e --- /dev/null +++ b/_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompareExport.qbl @@ -0,0 +1,42 @@ +Quintiq file version 2.0 +#parent: #root +Method CapacityAndSaleBudgeCompareExport () as BinaryValue +{ + Description: '瀵煎嚭姣旇緝缁撴灉' + TextBody: + [* + // yypsybs Sep-22-2023 (created) + tableName := "骞村害浜ч攢棰勭畻瀵规瘮"; + + text:= '<?xml version="1.0" encoding="utf-8" standalone="yes"?><table><name>' + tableName + '</name>'; + + // 澶勭悊column <column><name>鐗╂枡缂栫爜</name><type>String</type></column> + columnXml := "" + traverse( this, CapacityAndSaleBudgeCompareItemColumn, column ) { + info( "columnName : " + column.ColumnName() ); + columnXml := columnXml + "<column><name>" + column.ColumnName() + "</name><type>String</type></column>"; + } + text := text + columnXml + "</table>" + + // 濉炲唴瀹� + xmlDOMImplementation := XMLDOMImplementation::Create(); + xmlDOMDocument := xmlDOMImplementation.CreateDocumentFromString( text ); + tableElement:= xmlDOMDocument.GetElementByTagName( "table", 0 ); + rows := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, row, row.PlaceOfProductionOfArray() + "_" + row.BusinessType() ); + traverse ( rows, Elements, row ) { + info( "rowNo : " + [String]row.RowNo() ); + traverse( row, CapacityAndSaleBudgeCompareItemCell, cell ) { + ScenarioManager::GeneratesTheSpecifiedXMLColumn( xmlDOMDocument, tableElement, cell.CellContent(), cell.CapacityAndSaleBudgeCompareItemColumn().ColumnName() ); + } + } + xmlDOMSerializer := xmlDOMImplementation.CreateSerializer(); + xmlTableString := xmlDOMSerializer.WriteToString( xmlDOMDocument ); + + tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTableString ) ); + tableGroupHandle := TableGroupHandle::Create( tableName ); + tableGroupHandle.Add( tableHandle ); + tableBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); + + return tableBinaryData.AsBinaryValue(); + *] +} diff --git a/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl b/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl new file mode 100644 index 0000000..f40c634 --- /dev/null +++ b/_Main/BL/Type_ScenarioManager/StaticMethod_GeneratesTheSpecifiedXMLColumn.qbl @@ -0,0 +1,23 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod GeneratesTheSpecifiedXMLColumn ( + XMLDOMDocument xmlDOMDocument, + XMLDOMElement tableElement, + String value, + String columnName +) +{ + TextBody: + [* + columnElements := tableElement.GetElementsByTagName( "column" ); + + traverse ( columnElements, Elements, ce ) { + nameElement := ce.GetElementByTagName( "name", 0 ); + if ( nameElement.TextContent() = columnName ) { + cell := xmlDOMDocument.CreateElement( "cell" ); + cell.SetAttribute( "value", value ); + ce.AppendChild( cell ); + } + } + *] +} diff --git a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl index aff8971..857199b 100644 --- a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl +++ b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpoint.qbl @@ -33,7 +33,7 @@ // Update result.Update( unitid, id, name, unitofmeasurename, currencyname, isplannedinfinite, datestart, dateend, groupname, description, isfromdb ); }; - + result.IsPlannedInfinite(true); return result; *] } diff --git a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl index e4dae0e..9fdcd8b 100644 --- a/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl +++ b/_Main/BL/Type_StockingPoint_MP/StaticMethod_CreateStockingpointFromJson.qbl @@ -13,6 +13,11 @@ unitid := datarow.Get( "unitid" ).GetString(); name := datarow.Get( "name" ).GetString(); + unit := Unit::FindUnitTypeIndex( unitid); + if( isnull( unit)){ + unitid := "鐢熶骇"; + } + result := StockingPoint_MP::CreateStockingpoint( mp, id, unitid, name ); return result; diff --git a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl index f5ea0a0..7393582 100644 --- a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl +++ b/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl @@ -1,16 +1,17 @@ Quintiq file version 2.0 #parent: #root StaticMethod DoSync ( - MacroPlan macroPlan + GlobalOTDTable globalotdtable, + MacroPlan macroplan ) { Description: '鍗曟鍚屾' TextBody: [* // yypsybs Aug-17-2023 (created) - info( "Inital Finished, Start UnitOfMeasure_MP Data Broker" ) - macroPlan.Broker_OTD_UnitOfMeasure().Execute(); + //info( "Inital Finished, Start UnitOfMeasure_MP Data Broker" ) + //macroPlan.Broker_OTD_UnitOfMeasure().Execute(); info( "UnitOfMeasure_MP Data Broker Finished, Start UnitOfMeasure_MP Mapping" ) - macroPlan.MappingUnitOfMeasureData(); + macroplan.MappingUnitOfMeasureData(globalotdtable); *] } diff --git a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def b/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def index 7b1da32..e164af9 100644 --- a/_Main/UI/MacroPlanner/Component_FormTestButtonCollection/Response_Button398_OnClick.def +++ b/_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' diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgTest.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_abgTest.def new file mode 100644 index 0000000..e7f2aa2 --- /dev/null +++ b/_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' + ] +} diff --git "a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef\0431.def" "b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef\0431.def" new file mode 100644 index 0000000..42787dc --- /dev/null +++ "b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Component_applicationDevelopmentActionBarPageDef\0431.def" @@ -0,0 +1,8 @@ +Quintiq file version 2.0 +Component applicationDevelopmentActionBarPageDef id:applicationDevelopmentActionBarPageDef_1 #extension +{ + Children: + [ + #child: abgTest + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_abgTest_btnTest_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_TIANMA_JITUAN_abgTest_btnTest_OnClick.def new file mode 100644 index 0000000..8b67882 --- /dev/null +++ b/_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 ); + *] + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def index 2ee31ab..b0bcb6e 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def +++ b/_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/_ROOT_Component_ApplicationMacroPlanner.def @@ -11,6 +11,7 @@ [ #child: ActionBarPageData #child: ActionBarPageSales + #child: applicationDevelopmentActionBarPageDef_1 ] } Component DataHolderCapacityAndSaleBudgeFilterItem diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlActions.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlActions.def new file mode 100644 index 0000000..0e13477 --- /dev/null +++ b/_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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Component_pnlContent.def new file mode 100644 index 0000000..f885a86 --- /dev/null +++ b/_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: '妯℃澘浜ф垚鍝両D' + 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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_Edit.def new file mode 100644 index 0000000..77662e1 --- /dev/null +++ b/_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 ); + *] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Method_New.def new file mode 100644 index 0000000..fa8fb18 --- /dev/null +++ b/_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 ); + *] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnCancel_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnCancel_OnClick.def new file mode 100644 index 0000000..057d12d --- /dev/null +++ b/_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(); + *] + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/Response_pnlActions_btnOk_OnClick.def new file mode 100644 index 0000000..336e9a8 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/_ROOT_Component_DialogCreateEditCapacityAllocationResultsRuleConfiguration.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCapacityAllocationResultsRuleConfiguration/_ROOT_Component_DialogCreateEditCapacityAllocationResultsRuleConfiguration.def new file mode 100644 index 0000000..76da375 --- /dev/null +++ b/_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' + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def index 5d283ea..b8022af 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def +++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def @@ -108,7 +108,7 @@ // sync data if( data.EnableSync() ) { MacroPlan::DoSync( macroPlanNew, - data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ); + data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() ,GlobalOTDTable); } this.Close(); diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def b/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def index 66db189..4b16da7 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def +++ b/_Main/UI/MacroPlannerWebApp/Component_Form234/Component_List174.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"OrderCode","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":"OrderDateTime","title":"OrderDateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderDateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderQty","title":"OrderQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"ForecastHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"ForecastNoHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"CustomerCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerCode"}}]' + 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":"OrderQty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderDateTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderDateTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"鏈夐娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"鏃犻娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"瀹㈡埛ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"CustomerCode"}}]' ContextMenu: 'listContextMenu108' SortCriteria: 'OperateTime' Taborder: 2 diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def index c07b922..27d0374 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_ListCapacityAllocationResults.def +++ b/_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 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_PanelCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_PanelCapacityAllocationResults.def new file mode 100644 index 0000000..a916ec0 --- /dev/null +++ b/_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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def index 5384f4a..81f7ddb 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listActionBarPageCapacityAllocationResults.def +++ b/_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: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def index 62d4067..b7e995a 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Component_listContextMenuCapacityAllocationResults.def +++ b/_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: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def deleted file mode 100644 index 2d97d02..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_ButtonGenerateCapacityAllocationResults_OnClick.def +++ /dev/null @@ -1,16 +0,0 @@ -Quintiq file version 2.0 -#parent: ButtonGenerateCapacityAllocationResults -Response OnClick () id:Response_FormCapacityAllocationResults_ButtonGenerateCapacityAllocationResults_OnClick -{ - #keys: '[414702.0.340111671]' - CanBindMultiple: false - DefinitionID: 'Responsedef_WebButton_OnClick' - QuillAction - { - Body: - [* - CapacityAllocationResults::CreateDate( GlobalOTDTable, MacroPlan ); - *] - GroupServerCalls: false - } -} diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR\04339.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR\04339.def" new file mode 100644 index 0000000..6a4fd16 --- /dev/null +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_ButtonGenerateCapacityAllocationR\04339.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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_Export_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/Response_PanelCapacityAllocationResults_Export_OnClick.def new file mode 100644 index 0000000..4428575 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def index 432fdfa..983e0ed 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResults/_ROOT_Component_FormCapacityAllocationResults.def +++ b/_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: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_ListCapacityAllocationResultsRuleConfiguration.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_ListCapacityAllocationResultsRuleConfiguration.def new file mode 100644 index 0000000..add7c86 --- /dev/null +++ b/_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()' + } + ] + } + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_PanelImportAndExport.def new file mode 100644 index 0000000..367ca52 --- /dev/null +++ b/_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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listActionBarPageCapacityAllocationResultsRuleConfiguration.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listActionBarPageCapacityAllocationResultsRuleConfiguration.def new file mode 100644 index 0000000..cc72a32 --- /dev/null +++ b/_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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listContextMenuCapacityAllocationResultsRuleConfiguration.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Component_listContextMenuCapacityAllocationResultsRuleConfiguration.def new file mode 100644 index 0000000..597ad1b --- /dev/null +++ b/_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 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataCh.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_DataHolderSelectCapacityAllocationResultsRuleConfiguration_OnDataCh.def new file mode 100644 index 0000000..1c99357 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuDelete_OnClick.def new file mode 100644 index 0000000..ecf8b8c --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuEdit_OnClick.def new file mode 100644 index 0000000..01a7ffa --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuNew_OnClick.def new file mode 100644 index 0000000..76e0cd1 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClic.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_ListCapacityAllocationResultsRuleConfiguration_MenuSelectAll_OnClic.def new file mode 100644 index 0000000..720300e --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Export_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Export_OnClick.def new file mode 100644 index 0000000..602baba --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Import_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/Response_PanelImportAndExport_Import_OnClick.def new file mode 100644 index 0000000..3e90d91 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/_ROOT_Component_FormCapacityAllocationResultsRuleConfiguration.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAllocationResultsRuleConfiguration/_ROOT_Component_FormCapacityAllocationResultsRuleConfiguration.def new file mode 100644 index 0000000..436ef69 --- /dev/null +++ b/_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: '浜ц兘鍒嗛厤缁撴灉鎶ヨ〃-瑙勫垯缁存姢' + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def index 1e5e82c..984c1f6 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Component_ListCapacityAndSaleBudge.def @@ -38,6 +38,6 @@ ] Properties: [ - Taborder: 0 + Taborder: 1 ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_ButtonExportDetail_OnClick.def new file mode 100644 index 0000000..4f195d5 --- /dev/null +++ b/_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 + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def index 2b3f638..d4df714 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/Response_OnCreated.def @@ -12,6 +12,7 @@ [* MPSync::TestData( MPSync, MacroPlan ); GlobalOTDTable.InitTestData(); + MPSync.RefreshCapacityAndSaleBudgeFilter(); *] } } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def index 168d51b..8758502 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudge/_ROOT_Component_FormCapacityAndSaleBudge.def +++ b/_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: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def index ccb0ea2..53e33ba 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def +++ b/_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(), diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def index 3684ed8..237e0c6 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def +++ b/_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: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def index db394b0..cbfdc2b 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def @@ -93,6 +93,6 @@ ContextMenu: 'matrixeditorContextMenuCapacityAndSaleBudgeCompare' Editable: false Rows: 'MatrixEditorRowsCapacityAndSaleBudgeCompare' - Taborder: 1 + Taborder: 2 ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def new file mode 100644 index 0000000..97cea9d --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonExportCompare_OnClick.def @@ -0,0 +1,21 @@ +Quintiq file version 2.0 +#parent: ButtonExportCompare +Response OnClick () id:Response_FormCapacityAndSaleBudgeCompare_ButtonExportCompare_OnClick +{ + #keys: '[414384.0.881345276]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + Precondition: + [* + return not isnull( GlobalOTDTable ); + *] + QuillAction + { + Body: + [* + tableBinaryData := ScenarioManager.CapacityAndSaleBudgeCompareExport().AsBinaryData(); + Application.Download( "骞村害浜ч攢棰勭畻瀵规瘮.xlsx", tableBinaryData ); + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def index 9602b8e..d44643f 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def @@ -18,6 +18,17 @@ Taborder: 0 ] } + Component ButtonExportCompare + { + #keys: '[414384.0.881345277]' + BaseType: 'WebButton' + Properties: + [ + Image: 'EXPORT1' + Label: '瀵煎嚭' + Taborder: 1 + ] + } ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def index 6795199..c7d0922 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_ListHedgingOfLog.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"Serial","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"ForecastQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"ReverseQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"AuthorizeQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateQty","title":"OperateQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateType","title":"OperateType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Operator","title":"Operator","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Operator"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateTime","title":"OperateTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateTime"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"搴忓彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"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":"ReverseQty","title":"鍙嶇鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateQty","title":"鍔ㄤ綔鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateType","title":"鍔ㄤ綔绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Operator","title":"鎿嶄綔浜�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Operator"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OperateTime","title":"鎿嶄綔鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OperateTime"}}]' ContextMenu: 'listContextMenuHedgingOfLog' Taborder: 2 ] @@ -36,6 +36,6 @@ ] Properties: [ - Taborder: 3 + Taborder: 1 ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def index ed7d295..b86fdcd 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog.def @@ -27,15 +27,13 @@ ] Properties: [ - Taborder: 2 + Taborder: 0 ] } #child: ListHedgingOfLog - #child: PanelHedgingOfLog761 - #child: PanelHedgingOfLog593 ] Properties: [ - Taborder: 0 + Taborder: 2 ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def new file mode 100644 index 0000000..655b205 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog221.def @@ -0,0 +1,26 @@ +Quintiq file version 2.0 +Component PanelHedgingOfLog221 +{ + #keys: '[414724.0.149787927]' + BaseType: 'WebPanel' + Children: + [ + Component LabelHedgingOfLog id:LabelHedgingOfLog_298 + { + #keys: '[414724.0.149788086]' + BaseType: 'WebLabel' + Properties: + [ + FixedSize: false + Taborder: 0 + Text: '鏃ュ織椤甸潰' + ] + } + ] + Properties: + [ + Border: true + FixedSize: true + Taborder: 0 + ] +} diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def" new file mode 100644 index 0000000..e38df06 --- /dev/null +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593\04393.def" @@ -0,0 +1,38 @@ +Quintiq file version 2.0 +Component PanelHedgingOfLog593 id:PanelHedgingOfLog593_93 +{ + #keys: '[414724.0.152989129]' + BaseType: 'WebPanel' + Children: + [ + Component txt_QueryContent_FHO + { + #keys: '[414724.0.152989222]' + BaseType: 'WebEditField' + Properties: + [ + PlaceHolder: '妯$硦鎼滅储' + Taborder: 0 + ] + } + Component btn_Query_FHO + { + #keys: '[414724.0.152920619]' + BaseType: 'WebButton' + Properties: + [ + ButtonSize: 'compact' + Image: 'VIEW' + Label: '鏌ヨ' + Taborder: 1 + ] + } + ] + Properties: + [ + Alignment: 'trailing' + FixedSize: true + Orientation: 'horizontal' + Taborder: 1 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def deleted file mode 100644 index 58cf03b..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog593.def +++ /dev/null @@ -1,24 +0,0 @@ -Quintiq file version 2.0 -Component PanelHedgingOfLog593 -{ - #keys: '[414724.0.32210907]' - BaseType: 'WebPanel' - Children: - [ - Component lb_SKUCode - { - #keys: '[414724.0.32210935]' - BaseType: 'WebLabel' - Properties: - [ - Taborder: 0 - Text: 'SKU缂栫爜锛欰AAAAAAAA' - ] - } - ] - Properties: - [ - FixedSize: true - Taborder: 1 - ] -} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def deleted file mode 100644 index dded053..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Component_PanelHedgingOfLog761.def +++ /dev/null @@ -1,28 +0,0 @@ -Quintiq file version 2.0 -Component PanelHedgingOfLog761 -{ - #keys: '[414724.0.26973497]' - BaseType: 'WebPanel' - Children: - [ - Component LabelHedgingOfLog - { - #keys: '[414724.0.26973515]' - BaseType: 'WebLabel' - Properties: - [ - FixedSize: false - Taborder: 0 - Text: '鏃ュ織椤甸潰' - ] - } - ] - Properties: - [ - FixedSize: true - Orientation: 'horizontal' - Padding: 'true' - Style: 'content' - Taborder: 0 - ] -} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def new file mode 100644 index 0000000..4bc548f --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick.def @@ -0,0 +1,19 @@ +Quintiq file version 2.0 +#parent: PanelHedgingOfLog593_93/btn_Query_FHO +Response OnClick () id:Response_PanelHedgingOfLog593_93_btn_Query_FHO_OnClick +{ + #keys: '[414724.0.152920798]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + QuillAction + { + Body: + [* + DataExtractorHedgingOfLog.FixedFilter( "object.SKU().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" + + " or " + "object.OperateType().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" + + " or " + "object.Operator().LikeUserLocale( " + txt_QueryContent_FHO.Text().AsQUILL() + " )" + ); + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def index 1e88a95..f7142b9 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormHedgingOfLog/_ROOT_Component_FormHedgingOfLog.def @@ -8,16 +8,8 @@ Children: [ #child: PanelHedgingOfLog - Component lb_ForecastQty - { - #keys: '[414724.0.31031550]' - BaseType: 'WebLabel' - Properties: - [ - Taborder: 1 - Text: '鍘熸潗鏂欑殑棰勬祴鏁伴噺锛�0' - ] - } + #child: PanelHedgingOfLog221 + #child: PanelHedgingOfLog593_93 ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def index a9fc454..2d1eebd 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_ListMaterialPurchase.def @@ -12,6 +12,7 @@ Properties: [ DataType: 'structured[H_MaterialPurchase]' + FixedFilter: 'object.Status()="鏈彂甯�"' Source: 'DataHolderMaterialPurchase' Taborder: 0 Transformation: 'Elements' @@ -28,7 +29,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"ProductSubclassType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"OrgCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"WarehouseCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"DemandTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"浠撳簱浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}}]' ContextMenu: 'listContextMenuMaterialPurchase' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def index 228bfb8..5e51ffa 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase.def @@ -11,15 +11,17 @@ BaseType: 'WebLabel' Properties: [ - NumberOfColumns: 50 + NumberOfColumns: 30 Taborder: 0 Text: '寮�濮嬫椂闂达細2023-03-26 12:24:46' + Visible: false ] } #child: PanelMaterialPurchase613 ] Properties: [ + Alignment: 'trailing' FixedSize: true Orientation: 'horizontal' Taborder: 1 diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def new file mode 100644 index 0000000..043567d --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/Component_PanelMaterialPurchase354.def @@ -0,0 +1,26 @@ +Quintiq file version 2.0 +Component PanelMaterialPurchase354 +{ + #keys: '[414724.0.149784759]' + BaseType: 'WebPanel' + Children: + [ + Component lb_Title208 + { + #keys: '[414724.0.149784840]' + BaseType: 'WebLabel' + Properties: + [ + Description: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁' + Taborder: 0 + Text: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁' + ] + } + ] + Properties: + [ + Border: true + FixedSize: true + Taborder: 0 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def index 88640ec..a2af624 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormMaterialPurchase/_ROOT_Component_FormMaterialPurchase.def @@ -7,17 +7,6 @@ BaseType: 'WebForm' Children: [ - Component lb_Title - { - #keys: '[414724.0.32644779]' - BaseType: 'WebLabel' - Properties: - [ - Description: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁' - Taborder: 0 - Text: '鎺堟潈/鍙嶇鐗╂枡閲囪喘鏄庣粏閲婃斁' - ] - } #child: PanelMaterialPurchase Component DataHolderMaterialPurchase { @@ -45,6 +34,7 @@ ] } #child: ListMaterialPurchase + #child: PanelMaterialPurchase354 ] Properties: [ diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def" index 899294d..4aa7065 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_ListOrderLock\043844.def" @@ -29,7 +29,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderID","title":"OrderID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SalesSegmentName","title":"SalesSegmentName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SalesSegmentName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockingPointID","title":"StockingPointID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockingPointID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Price","title":"Price","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Price"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsLocked","title":"IsLocked","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsLocked"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"First.AsPlanningBaseSalesDemandInPeriod.End","title":"End","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"First.AsPlanningBaseSalesDemandInPeriod.End"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModify","title":"LastModify","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModify"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LastModifyTime","title":"LastModifyTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"LastModifyTime"}}]' ContextMenu: 'listContextMenuOrderLock' Taborder: 2 ] diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def" index 4ff0600..26dee9c 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Component_PanelOrderLockHeader\043545.def" @@ -87,7 +87,7 @@ ButtonSize: 'compact' Description: '璁㈠崟閿佸畾' Label: '閿佸畾' - Taborder: 7 + Taborder: 8 ] } Component ButtonOrderLockHeaderUnlock @@ -99,7 +99,7 @@ ButtonSize: 'compact' Description: '璁㈠崟瑙i攣' Label: '瑙i攣' - Taborder: 8 + Taborder: 9 ] } Component ButtonOrderLockHeaderClear @@ -114,6 +114,18 @@ Taborder: 6 ] } + Component ButtonOrderLockHeaderFresh + { + #keys: '[412960.0.259721852]' + BaseType: 'WebButton' + Properties: + [ + ButtonSize: 'compact' + Description: '浠庢暟鎹簮鍒锋柊璁㈠崟鏁版嵁' + Label: '閲嶆柊鑾峰彇璁㈠崟' + Taborder: 7 + ] + } ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def new file mode 100644 index 0000000..44c70d6 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick.def @@ -0,0 +1,19 @@ +Quintiq file version 2.0 +#parent: PanelOrderLockHeader_545/ButtonOrderLockHeaderFresh +Response OnClick () id:Response_PanelOrderLockHeader_545_ButtonOrderLockHeaderFresh_OnClick +{ + #keys: '[412960.0.259721886]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + GroupServerCalls: true + QuillAction + { + Body: + [* + macroplan := MacroPlan; + global := GlobalOTDTable; + businesstypes := DataHolderOrderLockGlobal.Data().BusinessType().Tokenize( ',' ); + CustomerOrder::DoSync( macroplan, businesstypes, global ); + *] + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def index 5fa0f71..bef1aa1 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderCustomerOrder_O.def @@ -19,11 +19,11 @@ newfilter := ""; findcount := 0; traverse( existfilterlist, Elements, filter ){ - if( filter.FindString( "EndDate()", 0 ) >= 0 ){ + if( filter.FindString( "StartDate()", 0 ) >= 0 ){ if( newfilter = "" ){ - newfilter := "( object.EndDate() = " + this.Date().AsQUILL() + " )"; + newfilter := "( object.StartDate() = " + this.Date().AsQUILL() + " )"; }else{ - newfilter := newfilter + " and " + "( object.EndDate() = " + this.Date().AsQUILL() + " )"; + newfilter := newfilter + " and " + "( object.StartDate() = " + this.Date().AsQUILL() + " )"; } findcount := 1; }else{ @@ -37,9 +37,9 @@ if( findcount = 0 ){ if( newfilter = "" ){ - newfilter := "( object.EndDate() = " + this.Date().AsQUILL() + " )"; + newfilter := "( object.StartDate() = " + this.Date().AsQUILL() + " )"; }else{ - newfilter := newfilter + " and " + "( object.EndDate() = " + this.Date().AsQUILL() + " )"; + newfilter := newfilter + " and " + "( object.StartDate() = " + this.Date().AsQUILL() + " )"; } } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def index a5fda9c..4680617 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormOrderLock/Response_PanelOrderLockHeader_545_DateSelectorOrderLockHeaderPlanDeliver_OnC.def @@ -19,7 +19,7 @@ newfilter := ""; findcount := 0; traverse( existfilterlist, Elements, filter ){ - if( filter.FindString( "End()", 0 ) >= 0 and filter.FindString( "EndDate()", 0 ) < 0 ){ + if( filter.FindString( "End()", 0 ) >= 0 ){ if( newfilter = "" ){ newfilter := "( object.First().AsPlanningBaseSalesDemandInPeriod().End().Date() = " + this.Date().AsQUILL() + " )"; }else{ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def b/_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def index 31b93b5..08db4f3 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormPanelMaterialTianHua/_ROOT_Component_FormPanelMaterialTianHua.def @@ -32,8 +32,8 @@ ] Properties: [ - Description: '澶╄姳' + Description: '澶╁崕' Image: 'CANDLE' - Title: '澶╄姳' + Title: '澶╁崕' ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def index fbb5054..ab6d309 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Issuer","title":"Issuer","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Issuer"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"IssuingDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FinishDate","title":"FinishDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FinishDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"Status","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VCode","title":"VCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"Serial","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Serial","title":"搴忓彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Serial"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"鍙戝竷鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FinishDate","title":"缁撴潫鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FinishDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Issuer","title":"鍙戝竷浜�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Issuer"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"鐘舵��","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}}]' ContextMenu: 'listContextMenuReleaseRecord' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def index 6ef25a7..4f4cedb 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_ListReleaseRecord243.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"H_ReleaseRecord_ID","title":"H_ReleaseRecord_ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"H_ReleaseRecord_ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"H_HedgingRecord_ID","title":"H_HedgingRecord_ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"H_HedgingRecord_ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"Qty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Status","title":"Status","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Status"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"IssuingDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"鐗╂枡缂栧彿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Qty","title":"鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Qty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"WarehouseCode","title":"浠撳簱浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"WarehouseCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DemandTime","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DemandTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IssuingDate","title":"鍙戝竷鏃堕棿","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IssuingDate"}}]' ContextMenu: 'listContextMenuReleaseRecord690' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def new file mode 100644 index 0000000..6d2fc94 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Component_PanelReleaseRecord423.def @@ -0,0 +1,26 @@ +Quintiq file version 2.0 +Component PanelReleaseRecord423 +{ + #keys: '[414724.0.149784904]' + BaseType: 'WebPanel' + Children: + [ + Component LabelReleaseRecord id:LabelReleaseRecord_296 + { + #keys: '[414724.0.149784974]' + BaseType: 'WebLabel' + Properties: + [ + NumberOfColumns: 20 + Taborder: 0 + Text: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏' + ] + } + ] + Properties: + [ + Border: true + FixedSize: true + Taborder: 0 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def index f4cc29c..9e293a9 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_ListReleaseRecord_OnSelectionChanged.def @@ -11,7 +11,15 @@ { Body: [* - DataExtractorReleaseRecord661.FixedFilter( "object.H_ReleaseRecord_ID() = " + selection.ID().AsQUILL()); + // 鍙戝竷ID + H_ReleaseRecord_ID := "-1"; + H_Status:="宸插彂甯�"; + if( not isnull( selection)) + { + H_ReleaseRecord_ID := selection.ID(); + } + DataExtractorReleaseRecord661.FixedFilter( "object.H_ReleaseRecord_ID() = " + H_ReleaseRecord_ID.AsQUILL() + + " and " + "object.Status() = " + H_Status.AsQUILL()); *] GroupServerCalls: false } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def index 5fc1173..75b080a 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/Response_OnCreated.def @@ -5,12 +5,12 @@ #keys: '[414724.0.37110847]' CanBindMultiple: false DefinitionID: 'Responsedef_WebComponent_OnCreated' - GroupServerCalls: true QuillAction { Body: [* dtMonth.Date(Date::Today()); *] + GroupServerCalls: false } } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def index 9a61137..675a452 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FormReleaseRecord/_ROOT_Component_FormReleaseRecord.def @@ -7,20 +7,10 @@ BaseType: 'WebForm' Children: [ - Component LabelReleaseRecord - { - #keys: '[414724.0.36933216]' - BaseType: 'WebLabel' - Properties: - [ - NumberOfColumns: 20 - Taborder: 0 - Text: '鍙嶇/鎺堟潈鐗╂枡鍙戝竷鐗堟湰鏄庣粏' - ] - } #child: PanelReleaseRecord #child: PanelReleaseRecord108 #child: PanelReleaseRecord527 + #child: PanelReleaseRecord423 ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def index a76472b..1b87aa1 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmAuthorizeAndCountersign_Material/Response_OnCreated.def @@ -17,22 +17,16 @@ SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect"); if(not isnull( SelectItem)) { - if(SelectItem.Value().Length()>0) + if(SelectItem.ValueJsonString().Length()>0) { - StrValue := SelectItem.Value().Tokenize( ";"); - lb_SUK_FAACM.Text(StrValue.Element( 0)); - lb_MaterialCode_FAACM.Text(StrValue.Element( 1)); - lb_Unit_FAACM.Text(StrValue.Element( 2)); + JInfo := JSON::Parse( SelectItem.ValueJsonString()); + lb_SUK_FAACM.Text(JInfo.Get( "ParentSKU").GetString()); + lb_MaterialCode_FAACM.Text(JInfo.Get( "SKU").GetString()); + lb_Unit_FAACM.Text(JInfo.Get( "Unit").GetString()); lb_Operator_FAACM.Text(ApplicationMacroPlanner.GetUserName()); + txt_CustomID_FAACM.Text(JInfo.Get( "CustomCode").GetString()); + txt_CustomName_FAACM.Text(JInfo.Get( "CustomName").GetString()); } - } - // 鑾峰彇閫夋嫨鍚庣殑SKU - SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect"); - if(not isnull( SelectItem) and SelectItem.Value().Length()>0) - { - StrValue := SelectItem.Value().Tokenize( ";"); - txt_CustomID_FAACM.Text(StrValue.Element( 2)); - txt_CustomName_FAACM.Text(StrValue.Element( 3)); } *] GroupServerCalls: false diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def index f24ffbd..f4e6b0e 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_List832.def @@ -11,7 +11,7 @@ BaseType: 'WebDataExtractor' Properties: [ - DataType: 'structured[Product_MP]' + DataType: 'structured[H_MaterialInfo]' Source: 'dh_FM_PruductMP' Taborder: 0 Transformation: 'Elements' @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"TotalInventoryLevels","title":"TotalInventoryLevels","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"TotalInventoryLevels"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Level","title":"Level","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Level"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsProductCategory","title":"IsProductCategory","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"IsProductCategory"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"鐗╂枡缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialType","title":"鐗╂枡绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MaterialName","title":"鐗╂枡鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MaterialName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedQty","title":"闇�姹傛暟閲�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"NeedDate","title":"闇�姹傛椂闂�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"NeedDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrgCode","title":"缁勭粐浠g爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrgCode"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StockPoint","title":"搴撳瓨鐐�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StockPoint"}}]' ContextMenu: 'listContextMenu892' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def index efb0178..a9de040 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Component_Panel418.def @@ -24,7 +24,7 @@ [ NumberOfColumns: 15 PlaceHolder: '妯$硦鎼滅储' - Taborder: 1 + Taborder: 2 ] } Component btn_Query_FM @@ -35,7 +35,7 @@ [ Image: 'VIEW' Label: '鏌ヨ' - Taborder: 2 + Taborder: 3 ] } Component btn_Add_FM @@ -46,7 +46,7 @@ [ Image: 'ADD2' Label: '鏂板鍙嶇/鎺堟潈' - Taborder: 3 + Taborder: 4 ] ResponseDefinitions: [ @@ -66,6 +66,16 @@ } ] } + Component ds_Month_FM + { + #keys: '[414724.0.148121614]' + BaseType: 'WebDateSelector' + Properties: + [ + DateFormat: 'YMM' + Taborder: 1 + ] + } ] Properties: [ diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def new file mode 100644 index 0000000..b04f7cf --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnDoubleClick.def @@ -0,0 +1,44 @@ +Quintiq file version 2.0 +#parent: List832 +Response OnDoubleClick ( + H_MaterialInfo selection +) id:Response_List832_OnDoubleClick +{ + #keys: '[414724.0.160542461]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebList_OnDoubleClick' + QuillAction + { + Body: + [* + if( not isnull( selection)) + { + if(selection.MaterialType()="鍗婃垚鍝�") + { + OrderCode:=""; + if( txtSaveForecastData_FM.Text().Length()>0) + { + JForecast := JSON::Parse( txtSaveForecastData_FM.Text()); + OrderCode := JForecast.Get( "OrderCode").GetString(); + } + jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.NeedQty(), OrderCode,"-",selection.NeedDate()); + if(jResult.Get( "Status").GetBoolean()) + { + de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " + selection.SKU().AsQUILL() + + " and object.ForecastID() = " + OrderCode.AsQUILL() + ); + } + else + { + WebMessageBox::Warning( jResult.Get( "Msg").GetString()); + } + } + else + { + // 寮瑰嚭鐗╂枡鍙嶇鎺堟潈 + } + } + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def deleted file mode 100644 index 4b24dec..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_List832_OnSelectionChanged.def +++ /dev/null @@ -1,23 +0,0 @@ -Quintiq file version 2.0 -#parent: List832 -Response OnSelectionChanged ( - Product_MP selection -) id:Response_List832_OnSelectionChanged -{ - #keys: '[414724.0.113297034]' - CanBindMultiple: false - DefinitionID: 'Responsedef_WebList_OnSelectionChanged' - QuillAction - { - Body: - [* - SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect"); - if( isnull( SelectItem)) - { - MacroPlan.H_MessagePassing(relnew,FKey :="FrmMaterial",ItemKey := "ListSelect",Value := ""); - } - SelectItem.Value(lb_SUK_FM.Text()+";"+ selection.ID() +";"+selection.UnitOfMeasureName()+";"); - *] - GroupServerCalls: false - } -} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def index 04a54ea..c3a42c1 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_OnCreated.def @@ -9,6 +9,7 @@ { Body: [* + ds_Month_FM.Date(Date::ActualDate()); txtSaveForecastData_FM.Text(""); // 鑾峰彇閫夋嫨鍚庣殑SKU SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect"); @@ -19,7 +20,9 @@ txtSaveForecastData_FM.Text( SelectItem.ValueJsonString()); JSelect := JSON::Parse( SelectItem.ValueJsonString()); lb_SUK_FM.Text(JSelect.Get( "SKU").GetString()); - de_dh_FM_ProductMP.FixedFilter( "object.ID() = " + JSelect.Get( "SKU").GetString().AsQUILL()); + de_dh_FM_ProductMP.FixedFilter( "object.ParentSKU() = " + JSelect.Get( "SKU").GetString().AsQUILL() + + " and object.ForecastID() = " + JSelect.Get( "OrderCode").GetString().AsQUILL() + ); } } *] diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def" index 0912867..dd32915 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick\043975.def" @@ -1,6 +1,8 @@ Quintiq file version 2.0 #parent: Panel418/btn_Add_FM -Response OnClick () id:Response_Panel418_btn_Add_FM_OnClick_975 +Response OnClick ( + H_MaterialInfo selection +) id:Response_Panel418_btn_Add_FM_OnClick_975 { #keys: '[414724.0.145238844]' CanBindMultiple: false @@ -14,14 +16,38 @@ Body: [* SelectItem := select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmMaterial" and Obj.ItemKey()="ListSelect"); + CustomCode:=""; + CustomName:=""; + SValue:=""; + SValueJsonString:=""; + // 鑾峰彇瀹㈡埛鍚嶇О鍜屽鎴稩D + if(txtSaveForecastData_FM.Text().Length()>0) + { + jForecast := JSON::Parse( txtSaveForecastData_FM.Text()); + CustomCode := jForecast.Get( "CustomCode").GetString(); + CustomName := jForecast.Get( "CustomName").GetString(); + } + 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( "CustomName",CustomName).Build().AsString(); + } if( isnull( SelectItem)) { - MacroPlan.H_MessagePassing(relnew,FKey :="FrmMaterial",ItemKey := "ListSelect",Value := ""); + MacroPlan.H_MessagePassing(relnew,FKey := "FrmMaterial",ItemKey := "ListSelect", Value:=SValue,ValueJsonString:=SValueJsonString); } else { - //SelectItem.ValueJsonString() + SelectItem.Value(SValue); + SelectItem.ValueJsonString( SValueJsonString); } + Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal"); *] GroupServerCalls: false } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def deleted file mode 100644 index 75a8322..0000000 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Add_FM_OnClick.def +++ /dev/null @@ -1,20 +0,0 @@ -Quintiq file version 2.0 -#parent: Panel418/btn_Add_FM -Response OnClick () id:Response_Panel418_btn_Add_FM_OnClick -{ - #keys: '[414724.0.93205915]' - CanBindMultiple: false - DefinitionID: 'Responsedef_WebButton_OnClick' - Precondition: - [* - return not isnull( MacroPlan); - *] - QuillAction - { - Body: - [* - Application.OpenForm( "FrmAuthorizeAndCountersign_Material","modal"); - *] - GroupServerCalls: false - } -} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def index 822a47c..d0ec30d 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/Response_Panel418_btn_Query_FM_OnClick.def @@ -9,10 +9,17 @@ { Body: [* - de_dh_FM_ProductMP.FixedFilter( "object.ID().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" ); - // + " or " + "object.SKU().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" - // + " or " + "object.CustomerCode().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" - // + " or " + "object.CustomerName().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" ); + de_dh_FM_ProductMP.FixedFilter( "( object.SKU().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.MaterialType().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.MaterialName().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.OrgCode().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.StockPoint().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " )" + + " or " + "object.Unit().LikeUserLocale( " + txt_QueryContent_FM.Text().AsQUILL() + " ))" + + " and " + "( object.NeedDate() < " + ds_Month_FM.Date().StartOfNextMonth().AsQUILL() + + " and " + "object.NeedDate() >= " + ds_Month_FM.Date().StartOfMonth().AsQUILL() + " )" + + ); *] GroupServerCalls: false } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def index a356ac2..d1b24d6 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmMaterial/_ROOT_Component_FrmMaterial.def @@ -14,7 +14,7 @@ { #keys: '[414724.0.53475285]' BaseType: 'WebDataHolder' - Databinding: 'structured[Product_MP]*' + Databinding: 'structured[H_MaterialInfo]*' Children: [ Component de_dh_FM_ProductMP @@ -26,7 +26,7 @@ DataType: 'MacroPlan' Source: 'MacroPlan' Taborder: 0 - Transformation: 'Product_MP' + Transformation: 'H_MaterialInfo' ] } ] @@ -53,7 +53,8 @@ [ Description: '鍘熸枡鍒楄〃椤�' Image: 'NAV_REDO_LIGHT_BLUE' - MinimumRows: 50 + MinimumColumns: 80 + MinimumRows: 40 Title: '鍘熸枡鍒楄〃椤�' ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def index 8801397..c6fbad5 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Component_Panel351.def @@ -73,6 +73,18 @@ Visible: false ] } + Component btn_OrderH_FOF + { + #keys: '[414724.0.165490408]' + BaseType: 'WebButton' + Properties: + [ + Description: 'ERO璁㈠崟鍐插噺' + Image: 'AMMUNITION_BOX_CLOSED' + Label: 'ERP璁㈠崟鍐插噺' + Taborder: 3 + ] + } ] Properties: [ diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def" "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def" index 7f7d6a1..0f50e1f 100644 --- "a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def" +++ "b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_Add_Material_FOF503_OnClick\043222.def" @@ -21,7 +21,10 @@ ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) .Add( "Util",selection.Util()) .Add( "CustomCode",selection.CustomCode()) - .Add( "CustomName",selection.CustomName()).Build().AsString()); + .Add( "CustomName",selection.CustomName()) + .Add( "ForecastQty",selection.ForecastQty()) + .Add( "NeedTime",selection.NeedTime().AsQUILL()) + .Add( "OrderCode",selection.OrderCode()).Build().AsString()); } else { @@ -29,9 +32,21 @@ SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) .Add( "Util",selection.Util()) .Add( "CustomCode",selection.CustomCode()) - .Add( "CustomName",selection.CustomName()).Build().AsString()); + .Add( "CustomName",selection.CustomName()) + .Add( "ForecastQty",selection.ForecastQty()) + .Add( "NeedTime",selection.NeedTime().AsQUILL()) + .Add( "OrderCode",selection.OrderCode()).Build().AsString()); } - Application.OpenForm( "FrmMaterial","popout"); + + jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime()); + if(jResult.Get( "Status").GetBoolean()) + { + Application.OpenForm( "FrmMaterial","popout"); + } + else + { + WebMessageBox::Warning( jResult.Get( "Msg").GetString()); + } } else { diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def new file mode 100644 index 0000000..4aa4c40 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_Panel351_btn_OrderH_FOF_OnClick.def @@ -0,0 +1,16 @@ +Quintiq file version 2.0 +#parent: Panel351/btn_OrderH_FOF +Response OnClick () id:Response_Panel351_btn_OrderH_FOF_OnClick +{ + #keys: '[414724.0.166610329]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + QuillAction + { + Body: + [* + H_FunctionClass::SM_OrderHedging( MacroPlan,true,"System","ERP璁㈠崟"); + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def index 4333154..991029e 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderForecast/Response_liH_Forecast_OnDoubleClick.def @@ -19,7 +19,10 @@ ValueJsonString := JSON::Object().Add( "SKU",selection.SKU()) .Add( "Util",selection.Util()) .Add( "CustomCode",selection.CustomCode()) - .Add( "CustomName",selection.CustomName()).Build().AsString()); + .Add( "CustomName",selection.CustomName()) + .Add( "ForecastQty",selection.ForecastQty()) + .Add( "NeedTime",selection.NeedTime().AsQUILL()) + .Add( "OrderCode",selection.OrderCode()).Build().AsString()); } else { @@ -27,9 +30,21 @@ SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU()) .Add( "Util",selection.Util()) .Add( "CustomCode",selection.CustomCode()) - .Add( "CustomName",selection.CustomName()).Build().AsString()); + .Add( "CustomName",selection.CustomName()) + .Add( "ForecastQty",selection.ForecastQty()) + .Add( "NeedTime",selection.NeedTime().AsQUILL()) + .Add( "OrderCode",selection.OrderCode()).Build().AsString()); } - Application.OpenForm( "FrmMaterial","popout"); + + jResult := H_FunctionClass::SM_GetMaterialData( MacroPlan,selection.SKU(),selection.ForecastQty(),selection.OrderCode(),"-",selection.NeedTime()); + if(jResult.Get( "Status").GetBoolean()) + { + Application.OpenForm( "FrmMaterial","popout"); + } + else + { + WebMessageBox::Warning( jResult.Get( "Msg").GetString()); + } *] GroupServerCalls: false } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def index 8a9e630..915ae2c 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmOrderResult/Component_List782.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"OrderCode","title":"OrderCode","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":"OrderQty","title":"OrderQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"ReverseQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"AuthorizeQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"ForecastQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"ForecastHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"ForecastNoHitQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"CustomerCode","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerCode"}}]' + 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":"OrderQty","title":"鏂板璁㈠崟","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"OrderQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"鍙嶇","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastQty","title":"棰勬祴","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastHitQty","title":"鏈夐娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ForecastNoHitQty","title":"鏃犻娴�","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ForecastNoHitQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerCode","title":"瀹㈡埛ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"CustomerCode"}}]' ContextMenu: 'listContextMenu526' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def index 8ba9e27..efcc861 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_List696.def @@ -28,7 +28,7 @@ ] Properties: [ - Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MType","title":"MType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"ReverseQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"AuthorizeQty","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"CustomerName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}}]' + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SKU","title":"SKU缂栫爜","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SKU"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"MType","title":"绫诲瀷","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"MType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ReverseQty","title":"棰勬祴鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ReverseQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"AuthorizeQty","title":"鎺堟潈鏁伴噺","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"AuthorizeQty"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit","title":"鍗曚綅","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Unit"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CustomerName","title":"瀹㈡埛鍚嶇О","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CustomerName"}}]' ContextMenu: 'listContextMenu660' Taborder: 2 ] diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def index 652ca4c..f95c042 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmRAShow/Component_Panel224.def @@ -32,6 +32,7 @@ BaseType: 'WebButton' Properties: [ + ButtonSize: 'compact' Image: 'VIEW' Label: '鏌ヨ' Taborder: 2 diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def new file mode 100644 index 0000000..d04a4cb --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_List212.def @@ -0,0 +1,41 @@ +Quintiq file version 2.0 +Component List212 +{ + #keys: '[414724.0.153225431]' + BaseType: 'WebList' + Children: + [ + Component DataExtractor924 + { + #keys: '[414724.0.153225432]' + BaseType: 'WebDataExtractor' + Properties: + [ + DataType: 'MacroPlan' + Source: 'MacroPlan' + Taborder: 0 + Transformation: 'MappingProduct' + ] + } + #child: listActionBarPage441 + Component DataSetLevel622 + { + #keys: '[414724.0.153225437]' + BaseType: 'WebDataSetLevel' + Children: + [ + #child: listContextMenu182 + ] + Properties: + [ + Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"BusinessType","title":"BusinessType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"BusinessType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"CommonBusiness","title":"CommonBusiness","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"CommonBusiness"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsCommon","title":"IsCommon","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsCommon"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"KeyProduct","title":"KeyProduct","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"KeyProduct"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Notes","title":"Notes","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Notes"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductMajorType","title":"ProductMajorType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductMajorType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSubclassType","title":"ProductSubclassType","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductSubclassType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShelfLife","title":"ShelfLife","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShelfLife"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"UnitOfMeasureName","title":"UnitOfMeasureName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"UnitOfMeasureName"}}]' + ContextMenu: 'listContextMenu182' + Taborder: 2 + ] + } + ] + Properties: + [ + Taborder: 1 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def new file mode 100644 index 0000000..bb08f37 --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listActionBarPage441.def @@ -0,0 +1,10 @@ +Quintiq file version 2.0 +Component listActionBarPage441 +{ + #keys: '[414724.0.153225434]' + BaseType: 'listActionBarPage' + Properties: + [ + Taborder: 1 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def new file mode 100644 index 0000000..e5e38ee --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Component_listContextMenu182.def @@ -0,0 +1,10 @@ +Quintiq file version 2.0 +Component listContextMenu182 +{ + #keys: '[414724.0.153225439]' + BaseType: 'listContextMenu' + Properties: + [ + Taborder: 0 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def new file mode 100644 index 0000000..d37a96f --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_Button593_OnClick.def @@ -0,0 +1,24 @@ +Quintiq file version 2.0 +#parent: Button593 +Response OnClick () id:Response_Frm_TEST_Button593_OnClick +{ + #keys: '[414724.0.153411735]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + QuillAction + { + Body: + [* + HObj := H_FunctionClass::SM_GetProductInfo( MacroPlan,""); + if( not isnull( HObj)) + { + WebMessageBox::Information( HObj.BusinessType()); + } + else + { + WebMessageBox::Information( "寰楀埌鐨勭┖鍊�"); + } + *] + GroupServerCalls: false + } +} diff --git "a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP\350\256\242\345\215\225_OnClick.def" "b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP\350\256\242\345\215\225_OnClick.def" new file mode 100644 index 0000000..e2bd314 --- /dev/null +++ "b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/Response_ButtonERP\350\256\242\345\215\225_OnClick.def" @@ -0,0 +1,16 @@ +Quintiq file version 2.0 +#parent: ButtonERP璁㈠崟 +Response OnClick () id:Response_Frm_TEST_ButtonERP璁㈠崟_OnClick +{ + #keys: '[414724.0.164341791]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + QuillAction + { + Body: + [* + H_FunctionClass::SM_OrderHedging( MacroPlan,true,"System","ERP璁㈠崟"); + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def new file mode 100644 index 0000000..55c933a --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_Frm_TEST/_ROOT_Component_Frm_TEST.def @@ -0,0 +1,62 @@ +Quintiq file version 2.0 +#root +#parent: MacroPlannerWebApp +OrphanComponent Frm_TEST +{ + #keys: '[414724.0.153225415]' + BaseType: 'WebForm' + Children: + [ + #child: List212 + Component DataHolder417 + { + #keys: '[414724.0.153253171]' + BaseType: 'WebDataHolder' + Databinding: 'structured[MappingProduct]*' + Children: + [ + Component DataExtractor742 + { + #keys: '[414724.0.153253184]' + BaseType: 'WebDataExtractor' + Properties: + [ + DataType: 'MacroPlan' + Source: 'MacroPlan' + Taborder: 0 + Transformation: 'MappingProduct' + ] + } + ] + Properties: + [ + Taborder: 2 + ] + } + Component Button593 + { + #keys: '[414724.0.153411711]' + BaseType: 'WebButton' + Properties: + [ + Image: 'MONITOR_RGB' + Label: '娴嬭瘯' + Taborder: 0 + ] + } + Component ButtonERP璁㈠崟 + { + #keys: '[414724.0.164341716]' + BaseType: 'WebButton' + Properties: + [ + Label: 'ERP璁㈠崟' + Taborder: 3 + ] + } + ] + Properties: + [ + Title: '娴嬭瘯椤甸潰' + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw b/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw index 0cae0ba..a309668 100644 --- a/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw +++ b/_Main/UI/MacroPlannerWebApp/Views/OrderLock.vw @@ -4,204 +4,403 @@ { forms { - form_legacy_1 + form_FormOrderLockLog { - title: 'Scenario manager' + title: 'QTIANMA_JITUAN::FormOrderLockLog' shown: true - componentID: 'FormScenarioManager' + componentID: 'QTIANMA_JITUAN::FormOrderLockLog' layout { mode: 'open' - rowPosition: 1 + rowPosition: 14 rowSpan: 8 columnPosition: 1 - columnSpan: 5 + columnSpan: 12 } components { - FormScenarioManager_ListScenario + FormOrderLockLog_PanelOrderLockLog + { + sizeRatio: 1 + } + FormOrderLockLog_ListOrderLockLog { } - FormScenarioManager_DataSetLevelScenario + FormOrderLockLog_DataSetLevelOrderLockLog { groupDepth: -1 - column_All_constraints + sort: 'DESC:Notes' + column_OrderID { - columnId: 'All constraints' - dataPath: 'All constraints' + columnId: 'OrderID' + dataPath: 'OrderID' dataType: 'string' - title: 'All constraints' + title: '璁㈠崟鍙�' index: 0 subtotals: '' - width: 90 + width: 150 } - column_Name + column_ProductID { - columnId: 'Name' - dataPath: 'Name' + columnId: 'ProductID' + dataPath: 'ProductID' dataType: 'string' - title: '鍚嶇О' + title: '鐗╂枡鍙�' index: 1 subtotals: '' - width: 277 + width: 150 } - column_ChangedBy + column_SalesSegmentName { - columnId: 'ChangedBy' - dataPath: 'ChangedBy' + columnId: 'SalesSegmentName' + dataPath: 'SalesSegmentName' dataType: 'string' - title: 'Changed by' + title: '閿�鍞儴闂�' index: 2 subtotals: '' - width: 106 + width: 150 } - column_ChangedOn + column_StockingPointID { - columnId: 'ChangedOn' - dataPath: 'ChangedOn' - dataType: 'datetime' - title: 'Changed on' - index: 3 - subtotals: '' - width: 99 - } - column_StorageMode - { - columnId: 'StorageMode' - dataPath: 'StorageMode' + columnId: 'StockingPointID' + dataPath: 'StockingPointID' dataType: 'string' - title: 'StorageMode' - index: 4 - subtotals: '' - width: 40 - } - } - } - } - form_legacy_2 - { - title: 'Assumptions' - shown: true - componentID: 'FormAssumptions' - layout - { - mode: 'open' - rowPosition: 9 - rowSpan: 8 - columnPosition: 1 - columnSpan: 5 - } - components - { - FormAssumptions_ListAssumptions - { - } - FormAssumptions_DataSetLevelAssumptions - { - groupDepth: -1 - column_All_constraints - { - columnId: 'All constraints' - dataPath: 'All constraints' - dataType: 'string' - title: 'All constraints' - index: 0 - subtotals: '' - width: 32 - } - column_Category - { - columnId: 'Category' - dataPath: 'Category' - dataType: 'string' - title: '绫诲埆' - index: 1 - subtotals: '' - width: 108 - } - column_Importance - { - columnId: 'Importance' - dataPath: 'Importance' - dataType: 'string' - title: '閲嶈鎬�' - index: 2 - subtotals: '' - width: 110 - } - column_Title - { - columnId: 'Title' - dataPath: 'Title' - dataType: 'string' - title: '鏍囬' + title: '搴撳瓨鐐�' index: 3 subtotals: '' width: 150 } - column_ChangedBy + column_CustomerName { - columnId: 'ChangedBy' - dataPath: 'ChangedBy' + columnId: 'CustomerName' + dataPath: 'CustomerName' dataType: 'string' - title: 'Changed by' + title: '瀹㈡埛鍚嶇О' index: 4 subtotals: '' width: 150 } - column_CreatedOn + column_Quantity { - columnId: 'CreatedOn' - dataPath: 'CreatedOn' - dataType: 'datetime' - title: 'Created on' + columnId: 'Quantity' + dataPath: 'Quantity' + dataType: 'real' index: 5 subtotals: '' width: 150 } + column_UnitOfMeasureName + { + columnId: 'UnitOfMeasureName' + dataPath: 'UnitOfMeasureName' + dataType: 'string' + title: '鍗曚綅' + index: 6 + subtotals: '' + width: 150 + } + column_Price + { + columnId: 'Price' + dataPath: 'Price' + dataType: 'real' + title: '閿�鍞' + index: 7 + subtotals: '' + width: 150 + } + column_EndDate + { + columnId: 'EndDate' + dataPath: 'EndDate' + dataType: 'date' + title: '瀹㈡埛闇�姹傛椂闂�' + index: 8 + subtotals: '' + width: 150 + } + column_IsLocked + { + columnId: 'IsLocked' + dataPath: 'IsLocked' + dataType: 'boolean' + title: '鐘舵��' + index: 9 + subtotals: '' + width: 150 + } + column_End + { + columnId: 'End' + dataPath: 'End' + dataType: 'date' + title: '璁″垝浜や粯鏃堕棿' + index: 10 + subtotals: '' + width: 150 + } + column_LastModify + { + columnId: 'LastModify' + dataPath: 'LastModify' + dataType: 'string' + title: '鏈�鍚庢搷浣滀汉' + index: 11 + subtotals: '' + width: 150 + } + column_LastModifyTime + { + columnId: 'LastModifyTime' + dataPath: 'LastModifyTime' + dataType: 'datetime' + title: '鏈�鍚庢搷浣滄椂闂�' + index: 12 + subtotals: '' + width: 145 + } + column_Notes + { + columnId: 'Notes' + dataPath: 'Notes' + dataType: 'string' + title: '鎿嶄綔璇︽儏' + index: 13 + subtotals: '' + width: 150 + } } } } - form_FormScenariosKPIsComparison + form_FormOrderLock { - title: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison' + title: 'QTIANMA_JITUAN::FormOrderLock' shown: true - componentID: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison' + componentID: 'QTIANMA_JITUAN::FormOrderLock' layout { mode: 'open' rowPosition: 1 - rowSpan: 16 - columnPosition: 6 - columnSpan: 7 + rowSpan: 13 + columnPosition: 1 + columnSpan: 12 } components { - FormScenariosKPIsComparison_MatrixEditorFinancialKPIs + FormOrderLock_PanelOrderLock + { + sizeRatio: 1 + } + FormOrderLock_PanelOrderLockHeader + { + sizeRatio: 1 + } + FormOrderLock_PanelOrderLockOrder + { + sizeRatio: 1 + } + FormOrderLock_ListOrderLock + { + } + FormOrderLock_DataSetLevelOrderLock + { + groupDepth: -1 + sort: 'StartDate' + column_OrderID + { + columnId: 'OrderID' + dataPath: 'OrderID' + dataType: 'string' + title: '璁㈠崟鍙�' + index: 0 + subtotals: '' + width: 150 + } + column_ProductID + { + columnId: 'ProductID' + dataPath: 'ProductID' + dataType: 'string' + title: '鐗╂枡鍙�' + index: 1 + subtotals: '' + width: 150 + } + column_SalesSegmentName + { + columnId: 'SalesSegmentName' + dataPath: 'SalesSegmentName' + dataType: 'string' + title: '閿�鍞儴闂�' + index: 2 + subtotals: '' + width: 150 + } + column_StockingPointID + { + columnId: 'StockingPointID' + dataPath: 'StockingPointID' + dataType: 'string' + title: '搴撳瓨鐐�' + index: 3 + subtotals: '' + width: 150 + } + column_CustomerName + { + columnId: 'CustomerName' + dataPath: 'CustomerName' + dataType: 'string' + title: '瀹㈡埛鍚嶇О' + index: 4 + subtotals: '' + width: 150 + } + column_Quantity + { + columnId: 'Quantity' + dataPath: 'Quantity' + dataType: 'real' + index: 5 + subtotals: '' + width: 150 + } + column_UnitOfMeasureName + { + columnId: 'UnitOfMeasureName' + dataPath: 'UnitOfMeasureName' + dataType: 'string' + title: '鍗曚綅' + index: 6 + subtotals: '' + width: 150 + } + column_Price + { + columnId: 'Price' + dataPath: 'Price' + dataType: 'real' + title: '閿�鍞' + index: 7 + subtotals: '' + width: 150 + } + column_StartDate + { + columnId: 'StartDate' + dataPath: 'StartDate' + dataType: 'date' + title: '瀹㈡埛闇�姹傛椂闂�' + index: 8 + subtotals: '' + width: 150 + } + column_IsLocked + { + columnId: 'IsLocked' + dataPath: 'IsLocked' + dataType: 'boolean' + title: '鐘舵��' + index: 9 + subtotals: '' + width: 150 + } + column_First_AsPlanningBaseSalesDemandInPeriod_End + { + columnId: 'First.AsPlanningBaseSalesDemandInPeriod.End' + dataPath: 'First.AsPlanningBaseSalesDemandInPeriod.End' + dataType: 'datetime' + title: '璁″垝浜や粯鏃堕棿' + index: 10 + subtotals: '' + width: 150 + } + column_LastModify + { + columnId: 'LastModify' + dataPath: 'LastModify' + dataType: 'string' + title: '鏈�鍚庢搷浣滀汉' + index: 11 + subtotals: '' + width: 150 + } + column_LastModifyTime + { + columnId: 'LastModifyTime' + dataPath: 'LastModifyTime' + dataType: 'datetime' + title: '鏈�鍚庢搷浣滄椂闂�' + index: 12 + subtotals: '' + width: 150 + } + } + FormOrderLock_PanelOrderLockPlanning + { + sizeRatio: 1 + } + FormOrderLock_PanelMatrix + { + sizeRatio: 1 + } + FormOrderLock_MatrixEditorProductPlanning { gridColor: '#c4c4c4' - totalHeaderWidth: 200 - attributeHeaderWidthRatio: 0.6 - nameHeaderWidthRatio: 0.4 + totalHeaderWidth: 427 + attributeHeaderWidthRatio: 0.325989701966572 + nameHeaderWidthRatio: 0.674010298033429 columnWidth: 100 horizontalGrid: true verticalGrid: true backendState { - componentId: 'QLibMacroPlannerWebUI::FormScenariosKPIsComparison.MatrixEditorFinancialKPIs' + componentId: 'QTIANMA_JITUAN::FormOrderLock.MatrixEditorProductPlanning' state { cells { attributes { - attribute_DisplayValue + attribute_DisplaySupplyQuantity { type: 'MatrixEditorWebApiCellDataModelInterest' index: 0 rowsubtotal: '' columnsubtotal: '' - attribute: 'DisplayValue' + attribute: 'DisplaySupplyQuantity' + } + attribute_DependentDemandAndSalesDemandQuantity + { + type: 'MatrixEditorWebApiCellDataModelInterest' + index: 1 + rowsubtotal: '' + columnsubtotal: '' + attribute: 'DependentDemandAndSalesDemandQuantity' + } + attribute_TargetInventoryLevel + { + type: 'MatrixEditorWebApiCellDataModelInterest' + index: 2 + rowsubtotal: '' + columnsubtotal: '' + attribute: 'TargetInventoryLevel' + } + attribute_InventoryLevelEnd + { + type: 'MatrixEditorWebApiCellDataModelInterest' + index: 3 + rowsubtotal: '' + columnsubtotal: '' + attribute: 'InventoryLevelEnd' + } + attribute_StockLevelInDays + { + type: 'MatrixEditorWebApiCellDataModelInterest' + index: 4 + rowsubtotal: '' + columnsubtotal: '' + attribute: 'StockLevelInDays' } } } @@ -209,14 +408,14 @@ { sorting { - criteria: '' + criteria: "datamember:'Start'" } } rows { sorting { - criteria: "datamember:'KPISetting.DisplayIndex'" + criteria: "datamember:'Product_MP.DisplayIndex';datamember:'Name'" } } } @@ -337,10 +536,10 @@ userconfigurableinformation { } - index: 2 - image: 'DOCUMENT_LOCK' page: 'applicationDevelopmentActionBarPageDef' group: '' + index: 2 + image: 'DOCUMENT_LOCK' description: '' } formatversion: 2 diff --git a/_Main/UI/MacroPlannerWebApp/Views/Test.vw b/_Main/UI/MacroPlannerWebApp/Views/Test.vw new file mode 100644 index 0000000..c66c058 --- /dev/null +++ b/_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 +} diff --git a/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc b/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc new file mode 100644 index 0000000..9fe1031 --- /dev/null +++ b/_var/_Main/ProjSettings/MacroPlannerWebApp/TypeConfigs/CustomerOrder.qtc @@ -0,0 +1,20 @@ +Quintiq file version 2.0 +{ + SelectableAttributes + { + ID + { + attribute: 'ID' + isactive: true + } + IsLocked + { + attribute: 'IsLocked' + isactive: true + } + } + meta_ + { + type: 'CustomerOrder' + } +} diff --git a/_var/_Main/ProjSettings/MacroPlannerWebApp/Views/Test.vw b/_var/_Main/ProjSettings/MacroPlannerWebApp/Views/Test.vw new file mode 100644 index 0000000..1571655 --- /dev/null +++ b/_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 +} -- Gitblit v1.9.3