From 3cb5a54def670d97301f07170fcaad213bfc54f2 Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期六, 09 九月 2023 15:30:46 +0800
Subject: [PATCH] 同步逻辑由MacroPlan移到MPSync
---
_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl | 96
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def | 8
_Main/BL/Type_MPSync/Method_MappingOperationData.qbl | 102 +
_Main/BL/Type_MappingOperation/StaticMethod_FindMinSeq.qbl | 4
_Main/BL/Type_MPSync/Method_ImportDBDataCustom.qbl | 91 +
_Main/BL/EDI/Broker_Broker_OTD_ActualPISPIP.qbl | 2
_Main/BL/EDI/Broker_Broker_OTD_Product.qbl | 3
_Main/BL/Type_MPSync/Method_MappingLaneData.qbl | 16
_Main/BL/Type_MPSync/Method_MappingOperationBOMData.qbl | 181 +++
_Main/BL/Type_IOCurrencyRate_MP/StaticMethod_DeleteIfExist.qbl | 18
_Main/BL/Type_MPSync/Method_MappingCurrencyData#670.qbl | 23
_Main/BL/Type_MPSync/Method_MappingUnitData.qbl | 52
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_PriorityName.qbl | 1
_Main/BL/Relations/Relation_MappingProduct_MPSync_MPSync_MappingProduct.qbl | 23
LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderID.qbl | 1
_Main/BL/Type_IOLane/StaticMethod_DeleteIfExist.qbl | 16
_Main/BL/Type_MPSync/Method_MappingForecastData.qbl | 40
_Main/BL/EDI/Broker_Broker_OTD_Unit.qbl | 4
_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl | 78
_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl | 86
_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew#821.qbl | 5
_Main/BL/Type_MPSync/Method_MappingActualPISPIPData.qbl | 30
_Main/BL/Type_IOLane/_ROOT_Type_IOLane.qbl | 6
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_CurrencyID.qbl | 1
_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl | 28
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_SalesSegmentName.qbl | 1
_Main/BL/Type_MPSync/Method_MappingCurrencyData.qbl | 17
_Main/BL/Type_MPSync/StaticMethod_ApiResponesCheck.qbl | 54 +
_Main/BL/Relations/Relation_MappingExternalSupply_MPSync_MPSync_MappingExternalSupply.qbl | 23
_Main/BL/EDI/Broker_Broker_OTD_CustomerOrder.qbl | 2
_Main/BL/Relations/Relation_MappingBaseConversionFactor_MPSync_MPSync_MappingBaseConversionFact.qbl | 23
_Main/BL/Relations/Relation_MappingSalesSegment_MPSync_MPSync_MappingSalesSegment.qbl | 23
LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderLineID.qbl | 1
_Main/BL/Type_MPSync/Method_MappingCurrencyRateData.qbl | 17
_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl | 22
_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl | 38
_Main/BL/Type_IOUnit/StaticMethod_FindById.qbl | 14
_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl | 66
_Main/BL/Relations/Relation_MappingCustomerOrder_MPSync_MPSync_MappingCustomerOrder.qbl | 23
_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl | 178 +-
LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerID.qbl | 1
_Main/BL/Type_MPSync/Method_GetProductTypeByProductId.qbl | 17
_Main/BL/Type_IOUnitOfMeasure_MP/StaticMethod_DeleteIfExist.qbl | 17
_Main/BL/Type_MPSync/Method_MappingInventoryValueAndCostData.qbl | 19
_Main/BL/Type_IOBaseConversionFactor/_ROOT_Type_IOBaseConversionFactor.qbl | 6
_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl | 30
_Main/BL/Type_IOOperation/_ROOT_Type_IOOperation.qbl | 6
LibMacroPlanner/BL/Type_IOProduct_MP/StaticMethod_Create.qbl | 1
_Main/BL/Type_MPSync/Method_MappingStockingPointData.qbl | 16
_Main/BL/EDI/Broker_Broker_OTD_Operation.qbl | 2
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def | 4
_Main/BL/EDI/Broker_Broker_OTD_BOM.qbl | 15
_Main/BL/Type_IOCurrency_MP/_ROOT_Type_IOCurrency_MP.qbl | 6
_Main/BL/Type_MPSync/Method_MappingLaneLegData.qbl | 16
_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl | 168 +-
_Main/BL/Relations/Relation_MappingProductInLane_MPSync_MPSync_MappingProductInLane.qbl | 23
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_DemandUncertaintyPercentage.qbl | 2
_Main/BL/Type_MPSync/Method_MappingStockingPointData#321.qbl | 29
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_UnitOfMeasureName.qbl | 1
_Main/BL/Type_MPSync/Method_MappingOperationCostData.qbl | 55 +
_Main/BL/Type_IOOperation/StaticMethod_CreateIfNotExist.qbl | 18
_Main/BL/Type_MPSync/Method_MappingProductData.qbl | 47
_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MPSync_MPSync_MappingInventoryValueAnd.qbl | 23
_Main/BL/EDI/Broker_Broker_OTD_UnitOfMeasure.qbl | 2
_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl | 160 +-
_Main/BL/Type_MPSync/StaticMethod_ApiBuildPostRequestBody.qbl | 25
_Main/BL/Relations/Relation_MappingActualPISPIP_MPSync_MPSync_MappingActualPISPIP.qbl | 23
_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl | 104
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StockingPointID.qbl | 1
_Main/BL/Relations/Relation_MappingOperationCost_MPSync_MPSync_MappingOperationCost.qbl | 23
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ProductID.qbl | 1
_Main/BL/Type_MPSync/Method_MappingExternalSupplyData.qbl | 34
_Main/BL/Type_MPSync/Method_MappingLaneData#474.qbl | 23
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ID.qbl | 1
LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerName.qbl | 1
_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew#331.qbl | 5
_Main/BL/Type_IOUnit/_ROOT_Type_IOUnit.qbl | 6
_Main/BL/Type_MPSync/_ROOT_Type_MPSync.qbl | 6
_Main/BL/Type_MPSync/Method_MappingCustomerOrderData.qbl | 44
_Main/BL/Type_IOProduct_MP/StaticMethod_CreateIfNotExist.qbl | 23
_Main/BL/Type_IOBaseConversionFactor/StaticMethod_DeleteIfExist.qbl | 19
_Main/BL/Type_MPSync/Method_MappingSalesSegmentData.qbl | 22
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StartDate.qbl | 1
_Main/BL/EDI/Broker_Broker_OTD_ProductInLane.qbl | 2
_Main/BL/Type_MPSync/Method_MappingCurencyRatesData.qbl | 28
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Price.qbl | 1
_Main/BL/Type_IOUnit/StaticMethod_CreateIfNotExistByTree.qbl | 32
_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew.qbl | 17
_Main/BL/Type_IORoutingStep/_ROOT_Type_IORoutingStep.qbl | 6
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting#576.qbl | 162 +-
_Main/BL/EDI/Broker_Broker_OTD_ExternalSupply.qbl | 2
_Main/BL/Type_IOProduct_MP/StaticMethod_FindById.qbl | 14
_Main/BL/Relations/Relation_MappingUnit_MPSync_MPSync_MappingUnit.qbl | 23
_Main/BL/EDI/Broker_Broker_OTD_SalesSegment.qbl | 2
_Main/BL/Relations/Relation_MappingBOM_MPSync_MPSync_MappingBOM.qbl | 23
_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl | 60
_Main/BL/Type_MPSync/Method_MappingProductInLaneData.qbl | 15
_Main/BL/Type_MPSync/Method_MappingUnitOfMeasureData.qbl | 14
_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 124 +-
_Main/BL/Relations/Relation_MappingUnitOfMeasure_MPSync_MPSync_MappingUnitOfMeasure.qbl | 23
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_EndDate.qbl | 1
_Main/BL/Relations/Relation_MappingForecast_MPSync_MPSync_MappingForecast.qbl | 23
_Main/BL/Type_IOProduct_MP/_ROOT_Type_IOProduct_MP.qbl | 6
_Main/BL/EDI/Broker_Broker_OTD_Forecast.qbl | 2
_Main/BL/Type_MPSync/Method_MappingBaseConversionFactorData.qbl | 19
_Main/BL/Type_IOCurrency_MP/StaticMethod_DeleteIfExist.qbl | 16
_Main/BL/Type_IORoutingStep/StaticMethod_CreateIfNotExist.qbl | 22
/dev/null | 16
_Main/BL/Type_IOCurrencyRate_MP/_ROOT_Type_IOCurrencyRate_MP.qbl | 6
_Main/BL/EDI/Broker_Broker_OTD_BaseConversionFactor.qbl | 2
_Main/BL/EDI/Broker_Broker_OTD_OperationCost.qbl | 2
LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Quantity.qbl | 1
_Main/BL/Type_MPSync/Method_MappingLaneLegData#257.qbl | 30
_Main/BL/Relations/Relation_MappingOperation_MPSync_MPSync_MappingOperation.qbl | 23
_Main/BL/EDI/Broker_Broker_OTD_InventoryCost.qbl | 2
_Main/BL/Type_MPSync/Method_MappingSalesLevelData.qbl | 18
116 files changed, 2,432 insertions(+), 768 deletions(-)
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerID.qbl
index 6feec50..fe2b3d6 100644
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerID.qbl
+++ b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerID.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341081382][138186.0.341081381][138186.0.341081383]'
Description: 'Customer unique ID'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerName.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerName.qbl
index ec7fd33..48c1336 100644
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerName.qbl
+++ b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_CustomerName.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341081370][138186.0.341081369][138186.0.341081371]'
Description: 'Name of the customer'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderID.qbl
index 1579ef7..01c1c5a 100644
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderID.qbl
+++ b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderID.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341081379][138186.0.341081378][138186.0.341081380]'
Description: 'Unique order ID'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderLineID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderLineID.qbl
index f96ec64..8f2f3df 100644
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderLineID.qbl
+++ b/LibMacroPlanner/BL/Type_IOCustomerOrder/Attribute_OrderLineID.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341081373][138186.0.341081372][138186.0.341081374]'
Description: 'Unique ID of the order line'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerID.qbl
deleted file mode 100644
index 66ae438..0000000
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: CustomerID
-}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerName.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerName.qbl
deleted file mode 100644
index bc2d538..0000000
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_CustomerName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: CustomerName
-}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderID.qbl
deleted file mode 100644
index 05c5cf1..0000000
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: OrderID
-}
diff --git a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderLineID.qbl b/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderLineID.qbl
deleted file mode 100644
index 01ff2bf..0000000
--- a/LibMacroPlanner/BL/Type_IOCustomerOrder/DefaultValue_OrderLineID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: OrderLineID
-}
diff --git a/LibMacroPlanner/BL/Type_IOProduct_MP/StaticMethod_Create.qbl b/LibMacroPlanner/BL/Type_IOProduct_MP/StaticMethod_Create.qbl
index a199c11..c52c2da 100644
--- a/LibMacroPlanner/BL/Type_IOProduct_MP/StaticMethod_Create.qbl
+++ b/LibMacroPlanner/BL/Type_IOProduct_MP/StaticMethod_Create.qbl
@@ -18,5 +18,4 @@
return ioproduct;
*]
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_CurrencyID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_CurrencyID.qbl
index 9b05252..d48a9fe 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_CurrencyID.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_CurrencyID.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341091998][138186.0.341091997][138186.0.341091999]'
Description: 'Foreign key'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_DemandUncertaintyPercentage.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_DemandUncertaintyPercentage.qbl
index cd61eb4..9429a07 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_DemandUncertaintyPercentage.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_DemandUncertaintyPercentage.qbl
@@ -9,5 +9,5 @@
This percentage is used to calculate StandardDeviationDemand on PISPIP.
*]
ValueType: Real
- InterfaceProperties { Accessibility: 'Module' }
+ InterfaceProperties { Accessibility: 'Module' Visibility: 'BusinessModel' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_EndDate.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_EndDate.qbl
index d0778bf..668fbb5 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_EndDate.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_EndDate.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341091995][138186.0.341091994][138186.0.341091996]'
ValueType: Date
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ID.qbl
index daba47a..8b1363c 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ID.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ID.qbl
@@ -6,5 +6,4 @@
Description: 'Sales Demand ID'
IsReadOnly: true
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Price.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Price.qbl
index 892021f..16335d7 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Price.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Price.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061308][138186.0.341061307][138186.0.341061309]'
ValueType: Real
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_PriorityName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_PriorityName.qbl
index c128a96..5f978d9 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_PriorityName.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_PriorityName.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061314][138186.0.341061313][138186.0.341061315]'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ProductID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ProductID.qbl
index e20f379..188f50c 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ProductID.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_ProductID.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061311][138186.0.341061310][138186.0.341061312]'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Quantity.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Quantity.qbl
index 40204d6..3986b31 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Quantity.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_Quantity.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061305][138186.0.341061304][138186.0.341061306]'
ValueType: Real
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_SalesSegmentName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_SalesSegmentName.qbl
index 8e03418..70f0ec9 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_SalesSegmentName.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_SalesSegmentName.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061299][138186.0.341061298][138186.0.341061300]'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StartDate.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StartDate.qbl
index eb15fd6..b4cf11d 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StartDate.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StartDate.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061302][138186.0.341061301][138186.0.341061303]'
ValueType: Date
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StockingPointID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StockingPointID.qbl
index ef9bec6..c582cfd 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StockingPointID.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_StockingPointID.qbl
@@ -4,5 +4,4 @@
{
#keys: '3[138186.0.341061317][138186.0.341061316][138186.0.341061318]'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_UnitOfMeasureName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_UnitOfMeasureName.qbl
index f35e733..a084c7e 100644
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_UnitOfMeasureName.qbl
+++ b/LibMacroPlanner/BL/Type_IOSalesDemandBase/Attribute_UnitOfMeasureName.qbl
@@ -5,5 +5,4 @@
#keys: '3[138186.0.341061321][138186.0.341061320][138186.0.341061322]'
Description: 'Unit of measure for sales demand'
ValueType: String
- InterfaceProperties { Accessibility: 'Module' }
}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_CurrencyID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_CurrencyID.qbl
deleted file mode 100644
index cae9679..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_CurrencyID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: CurrencyID
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ID.qbl
deleted file mode 100644
index 049abc0..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: ID
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_PriorityName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_PriorityName.qbl
deleted file mode 100644
index 59ad087..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_PriorityName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: PriorityName
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ProductID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ProductID.qbl
deleted file mode 100644
index 98649b2..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_ProductID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: ProductID
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_SalesSegmentName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_SalesSegmentName.qbl
deleted file mode 100644
index 521966d..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_SalesSegmentName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: SalesSegmentName
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_StockingPointID.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_StockingPointID.qbl
deleted file mode 100644
index fbb83fc..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_StockingPointID.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: StockingPointID
-}
diff --git a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_UnitOfMeasureName.qbl b/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_UnitOfMeasureName.qbl
deleted file mode 100644
index b2012de..0000000
--- a/LibMacroPlanner/BL/Type_IOSalesDemandBase/DefaultValue_UnitOfMeasureName.qbl
+++ /dev/null
@@ -1,6 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-DefaultValue
-{
- TargetAttribute: UnitOfMeasureName
-}
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_ActualPISPIP.qbl b/_Main/BL/EDI/Broker_Broker_OTD_ActualPISPIP.qbl
index bc7c6a3..6f554c1 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_ActualPISPIP.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_ActualPISPIP.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_ActualPISPIP
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_ActualPISPIP
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_BOM.qbl b/_Main/BL/EDI/Broker_Broker_OTD_BOM.qbl
index 965dd1b..07c4d2f 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_BOM.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_BOM.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_BOM
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_MappingBOM
@@ -10,7 +10,6 @@
EDIMLTable MappingBOM
{
PrimaryKeyColumns: AlternativeMaterialCode
- PrimaryKeyColumns: BusinessType
PrimaryKeyColumns: ComponentCode
PrimaryKeyColumns: OrganCode
PrimaryKeyColumns: ProcessSection
@@ -28,8 +27,8 @@
EDIMLColumn ComponentType { Attribute: ComponentType ValueType: String }
EDIMLColumn ComponentUnit { Attribute: ComponentUnit ValueType: String }
EDIMLColumn ComponentUnitDescription { Attribute: ComponentUnitDescription ValueType: String }
- EDIMLColumn DescriptionOfAlternativeMaterial { Attribute: DescriptionOfAlternativeMaterial ValueType: String }
EDIMLColumn DescriptionOfAlternativeMaterialUnits { Attribute: DescriptionOfAlternativeMaterialUnits ValueType: String }
+ EDIMLColumn DescriptionOfAlternativeMaterials { Attribute: DescriptionOfAlternativeMaterials ValueType: String }
EDIMLColumn MaterialSystem { Attribute: MaterialSystem ValueType: String }
EDIMLColumn OrganCode { Attribute: OrganCode ValueType: String }
EDIMLColumn ProcessSection { Attribute: ProcessSection ValueType: String }
@@ -53,7 +52,7 @@
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
- Parameters: '/owner="TIANMA"'
+ Parameters: '/owner="YUXTEST"'
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn ALTERNATIVEMATERIALCODE
{
@@ -110,12 +109,12 @@
OthersMayUpdateColumn: true
ValueType: String
}
- EDIODBCLinkColumn DESCRIPTIONOFALTERNATIVEMATERIAL
+ EDIODBCLinkColumn DESCRIPTIONOFALTERNATIVEMATERIALS
{
OthersMayUpdateColumn: true
ValueType: String
}
- EDIODBCLinkColumn DESCRIPTIONOFALTERNATIVEMATERIALUNIT
+ EDIODBCLinkColumn DESCRIPTIONOFALTERNATIVEMATERIALUNITS
{
OthersMayUpdateColumn: true
ValueType: String
@@ -189,8 +188,8 @@
EDIColumnMatch { InputColumn: COMPONENTTYPE OutputColumn: ComponentType }
EDIColumnMatch { InputColumn: COMPONENTUNIT OutputColumn: ComponentUnit }
EDIColumnMatch { InputColumn: COMPONENTUNITDESCRIPTION OutputColumn: ComponentUnitDescription }
- EDIColumnMatch { InputColumn: DESCRIPTIONOFALTERNATIVEMATERIAL OutputColumn: DescriptionOfAlternativeMaterial }
- EDIColumnMatch { InputColumn: DESCRIPTIONOFALTERNATIVEMATERIALUNIT OutputColumn: DescriptionOfAlternativeMaterialUnits }
+ EDIColumnMatch { InputColumn: DESCRIPTIONOFALTERNATIVEMATERIALS OutputColumn: DescriptionOfAlternativeMaterials }
+ EDIColumnMatch { InputColumn: DESCRIPTIONOFALTERNATIVEMATERIALUNITS OutputColumn: DescriptionOfAlternativeMaterialUnits }
EDIColumnMatch { InputColumn: MATERIALSYSTEM OutputColumn: MaterialSystem }
EDIColumnMatch { InputColumn: ORGANCODE OutputColumn: OrganCode }
EDIColumnMatch { InputColumn: PROCESSSECTION OutputColumn: ProcessSection }
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_BaseConversionFactor.qbl b/_Main/BL/EDI/Broker_Broker_OTD_BaseConversionFactor.qbl
index 7f8c525..4780330 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_BaseConversionFactor.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_BaseConversionFactor.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_BaseConversionFactor
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_BaseConversionFactor
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_CustomerOrder.qbl b/_Main/BL/EDI/Broker_Broker_OTD_CustomerOrder.qbl
index 362c208..8048dab 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_CustomerOrder.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_CustomerOrder.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_CustomerOrder
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_CustomerOrder
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_ExternalSupply.qbl b/_Main/BL/EDI/Broker_Broker_OTD_ExternalSupply.qbl
index 90a3bea..14c1481 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_ExternalSupply.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_ExternalSupply.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_ExternalSupply
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_ExternalSupply
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_Forecast.qbl b/_Main/BL/EDI/Broker_Broker_OTD_Forecast.qbl
index 6b4a67f..cde7da9 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_Forecast.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_Forecast.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_Forecast
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_Forecast
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_InventoryCost.qbl b/_Main/BL/EDI/Broker_Broker_OTD_InventoryCost.qbl
index b332e9d..d02ca22 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_InventoryCost.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_InventoryCost.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_InventoryCost
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_InventoryCost
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_Operation.qbl b/_Main/BL/EDI/Broker_Broker_OTD_Operation.qbl
index 64aa83d..045c8b9 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_Operation.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_Operation.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_Operation
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_Operation
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_OperationCost.qbl b/_Main/BL/EDI/Broker_Broker_OTD_OperationCost.qbl
index e60201f..0498242 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_OperationCost.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_OperationCost.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_OperationCost
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_MappingOperationCost
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_Product.qbl b/_Main/BL/EDI/Broker_Broker_OTD_Product.qbl
index 3da4e20..c42cadb 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_Product.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_Product.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_Product
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_MappingProduct
@@ -38,7 +38,6 @@
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="TIANMA"'
- PrimaryKeyColumns: ID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn BUSINESSTYPE
{
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_ProductInLane.qbl b/_Main/BL/EDI/Broker_Broker_OTD_ProductInLane.qbl
index b523027..a3196d2 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_ProductInLane.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_ProductInLane.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_ProductInLane
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_MappingProductInLane
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_SalesSegment.qbl b/_Main/BL/EDI/Broker_Broker_OTD_SalesSegment.qbl
index 6176047..8c26a57 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_SalesSegment.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_SalesSegment.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_SalesSegment
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_SalesSegment
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_Unit.qbl b/_Main/BL/EDI/Broker_Broker_OTD_Unit.qbl
index 80cde4f..3c7beb3 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_Unit.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_Unit.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_Unit
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_Unit
@@ -34,7 +34,7 @@
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
- Parameters: '/owner="OTD"'
+ Parameters: '/owner="TIANMA"'
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn EQUIPMENT
{
diff --git a/_Main/BL/EDI/Broker_Broker_OTD_UnitOfMeasure.qbl b/_Main/BL/EDI/Broker_Broker_OTD_UnitOfMeasure.qbl
index 0ece78e..3c68061 100644
--- a/_Main/BL/EDI/Broker_Broker_OTD_UnitOfMeasure.qbl
+++ b/_Main/BL/EDI/Broker_Broker_OTD_UnitOfMeasure.qbl
@@ -2,7 +2,7 @@
#parent: #root
EDIBroker Broker_OTD_UnitOfMeasure
{
- MDSDefinition: MacroPlan
+ MDSDefinition: MPSync
TimeZone: 'ACT'
UseOSTimeZone: false
EDIModelLink.Destination Des_UnitOfMeasure
diff --git a/_Main/BL/Relations/Relation_MacroPlan_MappingActualPISPIP_MappingActualPISPIP_MacroPlan.qbl b/_Main/BL/Relations/Relation_MacroPlan_MappingActualPISPIP_MappingActualPISPIP_MacroPlan.qbl
deleted file mode 100644
index 8f7d3ba..0000000
--- a/_Main/BL/Relations/Relation_MacroPlan_MappingActualPISPIP_MappingActualPISPIP_MacroPlan.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MacroPlan_MappingActualPISPIP_MappingActualPISPIP_MacroPlan
-{
- #keys: '1[414480.0.61560199]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MappingActualPISPIP
- {
- #keys: '3[414480.0.61560201][414480.0.61560200][414480.0.61560202]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
- RelationSide.RightSide MacroPlan
- {
- #keys: '3[414480.0.61560204][414480.0.61560203][414480.0.61560205]'
- Cardinality: '0to1'
- ObjectDefinition: MappingActualPISPIP
- OwningSide: 'Reference'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MacroPlan_MappingExternalSupply_MappingExternalSupply_MacroPlan.qbl b/_Main/BL/Relations/Relation_MacroPlan_MappingExternalSupply_MappingExternalSupply_MacroPlan.qbl
deleted file mode 100644
index 606070c..0000000
--- a/_Main/BL/Relations/Relation_MacroPlan_MappingExternalSupply_MappingExternalSupply_MacroPlan.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MacroPlan_MappingExternalSupply_MappingExternalSupply_MacroPlan
-{
- #keys: '1[414480.0.61581395]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MappingExternalSupply
- {
- #keys: '3[414480.0.61581397][414480.0.61581396][414480.0.61581398]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
- RelationSide.RightSide MacroPlan
- {
- #keys: '3[414480.0.61581400][414480.0.61581399][414480.0.61581401]'
- Cardinality: '0to1'
- ObjectDefinition: MappingExternalSupply
- OwningSide: 'Reference'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MacroPlan_MappingProduct_MappingProduct_MacroPlan.qbl b/_Main/BL/Relations/Relation_MacroPlan_MappingProduct_MappingProduct_MacroPlan.qbl
deleted file mode 100644
index f0b9f15..0000000
--- a/_Main/BL/Relations/Relation_MacroPlan_MappingProduct_MappingProduct_MacroPlan.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MacroPlan_MappingProduct_MappingProduct_MacroPlan
-{
- #keys: '1[414480.0.61560241]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MappingProduct
- {
- #keys: '3[414480.0.61560243][414480.0.61560242][414480.0.61560244]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
- RelationSide.RightSide MacroPlan
- {
- #keys: '3[414480.0.61560246][414480.0.61560245][414480.0.61560247]'
- Cardinality: '0to1'
- ObjectDefinition: MappingProduct
- OwningSide: 'Reference'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingActualPISPIP_MPSync_MPSync_MappingActualPISPIP.qbl b/_Main/BL/Relations/Relation_MappingActualPISPIP_MPSync_MPSync_MappingActualPISPIP.qbl
new file mode 100644
index 0000000..0f7a1ec
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingActualPISPIP_MPSync_MPSync_MappingActualPISPIP.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingActualPISPIP_MPSync_MPSync_MappingActualPISPIP
+{
+ #keys: '1[414384.0.737300004]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300006][414384.0.737300005][414384.0.737300007]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingActualPISPIP
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingActualPISPIP
+ {
+ #keys: '3[414384.0.737300009][414384.0.737300008][414384.0.737300010]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingBOM_MPSync_MPSync_MappingBOM.qbl b/_Main/BL/Relations/Relation_MappingBOM_MPSync_MPSync_MappingBOM.qbl
new file mode 100644
index 0000000..0af0e9d
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingBOM_MPSync_MPSync_MappingBOM.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingBOM_MPSync_MPSync_MappingBOM
+{
+ #keys: '1[414384.0.737300037]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300039][414384.0.737300038][414384.0.737300040]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingBOM
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingBOM
+ {
+ #keys: '3[414384.0.737300042][414384.0.737300041][414384.0.737300043]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingBOM_MacroPlan_MacroPlan_MappingBOM.qbl b/_Main/BL/Relations/Relation_MappingBOM_MacroPlan_MacroPlan_MappingBOM.qbl
deleted file mode 100644
index 902d4e9..0000000
--- a/_Main/BL/Relations/Relation_MappingBOM_MacroPlan_MacroPlan_MappingBOM.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingBOM_MacroPlan_MacroPlan_MappingBOM
-{
- #keys: '1[412960.0.86935179]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[412960.0.86935181][412960.0.86935180][412960.0.86935182]'
- Cardinality: '0to1'
- ObjectDefinition: MappingBOM
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingBOM
- {
- #keys: '3[412960.0.86935184][412960.0.86935183][412960.0.86935185]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MPSync_MPSync_MappingBaseConversionFact.qbl b/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MPSync_MPSync_MappingBaseConversionFact.qbl
new file mode 100644
index 0000000..d038edc
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MPSync_MPSync_MappingBaseConversionFact.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingBaseConversionFactor_MPSync_MPSync_MappingBaseConversionFactor
+{
+ #keys: '1[414384.0.737300021]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300023][414384.0.737300022][414384.0.737300024]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingBaseConversionFactor
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingBaseConversionFactor
+ {
+ #keys: '3[414384.0.737300026][414384.0.737300025][414384.0.737300027]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MacroPlan_MacroPlan_MappingBaseConversi.qbl b/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MacroPlan_MacroPlan_MappingBaseConversi.qbl
deleted file mode 100644
index a3c06fc..0000000
--- a/_Main/BL/Relations/Relation_MappingBaseConversionFactor_MacroPlan_MacroPlan_MappingBaseConversi.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingBaseConversionFactor_MacroPlan_MacroPlan_MappingBaseConversionFactor
-{
- #keys: '1[414384.0.583154683]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.583154685][414384.0.583154684][414384.0.583154686]'
- Cardinality: '0to1'
- ObjectDefinition: MappingBaseConversionFactor
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingBaseConversionFactor
- {
- #keys: '3[414384.0.583154688][414384.0.583154687][414384.0.583154689]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingCustomerOrder_MPSync_MPSync_MappingCustomerOrder.qbl b/_Main/BL/Relations/Relation_MappingCustomerOrder_MPSync_MPSync_MappingCustomerOrder.qbl
new file mode 100644
index 0000000..0b61f30
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingCustomerOrder_MPSync_MPSync_MappingCustomerOrder.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingCustomerOrder_MPSync_MPSync_MappingCustomerOrder
+{
+ #keys: '1[414384.0.737300053]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300055][414384.0.737300054][414384.0.737300056]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingCustomerOrder
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingCustomerOrder
+ {
+ #keys: '3[414384.0.737300058][414384.0.737300057][414384.0.737300059]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingCustomerOrder_MacroPlan_MacroPlan_MappingCustomerOrder.qbl b/_Main/BL/Relations/Relation_MappingCustomerOrder_MacroPlan_MacroPlan_MappingCustomerOrder.qbl
deleted file mode 100644
index 203709b..0000000
--- a/_Main/BL/Relations/Relation_MappingCustomerOrder_MacroPlan_MacroPlan_MappingCustomerOrder.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingCustomerOrder_MacroPlan_MacroPlan_MappingCustomerOrder
-{
- #keys: '1[414384.0.583154766]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.583154768][414384.0.583154767][414384.0.583154769]'
- Cardinality: '0to1'
- ObjectDefinition: MappingCustomerOrder
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingCustomerOrder
- {
- #keys: '3[414384.0.583154771][414384.0.583154770][414384.0.583154772]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingExternalSupply_MPSync_MPSync_MappingExternalSupply.qbl b/_Main/BL/Relations/Relation_MappingExternalSupply_MPSync_MPSync_MappingExternalSupply.qbl
new file mode 100644
index 0000000..a4fbde1
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingExternalSupply_MPSync_MPSync_MappingExternalSupply.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingExternalSupply_MPSync_MPSync_MappingExternalSupply
+{
+ #keys: '1[414384.0.737300069]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300071][414384.0.737300070][414384.0.737300072]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingExternalSupply
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingExternalSupply
+ {
+ #keys: '3[414384.0.737300074][414384.0.737300073][414384.0.737300075]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingForecast_MPSync_MPSync_MappingForecast.qbl b/_Main/BL/Relations/Relation_MappingForecast_MPSync_MPSync_MappingForecast.qbl
new file mode 100644
index 0000000..d90edf7
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingForecast_MPSync_MPSync_MappingForecast.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingForecast_MPSync_MPSync_MappingForecast
+{
+ #keys: '1[414384.0.737300085]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300087][414384.0.737300086][414384.0.737300088]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingForecast
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingForecast
+ {
+ #keys: '3[414384.0.737300090][414384.0.737300089][414384.0.737300091]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingForecast_MacroPlan_MacroPlan_MappingForecast.qbl b/_Main/BL/Relations/Relation_MappingForecast_MacroPlan_MacroPlan_MappingForecast.qbl
deleted file mode 100644
index e3bd43d..0000000
--- a/_Main/BL/Relations/Relation_MappingForecast_MacroPlan_MacroPlan_MappingForecast.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingForecast_MacroPlan_MacroPlan_MappingForecast
-{
- #keys: '1[414384.0.583160291]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.583160293][414384.0.583160292][414384.0.583160294]'
- Cardinality: '0to1'
- ObjectDefinition: MappingForecast
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingForecast
- {
- #keys: '3[414384.0.583160296][414384.0.583160295][414384.0.583160297]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MPSync_MPSync_MappingInventoryValueAnd.qbl b/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MPSync_MPSync_MappingInventoryValueAnd.qbl
new file mode 100644
index 0000000..9f91cf9
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MPSync_MPSync_MappingInventoryValueAnd.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingInventoryValueAndCost_MPSync_MPSync_MappingInventoryValueAndCost
+{
+ #keys: '1[414384.0.737300101]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300103][414384.0.737300102][414384.0.737300104]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingInventoryValueAndCost
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingInventoryValueAndCost
+ {
+ #keys: '3[414384.0.737300106][414384.0.737300105][414384.0.737300107]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MacroPlan_MacroPlan_MappingInventoryVa.qbl b/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MacroPlan_MacroPlan_MappingInventoryVa.qbl
deleted file mode 100644
index f282c80..0000000
--- a/_Main/BL/Relations/Relation_MappingInventoryValueAndCost_MacroPlan_MacroPlan_MappingInventoryVa.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingInventoryValueAndCost_MacroPlan_MacroPlan_MappingInventoryValueAndCost
-{
- #keys: '1[414384.0.601560025]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.601560027][414384.0.601560026][414384.0.601560028]'
- Cardinality: '0to1'
- ObjectDefinition: MappingInventoryValueAndCost
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingInventoryValueAndCost
- {
- #keys: '3[414384.0.601560030][414384.0.601560029][414384.0.601560031]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingOperationCost_MPSync_MPSync_MappingOperationCost.qbl b/_Main/BL/Relations/Relation_MappingOperationCost_MPSync_MPSync_MappingOperationCost.qbl
new file mode 100644
index 0000000..67b9f81
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingOperationCost_MPSync_MPSync_MappingOperationCost.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingOperationCost_MPSync_MPSync_MappingOperationCost
+{
+ #keys: '1[414384.0.736080617]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080619][414384.0.736080618][414384.0.736080620]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingOperationCost
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingOperationCost
+ {
+ #keys: '3[414384.0.736080622][414384.0.736080621][414384.0.736080623]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingOperationCost_MacroPlan_MacroPlan_MappingOperationCost.qbl b/_Main/BL/Relations/Relation_MappingOperationCost_MacroPlan_MacroPlan_MappingOperationCost.qbl
deleted file mode 100644
index 28c2cbe..0000000
--- a/_Main/BL/Relations/Relation_MappingOperationCost_MacroPlan_MacroPlan_MappingOperationCost.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingOperationCost_MacroPlan_MacroPlan_MappingOperationCost
-{
- #keys: '1[412960.0.95000601]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[412960.0.95000603][412960.0.95000602][412960.0.95000604]'
- Cardinality: '0to1'
- ObjectDefinition: MappingOperationCost
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingOperationCost
- {
- #keys: '3[412960.0.95000606][412960.0.95000605][412960.0.95000607]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingOperation_MPSync_MPSync_MappingOperation.qbl b/_Main/BL/Relations/Relation_MappingOperation_MPSync_MPSync_MappingOperation.qbl
new file mode 100644
index 0000000..bb6553e
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingOperation_MPSync_MPSync_MappingOperation.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingOperation_MPSync_MPSync_MappingOperation
+{
+ #keys: '1[414384.0.737300117]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.737300119][414384.0.737300118][414384.0.737300120]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingOperation
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingOperation
+ {
+ #keys: '3[414384.0.737300122][414384.0.737300121][414384.0.737300123]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingOperation_MacroPlan_MacroPlan_MappingOperation.qbl b/_Main/BL/Relations/Relation_MappingOperation_MacroPlan_MacroPlan_MappingOperation.qbl
deleted file mode 100644
index 4e7f7bc..0000000
--- a/_Main/BL/Relations/Relation_MappingOperation_MacroPlan_MacroPlan_MappingOperation.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingOperation_MacroPlan_MacroPlan_MappingOperation
-{
- #keys: '1[412960.0.86990893]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[412960.0.86990895][412960.0.86990894][412960.0.86990896]'
- Cardinality: '0to1'
- ObjectDefinition: MappingOperation
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingOperation
- {
- #keys: '3[412960.0.86990898][412960.0.86990897][412960.0.86990899]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingProductInLane_MPSync_MPSync_MappingProductInLane.qbl b/_Main/BL/Relations/Relation_MappingProductInLane_MPSync_MPSync_MappingProductInLane.qbl
new file mode 100644
index 0000000..a8def35
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingProductInLane_MPSync_MPSync_MappingProductInLane.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingProductInLane_MPSync_MPSync_MappingProductInLane
+{
+ #keys: '1[414384.0.736080646]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080648][414384.0.736080647][414384.0.736080649]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingProductInLane
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingProductInLane
+ {
+ #keys: '3[414384.0.736080651][414384.0.736080650][414384.0.736080652]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingProductInLane_MacroPlan_MacroPlan_MappingProductInLane.qbl b/_Main/BL/Relations/Relation_MappingProductInLane_MacroPlan_MacroPlan_MappingProductInLane.qbl
deleted file mode 100644
index 22712fa..0000000
--- a/_Main/BL/Relations/Relation_MappingProductInLane_MacroPlan_MacroPlan_MappingProductInLane.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingProductInLane_MacroPlan_MacroPlan_MappingProductInLane
-{
- #keys: '1[412960.0.86844662]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[412960.0.86844664][412960.0.86844663][412960.0.86844665]'
- Cardinality: '0to1'
- ObjectDefinition: MappingProductInLane
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingProductInLane
- {
- #keys: '3[412960.0.86844667][412960.0.86844666][412960.0.86844668]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingProduct_MPSync_MPSync_MappingProduct.qbl b/_Main/BL/Relations/Relation_MappingProduct_MPSync_MPSync_MappingProduct.qbl
new file mode 100644
index 0000000..64c3aef
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingProduct_MPSync_MPSync_MappingProduct.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingProduct_MPSync_MPSync_MappingProduct
+{
+ #keys: '1[414384.0.736080633]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080635][414384.0.736080634][414384.0.736080636]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingProduct
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingProduct
+ {
+ #keys: '3[414384.0.736080638][414384.0.736080637][414384.0.736080639]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingSalesSegment_MPSync_MPSync_MappingSalesSegment.qbl b/_Main/BL/Relations/Relation_MappingSalesSegment_MPSync_MPSync_MappingSalesSegment.qbl
new file mode 100644
index 0000000..7af3e26
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingSalesSegment_MPSync_MPSync_MappingSalesSegment.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingSalesSegment_MPSync_MPSync_MappingSalesSegment
+{
+ #keys: '1[414384.0.736080662]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080664][414384.0.736080663][414384.0.736080665]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingSalesSegment
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingSalesSegment
+ {
+ #keys: '3[414384.0.736080667][414384.0.736080666][414384.0.736080668]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingSalesSegment_MacroPlan_MacroPlan_MappingSalesSegment.qbl b/_Main/BL/Relations/Relation_MappingSalesSegment_MacroPlan_MacroPlan_MappingSalesSegment.qbl
deleted file mode 100644
index 691032b..0000000
--- a/_Main/BL/Relations/Relation_MappingSalesSegment_MacroPlan_MacroPlan_MappingSalesSegment.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingSalesSegment_MacroPlan_MacroPlan_MappingSalesSegment
-{
- #keys: '1[414384.0.583160113]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.583160115][414384.0.583160114][414384.0.583160116]'
- Cardinality: '0to1'
- ObjectDefinition: MappingSalesSegment
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingSalesSegment
- {
- #keys: '3[414384.0.583160118][414384.0.583160117][414384.0.583160119]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MPSync_MPSync_MappingUnitOfMeasure.qbl b/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MPSync_MPSync_MappingUnitOfMeasure.qbl
new file mode 100644
index 0000000..f1c43b5
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MPSync_MPSync_MappingUnitOfMeasure.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingUnitOfMeasure_MPSync_MPSync_MappingUnitOfMeasure
+{
+ #keys: '1[414384.0.736080697]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080699][414384.0.736080698][414384.0.736080700]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingUnitOfMeasure
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingUnitOfMeasure
+ {
+ #keys: '3[414384.0.736080702][414384.0.736080701][414384.0.736080703]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MacroPlan_MacroPlan_MappingUnitOfMeasure.qbl b/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MacroPlan_MacroPlan_MappingUnitOfMeasure.qbl
deleted file mode 100644
index e01a2f2..0000000
--- a/_Main/BL/Relations/Relation_MappingUnitOfMeasure_MacroPlan_MacroPlan_MappingUnitOfMeasure.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingUnitOfMeasure_MacroPlan_MacroPlan_MappingUnitOfMeasure
-{
- #keys: '1[414384.0.583160058]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[414384.0.583160060][414384.0.583160059][414384.0.583160061]'
- Cardinality: '0to1'
- ObjectDefinition: MappingUnitOfMeasure
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingUnitOfMeasure
- {
- #keys: '3[414384.0.583160063][414384.0.583160062][414384.0.583160064]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Relations/Relation_MappingUnit_MPSync_MPSync_MappingUnit.qbl b/_Main/BL/Relations/Relation_MappingUnit_MPSync_MPSync_MappingUnit.qbl
new file mode 100644
index 0000000..96a13c9
--- /dev/null
+++ b/_Main/BL/Relations/Relation_MappingUnit_MPSync_MPSync_MappingUnit.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation MappingUnit_MPSync_MPSync_MappingUnit
+{
+ #keys: '1[414384.0.736080678]'
+ DefaultRelationStrategy
+ {
+ }
+ RelationSide.LeftSide MPSync
+ {
+ #keys: '3[414384.0.736080680][414384.0.736080679][414384.0.736080681]'
+ Cardinality: '0to1'
+ ObjectDefinition: MappingUnit
+ OwningSide: 'Reference'
+ }
+ RelationSide.RightSide MappingUnit
+ {
+ #keys: '3[414384.0.736080683][414384.0.736080682][414384.0.736080684]'
+ Cardinality: '1toN'
+ ObjectDefinition: MPSync
+ OwningSide: 'Owned'
+ }
+}
diff --git a/_Main/BL/Relations/Relation_MappingUnit_MacroPlan_MacroPlan_MappingUnit.qbl b/_Main/BL/Relations/Relation_MappingUnit_MacroPlan_MacroPlan_MappingUnit.qbl
deleted file mode 100644
index e226c90..0000000
--- a/_Main/BL/Relations/Relation_MappingUnit_MacroPlan_MacroPlan_MappingUnit.qbl
+++ /dev/null
@@ -1,23 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Relation MappingUnit_MacroPlan_MacroPlan_MappingUnit
-{
- #keys: '1[412960.0.96453721]'
- DefaultRelationStrategy
- {
- }
- RelationSide.LeftSide MacroPlan
- {
- #keys: '3[412960.0.96453723][412960.0.96453722][412960.0.96453724]'
- Cardinality: '0to1'
- ObjectDefinition: MappingUnit
- OwningSide: 'Reference'
- }
- RelationSide.RightSide MappingUnit
- {
- #keys: '3[412960.0.96453726][412960.0.96453725][412960.0.96453727]'
- Cardinality: '1toN'
- ObjectDefinition: MacroPlan
- OwningSide: 'Owned'
- }
-}
diff --git a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl b/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
deleted file mode 100644
index 0ee5894..0000000
--- a/_Main/BL/Type_BaseConversionFactor/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan
-)
-{
- Description: '鍗曟鍚屾'
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- info( "Product Finished, Start BaseConversionFactor Data Broker" )
- macroPlan.Broker_OTD_BaseConversionFactor().Execute();
- info( "BaseConversionFactor Data Broker Finished, Start BaseConversionFactor Mapping" )
- macroPlan.MappingBaseConversionFactorData();
- *]
-}
diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
deleted file mode 100644
index ece7264..0000000
--- a/_Main/BL/Type_CustomerOrder/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan,
- Strings businessTypes
-)
-{
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- info( "Forecast Finished, Start CustomerOrder Data Broker" );
- macroPlan.Broker_OTD_CustomerOrder().Execute();
- info( "CustomerOrder Data Broker Finished, Start CustomerOrder Mapping" );
- macroPlan.MappingCustomerOrderData( businessTypes );
- *]
-}
diff --git a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl b/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
deleted file mode 100644
index 401e158..0000000
--- a/_Main/BL/Type_Forecast/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan,
- Strings businessTypes
-)
-{
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- info( "OperationCost Finished, Start Forecast Data Broker" );
- macroPlan.Broker_OTD_Forecast().Execute();
- info( "Forecast Data Broker Finished, Start Forecast Mapping" );
- macroPlan.MappingForecastData( businessTypes );
- *]
-}
diff --git a/_Main/BL/Type_IOBaseConversionFactor/StaticMethod_DeleteIfExist.qbl b/_Main/BL/Type_IOBaseConversionFactor/StaticMethod_DeleteIfExist.qbl
new file mode 100644
index 0000000..9802666
--- /dev/null
+++ b/_Main/BL/Type_IOBaseConversionFactor/StaticMethod_DeleteIfExist.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeleteIfExist (
+ MPSync mpSync,
+ String from,
+ String to,
+ String productId
+)
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ toDel := select( mpSync, IOBaseConversionFactor, item,
+ item.SourceUnitOfMeasureName() = from and item.TargetUnitOfMeasureName() = to and item.ProductID() = productId );
+ if( not isnull( toDel ) ) {
+ toDel.Delete();
+ }
+ *]
+}
diff --git a/_Main/BL/Type_IOBaseConversionFactor/_ROOT_Type_IOBaseConversionFactor.qbl b/_Main/BL/Type_IOBaseConversionFactor/_ROOT_Type_IOBaseConversionFactor.qbl
new file mode 100644
index 0000000..6636e3d
--- /dev/null
+++ b/_Main/BL/Type_IOBaseConversionFactor/_ROOT_Type_IOBaseConversionFactor.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOBaseConversionFactor #extension
+{
+}
diff --git a/_Main/BL/Type_IOCurrencyRate_MP/StaticMethod_DeleteIfExist.qbl b/_Main/BL/Type_IOCurrencyRate_MP/StaticMethod_DeleteIfExist.qbl
new file mode 100644
index 0000000..474e3f5
--- /dev/null
+++ b/_Main/BL/Type_IOCurrencyRate_MP/StaticMethod_DeleteIfExist.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeleteIfExist (
+ MPSync mpSync,
+ String currencyId,
+ Date start
+)
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ toDel := select( mpSync, IOCurrencyRate_MP, item,
+ item.CurrencyID() = currencyId and item.Start() = start );
+ if( not isnull( toDel ) ) {
+ toDel.Delete();
+ }
+ *]
+}
diff --git a/_Main/BL/Type_IOCurrencyRate_MP/_ROOT_Type_IOCurrencyRate_MP.qbl b/_Main/BL/Type_IOCurrencyRate_MP/_ROOT_Type_IOCurrencyRate_MP.qbl
new file mode 100644
index 0000000..21d526b
--- /dev/null
+++ b/_Main/BL/Type_IOCurrencyRate_MP/_ROOT_Type_IOCurrencyRate_MP.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOCurrencyRate_MP #extension
+{
+}
diff --git a/_Main/BL/Type_IOCurrency_MP/StaticMethod_DeleteIfExist.qbl b/_Main/BL/Type_IOCurrency_MP/StaticMethod_DeleteIfExist.qbl
new file mode 100644
index 0000000..b476627
--- /dev/null
+++ b/_Main/BL/Type_IOCurrency_MP/StaticMethod_DeleteIfExist.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeleteIfExist (
+ MPSync mpSync,
+ String id
+)
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ toDel := select( mpSync, IOCurrency_MP, item, item.ID() = id );
+ if( not isnull( toDel ) ) {
+ toDel.Delete();
+ }
+ *]
+}
diff --git a/_Main/BL/Type_IOCurrency_MP/_ROOT_Type_IOCurrency_MP.qbl b/_Main/BL/Type_IOCurrency_MP/_ROOT_Type_IOCurrency_MP.qbl
new file mode 100644
index 0000000..36fb030
--- /dev/null
+++ b/_Main/BL/Type_IOCurrency_MP/_ROOT_Type_IOCurrency_MP.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOCurrency_MP #extension
+{
+}
diff --git a/_Main/BL/Type_IOLane/StaticMethod_DeleteIfExist.qbl b/_Main/BL/Type_IOLane/StaticMethod_DeleteIfExist.qbl
new file mode 100644
index 0000000..cfd3b35
--- /dev/null
+++ b/_Main/BL/Type_IOLane/StaticMethod_DeleteIfExist.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeleteIfExist (
+ MPSync mpSync,
+ String id
+)
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ toDel := select( mpSync, IOLane, item, item.ID() = id );
+ if( not isnull( toDel ) ) {
+ toDel.Delete();
+ }
+ *]
+}
diff --git a/_Main/BL/Type_IOLane/_ROOT_Type_IOLane.qbl b/_Main/BL/Type_IOLane/_ROOT_Type_IOLane.qbl
new file mode 100644
index 0000000..66ac220
--- /dev/null
+++ b/_Main/BL/Type_IOLane/_ROOT_Type_IOLane.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOLane #extension
+{
+}
diff --git a/_Main/BL/Type_IOOperation/StaticMethod_CreateIfNotExist.qbl b/_Main/BL/Type_IOOperation/StaticMethod_CreateIfNotExist.qbl
new file mode 100644
index 0000000..c6d4e89
--- /dev/null
+++ b/_Main/BL/Type_IOOperation/StaticMethod_CreateIfNotExist.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateIfNotExist (
+ MPSync mpSync,
+ String id
+) as IOOperation
+{
+ TextBody:
+ [*
+ // yypsybs Sep-5-2023 (created)
+ result := select( mpSync, IOOperation, op, op.ID() = id );
+ if( isnull( result ) ) {
+ result := mpSync.IOOperation( relnew,
+ ID := id );
+ }
+ return result;
+ *]
+}
diff --git a/_Main/BL/Type_IOOperation/_ROOT_Type_IOOperation.qbl b/_Main/BL/Type_IOOperation/_ROOT_Type_IOOperation.qbl
new file mode 100644
index 0000000..3bb29a6
--- /dev/null
+++ b/_Main/BL/Type_IOOperation/_ROOT_Type_IOOperation.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOOperation #extension
+{
+}
diff --git a/_Main/BL/Type_IOProduct_MP/StaticMethod_CreateIfNotExist.qbl b/_Main/BL/Type_IOProduct_MP/StaticMethod_CreateIfNotExist.qbl
new file mode 100644
index 0000000..3a636ab
--- /dev/null
+++ b/_Main/BL/Type_IOProduct_MP/StaticMethod_CreateIfNotExist.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateIfNotExist (
+ MPSync mpSync,
+ String id,
+ String name,
+ String parentId,
+ String uom
+) as IOProduct_MP
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ value := IOProduct_MP::FindById( mpSync, id );
+ if( isnull( value ) ) {
+ value := IOProduct_MP::Create( mpSync, id, name, "", uom );
+ if( parentId <> "" ) {
+ value.ParentID( parentId );
+ }
+ }
+ return value;
+ *]
+}
diff --git a/_Main/BL/Type_IOProduct_MP/StaticMethod_FindById.qbl b/_Main/BL/Type_IOProduct_MP/StaticMethod_FindById.qbl
new file mode 100644
index 0000000..b080495
--- /dev/null
+++ b/_Main/BL/Type_IOProduct_MP/StaticMethod_FindById.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod FindById (
+ MPSync mpSync,
+ String id
+) as IOProduct_MP
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ result := select( mpSync, IOProduct_MP, item, item.ID() = id );
+ return result;
+ *]
+}
diff --git a/_Main/BL/Type_IOProduct_MP/_ROOT_Type_IOProduct_MP.qbl b/_Main/BL/Type_IOProduct_MP/_ROOT_Type_IOProduct_MP.qbl
new file mode 100644
index 0000000..e99d7ea
--- /dev/null
+++ b/_Main/BL/Type_IOProduct_MP/_ROOT_Type_IOProduct_MP.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOProduct_MP #extension
+{
+}
diff --git a/_Main/BL/Type_IORoutingStep/StaticMethod_CreateIfNotExist.qbl b/_Main/BL/Type_IORoutingStep/StaticMethod_CreateIfNotExist.qbl
new file mode 100644
index 0000000..e5e10b1
--- /dev/null
+++ b/_Main/BL/Type_IORoutingStep/StaticMethod_CreateIfNotExist.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateIfNotExist (
+ MPSync mpSync,
+ String routingId,
+ String name,
+ Number seq
+) as IORoutingStep
+{
+ TextBody:
+ [*
+ // yypsybs Sep-5-2023 (created)
+ value := select( mpSync, IORoutingStep, item, item.RoutingID() = routingId and item.Name() = name and item.SequenceNumberForExcel() = seq );
+ if( isnull( value ) ) {
+ mpSync.IORoutingStep( relnew,
+ RoutingID := routingId,
+ Name := name,
+ SequenceNumberForExcel := seq );
+ }
+ return value;
+ *]
+}
diff --git a/_Main/BL/Type_IORoutingStep/_ROOT_Type_IORoutingStep.qbl b/_Main/BL/Type_IORoutingStep/_ROOT_Type_IORoutingStep.qbl
new file mode 100644
index 0000000..966b160
--- /dev/null
+++ b/_Main/BL/Type_IORoutingStep/_ROOT_Type_IORoutingStep.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IORoutingStep #extension
+{
+}
diff --git a/_Main/BL/Type_IOUnit/StaticMethod_CreateIfNotExistByTree.qbl b/_Main/BL/Type_IOUnit/StaticMethod_CreateIfNotExistByTree.qbl
new file mode 100644
index 0000000..61c9d6b
--- /dev/null
+++ b/_Main/BL/Type_IOUnit/StaticMethod_CreateIfNotExistByTree.qbl
@@ -0,0 +1,32 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod CreateIfNotExistByTree (
+ MPSync mpSync,
+ String id,
+ String name,
+ String parentId,
+ String UOMName,
+ String currencyId,
+ Date startDate,
+ Date endDate,
+ String capacityType
+) as IOUnit
+{
+ TextBody:
+ [*
+ // yypsybs Sep-6-2023 (created)
+ value := IOUnit::FindById( mpSync, id );
+ if( isnull( value ) ) {
+ value := mpSync.IOUnit( relnew,
+ ID := id,
+ Name := name,
+ ParentUnitID := parentId,
+ UnitOfMeasureName := UOMName,
+ CurrencyID := currencyId,
+ StartDate := startDate,
+ EndDate := endDate,
+ CapacityType := capacityType );
+ }
+ return value;
+ *]
+}
diff --git a/_Main/BL/Type_IOUnit/StaticMethod_FindById.qbl b/_Main/BL/Type_IOUnit/StaticMethod_FindById.qbl
new file mode 100644
index 0000000..8d1460c
--- /dev/null
+++ b/_Main/BL/Type_IOUnit/StaticMethod_FindById.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod FindById (
+ MPSync mpSync,
+ String id
+) as IOUnit
+{
+ TextBody:
+ [*
+ // yypsybs Sep-6-2023 (created)
+ value := select( mpSync, IOUnit, item, item.ID() = id );
+ return value;
+ *]
+}
diff --git a/_Main/BL/Type_IOUnit/_ROOT_Type_IOUnit.qbl b/_Main/BL/Type_IOUnit/_ROOT_Type_IOUnit.qbl
new file mode 100644
index 0000000..4056a12
--- /dev/null
+++ b/_Main/BL/Type_IOUnit/_ROOT_Type_IOUnit.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+TypeSpecialization IOUnit #extension
+{
+}
diff --git a/_Main/BL/Type_IOUnitOfMeasure_MP/StaticMethod_DeleteIfExist.qbl b/_Main/BL/Type_IOUnitOfMeasure_MP/StaticMethod_DeleteIfExist.qbl
new file mode 100644
index 0000000..43a9efe
--- /dev/null
+++ b/_Main/BL/Type_IOUnitOfMeasure_MP/StaticMethod_DeleteIfExist.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DeleteIfExist (
+ MPSync mpSync,
+ String name
+)
+{
+ TextBody:
+ [*
+ // yypsybs Sep-1-2023 (created)
+ toDel := select( mpSync, IOUnitOfMeasure_MP, item,
+ item.Name() = name );
+ if( not isnull( toDel ) ) {
+ toDel.Delete();
+ }
+ *]
+}
diff --git a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl b/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
deleted file mode 100644
index 574ecd5..0000000
--- a/_Main/BL/Type_InventoryValueAndCost/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,15 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan
-)
-{
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- info( "ActualPISPIP Finished, Start InventoryCost Data Broker" );
- macroPlan.Broker_OTD_InventoryCost().Execute();
- info( "InventoryCost Data Broker Finished, Start InventoryCost Mapping" );
- macroPlan.MappingInventoryValueAndCostData();
- *]
-}
diff --git a/_Main/BL/Type_MPSync/Method_GetProductTypeByProductId.qbl b/_Main/BL/Type_MPSync/Method_GetProductTypeByProductId.qbl
new file mode 100644
index 0000000..7e4e927
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_GetProductTypeByProductId.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetProductTypeByProductId (
+ String productId
+) as String
+{
+ TextBody:
+ [*
+ // yypsybs Sep-5-2023 (created)
+ values := selectvalues( this, MappingBOM, item, item.ProductCode() = productId, item.ProductType() );
+ value := "";
+ if( values.Size() > 0 ) {
+ value := values.Element( 0 );
+ }
+ return value;
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_ImportDBDataCustom.qbl b/_Main/BL/Type_MPSync/Method_ImportDBDataCustom.qbl
new file mode 100644
index 0000000..0646b5f
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_ImportDBDataCustom.qbl
@@ -0,0 +1,91 @@
+Quintiq file version 2.0
+#parent: #root
+Method ImportDBDataCustom (
+ MacroPlan macroPlan,
+ Strings businessTypes,
+ Boolean isKeyProduct,
+ Boolean createPurchaseSupplyMaterial
+)
+{
+ Description: '灏嗚〃鐨勬暟鎹浆涓篒Oxxxx鐨勬暟鎹�'
+ TextBody:
+ [*
+ // Import data from DB
+
+ // 鏁版嵁澶勭悊
+
+ // 閿�鍞骇鍒強閿�鍞儴闂�
+ this.MappingSalesLevelData();
+ this.Broker_OTD_SalesSegment().Execute();
+ this.MappingSalesSegmentData( businessTypes );
+
+ // 鍗曚綅鍙婂崟浣嶆崲绠�
+ this.Broker_OTD_UnitOfMeasure().Execute();
+ this.MappingUnitOfMeasureData();
+ this.Broker_OTD_BaseConversionFactor().Execute();
+ this.MappingBaseConversionFactorData();
+
+ // 璐у竵鍙婅揣甯佹眹鐜�
+ this.MappingCurrencyData();
+ this.MappingCurrencyRateData();
+
+ // 搴撳瓨鐐�
+ this.MappingStockingPointData();
+
+ // 浜у搧
+ this.Broker_OTD_Product().Execute();
+ this.MappingProductData( businessTypes, isKeyProduct );
+
+ // 璁㈠崟棰勬祴
+ this.Broker_OTD_Forecast().Execute();
+ this.MappingForecastData( businessTypes );
+
+ // 璁㈠崟闇�姹�
+ this.Broker_OTD_CustomerOrder().Execute();
+ this.MappingCustomerOrderData( businessTypes );
+
+ // 杞﹂亾
+ this.MappingLaneData();
+ // 杞﹂亾杩愯緭娈�
+ this.MappingLaneLegData();
+ // 渚涘簲缃戠粶锛堣溅閬擄級
+ this.Broker_OTD_ProductInLane().Execute();
+ this.MappingProductInLaneData();
+
+ // routing routingStep unit operation operationLink operationInputGroup operationBOM
+ this.Broker_OTD_Operation().Execute();
+ this.Broker_OTD_BOM().Execute();
+ // 娓呯悊鏃ф暟鎹�
+ this.IOUnit( relflush );
+ this.IOOperation( relflush );
+ this.IOOperationLink( relflush );
+ this.IOOperationInputGroup( relflush );
+ // 澶勭悊鏁版嵁
+ this.MappingUnitData( businessTypes );
+ this.MappingOperationData( businessTypes );
+ // 娓呯悊鏃ф暟鎹�
+ this.IOOperationBOM( relflush );
+ // 澶勭悊鏁版嵁
+ this.MappingOperationBOMData( businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+
+ // 搴撳瓨鎴愭湰
+ this.Broker_OTD_InventoryCost().Execute();
+ this.MappingInventoryValueAndCostData();
+
+ // 搴撳瓨鏁版嵁
+ this.Broker_OTD_ActualPISPIP().Execute();
+ this.MappingActualPISPIPData( businessTypes, isKeyProduct )
+
+ // Update the LastImportFromDatabase time
+ this.LastImportTime( DateTime::ActualTime() );
+ // sync to mp
+ if( not isnull( macroPlan ) ) {
+ macroPlan.SynchronizeFromMPSync( this, false,
+ true, true, true, true, true,
+ true, true, true, true, true,
+ true, true, true, true, true,
+ true, true, true, true, true,
+ true, true, true, true );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingActualPISPIPData.qbl b/_Main/BL/Type_MPSync/Method_MappingActualPISPIPData.qbl
new file mode 100644
index 0000000..afc3888
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingActualPISPIPData.qbl
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingActualPISPIPData (
+ Strings businessTypes,
+ Boolean nuclear
+)
+{
+ TextBody:
+ [*
+ this.IOActualProductInStockingPointInPeriod( relflush );
+ // 鍏堟寜鍏抽敭鐗╂枡锛屽啀鎸塨usinessType绛涢�変骇鍝�
+ productList := selectset( this, MappingProduct, item, item.KeyProduct() = nuclear );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ productList := selectset( productList, Elements, item, businessTypes.Find( item.BusinessType() ) >= 0 );
+ }
+ productIdList := selectvalues( productList, Elements, item, item.ID() );
+ // 鏍规嵁浜у搧绛涢�夊簱瀛樻暟鎹�
+ traverse( this, MappingActualPISPIP, item, productIdList.Find( item.ProductID() ) >= 0 ) {
+ this.IOActualProductInStockingPointInPeriod( relnew,
+ ActualInventoryLevelEnd := item.ActualInventoryLevelEnd(),
+ // todo 纭浣跨敤褰撳墠鏃ユ湡杩樻槸鏁版嵁搴撴棩鏈�
+ Date := item.Date(),
+ Description := item.Description(),
+ ManufacturedDate := item.ManufacturedDate(),
+ ProductID := item.ProductID(),
+ StockingPointID := item.StockingPointID() );
+
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingBaseConversionFactorData.qbl b/_Main/BL/Type_MPSync/Method_MappingBaseConversionFactorData.qbl
new file mode 100644
index 0000000..78cf5e9
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingBaseConversionFactorData.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingBaseConversionFactorData
+{
+ Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
+ TextBody:
+ [*
+ this.IOBaseConversionFactor( relflush );
+ traverse( this, MappingBaseConversionFactor, item ) {
+ // IOBaseConversionFactor::DeleteIfExist( this, item.SourceUnitOfMeasureName(), item.TargetUnitOfMeasureName(), item.ProductId() );
+ this.IOBaseConversionFactor( relnew,
+ SourceUnitOfMeasureName := item.SourceUnitOfMeasureName(),
+ TargetUnitOfMeasureName := item.TargetUnitOfMeasureName(),
+ ProductID := item.ProductId(),
+ UserFactor := item.Factor(),
+ IsEnabled := item.IsEnabled() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingCurencyRatesData.qbl b/_Main/BL/Type_MPSync/Method_MappingCurencyRatesData.qbl
new file mode 100644
index 0000000..b941727
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingCurencyRatesData.qbl
@@ -0,0 +1,28 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingCurencyRatesData (
+ JSON data
+)
+{
+ TextBody:
+ [*
+ data_length := data.Size();
+ for( i := 0; i < data_length; i++ )
+ {
+ datarow := data.Get( i );
+ currencyId := datarow.Get( "currencyid" ).GetString();
+ rate := [Real]datarow.Get( "rate" ).GetString();
+ startString := datarow.Get( "start" ).GetString();
+ years := [Number]startString.SubString( 0, 4 );
+ month := [Number]startString.SubString( 5, 2 );
+ day := [Number]startString.SubString( 8, 2 );
+ start := Date::Construct( years, month, day );
+ // 鍒犻櫎宸叉湁鐨�
+ // IOCurrencyRate_MP::DeleteIfExist( this, currencyId, start );
+ this.IOCurrencyRate_MP( relnew,
+ CurrencyID := currencyId,
+ Rate := rate,
+ Start := start );
+ }
+ *]
+}
diff --git "a/_Main/BL/Type_MPSync/Method_MappingCurrencyData\043670.qbl" "b/_Main/BL/Type_MPSync/Method_MappingCurrencyData\043670.qbl"
new file mode 100644
index 0000000..b5acd8e
--- /dev/null
+++ "b/_Main/BL/Type_MPSync/Method_MappingCurrencyData\043670.qbl"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingCurrencyData (
+ JSON data
+)
+{
+ TextBody:
+ [*
+ data_length := data.Size();
+ for( i := 0; i < data_length; i++ )
+ {
+ datarow := data.Get( i );
+ id := datarow.Get( "id" ).GetString();
+ isBase := [Boolean]datarow.Get( "isbase" ).GetString();
+ name := datarow.Get( "name" ).GetString();
+ symbol := " ";
+ // 鍒犻櫎宸叉湁鐨�
+ // IOCurrency_MP::DeleteIfExist( this, id );
+ this.IOCurrency_MP( relnew,
+ ID := id, IsBase := isBase, Name := name, Symbol := symbol );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingCurrencyData.qbl b/_Main/BL/Type_MPSync/Method_MappingCurrencyData.qbl
new file mode 100644
index 0000000..8dae5ee
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingCurrencyData.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingCurrencyData
+{
+ TextBody:
+ [*
+ this.IOCurrency_MP( relflush );
+ // 璐у竵淇℃伅
+ bodyNumber := "1";
+ postRequestBody := MPSync::ApiBuildPostRequestBody( bodyNumber );
+ address := "api-uat-sgc.tianma.cn";
+ url := "/otdService/https/GetCurrenciesInfo";
+ port := 443;
+ data := MPSync::ApiResponesCheck( address, port, url, postRequestBody );
+ this.MappingCurrencyData( data );
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingCurrencyRateData.qbl b/_Main/BL/Type_MPSync/Method_MappingCurrencyRateData.qbl
new file mode 100644
index 0000000..4335dd8
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingCurrencyRateData.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingCurrencyRateData
+{
+ TextBody:
+ [*
+ this.IOCurrencyRate_MP( relflush );
+ // 璐у竵姹囩巼淇℃伅
+ bodynumber := "5";
+ postrequestbody := MPSync::ApiBuildPostRequestBody( bodynumber );
+ address := "api-uat-sgc.tianma.cn";
+ url := "/otdService/https/GetCurrencyRatesInfo";
+ port := 443;
+ data := MPSync::ApiResponesCheck( address, port, url, postrequestbody );
+ this.MappingCurencyRatesData( data );
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingCustomerOrderData.qbl b/_Main/BL/Type_MPSync/Method_MappingCustomerOrderData.qbl
new file mode 100644
index 0000000..c15e946
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingCustomerOrderData.qbl
@@ -0,0 +1,44 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingCustomerOrderData (
+ Strings businessTypes
+)
+{
+ Description: 'ETL璁㈠崟棰勬祴'
+ TextBody:
+ [*
+ toDels := selectset( this, IOSalesDemandBase, item, item.istype( IOCustomerOrder ) );
+ traverse( toDels, Elements, toDel ) {
+ toDel.Delete();
+ }
+ // 寰呭鐞嗘暟鎹�
+ toDealList := selectset( this, MappingCustomerOrder, item, true );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ toDealList := selectset( toDealList, Elements, item, businessTypes.Find( item.BusinessType() ) >= 0 );
+ }
+ // todo 娌acroPlan鎬庝箞鎼�
+ //queryStartDate := guard( DateTime::Now() - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
+ //queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
+ //listToDeal := selectset( listToDeal, Elements, item, item.StartDate() >= queryStartDate and item.EndDate() <= queryEndDate );
+ // 澶勭悊
+ traverse( toDealList, Elements, item ) {
+ this.IOSalesDemandBase( relnew,
+ IOCustomerOrder,
+ ID := item.ID(),
+ CurrencyID := item.CurrencyID(),
+ PriorityName := item.PriorityName(),
+ ProductID := item.ProductID(),
+ SalesSegmentName := item.SalesSegmentName(),
+ StockingPointID := item.StockPointID(),
+ UnitOfMeasureName := item.UnitOfMeasureName(),
+ CustomerID := item.CustomerID(),
+ CustomerName := item.Customer(),
+ OrderID := item.OrderID(),
+ OrderLineID := item.OrderLineID(),
+ Price := item.Price(),
+ Quantity := item.Quantity(),
+ StartDate := item.OrderDate() );
+
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingExternalSupplyData.qbl b/_Main/BL/Type_MPSync/Method_MappingExternalSupplyData.qbl
new file mode 100644
index 0000000..f077a13
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingExternalSupplyData.qbl
@@ -0,0 +1,34 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingExternalSupplyData (
+ Strings businessTypes,
+ Boolean nuclear
+)
+{
+ TextBody:
+ [*
+ //// renhao Aug-14-2023 (created)
+ //
+ //traverse( this,MappingExternalSupply,externalSupply){
+ // product := select( this,MappingProduct,product,product.ID() = externalSupply.ProductID() and product.KeyProduct() = nuclear,true);
+ //
+ // if( not isnull( product)){
+ // productMP := select( this,Product_MP,productMP,productMP.ID() = externalSupply.ProductID() ,true);
+ // stockingpoint := select( this,StockingPoint_MP,st,st.ID() = externalSupply.StockingPointID(),true);
+ // if( not isnull(businessTypes)){
+ //
+ // for( i :=0 ;i < businessTypes.Size();i++ ){
+ // businessType := businessTypes.Element( i);
+ // if( product.BusinessType() = businessType and not product.IsCommon()){
+ // InventorySupply::Create(externalSupply.ID(),productMP,stockingpoint,externalSupply.Date(),externalSupply.ManufacturedDate(),externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�",true);
+ // }
+ // }
+ //
+ // }else{
+ // InventorySupply::Create(externalSupply.ID(),productMP,stockingpoint,externalSupply.Date(),externalSupply.ManufacturedDate(),externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�",true);
+ // }
+ //
+ // }
+ //}
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingForecastData.qbl b/_Main/BL/Type_MPSync/Method_MappingForecastData.qbl
new file mode 100644
index 0000000..bfc14c3
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingForecastData.qbl
@@ -0,0 +1,40 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingForecastData (
+ Strings businessTypes
+)
+{
+ Description: 'ETL璁㈠崟棰勬祴'
+ TextBody:
+ [*
+ toDels := selectset( this, IOSalesDemandBase, item, item.istype( IOForecast ) );
+ traverse( toDels, Elements, toDel ) {
+ toDel.Delete();
+ }
+ // 寰呭鐞嗘暟鎹�
+ listToDeal := selectset( this, MappingForecast, item, true );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ listToDeal := selectset( listToDeal, Elements, item, businessTypes.Find( item.BusinessType() ) >= 0 );
+ }
+ // todo 娌acroPlan鎬庝箞鎼�
+ //queryStartDate := guard( DateTime::Now() - Duration::Days( 30 ), DateTime::MinDateTime() ).Date();
+ //queryEndDate := guard( max( this, Period_MP, item, true, item.EndDate() ), Date::MaxDate() );
+ //listToDeal := selectset( listToDeal, Elements, item, item.StartDate() >= queryStartDate and item.EndDate() <= queryEndDate );
+ // 澶勭悊
+ traverse( listToDeal, Elements, item ) {
+ this.IOSalesDemandBase( relnew,
+ IOForecast,
+ ID := item.ID(),
+ CurrencyID := item.CurrencyID(),
+ PriorityName := item.PriorityName(),
+ SalesSegmentName := item.SalesSegmentName(),
+ StockingPointID := item.StockingPointID(),
+ UnitOfMeasureName := item.UnitOfMeasureName(),
+ ProductID := item.ProductID(),
+ StartDate := item.StartDate(),
+ EndDate := item.EndDate(),
+ Quantity := item.Quantity(),
+ Price := item.Price());
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingInventoryValueAndCostData.qbl b/_Main/BL/Type_MPSync/Method_MappingInventoryValueAndCostData.qbl
new file mode 100644
index 0000000..3a8d758
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingInventoryValueAndCostData.qbl
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingInventoryValueAndCostData
+{
+ TextBody:
+ [*
+ this.IOInventoryValueAndCost( relflush );
+ traverse( this, MappingInventoryValueAndCost, item ) {
+ this.IOInventoryValueAndCost( relnew,
+ ID := item.ID(),
+ AccountName := item.AccountName(),
+ Cost := item.Cost(),
+ CostDriver := item.CostDriver(),
+ ProductID := item.ProductID(),
+ Start := item.Start(),
+ StockingPointID := item.StockingPointID() );
+ }
+ *]
+}
diff --git "a/_Main/BL/Type_MPSync/Method_MappingLaneData\043474.qbl" "b/_Main/BL/Type_MPSync/Method_MappingLaneData\043474.qbl"
new file mode 100644
index 0000000..5757549
--- /dev/null
+++ "b/_Main/BL/Type_MPSync/Method_MappingLaneData\043474.qbl"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingLaneData (
+ JSON data
+)
+{
+ TextBody:
+ [*
+ dataLength := data.Size();
+ for( i := 0; i < dataLength; i++ ) {
+ dataRow := data.Get( i );
+ id := dataRow.Get( "id" ).GetString();
+ unitId := dataRow.Get( "unitid" ).GetString();
+ name := dataRow.Get( "name" ).GetString();
+ userLeadTimeHours := [Number]dataRow.Get( "userleadtime" ).GetString();
+ this.IOLane( relnew,
+ ID := id,
+ Name := name,
+ UnitID := unitId,
+ UserLeadTime := Duration::Hours( userLeadTimeHours ) );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingLaneData.qbl b/_Main/BL/Type_MPSync/Method_MappingLaneData.qbl
new file mode 100644
index 0000000..8e84a76
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingLaneData.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingLaneData
+{
+ TextBody:
+ [*
+ this.IOLane( relflush );
+ bodyNumber := "3";
+ postRequestBody := MPSync::ApiBuildPostRequestBody( bodyNumber );
+ address := "api-uat-sgc.tianma.cn";
+ url := "/otdService/https/GetLanesInfo";
+ port := 443;
+ data := MPSync::ApiResponesCheck( address, port, url, postRequestBody );
+ this.MappingLaneData( data );
+ *]
+}
diff --git "a/_Main/BL/Type_MPSync/Method_MappingLaneLegData\043257.qbl" "b/_Main/BL/Type_MPSync/Method_MappingLaneLegData\043257.qbl"
new file mode 100644
index 0000000..0b5adf8
--- /dev/null
+++ "b/_Main/BL/Type_MPSync/Method_MappingLaneLegData\043257.qbl"
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingLaneLegData (
+ JSON data
+)
+{
+ TextBody:
+ [*
+ dataLength := data.Size();
+ for( i := 0; i < dataLength; i++ ) {
+ dataRow := data.Get( i );
+ laneId := dataRow.Get( "laneid" ).GetString();
+ originStockingPointId := dataRow.Get( "originstockingpointid" ).GetString();
+ destinationStockingPointId := dataRow.Get( "destinationstockingpointid" ).GetString();
+ name := dataRow.Get( "name" ).GetString();
+ userLeadTimeHours := [Number]dataRow.Get( "userleadtime" ).GetString();
+ this.IOLaneLeg( relnew,
+ LaneID := laneId,
+ OriginStockingPointID := originStockingPointId,
+ DestinationStockingPointID := destinationStockingPointId,
+ Name := name,
+ HasUserLeadTime := true,
+ UserLeadTime := Duration::Hours( userLeadTimeHours ),
+ Start := Date::MinDate(),
+ End := Date::MaxDate(),
+ PreferenceBonus := 0.0,
+ CO2Emission := 0.0 );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingLaneLegData.qbl b/_Main/BL/Type_MPSync/Method_MappingLaneLegData.qbl
new file mode 100644
index 0000000..edd9206
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingLaneLegData.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingLaneLegData
+{
+ TextBody:
+ [*
+ this.IOLaneLeg( relflush );
+ bodynumber := "4";
+ postRequestBody := MPSync::ApiBuildPostRequestBody( bodynumber );
+ address := "api-uat-sgc.tianma.cn";
+ url := "/otdService/https/GetLaneLegsInfo";
+ port := 443;
+ data := MPSync::ApiResponesCheck( address, port, url, postRequestBody );
+ this.MappingLaneLegData( data );
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MPSync/Method_MappingOperationBOMData.qbl
new file mode 100644
index 0000000..9e0eec0
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingOperationBOMData.qbl
@@ -0,0 +1,181 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingOperationBOMData (
+ Strings businessTypes,
+ Boolean isKeyProduct,
+ Boolean createPurchaseSupplyMaterial
+)
+{
+ TextBody:
+ [*
+ // keyProduct
+ keyProductIds := selectuniquevalues( this, MappingProduct, prod, prod.KeyProduct() = true, prod.ID() );
+ // 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
+ toDealOps := construct( MappingOperations );
+ toDealBoms := construct( MappingBOMs );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ toDealOps := selectsortedset( this, MappingOperation, item,
+ businessTypes.Find( item.BusinessType() ) >= 0
+ and ( not isKeyProduct or keyProductIds.Find( item.ProductID() ) >= 0 ),
+ item.SequenceNumber() );
+ toDealBoms := selectset( this, MappingBOM, item,
+ businessTypes.Find( item.BusinessType() ) >= 0
+ and ( not isKeyProduct or keyProductIds.Find( item.ComponentCode() ) >= 0 ) );
+ } else {
+ toDealOps := selectsortedset( this, MappingOperation, item,
+ not isKeyProduct or keyProductIds.Find( item.ProductID() ) >= 0 ,
+ item.SequenceNumber() );
+ toDealBoms := selectset( this, MappingBOM, item,
+ businessTypes.Find( item.BusinessType() ) >= 0
+ and ( not isKeyProduct or keyProductIds.Find( item.ComponentCode() ) >= 0 ) );
+ }
+ // 瀵规瘡涓猺outing璁$畻inputGroupId
+ inputGroupId := 1
+ // 瀵规瘡涓猂outing杩涜鎶曞叆浜у嚭澶勭悊
+ routingKeys := selectuniquevalues( toDealOps, Elements, item, item.OrganCode() + "_" + item.ProductID() );
+ traverse( routingKeys, Elements, routingKey ) {
+ // ==== 浜у嚭 ====
+ // 鎵炬渶澶eq
+ maxSeq := max( toDealOps, Elements, item, item.OrganCode() + "_" + item.ProductID() = routingKey, item.SequenceNumber() );
+ maxSeqElements := selectset( toDealOps, Elements, item,
+ item.OrganCode() + "_" + item.ProductID() = routingKey and item.SequenceNumber() = maxSeq );
+ traverse( maxSeqElements, Elements, maxSeqELement ) {
+ operationId := maxSeqELement.OrganCode() + "_" + maxSeqELement.ProductID() + "_" + maxSeqELement.ProcessSection();
+ if( maxSeqELement.Line() <> "" ) {
+ operationId := operationId + "_" + maxSeqELement.Line();
+ }
+ this.IOOperationBOM( relnew,
+ OperationID := operationId,
+ ProductID := maxSeqELement.ProductID(),
+ StockingPointID := maxSeqELement.OrganCode() + "_" + this.GetProductTypeByProductId( maxSeqELement.ProductID() ) + "_STOCK",
+ Quantity := 1,
+ IsInput := false );
+ }
+ // ==== 鎶曞叆 ====
+ // 瀵筄peration涓殑姣忎釜ProcessSection锛� 鎵緎eq鏈�灏忕殑list锛屾瘡鏉om瀵硅list鐢熸垚operationBOM
+ processSectionList := selectuniquevalues( toDealOps, Elements, toDeal,
+ toDeal.OrganCode() + "_" + toDeal.ProductID() = routingKey,
+ toDeal.ProcessSection() );
+ traverse( processSectionList, Elements, processSection ) {
+ minSeq := min( toDealOps, Elements, item,
+ item.OrganCode() + "_" + item.ProductID() = routingKey
+ and item.ProcessSection() = processSection,
+ item.SequenceNumber() );
+ operationRecordsWithMinSeq := selectset( toDealOps, Elements, minSeqWithProcessSectionElement,
+ minSeqWithProcessSectionElement.OrganCode() + "_" + minSeqWithProcessSectionElement.ProductID() = routingKey
+ and minSeqWithProcessSectionElement.ProcessSection() = processSection
+ and minSeqWithProcessSectionElement.SequenceNumber() = minSeq );
+ bomRecords := selectset( toDealBoms, Elements, bom,
+ bom.OrganCode() + "_" + bom.ProductCode() = routingKey
+ and bom.ProcessSection() = processSection );
+ // 鎸夋槸鍚︽湁鏇挎崲鏂欏垎缁�
+ bomWithoutAlters := selectset( bomRecords, Elements, bomRecord, bomRecord.AlternativeMaterialCode() = "" );
+ bomWithAlters := selectset( bomRecords, Elements, bomRecord, bomRecord.AlternativeMaterialCode() <> "" );
+ // 澶勭悊涓嶅甫鏇挎崲鏂欑殑input
+ traverse( operationRecordsWithMinSeq, Elements, op ) {
+ traverse( bomWithoutAlters, Elements, bom ) {
+ operationId := op.OrganCode() + "_" + op.ProductID() + "_" + op.ProcessSection();
+ if( op.Line() <> "" ) {
+ operationId := operationId + "_" + op.Line();
+ }
+ this.IOOperationBOM( relnew,
+ OperationID := operationId,
+ ProductID := op.ProductID(),
+ StockingPointID := op.OrganCode() + "_" + bom.ComponentType() + "_STOCK",
+ IsInput := true,
+ Quantity := bom.UnitUsageOfComponents() / bom.ComponentOutputRate() );
+ }
+ }
+ // 澶勭悊甯︽浛鎹㈡枡鐨勶紝鎸塴ine鍜屼富鏂欏垎缁�
+ lineList := selectuniquevalues( operationRecordsWithMinSeq, Elements, item, item.Line() );
+ mainProdList := selectuniquevalues( bomWithAlters, Elements, item, item.ComponentCode() );
+ traverse( lineList, Elements, line ) {
+ opWithLine := select( operationRecordsWithMinSeq, Elements, item, item.Line() = line );
+ opId := opWithLine.OrganCode() + "_" + opWithLine.ProductID() + "_" + opWithLine.ProcessSection();
+ if( opWithLine.Line() <> "" ) {
+ opId := opId + "_" + opWithLine.Line();
+ }
+ traverse( mainProdList, Elements, mainProd ) {
+ // 姣忕涓绘枡涓�涓猤roup
+ inputGroupId := inputGroupId + 1;
+ bomWithMainProdList := selectset( bomWithAlters, Elements, item, item.ComponentCode() = mainProd );
+ bomRandom := bomWithMainProdList.First();
+ // 鎬绘暟閲�
+ maxQuantityInGroup := bomRandom.UnitUsageOfComponents() / bomRandom.ComponentOutputRate();
+ // 鏇夸唬鏂欐�绘瘮渚�
+ alterRateTotal := sum( bomWithMainProdList, Elements, item, item.AlternativeRate() );
+ // 鍒涘缓inputGroup
+ this.IOOperationInputGroup( relnew, InputGroupID := inputGroupId, OperationID := opId, InputGroupQuantity := maxQuantityInGroup );
+ // 鍒涘缓涓绘枡鐨刬nput bom
+ this.IOOperationBOM( relnew,
+ OperationID := opId,
+ InputGroupID := inputGroupId,
+ ProductID := bomRandom.ComponentCode(),
+ StockingPointID := bomRandom.OrganCode() + "_" + bomRandom.ComponentType() + "_STOCK",
+ IsInput := true,
+ Quantity := maxQuantityInGroup * ( 1 - alterRateTotal ),
+ MinQuantityInGroup := 0.0,
+ MaxQuantityInGroup := maxQuantityInGroup );
+ // 鏇夸唬鏂檌nput bom
+ traverse( bomWithMainProdList, Elements, bom ) {
+ this.IOOperationBOM( relnew,
+ OperationID := opId,
+ InputGroupID := inputGroupId,
+ ProductID := bom.AlternativeMaterialCode(),
+ StockingPointID := bom.OrganCode() + "_" + bom.ComponentType() + "_STOCK",
+ IsInput := true,
+ Quantity := maxQuantityInGroup * bom.AlternativeRate(),
+ MinQuantityInGroup := 0.0,
+ MaxQuantityInGroup := maxQuantityInGroup );
+ }
+ }
+ }
+ }
+ // 閽堝姣忎釜routing 閲嶇疆 inputGroupId
+ inputGroupId := 1;
+ }
+ // 瀵规瘡涓狾rgCode_ComponentCode缁勫悎锛屽垱寤洪噰璐璻outing
+ if( createPurchaseSupplyMaterial ) {
+ toCreateKeys := selectuniquevalues( toDealBoms, Elements, bom,
+ bom.ComponentType() = "P",
+ bom.OrganCode() + "_" + bom.ComponentCode() );
+ traverse( toCreateKeys, Elements, toCreateKey ) {
+ bomRandom := selectset( toDealBoms, Elements, bom, bom.ComponentType() = "P" and bom.OrganCode() + "_" + bom.ComponentCode() = toCreateKey ).First();
+ routingId := bomRandom.OrganCode() + "_" + bomRandom.ComponentCode();
+ routingName := routingId;
+ routingStepName := "閲囪喘";
+ routingStepSeq := 1;
+ operationId := "PR_" + bomRandom.OrganCode() + bomRandom.ComponentCode();
+ operationName := operationId;
+ unitId := "渚涘簲鍟�";
+ // ==== 鍒涘缓 ====
+ // 鍒涘缓routing
+ this.IORouting( relnew,
+ ID := routingId, Name := routingName, IsEnabled := true, Start := Date::MinDate(), End := Date::MaxDate() );
+ // 鍒涘缓routingStep
+ IORoutingStep::CreateIfNotExist( this,
+ routingId,
+ routingStepName,
+ routingStepSeq );
+ // 鍒涘缓op
+ ioOp := IOOperation::CreateIfNotExist( this, operationId );
+ ioOp.UnitID( unitId );
+ ioOp.RoutingID( routingId );
+ ioOp.RoutingStepName( routingStepName );
+ ioOp.Name( operationName );
+ ioOp.UserLeadTime( Duration::Zero() );
+ ioOp.Throughput( 1.0 );
+ ioOp.HasUserMaximumQuantity( false );
+ ioOp.UserMinimumQuantity( Real::MinReal() );
+ ioOp.UserMaximumQuantity( Real::MaxReal() );
+ // 鍒涘缓opBOM
+ this.IOOperationBOM( relnew,
+ OperationID := operationId,
+ ProductID := bomRandom.ComponentCode(),
+ StockingPointID := bomRandom.OrganCode() + "_" + bomRandom.ProductType() + "_STOCK",
+ IsInput := true,
+ Quantity := 1 );
+ }
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingOperationCostData.qbl b/_Main/BL/Type_MPSync/Method_MappingOperationCostData.qbl
new file mode 100644
index 0000000..30509c6
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingOperationCostData.qbl
@@ -0,0 +1,55 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingOperationCostData (
+ Strings businesstypes
+)
+{
+ Description: 'Get operation cost data from operation mapping'
+ TextBody:
+ [*
+ //// Administrator Aug-21-2023 (created)
+ //// list to deal
+ //listtodeal := construct( structured[MappingOperation] );
+ //
+ //if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ // listtodeal := selectset( this, MappingOperation, item, true );
+ //} else {
+ // listtodeal := selectset( this, MappingOperation, item, businesstypes.Find( item.BusinessType() ) <> -1 );
+ //}
+ //
+ //// Get the list to deal with max sequence number
+ //listtodealwithmaxsn := construct( structured[MappingOperation] );
+ //traverse( listtodeal, Elements, item ){
+ // maxsn := maxselect( this,
+ // MappingOperation,
+ // moperation,
+ // moperation.OrganCode() = item.OrganCode(),
+ // moperation.ProductID() = item.ProductID(),
+ // moperation.SequenceNumber() ).SequenceNumber()
+ // if( item.SequenceNumber() = maxsn ){
+ // listtodealwithmaxsn.Add( item );
+ // }
+ // }
+ //
+ //// Get the operation cost data
+ //traverse( listtodealwithmaxsn, Elements, item ){
+ // id := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection() + "_" + item.Line();
+ // operation := Operation::FindOperationTypeIndex( id );
+ // account := Account_MP::FindByName( this, "Operation cost" );
+ // isfromdb := false;
+ // existoperationcost := OperationCost::FindOperationCostTypeIndex( id );
+ // if( isnull( existoperationcost ) ){
+ // connecteditem := select( this,
+ // MappingOperationCost,
+ // moperationcost,
+ // moperationcost.OrgCode() = item.OrganCode(),
+ // moperationcost.ProductID() = item.ProductID() );
+ // cost := connecteditem.Cost();
+ // lengthoftime := connecteditem.LengthOfTime();
+ // start := connecteditem.Start();
+ // timeunit := connecteditem.TimeUnit();
+ // OperationCost::Create( id, operation, account, "Volume", start, timeunit, lengthoftime, cost, isfromdb );
+ // }
+ // }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingOperationData.qbl b/_Main/BL/Type_MPSync/Method_MappingOperationData.qbl
new file mode 100644
index 0000000..556db60
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingOperationData.qbl
@@ -0,0 +1,102 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingOperationData (
+ Strings businessTypes
+)
+{
+ TextBody:
+ [*
+ // 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
+ toDealList := construct( MappingOperations );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ toDealList := selectsortedset( this, MappingOperation, item,
+ businessTypes.Find( item.BusinessType() ) >= 0,
+ item.SequenceNumber() );
+ } else {
+ toDealList := selectsortedset( this, MappingOperation, item,
+ true,
+ item.SequenceNumber() );
+ }
+ // 鍒犻櫎鍘熸湁routing
+ this.IORouting( relflush );
+ // 鏂皉outing
+ routingIdList := selectuniquevalues( toDealList, Elements, item, item.OrganCode() + "_" + item.ProductID() );
+ traverse( routingIdList, Elements, routingId ) {
+ this.IORouting( relnew,
+ ID := routingId, Name := routingId, IsEnabled := true );
+ }
+ // 鍒犻櫎鍘熸湁routingStep
+ this.IORoutingStep( relflush );
+ // 鏂皉outingStep
+ traverse( toDealList, Elements, op ) {
+ routingId := op.OrganCode() + "_" + op.ProductID();
+ routingStepName := op.ProcessSection() + "_" + [String]op.SequenceNumber();
+ IORoutingStep::CreateIfNotExist( this,
+ routingId,
+ routingStepName,
+ op.SequenceNumber() );
+ }
+ // 鏂皁peration
+ traverse( toDealList, Elements, op ) {
+ // 姹囨�绘暟鎹�
+ routingId := op.OrganCode() + "_" + op.ProductID();
+ routingStepName := op.ProcessSection() + "_" + [String]op.SequenceNumber();
+ opId := op.OrganCode() + "_" + op.ProductID() + "_" + op.ProcessSection();
+ unitId := op.OrganCode() + "_" + op.PlantName() + "_" + op.ProcessSection();
+ if( op.Line() <> "" ) {
+ opId := opId + "_" + op.Line();
+ unitId := unitId + "_" + op.Line();
+ }
+ opName := opId;
+ // 鏂板缓
+ ioOp := IOOperation::CreateIfNotExist( this, opId );
+ ioOp.UnitID( unitId );
+ ioOp.RoutingID( routingId );
+ ioOp.RoutingStepName( routingStepName );
+ ioOp.Name( opName );
+ ioOp.UserLeadTime( Duration::Hours( op.UserLeadTime() ) );
+ ioOp.Throughput( op.ActualCapacity() );
+ ioOp.UserMinimumQuantity( op.MinimumQuantity() );
+ ioOp.UserMaximumQuantity( op.MaximumQuantity() );
+ ioOp.HasUserMaximumQuantity( op.MaximumQuantity() <> 0.0 );
+ }
+ // 鎸� OrganCode + ProductID 鍒嗙粍 + 鎺掑簭
+ keyList := selectuniquevalues( toDealList, Elements, op,
+ op.OrganCode() + "_" + op.ProductID() );
+ keyList := selectsortedset( keyList, Elements, str, str );
+ traverse( keyList, Elements, key ) {
+ previousList := construct( MappingOperations );
+ // 鎸� SequenceNumber 鍒嗙粍 + 鎺掑簭
+ subKeyList := selectuniquevalues( toDealList, Elements, op,
+ key = op.OrganCode() + "_" + op.ProductID(),
+ op.SequenceNumber() );
+ subKeyList := selectsortedset( subKeyList, Elements, seq, seq );
+ // 閬嶅巻姣忎釜Seq锛屼笌鍓嶄竴涓猯ist杩涜杩炴帴锛屽悓鏃跺垱寤篻roup
+ traverse( subKeyList, Elements, seq ) {
+ elementList := selectset( this, MappingOperation, op,
+ op.OrganCode() + "_" + op.ProductID() = key and op.SequenceNumber() = seq );
+ if( not isnull( previousList ) and previousList.Size() > 0 ) {
+ // 瀵规瘡涓洰鏍囧垱寤篿nputGroup
+ if( previousList.Size() > 1 ) {
+ traverse( elementList, Elements, targetOp ) {
+ targetOpId := targetOp.OrganCode() + "_" + targetOp.ProductID() + "_" + targetOp.ProcessSection();
+ this.IOOperationInputGroup( relnew, InputGroupID := 1, OperationID := targetOpId, InputGroupQuantity := 1 );
+ }
+ }
+ // 婧愪笌鐩爣涓や袱鍒涘缓operationLink
+ traverse( elementList, Elements, targetOp ) {
+ traverse( previousList, Elements, sourceOp ) {
+ sourceOpId := sourceOp.OrganCode() + "_" + sourceOp.ProductID() + "_" + sourceOp.ProcessSection();
+ targetOpId := targetOp.OrganCode() + "_" + targetOp.ProductID() + "_" + targetOp.ProcessSection();
+ this.IOOperationLink( relnew,
+ SourceOperationID := sourceOpId, DestOperationID := targetOpId,
+ SourceGroupID := 1, DestGroupID := 1, SourceQuantity := 1, DestQuantity := 1 / previousList.Size(),
+ DestHasUserQuantity := false, DestMinQuantity := 0, DestMaxQuantity := 1 );
+ }
+ }
+ }
+ previousList := elementList;
+ }
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingProductData.qbl b/_Main/BL/Type_MPSync/Method_MappingProductData.qbl
new file mode 100644
index 0000000..4a5f907
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingProductData.qbl
@@ -0,0 +1,47 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingProductData (
+ Strings businesstypes,
+ Boolean iskeyproduct
+)
+{
+ Description: 'Method to get needed data from mapping product data'
+ TextBody:
+ [*
+ // 娓呴櫎鏃ф暟鎹�
+ this.IOProduct_MP( relflush );
+ // list to deal
+ listToDeal := construct( structured[MappingProduct] );
+ if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ if( iskeyproduct = true ){
+ listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true );
+ } else {
+ listToDeal := selectset( this, MappingProduct, item, true );
+ }
+ } else {
+ if( iskeyproduct = true ){
+ listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true, businesstypes.Find( item.BusinessType() ) <> -1 or businesstypes.Find( item.CommonBusiness() ) <> -1 );
+ } else {
+ listToDeal := selectset( this, MappingProduct, item, businesstypes.Find( item.BusinessType() ) <> -1 or businesstypes.Find( item.CommonBusiness() ) <> -1 );
+ }
+ }
+ // 鍒涘缓鏍逛骇鍝�
+ IOProduct_MP::CreateIfNotExist( this, "鍏ㄩ儴鐗╂枡浜у搧", "鍏ㄩ儴鐗╂枡浜у搧", "", "PCS" );
+ // 澶勭悊鏂颁俊鎭�
+ traverse( listToDeal, Elements, item ) {
+ // 鍒涘缓鐖朵骇鍝�
+ IOProduct_MP::CreateIfNotExist( this, item.ProductMajorType(), item.ProductMajorType(), "鍏ㄩ儴鐗╂枡", "PCS" );
+ IOProduct_MP::CreateIfNotExist( this, item.ProductSubclassType(), item.ProductSubclassType(), item.ProductMajorType(), "PCS" );
+ // 鍒涘缓浜у搧
+ this.IOProduct_MP( relnew,
+ ID := item.ID(),
+ Name := item.Name(),
+ ParentID := item.ProductSubclassType(),
+ UOMName := item.UnitOfMeasureName(),
+ // todo ?
+ HasShelfLife := true,
+ ShelfLife := item.ShelfLife(),
+ Notes := item.Notes() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingProductInLaneData.qbl b/_Main/BL/Type_MPSync/Method_MappingProductInLaneData.qbl
new file mode 100644
index 0000000..4b1a242
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingProductInLaneData.qbl
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingProductInLaneData
+{
+ Description: 'Get Product In Line data'
+ TextBody:
+ [*
+ this.IOProductInLane( relflush );
+ traverse( this, MappingProductInLane, item ){
+ this.IOProductInLane( relnew,
+ LaneID := item.LineID(),
+ ProductID := item.ProductID() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingSalesLevelData.qbl b/_Main/BL/Type_MPSync/Method_MappingSalesLevelData.qbl
new file mode 100644
index 0000000..0baf2aa
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingSalesLevelData.qbl
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingSalesLevelData
+{
+ TextBody:
+ [*
+ this.IOSalesLevel_MP( relflush );
+ this.IOSalesLevel_MP( relnew,
+ Level := 0,
+ Name := "钀ラ攢涓績" );
+ this.IOSalesLevel_MP( relnew,
+ Level := 1,
+ Name := "閿�鍞" );
+ this.IOSalesLevel_MP( relnew,
+ Level := 2,
+ Name := "瀹㈡埛" );
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingSalesSegmentData.qbl b/_Main/BL/Type_MPSync/Method_MappingSalesSegmentData.qbl
new file mode 100644
index 0000000..8313619
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingSalesSegmentData.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingSalesSegmentData (
+ Strings businessTypes
+)
+{
+ Description: 'ETL閿�鍞儴闂�'
+ TextBody:
+ [*
+ this.IOSalesSegment_MP( relflush );
+ toDealList := selectset( this, MappingSalesSegment, item, true );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ toDealList := selectset( toDealList, Elements, item, businessTypes.Find( item.BusinessType() ) >= 0 );
+ }
+ traverse( toDealList, Elements, item ) {
+ this.IOSalesSegment_MP( relnew,
+ Name := item.Name(),
+ ParentName := item.ParentName(),
+ DisplayIndex := item.DisplayIndex() );
+ }
+ *]
+}
diff --git "a/_Main/BL/Type_MPSync/Method_MappingStockingPointData\043321.qbl" "b/_Main/BL/Type_MPSync/Method_MappingStockingPointData\043321.qbl"
new file mode 100644
index 0000000..cfe65b5
--- /dev/null
+++ "b/_Main/BL/Type_MPSync/Method_MappingStockingPointData\043321.qbl"
@@ -0,0 +1,29 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingStockingPointData (
+ JSON data
+)
+{
+ TextBody:
+ [*
+ dataLength := data.Size();
+ for( i:=0; i < dataLength; i++ )
+ {
+ dataRow := data.Get( i );
+ id := dataRow.Get( "id" ).GetString();
+ unitId := dataRow.Get( "unitid" ).GetString();
+ name := dataRow.Get( "name" ).GetString();
+ this.IOStockingPoint_MP( relnew,
+ ID := id,
+ Name := name,
+ UnitID := unitId,
+ CurrencyID := "CNY",
+ UnitOfMeasureName := "PCS",
+ IsPlannedInfinite := false,
+ GroupName := " ",
+ Notes := " ",
+ Start := Date::MinDate(),
+ End := Date::MaxDate() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingStockingPointData.qbl b/_Main/BL/Type_MPSync/Method_MappingStockingPointData.qbl
new file mode 100644
index 0000000..b09b6be
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingStockingPointData.qbl
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingStockingPointData
+{
+ TextBody:
+ [*
+ this.IOStockingPoint_MP( relflush );
+ bodyNumber := "2";
+ postRequestBody := MPSync::ApiBuildPostRequestBody( bodyNumber );
+ address := "api-uat-sgc.tianma.cn";
+ port := 443;
+ url := "/otdService/https/GetStockingPointsInfo";
+ data := MPSync::ApiResponesCheck( address, port, url, postRequestBody );
+ this.MappingStockingPointData( data );
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingUnitData.qbl b/_Main/BL/Type_MPSync/Method_MappingUnitData.qbl
new file mode 100644
index 0000000..eaec58b
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingUnitData.qbl
@@ -0,0 +1,52 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingUnitData (
+ Strings businessTypes
+)
+{
+ Description: 'Get unit data from operation mapping'
+ TextBody:
+ [*
+ listToDeal := selectset( this, MappingOperation, item, true );
+ if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ listToDeal := selectset( this, MappingOperation, item, businessTypes.Find( item.BusinessType() ) >= 0 );
+ }
+ // 甯搁噺
+ unitOfMeasureName := "PCS";
+ currencyId := "CNY";
+ startDate := Date::Date( 1900, 1, 1 );
+ endDate := Date::Date( 9999, 12, 31 );
+ capacityType := "Infinite";
+ // 閫愮骇鍒涘缓
+ IOUnit::CreateIfNotExistByTree( this, "澶╅┈闆嗗洟", "澶╅┈闆嗗洟", "", unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ IOUnit::CreateIfNotExistByTree( this, "鐢熶骇", "鐢熶骇", "澶╅┈闆嗗洟", unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ IOUnit::CreateIfNotExistByTree( this, "渚涘簲鍟�", "渚涘簲鍟�", "澶╅┈闆嗗洟", unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ IOUnit::CreateIfNotExistByTree( this, "鏁磋溅杩愯緭", "鏁磋溅杩愯緭", "澶╅┈闆嗗洟", unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ // 鏍规嵁operation鍒涘缓
+ traverse( listToDeal, Elements, op ) {
+ // 涓�绾� orgCode
+ levelOne := op.OrganCode();
+ IOUnit::CreateIfNotExistByTree( this,
+ levelOne, op.OrganName(), "鐢熶骇",
+ unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ // 浜岀骇 orgCode + plantName
+ levelTwo := op.OrganCode() + "_" + op.PlantName();
+ IOUnit::CreateIfNotExistByTree( this,
+ levelTwo, levelTwo, levelOne,
+ unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ // 涓夌骇 浜岀骇 + processSection
+ levelThree := levelTwo + "_" + op.ProcessSection();
+ IOUnit::CreateIfNotExistByTree( this,
+ levelThree, levelThree, levelTwo,
+ unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ // 鍥涚骇 涓夌骇 + line
+ if( op.Line() <> "" ) {
+ levelFour := levelThree + "_" + op.Line();
+ IOUnit::CreateIfNotExistByTree( this,
+ levelFour, levelFour, levelThree,
+ unitOfMeasureName, currencyId, startDate, endDate, capacityType );
+ }
+
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/Method_MappingUnitOfMeasureData.qbl b/_Main/BL/Type_MPSync/Method_MappingUnitOfMeasureData.qbl
new file mode 100644
index 0000000..066fe15
--- /dev/null
+++ b/_Main/BL/Type_MPSync/Method_MappingUnitOfMeasureData.qbl
@@ -0,0 +1,14 @@
+Quintiq file version 2.0
+#parent: #root
+Method MappingUnitOfMeasureData
+{
+ Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
+ TextBody:
+ [*
+ this.IOUnitOfMeasure_MP( relflush );
+ traverse( this, MappingUnitOfMeasure, item ) {
+ // IOUnitOfMeasure_MP::DeleteIfExist( this, item.Name() );
+ this.IOUnitOfMeasure_MP( relnew, IsDefault := item.IsDefault(), Name := item.Name() );
+ }
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/StaticMethod_ApiBuildPostRequestBody.qbl b/_Main/BL/Type_MPSync/StaticMethod_ApiBuildPostRequestBody.qbl
new file mode 100644
index 0000000..d7495b1
--- /dev/null
+++ b/_Main/BL/Type_MPSync/StaticMethod_ApiBuildPostRequestBody.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ApiBuildPostRequestBody (
+ String bodynumber
+) as String
+{
+ TextBody:
+ [*
+ postrequestbody := JSON::Object()
+ .Add( "serviceInterfaceCode", "ESBOTDH000" + bodynumber )
+ .Add( "fromSystemCode", "OTDH000" + bodynumber )
+ .Add( "toInterfaceCode", "QIDH000" + bodynumber )
+ .Add( "ouZone", "OU_TMSH" )
+ .Add( "uuid", "1617355496bb588e353e80147eea5f45" )
+ .Add( "requestTime", DateTime::Now().Format( "Y-M2-D2 H:m:s" ) )
+ .Add( "dataType", "JSON" )
+ .Add( "data", JSON::Object()
+ .Add( "pageIndex", "1" ) ).Build();
+
+ info( DateTime::Now().Format( "Y-M2-D2 H:m:s" ) );
+ postrequestbodystring := postrequestbody.AsString();
+
+ return postrequestbodystring;
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/StaticMethod_ApiResponesCheck.qbl b/_Main/BL/Type_MPSync/StaticMethod_ApiResponesCheck.qbl
new file mode 100644
index 0000000..ac1f3c0
--- /dev/null
+++ b/_Main/BL/Type_MPSync/StaticMethod_ApiResponesCheck.qbl
@@ -0,0 +1,54 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ApiResponesCheck (
+ String address,
+ Number port,
+ String path,
+ String postrequestbody
+) as owning JSON
+{
+ TextBody:
+ [*
+ // for HTTPS requests:
+ i := HTTPInterface::Create( address, port );
+ //i := HTTPInterface::Create( address ,443);
+ info( address, port, path, postrequestbody );
+
+ i.URL(path);
+ //i.SSL(false);
+ i.SSL(true);
+ i.SSLKeystore('MyKeystore'); // created in the Config Utility
+
+ i.PostMethod(true); //it's a POST method
+
+ i.Call(postrequestbody); // Call's argument is for POST method's content.
+ htmlresult := i.Result();
+
+ htmlresponse := JSON::Parse( htmlresult );
+
+ code := htmlresponse.Get( "resultCode" ).GetString();
+ message := htmlresponse.Get( "resultMsg" );
+ data := htmlresponse.Get( "responseData" );
+ datalist := data.Get( "dataList" );
+
+ if( code = "1" )
+ {
+ info( "Data have been written into table" );
+ }
+ else
+ {
+ messagestring := " ";
+ if ( message.IsNull() )
+ {
+ messagestring := "No message returns!";
+ }
+ else
+ {
+ messagestring := message.GetString();
+ }
+ info( "Error! error code: " + code + ", error message: " + messagestring );
+ }
+
+ return &datalist;
+ *]
+}
diff --git a/_Main/BL/Type_MPSync/_ROOT_Type_MPSync.qbl b/_Main/BL/Type_MPSync/_ROOT_Type_MPSync.qbl
new file mode 100644
index 0000000..2e63828
--- /dev/null
+++ b/_Main/BL/Type_MPSync/_ROOT_Type_MPSync.qbl
@@ -0,0 +1,6 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type MPSync #extension
+{
+}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
index 87cbdf3..2b6b764 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingActualPISPIPData.qbl
@@ -7,44 +7,44 @@
{
TextBody:
[*
- // renhao Aug-14-2023 (created)
- date := Date :: Today();
- listtodeal := selectset( this,MappingActualPISPIP,actual,not isnull( Product_MP::FindById( this, actual.ProductID() ) ) );
- 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 ){
- 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);
- if( not isnull( product)){
- if( not isnull(businessTypes)){
-
- for( i :=0 ;i < businessTypes.Size();i++ ){
- businessType := businessTypes.Element( i);
- if( product.BusinessType() = businessType and not product.IsCommon()){
- ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
- actual.ProductID(),
- actual.StockingPointID(),
- actual.Description(),
- actual.ActualInventoryLevelEnd(),
- actual.ManufacturedDate());
- }
- }
-
- }else{
- ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
- actual.ProductID(),
- actual.StockingPointID(),
- actual.Description(),
- actual.ActualInventoryLevelEnd(),
- actual.ManufacturedDate());
- }
-
- }
- }
+ //// renhao Aug-14-2023 (created)
+ //date := Date :: Today();
+ //listtodeal := selectset( this,MappingActualPISPIP,actual,not isnull( Product_MP::FindById( this, actual.ProductID() ) ) );
+ //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 ){
+ // 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);
+ // if( not isnull( product)){
+ // if( not isnull(businessTypes)){
+ //
+ // for( i :=0 ;i < businessTypes.Size();i++ ){
+ // businessType := businessTypes.Element( i);
+ // if( product.BusinessType() = businessType and not product.IsCommon()){
+ // ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
+ // actual.ProductID(),
+ // actual.StockingPointID(),
+ // actual.Description(),
+ // actual.ActualInventoryLevelEnd(),
+ // actual.ManufacturedDate());
+ // }
+ // }
+ //
+ // }else{
+ // ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
+ // actual.ProductID(),
+ // actual.StockingPointID(),
+ // actual.Description(),
+ // actual.ActualInventoryLevelEnd(),
+ // actual.ManufacturedDate());
+ // }
+ //
+ // }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
index f0a87c2..eb0cfc7 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingBaseConversionFactorData.qbl
@@ -5,16 +5,16 @@
Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
- traverse( this, MappingBaseConversionFactor, item ) {
- //濡傛灉ProductID涓嶄负绌猴紝涓斿尮閰嶄笉鍒癙roduct锛屽垯涓嶅垱寤猴紝杩斿洖涓虹┖
- // info( item.ProductId().AsQUILL() );
- BaseConversionFactor::CreateOrUpdate( this,
- item.SourceUnitOfMeasureName(),
- item.TargetUnitOfMeasureName(),
- item.IsEnabled(),
- item.ProductId(),
- item.Factor() );
- }
+ //// yypsybs Aug-15-2023 (created)
+ //traverse( this, MappingBaseConversionFactor, item ) {
+ // //濡傛灉ProductID涓嶄负绌猴紝涓斿尮閰嶄笉鍒癙roduct锛屽垯涓嶅垱寤猴紝杩斿洖涓虹┖
+ //// info( item.ProductId().AsQUILL() );
+ // BaseConversionFactor::CreateOrUpdate( this,
+ // item.SourceUnitOfMeasureName(),
+ // item.TargetUnitOfMeasureName(),
+ // item.IsEnabled(),
+ // item.ProductId(),
+ // item.Factor() );
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
index 873ed35..c1421d2 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingCustomerOrderData.qbl
@@ -7,39 +7,39 @@
Description: 'ETL璁㈠崟棰勬祴'
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
- // 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingCustomerOrder] );
- if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingCustomerOrder, item, true );
- } else {
- listToDeal := selectset( this, MappingCustomerOrder, 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() ) ) );
-
- totalcount := listToDeal.Size();
- info( "CustomerOrder has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- // 澶勭悊
- traverse( listToDeal, Elements, item ) {
- count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
- info( "Now is dealing with the " + count.AsQUILL() + "CustomerOrder " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
- }
- // if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
- // info( item.ProductID().AsQUILL() );
- CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(),
- item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(),
- item.PriorityName(), item.ProductID(),
- item.StockPointID(),
- item.SalesSegmentName(),
- item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable());
- // }else{
- // info( "invaild product: " + item.ProductID().AsQUILL() );
+ //// yypsybs Aug-15-2023 (created)
+ //// 寰呭鐞嗘暟鎹�
+ //listToDeal := construct( structured[MappingCustomerOrder] );
+ //if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
+ // listToDeal := selectset( this, MappingCustomerOrder, item, true );
+ //} else {
+ // listToDeal := selectset( this, MappingCustomerOrder, 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() ) ) );
+ //
+ //totalcount := listToDeal.Size();
+ //info( "CustomerOrder has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //// 澶勭悊
+ //traverse( listToDeal, Elements, item ) {
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ // info( "Now is dealing with the " + count.AsQUILL() + "CustomerOrder " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
// }
- }
+ //// if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
+ //// info( item.ProductID().AsQUILL() );
+ // CustomerOrder::CreateOrUpdate( this, item.CurrencyID(), item.Customer(), item.CustomerID(), item.ID(),
+ // item.OrderDate(), item.OrderID(), item.OrderLineID(), item.Price(),
+ // item.PriorityName(), item.ProductID(),
+ // item.StockPointID(),
+ // item.SalesSegmentName(),
+ // item.Quantity(), item.UnitOfMeasureName(), item.OrderType(), item.IsAvailable());
+ //// }else{
+ //// info( "invaild product: " + item.ProductID().AsQUILL() );
+ //// }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
index 7295bad..7792802 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingExternalSupplyData.qbl
@@ -7,53 +7,53 @@
{
TextBody:
[*
- // renhao Aug-14-2023 (created)
-
- listtodeal := selectset( this,MappingExternalSupply,externalSupply,
- not isnull( StockingPoint_MP::FindById( this, externalSupply.StockingPointID() ) ) and not isnull( Product_MP::FindById( this, externalSupply.ProductID() ) ) );
- totalcount := listtodeal.Size();
- info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- traverse( listtodeal,Elements,externalSupply){
- count := count + 1;
- if( count - [Number](count/100) * 100 = 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() and product.KeyProduct() = nuclear,true);
-
- if( not isnull( product)){
- productMP := select( this,Product_MP,productMP,productMP.ID() = externalSupply.ProductID() ,true);
- stockingpoint := select( this,StockingPoint_MP,st,st.ID() = externalSupply.StockingPointID(),true);
- if( not isnull(businessTypes)){
-
- for( i :=0 ;i < businessTypes.Size();i++ ){
- businessType := businessTypes.Element( i);
- if( product.BusinessType() = businessType and not product.IsCommon()){
- InventorySupply::CreateOrUpdate( externalSupply.ID(),
- productMP,
- stockingpoint,
- externalSupply.Date(),
- externalSupply.ManufacturedDate(),
- externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�");
- }
- }
-
- }else{
- if( not isnull( stockingpoint) and not isnull( productMP)){
- InventorySupply::CreateOrUpdate( externalSupply.ID(),
- productMP,
- stockingpoint,
- externalSupply.Date(),
- externalSupply.ManufacturedDate(),
- externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�");
- }
-
- }
-
- }else{
- info( "Invaild product" );
- }
- }
+ //// renhao Aug-14-2023 (created)
+ //
+ //listtodeal := selectset( this,MappingExternalSupply,externalSupply,
+ // not isnull( StockingPoint_MP::FindById( this, externalSupply.StockingPointID() ) ) and not isnull( Product_MP::FindById( this, externalSupply.ProductID() ) ) );
+ //totalcount := listtodeal.Size();
+ //info( "ExternalSupply has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //traverse( listtodeal,Elements,externalSupply){
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 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() and product.KeyProduct() = nuclear,true);
+ //
+ // if( not isnull( product)){
+ // productMP := select( this,Product_MP,productMP,productMP.ID() = externalSupply.ProductID() ,true);
+ // stockingpoint := select( this,StockingPoint_MP,st,st.ID() = externalSupply.StockingPointID(),true);
+ // if( not isnull(businessTypes)){
+ //
+ // for( i :=0 ;i < businessTypes.Size();i++ ){
+ // businessType := businessTypes.Element( i);
+ // if( product.BusinessType() = businessType and not product.IsCommon()){
+ // InventorySupply::CreateOrUpdate( externalSupply.ID(),
+ // productMP,
+ // stockingpoint,
+ // externalSupply.Date(),
+ // externalSupply.ManufacturedDate(),
+ // externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�");
+ // }
+ // }
+ //
+ // }else{
+ // if( not isnull( stockingpoint) and not isnull( productMP)){
+ // InventorySupply::CreateOrUpdate( externalSupply.ID(),
+ // productMP,
+ // stockingpoint,
+ // externalSupply.Date(),
+ // externalSupply.ManufacturedDate(),
+ // externalSupply.UserQuantity(),"鍦ㄩ�斿湪鍒�");
+ // }
+ //
+ // }
+ //
+ // }else{
+ // info( "Invaild product" );
+ // }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
index 903aea0..933c3fc 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingForecastData.qbl
@@ -7,36 +7,36 @@
Description: 'ETL璁㈠崟棰勬祴'
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
- // 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingForecast] );
- if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingForecast, item, true );
- } else {
- listToDeal := selectset( this, MappingForecast, 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.StartDate() >= queryStartDate and item.EndDate() <= 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( "Forecast has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- // 澶勭悊
- traverse( listToDeal, Elements, item ) {
- count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
- info( "Now is dealing with the " + count.AsQUILL() + "Forecast " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
- }
- // if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
- Forecast::CreateOrUpdate( this,
- item.ProductID(), item.SalesSegmentName(), item.StockingPointID(), item.PriorityName(),
- item.CurrencyID(), item.UnitOfMeasureName(),
- item.ID(), item.StartDate(), item.EndDate(), item.Quantity(), item.Price());
- // }else{
- // info( "invaild product" + item.ProductID().AsQUILL() );
+ //// yypsybs Aug-15-2023 (created)
+ //// 寰呭鐞嗘暟鎹�
+ //listToDeal := construct( structured[MappingForecast] );
+ //if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
+ // listToDeal := selectset( this, MappingForecast, item, true );
+ //} else {
+ // listToDeal := selectset( this, MappingForecast, 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.StartDate() >= queryStartDate and item.EndDate() <= 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( "Forecast has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //// 澶勭悊
+ //traverse( listToDeal, Elements, item ) {
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ // info( "Now is dealing with the " + count.AsQUILL() + "Forecast " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
// }
- }
+ //// if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
+ // Forecast::CreateOrUpdate( this,
+ // item.ProductID(), item.SalesSegmentName(), item.StockingPointID(), item.PriorityName(),
+ // item.CurrencyID(), item.UnitOfMeasureName(),
+ // item.ID(), item.StartDate(), item.EndDate(), item.Quantity(), item.Price());
+ //// }else{
+ //// info( "invaild product" + item.ProductID().AsQUILL() );
+ //// }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
index 2138aae..f73b9e0 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingInventoryValueAndCostData.qbl
@@ -4,24 +4,24 @@
{
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
- listtodeal := selectset( this,MappingInventoryValueAndCost,item,not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) );
- totalcount := listtodeal.Size();
- info( "InventoryCost has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- traverse( listtodeal, Elements, item ) {
- count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
- info( "Now is dealing with the " + count.AsQUILL() + "InventoryCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
- }
- if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
- InventoryValueAndCost::CreateOrUpdate( this, item.ID(), item.ProductID(),
- item.StockingPointID(),
- item.AccountName(), item.CostDriver(), item.Start(), item.Cost() );
- }else{
- info( "invaild product: " + item.ProductID().AsQUILL() );
- }
- }
+ //// yypsybs Aug-15-2023 (created)
+ //listtodeal := selectset( this,MappingInventoryValueAndCost,item,not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( StockingPoint_MP::FindById( this, item.StockingPointID() ) ) );
+ //totalcount := listtodeal.Size();
+ //info( "InventoryCost has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //traverse( listtodeal, Elements, item ) {
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ // info( "Now is dealing with the " + count.AsQUILL() + "InventoryCost " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
+ // }
+ // if( not isnull( Product_MP::FindById( this, item.ProductID() ) ) ){
+ // InventoryValueAndCost::CreateOrUpdate( this, item.ID(), item.ProductID(),
+ // item.StockingPointID(),
+ // item.AccountName(), item.CostDriver(), item.Start(), item.Cost() );
+ // }else{
+ // info( "invaild product: " + item.ProductID().AsQUILL() );
+ // }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
index 93b5707..16d4ed2 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl
@@ -8,67 +8,67 @@
{
TextBody:
[*
- // yypsybs Aug-21-2023 (created)
-
- keyProductList := construct( Strings );
- if( isKeyProduct ) {
- keyProductList := selectuniquevalues( this, MappingProduct, item, item.KeyProduct(), item.ID() );
- }
- bomList := selectsortedset( this, MappingBOM, item,
- ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0,
- true,
- businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 )
- and ifexpr( isKeyProduct,
- keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0,
- true ),
- item.OrganCode() + "_" + item.ProductCode() + "_" + item.ProcessSection() );
- // 鎸塺outing鍙妑outingStep鍒嗙粍
- routingIds := selectuniquevalues( bomList, Elements, item, true, item.OrganCode() + "_" + item.ProductCode() );
- traverse( routingIds, Elements, routingId ) {
- routingRows := selectset( bomList, Elements, item, true, routingId = item.OrganCode() + "_" + item.ProductCode() );
- if( routingRows.Size() > 0 ) {
- firstRow := routingRows.Element( 0 );
- stockingPointId := firstRow.OrganCode() + "_" + firstRow.ProductType() + "_STOCK";
- inputStockingPointId := firstRow.OrganCode() + "_" + firstRow.ComponentType() + "_STOCK";
- // ========妫�鏌�========
- product := Product_MP::FindById( this, firstRow.ProductCode() );
- if( not isnull( product ) ) {
- // error( "product : " + firstRow.ProductCode() + " not found" );
- stockingPoint := StockingPoint_MP::FindById( this, stockingPointId );
- inputStockingPoint := StockingPoint_MP::FindById( this, inputStockingPointId );
- // info( stockingPointId.AsQUILL() );
- // if( isnull( stockingPoint ) ) {
- // error( "stockingPoint : " + stockingPointId + " not found" );
- // }
- routing := Routing::FindById( this, routingId );
- if( not isnull( routing ) ) {
- // error( "routing : " + routingId + " not found" );
- // ========澶勭悊杈撳嚭========
- if( not isnull( stockingPoint ) ) {
- // info( 1 );
- operationsInLastSteps := Operation::FindFinalOperationsByRoutingId( this, routingId );
- traverse( operationsInLastSteps, Elements, operationsInLastStep ) {
- operationsInLastStep.CreateOperationBOM( product, stockingPoint, false, true );
- operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 );
- }
- // ========鍒嗙粍澶勭悊杈撳叆========
-
- }
- if( not isnull( inputStockingPoint)){
- this.MappingOperationBOMDataRouting( routing,routingRows,inputStockingPoint,keyProductList);
- }
- }
- }
- }
- }
- if( createPurchaseSupplyMaterial ) {
- toCreateBomList := selectuniquevalues( bomList, Elements, item,
- item.ProductType() = "P", item.OrganCode() + item.ComponentCode());
- traverse( toCreateBomList, Elements, key ) {
- boms := selectset( bomList, Elements, item, item.ProductType() = "P" and item.OrganCode() + item.ComponentCode() = key );
- bom := boms.First();
- this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType());
- }
- }
+ //// yypsybs Aug-21-2023 (created)
+ //
+ //keyProductList := construct( Strings );
+ //if( isKeyProduct ) {
+ // keyProductList := selectuniquevalues( this, MappingProduct, item, item.KeyProduct(), item.ID() );
+ //}
+ //bomList := selectsortedset( this, MappingBOM, item,
+ // ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0,
+ // true,
+ // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 )
+ // and ifexpr( isKeyProduct,
+ // keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0,
+ // true ),
+ // item.OrganCode() + "_" + item.ProductCode() + "_" + item.ProcessSection() );
+ //// 鎸塺outing鍙妑outingStep鍒嗙粍
+ //routingIds := selectuniquevalues( bomList, Elements, item, true, item.OrganCode() + "_" + item.ProductCode() );
+ //traverse( routingIds, Elements, routingId ) {
+ // routingRows := selectset( bomList, Elements, item, true, routingId = item.OrganCode() + "_" + item.ProductCode() );
+ // if( routingRows.Size() > 0 ) {
+ // firstRow := routingRows.Element( 0 );
+ // stockingPointId := firstRow.OrganCode() + "_" + firstRow.ProductType() + "_STOCK";
+ // inputStockingPointId := firstRow.OrganCode() + "_" + firstRow.ComponentType() + "_STOCK";
+ // // ========妫�鏌�========
+ // product := Product_MP::FindById( this, firstRow.ProductCode() );
+ // if( not isnull( product ) ) {
+ //// error( "product : " + firstRow.ProductCode() + " not found" );
+ // stockingPoint := StockingPoint_MP::FindById( this, stockingPointId );
+ // inputStockingPoint := StockingPoint_MP::FindById( this, inputStockingPointId );
+ //// info( stockingPointId.AsQUILL() );
+ // // if( isnull( stockingPoint ) ) {
+ // // error( "stockingPoint : " + stockingPointId + " not found" );
+ // // }
+ // routing := Routing::FindById( this, routingId );
+ // if( not isnull( routing ) ) {
+ //// error( "routing : " + routingId + " not found" );
+ // // ========澶勭悊杈撳嚭========
+ // if( not isnull( stockingPoint ) ) {
+ //// info( 1 );
+ // operationsInLastSteps := Operation::FindFinalOperationsByRoutingId( this, routingId );
+ // traverse( operationsInLastSteps, Elements, operationsInLastStep ) {
+ // operationsInLastStep.CreateOperationBOM( product, stockingPoint, false, true );
+ // operationsInLastStep.GetOperationBOM( product.ID(), stockingPoint.ID(), false ).Quantity( 1 );
+ // }
+ // // ========鍒嗙粍澶勭悊杈撳叆========
+ //
+ // }
+ // if( not isnull( inputStockingPoint)){
+ // this.MappingOperationBOMDataRouting( routing,routingRows,inputStockingPoint,keyProductList);
+ // }
+ // }
+ // }
+ // }
+ //}
+ //if( createPurchaseSupplyMaterial ) {
+ // toCreateBomList := selectuniquevalues( bomList, Elements, item,
+ // item.ProductType() = "P", item.OrganCode() + item.ComponentCode());
+ // traverse( toCreateBomList, Elements, key ) {
+ // boms := selectset( bomList, Elements, item, item.ProductType() = "P" and item.OrganCode() + item.ComponentCode() = key );
+ // bom := boms.First();
+ // this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType());
+ // }
+ //}
*]
}
diff --git "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl" "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
index 03a3858..3eb9f87 100644
--- "a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
+++ "b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMDataRouting\043576.qbl"
@@ -9,87 +9,87 @@
{
TextBody:
[*
- // yypsybs Aug-21-2023 (created)
-
- // 鏍规嵁宸ヨ壓娈垫眹鎬诲鐞�
- processSections := selectuniquevalues( routingRows, Elements, row, true, row.ProcessSection() );
- traverse( processSections, Elements, processSection ) {
- 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 );
- routingStepId := processSection + "_" + [String]minSeq;
- // 鎵惧搴攔outingStep
- routingStep := RoutingStep::FindByName( routing, routingStepId );
- if( not isnull( routingStep ) ) {
- // error( "routing step : " + routing.ID() + "|" + routingStepId + " not found" );
- // 浠呬富鏂欙紝缁熶竴澶勭悊
- noAlterRows := selectset( rows, Elements, noAlterRow, noAlterRow.AlternativeMaterialCode() = "" );
- traverse( noAlterRows, Elements, noAlterRow ) {
- traverse( routingStep, Operation, toLink ) {
- // 妫�鏌ヤ富鏂�
- component := Product_MP::FindById( this, noAlterRow.ComponentCode() );
- if( not isnull( component ) ) {
- // error( "component : " + noAlterRow.ComponentCode() + " not found" );
- // 杩炴帴浜у搧涓巓peration
- pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint );
- trash := construct( OperationBOMs );
- operationBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp,
- true, trash );
- operationBOM.MinQuantityInGroup( 0 );
- operationBOM.Quantity( noAlterRow.UnitUsageOfComponents() / noAlterRow.ComponentOutputRate() );
- operationBOM.MaxQuantityInGroup( noAlterRow.UnitUsageOfComponents() / noAlterRow.ComponentOutputRate() );
- }
- }
- }
- // 鏇挎崲鏂欙紝鎸変富鏂欏垎缁勫鐞�
- alterComponentIds := selectuniquevalues( rows, Elements, row, row.AlternativeMaterialCode() <> "", row.ComponentCode() );
- traverse( alterComponentIds, Elements, alterComponentId ) {
- alterRows := selectset( rows, Elements, row, row.ComponentCode() = alterComponentId );
- firstAlterRow := alterRows.Element( 0 );
- // 妫�鏌ヤ富鏂�
- component := Product_MP::FindById( this, firstAlterRow.ComponentCode() );
- if( not isnull( component ) ) {
- // error( "component : " + firstAlterRow.ComponentCode() + " not found" );
+ //// yypsybs Aug-21-2023 (created)
+ //
+ //// 鏍规嵁宸ヨ壓娈垫眹鎬诲鐞�
+ //processSections := selectuniquevalues( routingRows, Elements, row, true, row.ProcessSection() );
+ //traverse( processSections, Elements, processSection ) {
+ // 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 );
+ // routingStepId := processSection + "_" + [String]minSeq;
+ // // 鎵惧搴攔outingStep
+ // routingStep := RoutingStep::FindByName( routing, routingStepId );
+ // if( not isnull( routingStep ) ) {
+ //// error( "routing step : " + routing.ID() + "|" + routingStepId + " not found" );
+ // // 浠呬富鏂欙紝缁熶竴澶勭悊
+ // noAlterRows := selectset( rows, Elements, noAlterRow, noAlterRow.AlternativeMaterialCode() = "" );
+ // traverse( noAlterRows, Elements, noAlterRow ) {
+ // traverse( routingStep, Operation, toLink ) {
+ // // 妫�鏌ヤ富鏂�
+ // component := Product_MP::FindById( this, noAlterRow.ComponentCode() );
+ // if( not isnull( component ) ) {
+ //// error( "component : " + noAlterRow.ComponentCode() + " not found" );
+ // // 杩炴帴浜у搧涓巓peration
+ // pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint );
+ // trash := construct( OperationBOMs );
+ // operationBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp,
+ // true, trash );
+ // operationBOM.MinQuantityInGroup( 0 );
+ // operationBOM.Quantity( noAlterRow.UnitUsageOfComponents() / noAlterRow.ComponentOutputRate() );
+ // operationBOM.MaxQuantityInGroup( noAlterRow.UnitUsageOfComponents() / noAlterRow.ComponentOutputRate() );
+ // }
// }
- traverse( routingStep, Operation, toLink ) {
- // 杩炴帴浜у搧涓巓peration
- pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint );
- trash := construct( OperationBOMs );
- mainBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp,
- true, trash );
- mainBOM.Quantity( firstAlterRow.UnitUsageOfComponents() / firstAlterRow.ComponentOutputRate() );
- mainBOM.MaxQuantityInGroup( firstAlterRow.UnitUsageOfComponents() / firstAlterRow.ComponentOutputRate() );
- mainQty := mainBOM.Quantity();
- Transaction::Transaction().Propagate();
- // 娣诲姞杈呮枡
- traverse( alterRows, Elements, alterRow ) {
- alterProd := Product_MP::FindById( this, alterRow.AlternativeMaterialCode() );
- if( not isnull( alterProd ) ) {
- // error( "alterProd : " + alterRow.AlternativeMaterialCode() + " not found" );
- stockingPointIdAlter := alterRow.OrganCode() + "_" + alterRow.ProductType() + "_STOCK";
- stockingPointAlter := StockingPoint_MP::FindById( this, stockingPointIdAlter );
- if( isnull( stockingPointAlter ) ) {
- error( "stockingPoint : " + stockingPointIdAlter + " not found" );
- }
- pispAlter := ProductInStockingPoint_MP::CreateIfNotFound( alterProd, stockingPointAlter );
- mainInput := toLink.LastOperationInput();
- trash := construct( OperationBOMs );
- if( not isnull( mainInput ) ) {
- alterBom := mainInput.Operation().LinkPISP( pispAlter, true, mainInput.OperationLinkGroupID(), trash );
- alterBom.Quantity( mainBOM.MaxQuantityInGroup() * alterRow.AlternativeRate() );
- alterBom.MaxQuantityInGroup( mainBOM.MaxQuantityInGroup() );
- // info( "Quantity" + [String]alterBom.Quantity() )
- // info( "MaxQuantityInGroup" + [String]alterBom.MaxQuantityInGroup() )
- mainQty := mainQty - alterBom.Quantity();
- }
- }
- mainBOM.Quantity( mainQty );
- }
- }
- }
- }
- }
- }
+ // }
+ // // 鏇挎崲鏂欙紝鎸変富鏂欏垎缁勫鐞�
+ // alterComponentIds := selectuniquevalues( rows, Elements, row, row.AlternativeMaterialCode() <> "", row.ComponentCode() );
+ // traverse( alterComponentIds, Elements, alterComponentId ) {
+ // alterRows := selectset( rows, Elements, row, row.ComponentCode() = alterComponentId );
+ // firstAlterRow := alterRows.Element( 0 );
+ // // 妫�鏌ヤ富鏂�
+ // component := Product_MP::FindById( this, firstAlterRow.ComponentCode() );
+ // if( not isnull( component ) ) {
+ //// error( "component : " + firstAlterRow.ComponentCode() + " not found" );
+ //// }
+ // traverse( routingStep, Operation, toLink ) {
+ // // 杩炴帴浜у搧涓巓peration
+ // pisp := ProductInStockingPoint_MP::CreateIfNotFound( component, stockingPoint );
+ // trash := construct( OperationBOMs );
+ // mainBOM := toLink.LinkProduct( component, true, BaseOperationLink::GetGroupID( toLink, true, false ), pisp,
+ // true, trash );
+ // mainBOM.Quantity( firstAlterRow.UnitUsageOfComponents() / firstAlterRow.ComponentOutputRate() );
+ // mainBOM.MaxQuantityInGroup( firstAlterRow.UnitUsageOfComponents() / firstAlterRow.ComponentOutputRate() );
+ // mainQty := mainBOM.Quantity();
+ // Transaction::Transaction().Propagate();
+ // // 娣诲姞杈呮枡
+ // traverse( alterRows, Elements, alterRow ) {
+ // alterProd := Product_MP::FindById( this, alterRow.AlternativeMaterialCode() );
+ // if( not isnull( alterProd ) ) {
+ // // error( "alterProd : " + alterRow.AlternativeMaterialCode() + " not found" );
+ // stockingPointIdAlter := alterRow.OrganCode() + "_" + alterRow.ProductType() + "_STOCK";
+ // stockingPointAlter := StockingPoint_MP::FindById( this, stockingPointIdAlter );
+ // if( isnull( stockingPointAlter ) ) {
+ // error( "stockingPoint : " + stockingPointIdAlter + " not found" );
+ // }
+ // pispAlter := ProductInStockingPoint_MP::CreateIfNotFound( alterProd, stockingPointAlter );
+ // mainInput := toLink.LastOperationInput();
+ // trash := construct( OperationBOMs );
+ // if( not isnull( mainInput ) ) {
+ // alterBom := mainInput.Operation().LinkPISP( pispAlter, true, mainInput.OperationLinkGroupID(), trash );
+ // alterBom.Quantity( mainBOM.MaxQuantityInGroup() * alterRow.AlternativeRate() );
+ // alterBom.MaxQuantityInGroup( mainBOM.MaxQuantityInGroup() );
+ //// info( "Quantity" + [String]alterBom.Quantity() )
+ //// info( "MaxQuantityInGroup" + [String]alterBom.MaxQuantityInGroup() )
+ // mainQty := mainQty - alterBom.Quantity();
+ // }
+ // }
+ // mainBOM.Quantity( mainQty );
+ // }
+ // }
+ // }
+ // }
+ // }
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl
index 3a315d0..061336f 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationCostData.qbl
@@ -7,57 +7,57 @@
Description: 'Get operation cost data from operation mapping'
TextBody:
[*
- // Administrator Aug-21-2023 (created)
- // list to deal
- listtodeal := construct( structured[MappingOperation] );
-
- if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
- listtodeal := selectset( this, MappingOperation, item, true );
- } else {
- listtodeal := selectset( this, MappingOperation, item, businesstypes.Find( item.BusinessType() ) <> -1 );
- }
-
- // Get the list to deal with max sequence number
- listtodealwithmaxsn := construct( structured[MappingOperation] );
- traverse( listtodeal, Elements, item ){
- maxsn := maxselect( this,
- MappingOperation,
- moperation,
- moperation.OrganCode() = item.OrganCode(),
- moperation.ProductID() = item.ProductID(),
- moperation.SequenceNumber() ).SequenceNumber()
- if( item.SequenceNumber() = maxsn ){
- listtodealwithmaxsn.Add( item );
- }
- }
-
- totalcount := listtodealwithmaxsn.Size();
- info( "OperationCost has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- // Get the operation cost data
- traverse( listtodealwithmaxsn, Elements, item ){
- count := count + 1;
- if( count - [Number](count/100) * 100 = 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();
- operation := Operation::FindOperationTypeIndex( id );
- account := Account_MP::FindByName( this, "Operation cost" );
- isfromdb := false;
- existoperationcost := OperationCost::FindOperationCostTypeIndex( id );
- if( isnull( existoperationcost ) ){
- connecteditem := select( this,
- MappingOperationCost,
- moperationcost,
- moperationcost.OrgCode() = item.OrganCode(),
- moperationcost.ProductID() = item.ProductID() );
- cost := connecteditem.Cost();
- lengthoftime := connecteditem.LengthOfTime();
- start := connecteditem.Start();
- timeunit := connecteditem.TimeUnit();
- OperationCost::Create( id, operation, account, "Volume", start, timeunit, lengthoftime, cost, isfromdb );
- }
- }
+ //// Administrator Aug-21-2023 (created)
+ //// list to deal
+ //listtodeal := construct( structured[MappingOperation] );
+ //
+ //if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ // listtodeal := selectset( this, MappingOperation, item, true );
+ //} else {
+ // listtodeal := selectset( this, MappingOperation, item, businesstypes.Find( item.BusinessType() ) <> -1 );
+ //}
+ //
+ //// Get the list to deal with max sequence number
+ //listtodealwithmaxsn := construct( structured[MappingOperation] );
+ //traverse( listtodeal, Elements, item ){
+ // maxsn := maxselect( this,
+ // MappingOperation,
+ // moperation,
+ // moperation.OrganCode() = item.OrganCode(),
+ // moperation.ProductID() = item.ProductID(),
+ // moperation.SequenceNumber() ).SequenceNumber()
+ // if( item.SequenceNumber() = maxsn ){
+ // listtodealwithmaxsn.Add( item );
+ // }
+ // }
+ //
+ //totalcount := listtodealwithmaxsn.Size();
+ //info( "OperationCost has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //// Get the operation cost data
+ //traverse( listtodealwithmaxsn, Elements, item ){
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 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();
+ // operation := Operation::FindOperationTypeIndex( id );
+ // account := Account_MP::FindByName( this, "Operation cost" );
+ // isfromdb := false;
+ // existoperationcost := OperationCost::FindOperationCostTypeIndex( id );
+ // if( isnull( existoperationcost ) ){
+ // connecteditem := select( this,
+ // MappingOperationCost,
+ // moperationcost,
+ // moperationcost.OrgCode() = item.OrganCode(),
+ // moperationcost.ProductID() = item.ProductID() );
+ // cost := connecteditem.Cost();
+ // lengthoftime := connecteditem.LengthOfTime();
+ // start := connecteditem.Start();
+ // timeunit := connecteditem.TimeUnit();
+ // OperationCost::Create( id, operation, account, "Volume", start, timeunit, lengthoftime, cost, isfromdb );
+ // }
+ // }
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
index a3a19ed..47487bf 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationData.qbl
@@ -6,89 +6,89 @@
{
TextBody:
[*
- // yypsybs Aug-18-2023 (created)
- // 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
- toDealList := construct( MappingOperations );
- if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
- toDealList := selectsortedset( this, MappingOperation, item,
- // businessTypes.Find( item.BusinessType() ) >= 0,
- businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0,
- item.SequenceNumber() );
- } else {
- toDealList := selectsortedset( this, MappingOperation, item,
- true,
- item.SequenceNumber() );
- }
- // 閫愭潯澶勭悊锛岄娆″鐞嗘椂鍒犻櫎steps
- dealtRoutingIds := construct( Strings );
- routingList := construct( Routings );
- traverse( toDealList, Elements, item ) {
- routingId := item.OrganCode() + "_" + item.ProductID();
- unitId := item.OrganCode() + "_" + item.PlantName() + "_" + item.ProcessSection();
- routingStepName := item.ProcessSection() + "_" + [String]item.SequenceNumber();
- operationId := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection();
- // info( "========" )
- // info( "routingId:" + routingId );
- // info( "unitId:" + unitId );
- // info( "routingStepName:" + routingStepName );
- // info( "operationId:" + operationId );
- if( guard( item.Line(), "" ).Length() > 0 ) {
- unitId := unitId + "_" + item.Line();
- operationId := operationId + "_" + item.Line()
- }
- routing := Routing::CreateOrUpdate( this, routingId );
- if( routingList.Find( routing ) < 0 ) {
- routingList.Add( routing );
- }
- // 鍒犻櫎steps(units鍏崇郴銆乷perations涔熶細鍒犻櫎)
- if( dealtRoutingIds.Find( routingId ) < 0 ) {
- toDeleteSteps := selectset( routing, RoutingStep, routingStep, true );
- RoutingStep::Delete( toDeleteSteps );
- dealtRoutingIds.Add( routingId );
- }
- // RoutingStep
- routingStep := RoutingStep::FindByName( routing, routingStepName );
- if( isnull( routingStep ) ) {
- routingStep := RoutingStep::Create( routing, routingStepName, "", true );
- }
- // UnitOfMeasure
- unitOfMeasure := UnitOfMeasure_MP::FindByName( this, item.UnitOfMeasureName() );
- if( isnull( unitOfMeasure ) ) {
- error( "unit of measure [" + item.UnitOfMeasureName() + "] not found for routing [" + routingId + "]" );
- }
- // Unit
- unit := Unit::FindById( this, unitId );
- if( isnull( unit ) ) {
- unit := this.Unit( relnew,
- ID := unitId, Name := unitId, CapacityType := "Infinite",
- DefaultGridX := 0, DefaultGridY := 0,
- IsManuallyConfigured := false,
- Currency_MP := this.BaseCurrency(), UnitOfMeasure_MP := unitOfMeasure );
- }
- // Operation
- haveMaxQty := item.MaximumQuantity() <> 0.0;
- op := Operation::FindOperationTypeIndex( operationId );
- if( isnull( op)){
- op := Operation::Create( operationId, unit, operationId, routingStep,
- Duration::Hours( item.UserLeadTime() ), Duration::Zero(), item.ActualCapacity(), false,
- [Real]item.MinimumQuantity(), haveMaxQty, guard( [Real]item.MaximumQuantity(), Real::MaxReal() ),
- 0.0, 0.0, false, true );
- }
-
- ManufactureLTProcessSection::CreateOrUpdate( op );
- }
- info( "========" )
- // 閬嶅巻routing锛岃繘琛宭ink
- lastStep := null( RoutingStep );
- traverse( routingList, Elements.RoutingStep, step ) {
- // 鍚屽伐鑹鸿矾绾挎椂杩炴帴
- if( not isnull( lastStep ) and lastStep.Routing() = step.Routing() ) {
- toLink := construct( RoutingSteps );
- toLink.Add( lastStep );
- // todo 瀛樼枒
- step.LinkOperations( toLink );
- }
- lastStep := step;
- }
+ //// yypsybs Aug-18-2023 (created)
+ //// 鑾峰彇鏈夊簭鐨勫緟澶勭悊璁板綍
+ //toDealList := construct( MappingOperations );
+ //if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
+ // toDealList := selectsortedset( this, MappingOperation, item,
+ //// businessTypes.Find( item.BusinessType() ) >= 0,
+ // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0,
+ // item.SequenceNumber() );
+ //} else {
+ // toDealList := selectsortedset( this, MappingOperation, item,
+ // true,
+ // item.SequenceNumber() );
+ //}
+ //// 閫愭潯澶勭悊锛岄娆″鐞嗘椂鍒犻櫎steps
+ //dealtRoutingIds := construct( Strings );
+ //routingList := construct( Routings );
+ //traverse( toDealList, Elements, item ) {
+ // routingId := item.OrganCode() + "_" + item.ProductID();
+ // unitId := item.OrganCode() + "_" + item.PlantName() + "_" + item.ProcessSection();
+ // routingStepName := item.ProcessSection() + "_" + [String]item.SequenceNumber();
+ // operationId := item.OrganCode() + "_" + item.ProductID() + "_" + item.ProcessSection();
+ //// info( "========" )
+ //// info( "routingId:" + routingId );
+ //// info( "unitId:" + unitId );
+ //// info( "routingStepName:" + routingStepName );
+ //// info( "operationId:" + operationId );
+ // if( guard( item.Line(), "" ).Length() > 0 ) {
+ // unitId := unitId + "_" + item.Line();
+ // operationId := operationId + "_" + item.Line()
+ // }
+ // routing := Routing::CreateOrUpdate( this, routingId );
+ // if( routingList.Find( routing ) < 0 ) {
+ // routingList.Add( routing );
+ // }
+ // // 鍒犻櫎steps(units鍏崇郴銆乷perations涔熶細鍒犻櫎)
+ // if( dealtRoutingIds.Find( routingId ) < 0 ) {
+ // toDeleteSteps := selectset( routing, RoutingStep, routingStep, true );
+ // RoutingStep::Delete( toDeleteSteps );
+ // dealtRoutingIds.Add( routingId );
+ // }
+ // // RoutingStep
+ // routingStep := RoutingStep::FindByName( routing, routingStepName );
+ // if( isnull( routingStep ) ) {
+ // routingStep := RoutingStep::Create( routing, routingStepName, "", true );
+ // }
+ // // UnitOfMeasure
+ // unitOfMeasure := UnitOfMeasure_MP::FindByName( this, item.UnitOfMeasureName() );
+ // if( isnull( unitOfMeasure ) ) {
+ // error( "unit of measure [" + item.UnitOfMeasureName() + "] not found for routing [" + routingId + "]" );
+ // }
+ // // Unit
+ // unit := Unit::FindById( this, unitId );
+ // if( isnull( unit ) ) {
+ // unit := this.Unit( relnew,
+ // ID := unitId, Name := unitId, CapacityType := "Infinite",
+ // DefaultGridX := 0, DefaultGridY := 0,
+ // IsManuallyConfigured := false,
+ // Currency_MP := this.BaseCurrency(), UnitOfMeasure_MP := unitOfMeasure );
+ // }
+ // // Operation
+ // haveMaxQty := item.MaximumQuantity() <> 0.0;
+ // op := Operation::FindOperationTypeIndex( operationId );
+ // if( isnull( op)){
+ // op := Operation::Create( operationId, unit, operationId, routingStep,
+ // Duration::Hours( item.UserLeadTime() ), Duration::Zero(), item.ActualCapacity(), false,
+ // [Real]item.MinimumQuantity(), haveMaxQty, guard( [Real]item.MaximumQuantity(), Real::MaxReal() ),
+ // 0.0, 0.0, false, true );
+ // }
+ //
+ // ManufactureLTProcessSection::CreateOrUpdate( op );
+ //}
+ //info( "========" )
+ //// 閬嶅巻routing锛岃繘琛宭ink
+ //lastStep := null( RoutingStep );
+ //traverse( routingList, Elements.RoutingStep, step ) {
+ // // 鍚屽伐鑹鸿矾绾挎椂杩炴帴
+ // if( not isnull( lastStep ) and lastStep.Routing() = step.Routing() ) {
+ // toLink := construct( RoutingSteps );
+ // toLink.Add( lastStep );
+ // // todo 瀛樼枒
+ // step.LinkOperations( toLink );
+ // }
+ // lastStep := step;
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
index cb6a99d..8e19ed7 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingProductData.qbl
@@ -8,85 +8,85 @@
Description: 'Method to get needed data from mapping product data'
TextBody:
[*
- // Administrator Aug-16-2023 (created)
- // list to deal
- //info( "Get list to deal of product" );
- listToDeal := construct( structured[MappingProduct] );
-
- if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
- if( iskeyproduct = true ){
- listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true );
- }
- else{
- listToDeal := selectset( this, MappingProduct, item, true );
- }
- } else {
- if( iskeyproduct = true ){
- listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true, businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 );
- }
- else{
- listToDeal := selectset( this, MappingProduct, item, businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 );
- }
- }
- totalcount := listToDeal.Size();
- info( "Product has " + totalcount.AsQUILL() + " rows in total" );
-
- // Get the root data
- Product_MP::CreateOrUpdate( this,
- "鍏ㄩ儴鐗╂枡浜у搧",
- "",
- "鍏ㄩ儴鐗╂枡浜у搧",
- "PCS",
- "鍏ㄩ儴鐗╂枡浜у搧",
- 0.0
- );
- count := 0;
- // Get the ProductMajorType list & ProductSubclassType list
- traverse( listToDeal, Elements, item ){
- count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
- info( "Now is dealing with the " + count.AsQUILL() + "Product " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
- }
- if( not item.ProductMajorType() = "" ){
- Product_MP::CreateOrUpdate( this,
- item.ProductMajorType(),
- "鍏ㄩ儴鐗╂枡浜у搧",
- item.ProductMajorType(),
- "PCS",
- item.ProductMajorType(),
- 0.0
- );
- }
- productmajortype := item.ProductMajorType();
- if( productmajortype="" ){
- productmajortype := "鍏ㄩ儴鐗╂枡浜у搧";
- }
-
- if( not item.ProductSubclassType() = "" ){
- Product_MP::CreateOrUpdate( this,
- item.ProductSubclassType(),
- productmajortype,
- item.ProductSubclassType(),
- "PCS",
- item.ProductSubclassType(),
- 0.0
- );
- }
- productsubclasstype := item.ProductSubclassType();
- if( productsubclasstype="" ){
- productsubclasstype := productmajortype;
- }
-
- if( not item.ID() = "" ){
- Product_MP::CreateOrUpdate( this,
- item.ID(),
- productsubclasstype,
- item.ID(),
- item.UnitOfMeasureName(),
- item.Name(),
- item.ShelfLife()
- );
- }
- }
+ //// Administrator Aug-16-2023 (created)
+ //// list to deal
+ ////info( "Get list to deal of product" );
+ //listToDeal := construct( structured[MappingProduct] );
+ //
+ //if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ // if( iskeyproduct = true ){
+ // listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true );
+ // }
+ // else{
+ // listToDeal := selectset( this, MappingProduct, item, true );
+ // }
+ //} else {
+ // if( iskeyproduct = true ){
+ // listToDeal := selectset( this, MappingProduct, item, item.KeyProduct() = true, businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 );
+ // }
+ // else{
+ // listToDeal := selectset( this, MappingProduct, item, businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 );
+ // }
+ //}
+ //totalcount := listToDeal.Size();
+ //info( "Product has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //// Get the root data
+ //Product_MP::CreateOrUpdate( this,
+ // "鍏ㄩ儴鐗╂枡浜у搧",
+ // "",
+ // "鍏ㄩ儴鐗╂枡浜у搧",
+ // "PCS",
+ // "鍏ㄩ儴鐗╂枡浜у搧",
+ // 0.0
+ // );
+ //count := 0;
+ //// Get the ProductMajorType list & ProductSubclassType list
+ //traverse( listToDeal, Elements, item ){
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ // info( "Now is dealing with the " + count.AsQUILL() + "Product " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
+ // }
+ // if( not item.ProductMajorType() = "" ){
+ // Product_MP::CreateOrUpdate( this,
+ // item.ProductMajorType(),
+ // "鍏ㄩ儴鐗╂枡浜у搧",
+ // item.ProductMajorType(),
+ // "PCS",
+ // item.ProductMajorType(),
+ // 0.0
+ // );
+ // }
+ // productmajortype := item.ProductMajorType();
+ // if( productmajortype="" ){
+ // productmajortype := "鍏ㄩ儴鐗╂枡浜у搧";
+ // }
+ //
+ // if( not item.ProductSubclassType() = "" ){
+ // Product_MP::CreateOrUpdate( this,
+ // item.ProductSubclassType(),
+ // productmajortype,
+ // item.ProductSubclassType(),
+ // "PCS",
+ // item.ProductSubclassType(),
+ // 0.0
+ // );
+ // }
+ // productsubclasstype := item.ProductSubclassType();
+ // if( productsubclasstype="" ){
+ // productsubclasstype := productmajortype;
+ // }
+ //
+ // if( not item.ID() = "" ){
+ // Product_MP::CreateOrUpdate( this,
+ // item.ID(),
+ // productsubclasstype,
+ // item.ID(),
+ // item.UnitOfMeasureName(),
+ // item.Name(),
+ // item.ShelfLife()
+ // );
+ // }
+ // }
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
index 2bd20a4..b0de01f 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingProductInLaneData.qbl
@@ -5,20 +5,20 @@
Description: 'Get Product In Line data'
TextBody:
[*
- // Administrator Aug-17-2023 (created)
- // list to deal
- listtodeal := selectset( this, MappingProductInLane, item, not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( Lane::FindLaneTypeIndex( item.LineID() ) ) );
- totalcount := listtodeal.Size();
- info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" );
-
- count := 0;
- // Create ProductInLane
- traverse( listtodeal, Elements, item ){
- count := count + 1;
- if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
- info( "Now is dealing with the " + count.AsQUILL() + "ProductInLane " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
- }
- ProductInLane::CreateOrUpdate( this, item.ProductID(), item.LineID() );
- }
+ //// Administrator Aug-17-2023 (created)
+ //// list to deal
+ //listtodeal := selectset( this, MappingProductInLane, item, not isnull( Product_MP::FindById( this, item.ProductID() ) ), not isnull( Lane::FindLaneTypeIndex( item.LineID() ) ) );
+ //totalcount := listtodeal.Size();
+ //info( "ProductInLane has " + totalcount.AsQUILL() + " rows in total" );
+ //
+ //count := 0;
+ //// Create ProductInLane
+ //traverse( listtodeal, Elements, item ){
+ // count := count + 1;
+ // if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
+ // info( "Now is dealing with the " + count.AsQUILL() + "ProductInLane " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
+ // }
+ // ProductInLane::CreateOrUpdate( this, item.ProductID(), item.LineID() );
+ // }
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
index 5f5e1aa..a1b9585 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingSalesSegmentData.qbl
@@ -7,50 +7,50 @@
Description: 'ETL閿�鍞儴闂�'
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
- // 寰呭鐞嗘暟鎹�
- listToDeal := construct( structured[MappingSalesSegment] );
- if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
- listToDeal := selectset( this, MappingSalesSegment, item, true );
- } else {
- listToDeal := selectset( this, MappingSalesSegment, item, businessTypes.Find( item.BusinessType() ) <> -1 );
- }
- //nameList := construct( structured[String] );
- //nameList := selectvalues( listToDeal, Elements, item, true, item.Name() );
- //// 妫�鏌arent
- //traverse( listToDeal, Elements, item, item.ParentName() <> "" ) {
- // if( nameList.Find( item.ParentName() ) = -1 ) {
- // error( "sales segment parent not found: " + item.Name().AsQUILL() );
- // }
+ //// yypsybs Aug-15-2023 (created)
+ //// 寰呭鐞嗘暟鎹�
+ //listToDeal := construct( structured[MappingSalesSegment] );
+ //if( isnull( businessTypes ) or businessTypes.Size() = 0 ) {
+ // listToDeal := selectset( this, MappingSalesSegment, item, true );
+ //} else {
+ // listToDeal := selectset( this, MappingSalesSegment, item, businessTypes.Find( item.BusinessType() ) <> -1 );
//}
- //// 閫愬眰閬嶅巻锛岀洿鑷冲鐞嗗畬鎴�
- //dealtNameList := construct( structured[String] );
- //while( listToDeal.Size() <> dealtNameList.Size() ) {
- // traverse( listToDeal, Elements, item ) {
- // // 鏈鐞嗚繃
- // if( dealtNameList.Find( item.Name() ) < 0 ){
- // // 鏃犵埗閮ㄩ棬锛岀洿鎺ュ鐞�
- // if( item.ParentName() = "" ) {
- // SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
- // dealtNameList.Add( item.Name() );
- // }
- // // 鏈夌埗閮ㄩ棬涓旂埗閮ㄩ棬宸插鐞�
- // else if( item.ParentName() <> "" and dealtNameList.Find(item.ParentName()) >= 0 ) {
- // SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
- // dealtNameList.Add( item.Name() );
- // }
- // // 鏈夌埗閮ㄩ棬涓旂埗閮ㄩ棬鏈鐞嗭紝涓嬩竴杞鐞�
- // }
+ ////nameList := construct( structured[String] );
+ ////nameList := selectvalues( listToDeal, Elements, item, true, item.Name() );
+ ////// 妫�鏌arent
+ ////traverse( listToDeal, Elements, item, item.ParentName() <> "" ) {
+ //// if( nameList.Find( item.ParentName() ) = -1 ) {
+ //// error( "sales segment parent not found: " + item.Name().AsQUILL() );
+ //// }
+ ////}
+ ////// 閫愬眰閬嶅巻锛岀洿鑷冲鐞嗗畬鎴�
+ ////dealtNameList := construct( structured[String] );
+ ////while( listToDeal.Size() <> dealtNameList.Size() ) {
+ //// traverse( listToDeal, Elements, item ) {
+ //// // 鏈鐞嗚繃
+ //// if( dealtNameList.Find( item.Name() ) < 0 ){
+ //// // 鏃犵埗閮ㄩ棬锛岀洿鎺ュ鐞�
+ //// if( item.ParentName() = "" ) {
+ //// SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
+ //// dealtNameList.Add( item.Name() );
+ //// }
+ //// // 鏈夌埗閮ㄩ棬涓旂埗閮ㄩ棬宸插鐞�
+ //// else if( item.ParentName() <> "" and dealtNameList.Find(item.ParentName()) >= 0 ) {
+ //// SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
+ //// dealtNameList.Add( item.Name() );
+ //// }
+ //// // 鏈夌埗閮ㄩ棬涓旂埗閮ㄩ棬鏈鐞嗭紝涓嬩竴杞鐞�
+ //// }
+ //// }
+ ////}
+ //traverse( listToDeal,Elements,item ){
+ // if( item.ParentName() <> "" and isnull( SalesSegment_MP::FindByName( this, item.ParentName() ) ) ){
+ // SalesSegment_MP::CreateOrUpdate( this, item.ParentName(), item.DisplayIndex(), "" );
// }
- //}
- traverse( listToDeal,Elements,item ){
- if( item.ParentName() <> "" and isnull( SalesSegment_MP::FindByName( this, item.ParentName() ) ) ){
- SalesSegment_MP::CreateOrUpdate( this, item.ParentName(), item.DisplayIndex(), "" );
- }
- }
-
- traverse( listToDeal,Elements,item ){
- SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
- }
+ // }
+ //
+ //traverse( listToDeal,Elements,item ){
+ // SalesSegment_MP::CreateOrUpdate( this, item.Name(), item.DisplayIndex(), item.ParentName() );
+ // }
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
index fa613b6..59960f6 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl
@@ -7,94 +7,94 @@
Description: 'Get unit data from operation mapping'
TextBody:
[*
- // Administrator Aug-21-2023 (created)
- // list to deal
- listtodeal := construct( structured[MappingOperation] );
-
- if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
- listtodeal := selectset( this, MappingOperation, item, true );
- } else {
- listtodeal := selectset( this, MappingOperation, item,
- businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
- );
- }
-
- //Set the Default values
- unitofmeasurename := "PCS";
- capacitytype := "Infinite";
-
- // Get the root data
- Unit::CreateOrUpdate( this,
- "澶╅┈闆嗗洟",
- "澶╅┈闆嗗洟",
- "",
- capacitytype,
- unitofmeasurename );
-
- // Get the sub root data
- Unit::CreateOrUpdate( this,
- "鐢熶骇",
- "鐢熶骇",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- Unit::CreateOrUpdate( this,
- "渚涘簲鍟�",
- "渚涘簲鍟�",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- Unit::CreateOrUpdate( this,
- "鏁磋溅杩愯緭",
- "鏁磋溅杩愯緭",
- "澶╅┈闆嗗洟",
- capacitytype,
- unitofmeasurename );
-
- // Get the unit list
- traverse( listtodeal, Elements, item){
- OrgName := item.OrganName();
- if( OrgName = ''){
- OrgName := item.OrganCode();
- }
- //Get the first level unit
- Unit::CreateOrUpdate( this,
- item.OrganCode(),
- OrgName,
- "鐢熶骇",
- capacitytype,
- unitofmeasurename );
-
- //Get the second level unit
- secondlevelid := item.OrganCode() + "_" + item.PlantName();
- Unit::CreateOrUpdate( this,
- secondlevelid,
- secondlevelid,
- item.OrganCode(),
- capacitytype,
- unitofmeasurename );
-
- //Get the third level unit
- thirdlevelid := secondlevelid + "_" + item.ProcessSection();
- Unit::CreateOrUpdate( this,
- thirdlevelid,
- thirdlevelid,
- secondlevelid,
- "Time",
- item.UnitOfMeasureName() );
-
- //Get the last level unit
- if( item.Line()<>"" ){
- lastlevelid := thirdlevelid + "_" + item.Line();
- Unit::CreateOrUpdate( this,
- lastlevelid,
- lastlevelid,
- thirdlevelid,
- "Time",
- item.UnitOfMeasureName() );
- }
- }
+ //// Administrator Aug-21-2023 (created)
+ //// list to deal
+ //listtodeal := construct( structured[MappingOperation] );
+ //
+ //if( isnull( businesstypes ) or businesstypes.Size() = 0 ) {
+ // listtodeal := selectset( this, MappingOperation, item, true );
+ //} else {
+ // listtodeal := selectset( this, MappingOperation, item,
+ // businesstypes.Difference( businesstypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0
+ // );
+ //}
+ //
+ ////Set the Default values
+ //unitofmeasurename := "PCS";
+ //capacitytype := "Infinite";
+ //
+ //// Get the root data
+ //Unit::CreateOrUpdate( this,
+ // "澶╅┈闆嗗洟",
+ // "澶╅┈闆嗗洟",
+ // "",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //// Get the sub root data
+ //Unit::CreateOrUpdate( this,
+ // "鐢熶骇",
+ // "鐢熶骇",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //Unit::CreateOrUpdate( this,
+ // "渚涘簲鍟�",
+ // "渚涘簲鍟�",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //Unit::CreateOrUpdate( this,
+ // "鏁磋溅杩愯緭",
+ // "鏁磋溅杩愯緭",
+ // "澶╅┈闆嗗洟",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ //// Get the unit list
+ //traverse( listtodeal, Elements, item){
+ // OrgName := item.OrganName();
+ // if( OrgName = ''){
+ // OrgName := item.OrganCode();
+ // }
+ // //Get the first level unit
+ // Unit::CreateOrUpdate( this,
+ // item.OrganCode(),
+ // OrgName,
+ // "鐢熶骇",
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ // //Get the second level unit
+ // secondlevelid := item.OrganCode() + "_" + item.PlantName();
+ // Unit::CreateOrUpdate( this,
+ // secondlevelid,
+ // secondlevelid,
+ // item.OrganCode(),
+ // capacitytype,
+ // unitofmeasurename );
+ //
+ // //Get the third level unit
+ // thirdlevelid := secondlevelid + "_" + item.ProcessSection();
+ // Unit::CreateOrUpdate( this,
+ // thirdlevelid,
+ // thirdlevelid,
+ // secondlevelid,
+ // "Time",
+ // item.UnitOfMeasureName() );
+ //
+ // //Get the last level unit
+ // if( item.Line()<>"" ){
+ // lastlevelid := thirdlevelid + "_" + item.Line();
+ // Unit::CreateOrUpdate( this,
+ // lastlevelid,
+ // lastlevelid,
+ // thirdlevelid,
+ // "Time",
+ // item.UnitOfMeasureName() );
+ // }
+ // }
*]
}
diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
index 2c4ce55..c4a9894 100644
--- a/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitOfMeasureData.qbl
@@ -5,19 +5,19 @@
Description: 'ETL鏁版嵁杞ā鍨嬫暟鎹�'
TextBody:
[*
- // yypsybs Aug-15-2023 (created)
-
- defaultOld := UnitOfMeasure_MP::FindDefault( this );
- defaultNew := select( this, MappingUnitOfMeasure, item, true, item.IsDefault() );
-
- if( not isnull( defaultOld ) and not isnull( defaultNew )
- and defaultOld.Name() <> defaultNew.Name() ) {
- defaultOld.IsDefault(false);
- //error( "multi default unit of measure" )
- }
-
- traverse( this, MappingUnitOfMeasure, item ) {
- UnitOfMeasure_MP::CreateOrUpdate( this, item.Name(), item.IsDefault() );
- }
+ //// yypsybs Aug-15-2023 (created)
+ //
+ //defaultOld := UnitOfMeasure_MP::FindDefault( this );
+ //defaultNew := select( this, MappingUnitOfMeasure, item, true, item.IsDefault() );
+ //
+ //if( not isnull( defaultOld ) and not isnull( defaultNew )
+ // and defaultOld.Name() <> defaultNew.Name() ) {
+ // defaultOld.IsDefault(false);
+ // //error( "multi default unit of measure" )
+ //}
+ //
+ //traverse( this, MappingUnitOfMeasure, item ) {
+ // UnitOfMeasure_MP::CreateOrUpdate( this, item.Name(), item.IsDefault() );
+ //}
*]
}
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
deleted file mode 100644
index dc5d8d6..0000000
--- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync0.qbl
+++ /dev/null
@@ -1,149 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan,
- Strings businessTypes,
- Boolean isKeyProduct,
- Boolean createPurchaseSupplyMaterial
-)
-{
- Description: '鍗曟鍚屾'
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- // 甯佺鍜屽竵绉嶆眹鐜�
- //Currency_MP::CreateCurrencyFromJson( macroPlan, jsonDataRow );
- info( "Prepare to do sync" )
- if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
- traverse( businessTypes, Elements, item ) {
- info( "Business type : " + item )
- }
- }
- info( "KeyProduct : " + [String]isKeyProduct )
- info( "Create purchase supply material : " + [String]createPurchaseSupplyMaterial )
-
- // 鍒濆鎹�-0
- info( "Start Initial" );
- macroPlan.InitialUnitAndStockingPoint();
-
- // 鍗曚綅-1
- UnitOfMeasure_MP::DoSync( macroPlan );
-
- // 閿�鍞儴闂�-2
- SalesSegment_MP::DoSync( macroPlan, businessTypes );
-
- // 搴撳瓨鐐�-3
- info( "Sales Segment Finished, Start Get StockingPoint From Api" )
- bodynumber := "2";
- postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
- address := "api-uat-sgc.tianma.cn";
- url := "/otdService/https/GetStockingPointsInfo";
- port := 443;
- data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
- macroPlan.ApiStockingPointData( data );
-
- // 璐у竵淇℃伅-4
- info( "Get StockingPoint From Api Finished, Start Get CurrencyInfo From Api" )
- bodynumber := "1";
- postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
- address := "api-uat-sgc.tianma.cn";
- url := "/otdService/https/GetCurrenciesInfo";
- port := 443;
- data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
- macroPlan.ApiCurenciesData( data );
-
- //璐у竵姹囩巼淇℃伅-5
- info( "Get CurrencyInfo From Api Finished, Start Get CurrencyRates From Api" )
- bodynumber := "5";
- postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
- address := "api-uat-sgc.tianma.cn";
- url := "/otdService/https/GetCurrencyRatesInfo";
- port := 443;
- data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
- macroPlan.ApiCurencyRatesData( data );
-
- // 浜у搧鐗╂枡-6
- 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, false );
-
- //鍗曚綅杞崲-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 );
-
- // 宸ヨ壓璺嚎 + BOM-9
- info( "Unit Finished, Start Operation Mapping" );
- macroPlan.MappingOperationData( businessTypes );
- 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 );
-
- //杞﹂亾淇℃伅-10
- info( "BOM Finished, Start Get Lanes From Api" );
- bodynumber := "3";
- postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
- address := "api-uat-sgc.tianma.cn";
- url := "/otdService/https/GetLanesInfo";
- port := 443;
- data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
- macroPlan.ApiLanesData( data );
-
- //杞﹂亾杩愯緭娈�-11
- info( "Get Lanes From Api Finished, Start Get LaneLegs From Api" );
- bodynumber := "4";
- postrequestbody := macroPlan.ApiBuildPostRequestBody( bodynumber );
- address := "api-uat-sgc.tianma.cn";
- url := "/otdService/https/GetLaneLegsInfo";
- port := 443;
- data := macroPlan.ApiResponesCheck( address, url, port, postrequestbody );
- macroPlan.ApiLaneLegsData( data );
-
- //// 渚涘簲缃戠粶锛堣溅閬擄級-12
- //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();
-
- // 鍦ㄥ簱搴撳瓨鏁版嵁-13
- 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, false );
-
- // 鍦ㄩ�斿簱瀛�-14
- info( "ActualPISPIP Finished, Start ExternalSupply Data Broker" );
- macroPlan.Broker_OTD_ExternalSupply().Execute();
- //macroPlan.MappingExternalSupplyData( businessTypes, true );
- info( "ExternalSupply Data Broker Finished, Start ExternalSupply Mapping" );
- macroPlan.MappingExternalSupplyData( businessTypes, false );
-
- // 搴撳瓨鎴愭湰-15
- InventoryValueAndCost::DoSync( macroPlan );
-
- //// todo 鍒堕�犳垚鏈�-16
- //info( "InventoryCost Finished, Start OperationCost Mapping" );
- //macroPlan.MappingOperationCostData( businessTypes );
-
- // 璁㈠崟棰勬祴-17
- Forecast::DoSync( macroPlan, businessTypes );
-
- // 璁㈠崟闇�姹�-18
- CustomerOrder::DoSync( macroPlan, businessTypes );
-
- //// todo 渚涘簲鍟嗚兘鍔�
- //info( "ProviderCapacity::DoSync" )
-
- //// todo 渚涘簲鍟嗗洖澶�
- //info( "ProviderReply::DoSync" )
- *]
-}
diff --git "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl" "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043331.qbl"
similarity index 72%
rename from "_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl"
rename to "_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043331.qbl"
index c3d0398..dc03063 100644
--- "a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync\043618.qbl"
+++ "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043331.qbl"
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
-StaticMethod DoSync (
+StaticMethod DoSyncNew (
MacroPlan macroPlan,
+ MPSync mpSync,
String businessTypeStr,
Boolean isKeyProduct,
Boolean createPurchaseSupplyMaterial
@@ -15,6 +16,6 @@
if( businessTypeStr.Length() > 0 ) {
businessTypes := businessTypeStr.Tokenize( ',' );
}
- MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ MacroPlan::DoSyncNew( macroPlan, mpSync, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
*]
}
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043821.qbl"
similarity index 63%
rename from _Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl
rename to "_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043821.qbl"
index 4609620..c7824af 100644
--- a/_Main/BL/Type_MacroPlan/StaticMethod_DoSync.qbl
+++ "b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew\043821.qbl"
@@ -1,7 +1,8 @@
Quintiq file version 2.0
#parent: #root
-StaticMethod DoSync (
+StaticMethod DoSyncNew (
MacroPlan macroPlan,
+ MPSync mpSync,
Boolean isKeyProduct,
Boolean createPurchaseSupplyMaterial
)
@@ -11,6 +12,6 @@
[*
// yypsybs Aug-17-2023 (created)
businessTypes := construct( Strings );
- MacroPlan::DoSync( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ MacroPlan::DoSyncNew( macroPlan, mpSync, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
*]
}
diff --git a/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew.qbl b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew.qbl
new file mode 100644
index 0000000..a66613b
--- /dev/null
+++ b/_Main/BL/Type_MacroPlan/StaticMethod_DoSyncNew.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod DoSyncNew (
+ MacroPlan macroPlan,
+ MPSync mpSync,
+ Strings businessTypes,
+ Boolean isKeyProduct,
+ Boolean createPurchaseSupplyMaterial
+)
+{
+ Description: '鍗曟鍚屾'
+ TextBody:
+ [*
+ // yypsybs Aug-31-2023 (created)
+ mpSync.ImportDBDataCustom( macroPlan, businessTypes, isKeyProduct, createPurchaseSupplyMaterial );
+ *]
+}
diff --git a/_Main/BL/Type_MappingBOM/Attribute_DescriptionOfAlternativeMaterial.qbl b/_Main/BL/Type_MappingBOM/Attribute_DescriptionOfAlternativeMaterial.qbl
deleted file mode 100644
index d0064b7..0000000
--- a/_Main/BL/Type_MappingBOM/Attribute_DescriptionOfAlternativeMaterial.qbl
+++ /dev/null
@@ -1,7 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Attribute DescriptionOfAlternativeMaterial
-{
- #keys: '3[412960.0.86934734][412960.0.86934733][412960.0.86934735]'
- ValueType: String
-}
diff --git a/_Main/BL/Type_MappingOperation/StaticMethod_FindMinSeq.qbl b/_Main/BL/Type_MappingOperation/StaticMethod_FindMinSeq.qbl
index 74aadb6..4b74ebe 100644
--- a/_Main/BL/Type_MappingOperation/StaticMethod_FindMinSeq.qbl
+++ b/_Main/BL/Type_MappingOperation/StaticMethod_FindMinSeq.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod FindMinSeq (
- MacroPlan macroPlan,
+ MPSync mpSync,
String orgCode,
String productId,
String processSection
@@ -10,7 +10,7 @@
TextBody:
[*
// yypsybs Aug-22-2023 (created)
- return guard (min( macroPlan, MappingOperation, item,
+ return guard (min( mpSync, MappingOperation, item,
item.OrganCode() = orgCode and item.ProductID() = productId and item.ProcessSection() = processSection,
item.SequenceNumber() ), Number::MinNumber() );
*]
diff --git a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
deleted file mode 100644
index ef1ffae..0000000
--- a/_Main/BL/Type_SalesSegment_MP/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan,
- Strings businessTypes
-)
-{
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- 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 );
- *]
-}
diff --git a/_Main/BL/Type_Unit/StaticMethod_NewStaticMethod.qbl b/_Main/BL/Type_Unit/StaticMethod_NewStaticMethod.qbl
deleted file mode 100644
index 341c388..0000000
--- a/_Main/BL/Type_Unit/StaticMethod_NewStaticMethod.qbl
+++ /dev/null
@@ -1,19 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod NewStaticMethod (
- MacroPlan macroPlan,
- String unitid,
- String unitname,
- String parentid,
- String capacitytype,
- String unitofmeasurename,
- String currencyid,
- Date startdate,
- Date enddate
-)
-{
- TextBody:
- [*
- // Administrator Sep-1-2023 (created)
- *]
-}
diff --git a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl b/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
deleted file mode 100644
index f5ea0a0..0000000
--- a/_Main/BL/Type_UnitOfMeasure_MP/StaticMethod_DoSync.qbl
+++ /dev/null
@@ -1,16 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-StaticMethod DoSync (
- MacroPlan macroPlan
-)
-{
- Description: '鍗曟鍚屾'
- TextBody:
- [*
- // yypsybs Aug-17-2023 (created)
- 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();
- *]
-}
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
index 6253182..907d127 100644
--- a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_TIANMA_JITUAN_mbMainMenu_MenuDoSync_OnClick.def
@@ -5,11 +5,11 @@
#keys: '[414384.0.605664178]'
Body:
[*
- MacroPlan::DoSync( MacroPlan,false,false);
+ MacroPlan::DoSyncNew( MacroPlan, MPSync, false,false );
*]
DefinitionID: 'Responsedef_Menu_OnClick'
Precondition:
[*
- return not isnull( MacroPlan );
+ return not isnull( MacroPlan ) and not isnull( MPSync );
*]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
index e97d405..1bbb117 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditScenario/Method_OnOk.def
@@ -87,15 +87,15 @@
}
}
- macroPlanNew := MacroPlan;
- ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
-
// sync data
if( data.EnableSync() ) {
- MacroPlan::DoSync( macroPlanNew,
+ MacroPlan::DoSyncNew( DataHolderMacroPlanner.Data(), MPSync,
data.BusinessType(), data.IsKeyProduct(), data.CreatePurchaseSupplyMaterial() );
}
+ macroPlanNew := MacroPlan;
+ ManufactureLTImputation::Transfer( macroPlanOld, macroPlanNew );
+
this.Close();
*]
}
--
Gitblit v1.9.3