From 531bf2d5dc98162aa050d03cba99a71c7ffb47d5 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期三, 23 十月 2024 18:19:37 +0800
Subject: [PATCH] 大连料架优化
---
_Main/BL/Type_DL_EngineRackCell/Attribute_CCCleaningCost.qbl | 8 ++++
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCCleaningCost.qbl | 8 ++++
_Main/BL/Type_DL_EngineRackCell/Attribute_CleaningCost.qbl | 2
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp | 43 ++++++++++++++++++++-
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def | 2
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl | 26 ++++++++----
6 files changed, 75 insertions(+), 14 deletions(-)
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_CCCleaningCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_CCCleaningCost.qbl
new file mode 100644
index 0000000..cc022a7
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_CCCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute CCCleaningCost
+{
+ #keys: '3[415754.0.513823110][415754.0.513823109][415754.0.513823111]'
+ Description: '闀挎槬澶栫搴撴竻娲楄垂鐢�'
+ ValueType: Real
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_CleaningCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_CleaningCost.qbl
index 65b1569..1dbc644 100644
--- a/_Main/BL/Type_DL_EngineRackCell/Attribute_CleaningCost.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_CleaningCost.qbl
@@ -3,6 +3,6 @@
Attribute CleaningCost
{
#keys: '3[413988.0.1488160070][413988.0.1488160069][413988.0.1488160071]'
- Description: '娓呮礂璐圭敤'
+ Description: '澶ц繛澶栫搴撴竻娲楄垂鐢�'
ValueType: Real
}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCCleaningCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCCleaningCost.qbl
new file mode 100644
index 0000000..7eabc95
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCCleaningCost
+{
+ #keys: '3[415754.0.513823146][415754.0.513823145][415754.0.513823147]'
+ Description: '闀挎槬澶栫搴撴竻娲楄垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
index 5df7805..22afbd5 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -34,7 +34,7 @@
and tempLCE.StartDate() <= dlerc.StartDate() and tempLCE.EndDate() >= dlerc.StartDate().StartOfNextMonth() );
// 鏂欐灦鎴愭湰鍙傛暟
- lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "澶ц繛宸ュ巶"
+ lcmr := select( macroPlan, LogisticsCostMaterialRack, tempLCMR, tempLCMR.Factory() = "闀挎槬宸ュ巶"
and tempLCMR.StartDate() <= dlerc.StartDate() and tempLCMR.EndDate() >= dlerc.StartDate().StartOfNextMonth() );
// 杩愯緭鎴愭湰鍙傛暟
@@ -95,11 +95,11 @@
// DL澶栫搴撳叆搴撹垂鐢細鍙戝姩鏈哄叆搴撻噺 / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級* 鏂欐灦鍏ュ簱鍗曚环
inventoryQuantity := sum( macroPlan, SalesDemand.astype( Forecast ), tempF,
- tempF.Product_MP().Generation() = dlerr.Generation() and
- tempF.Product_MP().MQBMLB() = dlerr.MLB_MQB() and
- tempF.StockingPointID() = "澶ц繛澶栫搴�" and
- tempF.StartDate().Year() = dlerc.StartDate().Year() and
- tempF.StartDate().Month() = dlerc.StartDate().Month(),
+ tempF.Product_MP().Generation() = dlerr.Generation() and
+ tempF.Product_MP().MQBMLB() = dlerr.MLB_MQB() and
+ tempF.StockingPointID() = "澶ц繛澶栫搴�" and
+ ( tempF.StartDate() - 2 ).Year() = dlerc.StartDate().Year() and
+ ( tempF.StartDate() - 2 ).Month() = dlerc.StartDate().Month(),
tempF.FulfilledQuantity() );
// info( "鏃堕棿锛�", dlerc.StartDate().Format( "Y-M2-D2" ), " 鍏ュ簱鏁伴噺锛�", inventoryQuantity, " 鍖呰瀹归噺锛�", guard( lce.PackagingCapacity(), 0 ),
// " 瑁呰浇瀹归噺锛�", guard( lct1.LoadingCapacity(), 0 ) ); // 娴嬭瘯杈撳嚭
@@ -109,7 +109,7 @@
outboundQuantity := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), tempPISPIPPL,
tempPISPIPPL.ProductInStockingPoint_MP().Product_MP().Generation() = dlerr.Generation() and
tempPISPIPPL.ProductInStockingPoint_MP().Product_MP().MQBMLB() = dlerr.MLB_MQB() and
- tempPISPIPPL.ProductInStockingPoint_MP().StockingPointID() = "澶ц繛澶栫搴�" and
+ tempPISPIPPL.ProductInStockingPoint_MP().StockingPointID() = "澶ц繛鍦哄唴搴�" and
tempPISPIPPL.Start().Date() >= dlerc.StartDate() and
tempPISPIPPL.End().Date() <= lastDayOfThisMonth,
tempPISPIPPL.NewSupplyQuantity() );
@@ -130,14 +130,22 @@
tempPISPIP.PlannedInventoryLevelEnd() );
cell.DLRentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - plannedInventory1 ) / lce.PackagingCapacity(), 0 ) * guard( lcmr.StoragePrice(), 1 ) ) );
- //娓呮礂璐圭敤锛氬彂鍔ㄦ満鍏ュ簱閲� / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
- cell.CleaningCost( [Number] ( guard( inventoryQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
+ // DL澶栫搴撴竻娲楄垂鐢細鍙戝姩鏈哄叆搴撻噺 / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
+ cell.CleaningCost( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
// 棰勮鎬昏垂鐢�
cell.EstimatedTotalCost( cell.CCStorageFeesForRentedWarehouses() + cell.CCOutboundExpensesForRentedWarehouses() + cell.CCRentalWarehouseStorageFees() + cell.CCLineHaulCost() +
cell.CCShortDistanceTransportationCosts() + cell.DLStorageFeesForRentedWarehouses() + cell.DLOutboundExpensesForRentedWarehouses() +
cell.DLExternalRentalWarehouseTransportationCosts() + cell.DLRentalWarehouseStorageFees() + cell.CleaningCost() );
+ // 澶ц繛澶栫搴撴枡鏋惰垂鐢�
+ cell.DLRentalWarehouseMaterialRackCost( cell.DLStorageFeesForRentedWarehouses() + cell.DLOutboundExpensesForRentedWarehouses() +
+ cell.DLExternalRentalWarehouseTransportationCosts() );
+
+ // CC澶栫搴揇L鏂欐灦璐圭敤
+ cell.CCExternalRentalWarehouseDLMaterialRackCost( cell.CCStorageFeesForRentedWarehouses() + cell.CCOutboundExpensesForRentedWarehouses() +
+ cell.CCRentalWarehouseStorageFees() + cell.CCShortDistanceTransportationCosts() );
+
// 绯绘暟
cell.Coefficient( 1.05 );
diff --git a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
index 4542a16..af90d6d 100644
--- a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -2,10 +2,26 @@
#parent: #root
TypeRepresentation DL_EngineRackCell
{
+ AttributeRepresentation CCExternalRentalWarehouseDLMaterialRackCost
+ {
+ AttributeKey: '[415754.0.481133918]'
+ Synonym: 'CC澶栫搴揇L鏂欐灦璐圭敤'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCExternalRentalWarehouseDLMaterialRackCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
+ }
AttributeRepresentation CCLineHaulCost
{
AttributeKey: '[413988.0.1488160126]'
- Synonym: 'CC闀块�旇繍杈撹垂鐢�'
+ Synonym: '涓ゅ巶闂存枡鏋惰繍杈撹垂鐢�'
Conditional:
[
DataRepresentation.Conditional
@@ -85,7 +101,7 @@
AttributeRepresentation CleaningCost
{
AttributeKey: '[413988.0.1488160069]'
- Synonym: '娓呮礂璐圭敤'
+ Synonym: 'DL澶栫搴撴竻娲楄垂鐢�'
Conditional:
[
DataRepresentation.Conditional
@@ -151,10 +167,26 @@
}
]
}
+ AttributeRepresentation DLRentalWarehouseMaterialRackCost
+ {
+ AttributeKey: '[415754.0.481133881]'
+ Synonym: 'DL澶栫搴撴枡鏋惰垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsDLRentalWarehouseMaterialRackCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
+ }
AttributeRepresentation DLRentalWarehouseStorageFees
{
AttributeKey: '[413988.0.1488160103]'
- Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+ Synonym: 'DL澶栫搴撲粨鍌ㄨ垂鐢�'
Conditional:
[
DataRepresentation.Conditional
@@ -199,6 +231,11 @@
}
]
}
+ AttributeRepresentation IsCleaningCost
+ {
+ AttributeKey: '[415754.0.459256980]'
+ Synonym: 'CC澶栫搴撴竻娲楄垂鐢�'
+ }
AttributeRepresentation NumberOfEmptyShelves
{
AttributeKey: '[413988.0.1488160058]'
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
index 353785c..98d36c9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
@@ -26,7 +26,7 @@
]
Properties:
[
- Attributes: 'TotalQuantityOfMaterialRacks;NumberOfEmptyShelves;CCStorageFeesForRentedWarehouses;CCOutboundExpensesForRentedWarehouses;CCRentalWarehouseStorageFees;CCLineHaulCost;CCShortDistanceTransportationCosts;DLStorageFeesForRentedWarehouses;DLOutboundExpensesForRentedWarehouses;DLExternalRentalWarehouseTransportationCosts;DLRentalWarehouseStorageFees;CleaningCost;EstimatedTotalCost;Coefficient;TotalCost'
+ Attributes: 'TotalQuantityOfMaterialRacks;NumberOfEmptyShelves;CCStorageFeesForRentedWarehouses;CCOutboundExpensesForRentedWarehouses;CCRentalWarehouseStorageFees;CCShortDistanceTransportationCosts;CCCleaningCost;DLStorageFeesForRentedWarehouses;DLOutboundExpensesForRentedWarehouses;DLExternalRentalWarehouseTransportationCosts;DLRentalWarehouseStorageFees;CleaningCost;DLRentalWarehouseMaterialRackCost;CCExternalRentalWarehouseDLMaterialRackCost;CCLineHaulCost;EstimatedTotalCost;Coefficient;TotalCost'
Column: 'DL_EngineRackColumn'
Row: 'DL_EngineRackRow'
Taborder: 0
--
Gitblit v1.9.3