From f0b5a93331432794466e54d10d77f837a61d37fa Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期三, 23 十月 2024 19:02:20 +0800
Subject: [PATCH] 大连料架报表优化
---
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp | 10 +++++-----
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl | 4 ++--
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl | 10 ++++++++++
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl | 27 ++++++++++++++++++++-------
4 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
index 22afbd5..40e0407 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -130,6 +130,16 @@
tempPISPIP.PlannedInventoryLevelEnd() );
cell.DLRentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - plannedInventory1 ) / lce.PackagingCapacity(), 0 ) * guard( lcmr.StoragePrice(), 1 ) ) );
+ // CC澶栫搴撴竻娲楄垂鐢細鍙戝姩鏈哄叆搴撻噺 / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
+ clearnQuantity := 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() - 2 ).Year() = dlerc.StartDate().Year() and
+ ( tempF.StartDate() - 2 ).Month() = dlerc.StartDate().Month(),
+ tempF.FulfilledQuantity() );
+ cell.CleaningCost( [Number] ( guard( clearnQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
+
// DL澶栫搴撴竻娲楄垂鐢細鍙戝姩鏈哄叆搴撻噺 / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
cell.CleaningCost( [Number] ( guard( outboundQuantity / lce.PackagingCapacity(), 0 ) * guard( lcmr.CleanPrice(), 1 ) ) );
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
index 8cf8a6a..6033430 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
@@ -25,7 +25,7 @@
firstCell.SetAttribute( "value", dlerr.Name() );
firstColumn.AppendChild( firstCell );
- for ( i := 0; i < 14; i++ ) {
+ for ( i := 0; i < 17; i++ ) {
firstCell := xmlDOM.CreateElement( "cell" );
firstCell.SetAttribute( "value", "" );
firstColumn.AppendChild( firstCell );
@@ -36,8 +36,9 @@
// 绗簩鍒�
attrs := construct( Strings ); attrs.Add( "鏂欐灦鎬绘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "CC澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "CC澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "CC澶栫搴撲粨鍌ㄨ垂鐢�" );
- attrs.Add( "CC闀块�旇繍杈撹垂鐢�" ); attrs.Add( "CC鐭�旇繍杈撹垂鐢�" ); attrs.Add( "DL澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撹繍杈撹垂鐢�" );
- attrs.Add( "澶栫搴撲粨鍌ㄨ垂鐢�" ); attrs.Add( "娓呮礂璐圭敤" ); attrs.Add( "棰勮鎬昏垂鐢�" ); attrs.Add( "绯绘暟" ); attrs.Add( "鎬昏垂鐢�" );
+ attrs.Add( "CC鐭�旇繍杈撹垂鐢�" ); attrs.Add( "CC澶栫搴撴竻娲楄垂鐢�" ); attrs.Add( "DL澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "DL澶栫搴撹繍杈撹垂鐢�" );
+ attrs.Add( "DL澶栫搴撲粨鍌ㄨ垂鐢�" ); attrs.Add( "DL澶栫搴撴竻娲楄垂鐢�" ); attrs.Add( "DL澶栫搴撴枡鏋惰垂鐢�" ); attrs.Add( "CC澶栫搴揇L鏂欐灦璐圭敤" );
+ attrs.Add( "涓ゅ巶闂存枡鏋惰繍杈撹垂鐢�" ); attrs.Add( "棰勮鎬昏垂鐢�" ); attrs.Add( "绯绘暟" ); attrs.Add( "鎬昏垂鐢�" );
secondColumn := xmlDOM.CreateElement( "column" );
secondName := xmlDOM.CreateElement( "name" );
secondType := xmlDOM.CreateElement( "type" );
@@ -87,11 +88,11 @@
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // CC闀块�旇繍杈撹垂鐢�
+ cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC鐭�旇繍杈撹垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC鐭�旇繍杈撹垂鐢�
+ cell.SetAttribute( "value", [String]c.CCCleaningCost().Round( 0 ) ); // CC澶栫搴撴竻娲楄垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
@@ -107,11 +108,23 @@
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // 澶栫搴撲粨鍌ㄨ垂鐢�
+ cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // DL澶栫搴撲粨鍌ㄨ垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // 娓呮礂璐圭敤
+ cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // DL澶栫搴撴竻娲楄垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.DLRentalWarehouseMaterialRackCost().Round( 0 ) ); // DL澶栫搴撴枡鏋惰垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCExternalRentalWarehouseDLMaterialRackCost().Round( 0 ) ); // CC澶栫搴揇L鏂欐灦璐圭敤
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // 涓ゅ巶闂存枡鏋惰繍杈撹垂鐢�
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
index fc6b28d..190af16 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
@@ -78,12 +78,12 @@
cell.IsDLExternalRentalWarehouseTransportationCosts( true );
}
cell.DLExternalRentalWarehouseTransportationCosts( [Real]cellValue );
- } else if ( attributeUpdateFlag = "澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
+ } else if ( attributeUpdateFlag = "DL澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
if ( not cell.IsDLRentalWarehouseStorageFees() and cell.DLRentalWarehouseStorageFees() <> [Real]cellValue ) {
cell.IsDLRentalWarehouseStorageFees( true );
}
cell.DLRentalWarehouseStorageFees( [Real]cellValue );
- } else if ( attributeUpdateFlag = "娓呮礂璐圭敤" and not isnull( cell ) ) {
+ } else if ( attributeUpdateFlag = "DL澶栫搴撴竻娲楄垂鐢�" and not isnull( cell ) ) {
if ( not cell.IsCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
cell.IsCleaningCost( true );
}
diff --git a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
index af90d6d..5775317 100644
--- a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -2,6 +2,11 @@
#parent: #root
TypeRepresentation DL_EngineRackCell
{
+ AttributeRepresentation CCCleaningCost
+ {
+ AttributeKey: '[415754.0.513823109]'
+ Synonym: 'CC澶栫搴撴竻娲楄垂鐢�'
+ }
AttributeRepresentation CCExternalRentalWarehouseDLMaterialRackCost
{
AttributeKey: '[415754.0.481133918]'
@@ -230,11 +235,6 @@
InheritConversion: false
}
]
- }
- AttributeRepresentation IsCleaningCost
- {
- AttributeKey: '[415754.0.459256980]'
- Synonym: 'CC澶栫搴撴竻娲楄垂鐢�'
}
AttributeRepresentation NumberOfEmptyShelves
{
--
Gitblit v1.9.3