From 9e75417aab6ab66f28a2e1bc93c7e4b412b40990 Mon Sep 17 00:00:00 2001
From: admin <admin@admin.com>
Date: 星期六, 19 十月 2024 19:42:02 +0800
Subject: [PATCH] 长春&大连料架报表优化
---
_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl | 2
_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl | 8
_Main/Sys/Repr/Global/CC_EngineRackCell.qrp | 107 ++++
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl | 8
_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl | 2
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def | 19
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl | 144 ++++++
_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl | 13
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl | 8
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def | 19
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl | 8
_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw | 157 ++++++
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl | 8
_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl | 49 ++
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl | 8
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl | 8
_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl | 78 +++
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def | 2
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def | 22
_Main/Sys/Repr/Global/DL_EngineRackCell.qrp | 162 +++++++
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl | 8
_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl | 111 ++++
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl | 8
_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl | 11
_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl | 60 +-
_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def | 19
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl | 8
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl | 8
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl | 8
_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl | 8
_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl | 25 +
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl | 8
_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def | 19
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick#593.def | 45 +
_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl | 8
_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl | 8
/dev/null | 13
_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl | 8
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def | 2
_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl | 8
_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl | 11
_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick#844.def | 22
53 files changed, 1,292 insertions(+), 54 deletions(-)
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl
new file mode 100644
index 0000000..fb7651e
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateCleaningCost
+{
+ #keys: '3[415754.0.459255955][415754.0.459255954][415754.0.459255956]'
+ Description: '娓呮礂璐圭敤鏇存柊鍊�'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl
new file mode 100644
index 0000000..5dd4ab0
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateCoefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateCoefficient
+{
+ #keys: '3[415754.0.459231854][415754.0.459231853][415754.0.459231855]'
+ Description: '绯绘暟鏇存柊鍊�'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl
new file mode 100644
index 0000000..00d21a4
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateEstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateEstimatedTotalCost
+{
+ #keys: '3[415754.0.459255992][415754.0.459255991][415754.0.459255993]'
+ Description: '棰勮鎬昏垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
new file mode 100644
index 0000000..8c5bf88
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateExternalRentalWarehouseTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateExternalRentalWarehouseTransportationCosts
+{
+ #keys: '3[415754.0.459255918][415754.0.459255917][415754.0.459255919]'
+ Description: '澶栫搴撹繍杈撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl
new file mode 100644
index 0000000..770e680
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateNumberOfEmptyShelves.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateNumberOfEmptyShelves
+{
+ #keys: '3[415754.0.459255802][415754.0.459255801][415754.0.459255803]'
+ Description: '绌烘枡鏋舵暟閲忚窡鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..4ce6fc1
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateOutboundExpensesForRentedWarehouses
+{
+ #keys: '3[415754.0.459255881][415754.0.459255880][415754.0.459255882]'
+ Description: '澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..8381b8f
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateRentalWarehouseStorageFees
+{
+ #keys: '3[415754.0.459215185][415754.0.459215184][415754.0.459215186]'
+ Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..de2556d
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateStorageFeesForRentedWarehouses
+{
+ #keys: '3[415754.0.459255844][415754.0.459255843][415754.0.459255845]'
+ Description: '澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl
new file mode 100644
index 0000000..294f7ff
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTotalCost
+{
+ #keys: '3[415754.0.459256029][415754.0.459256028][415754.0.459256030]'
+ Description: '鎬昏垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl
new file mode 100644
index 0000000..0e9c3b8
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackCell/Attribute_IsUpdateTotalQuantityOfMaterialRacks.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsUpdateTotalQuantityOfMaterialRacks
+{
+ #keys: '3[415754.0.459231812][415754.0.459231811][415754.0.459231813]'
+ Description: '鏂欐灦鎬绘暟閲忔洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
index 7504705..567b121 100644
--- a/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -9,6 +9,17 @@
[*
this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
- this.NumberOfEmptyShelves( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() );
+ // 绌烘枡鏋舵暟閲忚仈鍔�
+ this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
+
+ // SUM琛岃仈鍔�
+ cell := select( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" );
+ cell.TotalQuantityOfMaterialRacks( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( this, CC_EngineRackColumn.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
+
+ // SUM鍒楄仈鍔�
+ cell := select( this, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackColumn().DisplayName() = "SUM" );
+ cell.TotalQuantityOfMaterialRacks( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( this,CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
*]
}
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
index 180d987..fcff038 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_CreateData.qbl
@@ -9,15 +9,6 @@
macroPlan.CC_EngineRackRow( relflush );
macroPlan.CC_EngineRackColumn( relflush );
- sumNumberOfEmptyShelves := 0.0;
- sumStorageFeesForRentedWarehouses := 0.0;
- sumOutboundExpensesForRentedWarehouses := 0.0;
- sumExternalRentalWarehouseTransportationCosts := 0.0;
- sumRentalWarehouseStorageFees := 0.0;
- sumCleaningCost := 0.0;
- sumEstimatedTotalCost := 0.0;
- sumTotalCost := 0.0;
-
// 鍒涘缓琛�
genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() );
mqbmlbs := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() );
@@ -67,7 +58,6 @@
cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
cell.PlannedInventory( plannedInventory );
cell.NumberOfEmptyShelves( guard( [Number] ( cell.TotalQuantityOfMaterialRacks() - ( plannedInventory / lce.PackagingCapacity() ) ), 0 ) );
- sumNumberOfEmptyShelves := sumNumberOfEmptyShelves + cell.NumberOfEmptyShelves();
// 澶栫搴撳叆搴撹垂鐢紙鍙戝姩鏈洪攢閲� / 鍖呰瀹归噺[鍚戜笂鍙栨暣] * 鏂欐灦鍏ュ簱鍗曚环锛�
engineSales := sum( macroPlan, FSImportData, tempFSID,
@@ -78,7 +68,6 @@
tempFSID.StartDate().Month() = ccerc.StartDate().Month(),
tempFSID.Quantity() );
cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) );
- sumStorageFeesForRentedWarehouses := sumStorageFeesForRentedWarehouses + cell.StorageFeesForRentedWarehouses();
// 澶栫搴撳嚭搴撹垂鐢紙鍙戝姩鏈轰骇閲� / 鍖呰瀹归噺[鍚戜笂鍙栨暣] * 鏂欐灦鍑哄簱鍗曚环锛�
engineProductions := sum( macroPlan, FPImportData, tempFPID,
@@ -88,8 +77,7 @@
tempFPID.StartDate().Year() = ccerc.StartDate().Year() and
tempFPID.StartDate().Month() = ccerc.StartDate().Month(),
tempFPID.Quantity() );
- cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) ) * guard( lcmr.OutboundPrice(), 1 ) );
- sumOutboundExpensesForRentedWarehouses := sumOutboundExpensesForRentedWarehouses + cell.OutboundExpensesForRentedWarehouses();
+ cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.OutboundPrice(), 1 ) ) );
// 澶栫搴撹繍杈撹垂鐢細鍙戝姩鏈鸿繍杈撻噺 / 鍖呰瀹归噺 / 瑁呰浇瀹归噺锛堝悜涓婂彇鏁达級 * 鏂欐灦杩愯緭鍗曚环
transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT,
@@ -103,16 +91,13 @@
);
// info( "鏃堕棿锛�", ccerc.StartDate().Format( "Y-M2-D2" ), " 杩愯緭鏁版嵁锛�", transportationQuantity, " 杩愯緭鍗曚环锛�", lct.TransportPrice() );
cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) );
- sumExternalRentalWarehouseTransportationCosts := sumExternalRentalWarehouseTransportationCosts + cell.ExternalRentalWarehouseTransportationCosts();
// 澶栫搴撲粨鍌ㄨ垂鐢細鏂欐灦鎬绘暟閲� - 鍙戝姩鏈哄簱瀛� / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級锛屽啀涔樹互绌烘枡鏋朵粨鍌ㄥ崟浠峰緱鍒扮┖鏂欐灦浠撳偍璐圭敤銆傚彂鍔ㄦ満搴撳瓨鍙朅ctual inventories閲屽彇鍒伴暱鏄ュ绉熷簱璇ュ彂鍔ㄦ満鐨勪粨鍌ㄩ噺锛屾枡鏋舵�绘暟閲忛渶瑕佹墜鍔ㄧ淮鎶ゃ��
cell.UnitPriceOfEmptyShelfStorage( lcmr.StoragePrice() );
cell.RentalWarehouseStorageFees( [Number] ( guard( ( cell.TotalQuantityOfMaterialRacks() - [Number]( plannedInventory / lce.PackagingCapacity() ) ) * lcmr.StoragePrice(), 0 ) ) );
- sumRentalWarehouseStorageFees := sumRentalWarehouseStorageFees + cell.RentalWarehouseStorageFees();
// 娓呮礂璐圭敤锛氬彂鍔ㄦ満鍏ュ簱閲� / 鍖呰瀹归噺 * 鏂欐灦娓呮礂鍗曚环銆傚彂鍔ㄦ満鍏ュ簱閲忓彇鍙戝姩鏈洪攢閲忥紝鍖呰瀹归噺鍙栬嚜鍙戝姩鏈烘垚鏈〃銆傛枡鏋舵竻娲楀崟浠峰彇鏂欐灦鎴愭湰琛ㄣ��
cell.CleaningCost( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) * lcmr.CleanPrice() ) );
- sumCleaningCost := sumCleaningCost + cell.CleaningCost();
// 棰勮鎬昏垂鐢�
cell.EstimatedTotalCost( cell.StorageFeesForRentedWarehouses() +
@@ -121,34 +106,49 @@
cell.RentalWarehouseStorageFees() +
cell.CleaningCost()
);
- sumEstimatedTotalCost := sumEstimatedTotalCost + cell.EstimatedTotalCost();
// 绯绘暟
cell.Coefficient( 1.05 );
// 鎬昏垂鐢�
- cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
- sumTotalCost := sumTotalCost + cell.TotalCost();
+ cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
cell.CC_EngineRackColumn( relset, ccerc );
}
}
// 鍒涘缓SUM琛�
- sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
+ sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
traverse ( macroPlan, CC_EngineRackColumn, ccerc ) {
cell := sumR.CC_EngineRackCell( relnew );
-
- cell.NumberOfEmptyShelves( sumNumberOfEmptyShelves );
- cell.StorageFeesForRentedWarehouses( sumStorageFeesForRentedWarehouses );
- cell.OutboundExpensesForRentedWarehouses( sumOutboundExpensesForRentedWarehouses );
- cell.ExternalRentalWarehouseTransportationCosts( sumExternalRentalWarehouseTransportationCosts );
- cell.RentalWarehouseStorageFees( sumRentalWarehouseStorageFees );
- cell.CleaningCost( sumCleaningCost );
- cell.EstimatedTotalCost( sumEstimatedTotalCost );
- cell.TotalCost( sumTotalCost );
-
cell.CC_EngineRackColumn( relset, ccerc );
+
+ cell.NumberOfEmptyShelves( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.NumberOfEmptyShelves() ) );
+ cell.StorageFeesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.StorageFeesForRentedWarehouses() ) );
+ cell.OutboundExpensesForRentedWarehouses( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
+ cell.ExternalRentalWarehouseTransportationCosts( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
+ cell.RentalWarehouseStorageFees( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.RentalWarehouseStorageFees() ) );
+ cell.CleaningCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.CleaningCost() ) );
+ cell.EstimatedTotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.EstimatedTotalCost() ) );
+ cell.Coefficient( 1.05 );
+ cell.TotalCost( sum( ccerc, CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() <> "SUM", tempCCERCell.TotalCost() ) );
+ }
+
+ // 鍒涘缓SUM鍒�
+ sumC := macroPlan.CC_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
+ traverse ( macroPlan, CC_EngineRackRow, ccerr ) {
+ cell := ccerr.CC_EngineRackCell( relnew );
+ cell.CC_EngineRackColumn( relset, sumC );
+
+ cell.NumberOfEmptyShelves( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.NumberOfEmptyShelves() ) );
+ cell.StorageFeesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.StorageFeesForRentedWarehouses() ) );
+ cell.OutboundExpensesForRentedWarehouses( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.OutboundExpensesForRentedWarehouses() ) );
+ cell.ExternalRentalWarehouseTransportationCosts( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.ExternalRentalWarehouseTransportationCosts() ) );
+ cell.RentalWarehouseStorageFees( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.RentalWarehouseStorageFees() ) );
+ cell.CleaningCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.CleaningCost() ) );
+ cell.EstimatedTotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.EstimatedTotalCost() ) );
+ cell.Coefficient( 1.05 );
+ cell.TotalCost( sum( ccerr, CC_EngineRackCell, tempCCERCell, not tempCCERCell.CC_EngineRackColumn().StartDate().IsMaxInfinity(), tempCCERCell.TotalCost() ) );
}
*]
}
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
index 1d83bd4..895569d 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Export.qbl
@@ -35,7 +35,7 @@
// 绗簩鍒�
- attrs := construct( Strings ); attrs.Add( "鏂欐灦绌烘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "澶栫搴撹繍杈撹垂鐢�" );
+ attrs := construct( Strings ); attrs.Add( "鏂欐灦鎬绘暟閲�" ); attrs.Add( "绌烘枡鏋舵暟閲�" ); attrs.Add( "澶栫搴撳叆搴撹垂鐢�" ); attrs.Add( "澶栫搴撳嚭搴撹垂鐢�" ); attrs.Add( "澶栫搴撹繍杈撹垂鐢�" );
attrs.Add( "澶栫搴撲粨鍌ㄨ垂鐢�" ); attrs.Add( "娓呮礂璐圭敤" ); attrs.Add( "棰勮鎬昏垂鐢�" ); attrs.Add( "绯绘暟" ); attrs.Add( "鎬昏垂鐢�" );
secondColumn := xmlDOM.CreateElement( "column" );
secondName := xmlDOM.CreateElement( "name" );
@@ -59,8 +59,8 @@
cellColumn := xmlDOM.CreateElement( "column" );
cellName := xmlDOM.CreateElement( "name" );
cellType := xmlDOM.CreateElement( "type" );
- cellName.TextContent( cerc.StartDate().Format( "M2/D2/Y" ) );
- cellType.TextContent( "Number" );
+ cellName.TextContent( cerc.DisplayName() );
+ cellType.TextContent( "Real" );
cellColumn.AppendChild( cellName );
cellColumn.AppendChild( cellType );
cells := selectsortedset( cerc, CC_EngineRackCell, tempCELL, true, tempCELL.CC_EngineRackRow().Index(), tempCELL.CC_EngineRackRow().Name() );
@@ -98,7 +98,7 @@
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
- cell.SetAttribute( "value", [String]c.Coefficient().Round( 0 ) ); // 绯绘暟
+ cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // 绯绘暟
cellColumn.AppendChild( cell );
cell := xmlDOM.CreateElement( "cell" );
diff --git a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
index ab510db..4fca189 100644
--- a/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_CC_EngineRackCell/StaticMethod_Import.qbl
@@ -5,5 +5,81 @@
GeneralExcelImportAndExportDataTable table
)
{
- TextBody: '//traverse ('
+ TextBody:
+ [*
+ isUpdateFlag := "";
+ attributeUpdateFlag := "";
+
+ traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
+ traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
+ // 鍗曞厓鏍煎��
+ cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
+ // 闀挎槬鏂欐灦鎶ヨ〃鍒�
+ ccerc := select( macroPlan, CC_EngineRackColumn, tempCCERC, tempCCERC.DisplayName() = column.Name() );
+ cell := select( macroPlan, CC_EngineRackRow.CC_EngineRackCell, tempCCERCell, tempCCERCell.CC_EngineRackRow().Generation() = "SUM" and tempCCERCell.CC_EngineRackColumn() = ccerc );
+
+ if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
+ isUpdateFlag := cellValue;
+ }
+
+ if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
+ attributeUpdateFlag := cellValue;
+ }
+
+ if ( isUpdateFlag = "SUM" ) {
+ if ( attributeUpdateFlag = "鏂欐灦鎬绘暟閲�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
+ cell.IsUpdateTotalQuantityOfMaterialRacks( true );
+ }
+ cell.TotalQuantityOfMaterialRacks( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "绌烘枡鏋舵暟閲�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
+ cell.IsUpdateNumberOfEmptyShelves( true );
+ }
+ cell.NumberOfEmptyShelves( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "澶栫搴撳叆搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateStorageFeesForRentedWarehouses() and cell.StorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsUpdateStorageFeesForRentedWarehouses( true );
+ }
+ cell.StorageFeesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "澶栫搴撳嚭搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateOutboundExpensesForRentedWarehouses() and cell.OutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsUpdateOutboundExpensesForRentedWarehouses( true );
+ }
+ cell.OutboundExpensesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "澶栫搴撹繍杈撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateExternalRentalWarehouseTransportationCosts() and cell.ExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
+ cell.IsUpdateExternalRentalWarehouseTransportationCosts( true );
+ }
+ cell.ExternalRentalWarehouseTransportationCosts( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateRentalWarehouseStorageFees() and cell.RentalWarehouseStorageFees() <> [Real]cellValue ) {
+ cell.IsUpdateRentalWarehouseStorageFees( true );
+ }
+ cell.RentalWarehouseStorageFees( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "娓呮礂璐圭敤" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
+ cell.IsUpdateCleaningCost( true );
+ }
+ cell.CleaningCost( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "棰勮鎬昏垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
+ cell.IsUpdateEstimatedTotalCost( true );
+ }
+ cell.EstimatedTotalCost( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "绯绘暟" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
+ cell.IsUpdateCoefficient( true );
+ }
+ cell.Coefficient( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "鎬昏垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsUpdateTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
+ cell.IsUpdateTotalCost( true );
+ }
+ cell.TotalCost( [Real]cellValue );
+ }
+ }
+ }
+ }
+ *]
}
diff --git a/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl b/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl
new file mode 100644
index 0000000..a12b7a8
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackColumn/Attribute_DisplayName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DisplayName
+{
+ #keys: '3[415754.0.459254726][415754.0.459254725][415754.0.459254727]'
+ Description: '鍒楁樉绀�'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl b/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl
new file mode 100644
index 0000000..fea962d
--- /dev/null
+++ b/_Main/BL/Type_CC_EngineRackColumn/Function_CalcDisplayName.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcDisplayName
+{
+ TextBody:
+ [*
+ value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
+
+ this.DisplayName( value );
+ *]
+}
diff --git a/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl b/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
index cc3f7b8..64e6dfc 100644
--- a/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
+++ b/_Main/BL/Type_CC_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
[*
// lihongji Aug-12-2024 (created)
- value := this.Generation() + " " + this.MLB_MQB();
+ value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
this.Name( value );
*]
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl
new file mode 100644
index 0000000..9678765
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCLineHaulCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCLineHaulCost
+{
+ #keys: '3[415754.0.459222291][415754.0.459222290][415754.0.459222292]'
+ Description: 'CC闀块�旇繍杈撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..ae42526
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCOutboundExpensesForRentedWarehouses
+{
+ #keys: '3[415754.0.459256613][415754.0.459256612][415754.0.459256614]'
+ Description: 'CC澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..77be3e8
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCRentalWarehouseStorageFees
+{
+ #keys: '3[415754.0.459256657][415754.0.459256656][415754.0.459256658]'
+ Description: 'CC澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl
new file mode 100644
index 0000000..07e6841
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCShortDistanceTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCShortDistanceTransportationCosts
+{
+ #keys: '3[415754.0.459256731][415754.0.459256730][415754.0.459256732]'
+ Description: 'CC鐭�旇繍杈撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..7bece2a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCCStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCCStorageFeesForRentedWarehouses
+{
+ #keys: '3[415754.0.459256569][415754.0.459256568][415754.0.459256570]'
+ Description: 'CC澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl
new file mode 100644
index 0000000..5b3a854
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCleaningCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCleaningCost
+{
+ #keys: '3[415754.0.459256981][415754.0.459256980][415754.0.459256982]'
+ Description: '娓呮礂璐圭敤鏇存柊鍊�'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl
new file mode 100644
index 0000000..137a894
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsCoefficient.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsCoefficient
+{
+ #keys: '3[415754.0.459257069][415754.0.459257068][415754.0.459257070]'
+ Description: '绯绘暟鏇存柊鍊�'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl
new file mode 100644
index 0000000..f638db1
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLExternalRentalWarehouseTransportationCosts.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLExternalRentalWarehouseTransportationCosts
+{
+ #keys: '3[415754.0.459256937][415754.0.459256936][415754.0.459256938]'
+ Description: 'DL澶栫搴撹繍杈撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl
new file mode 100644
index 0000000..2edbd6a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLOutboundExpensesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLOutboundExpensesForRentedWarehouses
+{
+ #keys: '3[415754.0.459256863][415754.0.459256862][415754.0.459256864]'
+ Description: 'DL澶栫搴撳嚭搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl
new file mode 100644
index 0000000..733d715
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLRentalWarehouseStorageFees.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLRentalWarehouseStorageFees
+{
+ #keys: '3[415754.0.459256775][415754.0.459256774][415754.0.459256776]'
+ Description: '澶栫搴撲粨鍌ㄨ垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl
new file mode 100644
index 0000000..5d623f8
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsDLStorageFeesForRentedWarehouses.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsDLStorageFeesForRentedWarehouses
+{
+ #keys: '3[415754.0.459256819][415754.0.459256818][415754.0.459256820]'
+ Description: 'DL澶栫搴撳叆搴撹垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl
new file mode 100644
index 0000000..6c9ebc6
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsEstimatedTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsEstimatedTotalCost
+{
+ #keys: '3[415754.0.459257025][415754.0.459257024][415754.0.459257026]'
+ Description: '棰勮鎬昏垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl
new file mode 100644
index 0000000..1a2677d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsNumberOfEmptyShelves.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsNumberOfEmptyShelves
+{
+ #keys: '3[415754.0.459256525][415754.0.459256524][415754.0.459256526]'
+ Description: '绌烘枡鏋舵暟閲忔洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl
new file mode 100644
index 0000000..fe3356f
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalCost.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsTotalCost
+{
+ #keys: '3[415754.0.459257113][415754.0.459257112][415754.0.459257114]'
+ Description: '鎬昏垂鐢ㄦ洿鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl
new file mode 100644
index 0000000..9a4eee2
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Attribute_IsTotalQuantityOfMaterialRacks.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsTotalQuantityOfMaterialRacks
+{
+ #keys: '3[415754.0.459222217][415754.0.459222216][415754.0.459222218]'
+ Description: '鏂欐灦鎬绘暟閲忚窡鏂板��'
+ ValueType: Boolean
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl b/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
deleted file mode 100644
index 5bec7ea..0000000
--- a/_Main/BL/Type_DL_EngineRackCell/Function_CalcNumberOfEmptyShelves.qbl
+++ /dev/null
@@ -1,13 +0,0 @@
-Quintiq file version 2.0
-#parent: #root
-Function CalcNumberOfEmptyShelves
-{
- TextBody:
- [*
- // lihongji Oct-9-2024 (created)
-
- value := guard( this.TotalQuantityOfMaterialRacks() - ( this.PlannedInventory() / this.PackagingCapacity() ), 0 );
-
- this.NumberOfEmptyShelves( value );
- *]
-}
diff --git a/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl b/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl
new file mode 100644
index 0000000..74b51f0
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/Method_SetTheTotalQuantity.qbl
@@ -0,0 +1,25 @@
+Quintiq file version 2.0
+#parent: #root
+Method SetTheTotalQuantity (
+ Real totalQuantityOfMaterialRacks
+)
+{
+ Description: '璁剧疆鏂欐灦鎬绘暟閲�'
+ TextBody:
+ [*
+ this.TotalQuantityOfMaterialRacks( totalQuantityOfMaterialRacks );
+
+ // 绌烘枡鏋舵暟閲忚仈鍔�
+ this.NumberOfEmptyShelves( [Number] ( ( totalQuantityOfMaterialRacks - this.PlannedInventory() ) / this.PackagingCapacity() ) );
+
+ // SUM琛岃仈鍔�
+ cell := select( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" );
+ cell.TotalQuantityOfMaterialRacks( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( this, DL_EngineRackColumn.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
+
+ // SUM鍒楄仈鍔�
+ cell := select( this, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackColumn().DisplayName() = "SUM" );
+ cell.TotalQuantityOfMaterialRacks( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( this,DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
+ *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
index c4e7eee..5df7805 100644
--- a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_CreateData.qbl
@@ -59,6 +59,7 @@
tempPISPIP.PlannedInventoryLevelEnd() );
cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) );
cell.PlannedInventory( plannedInventory );
+ cell.NumberOfEmptyShelves( [Number] ( cell.TotalQuantityOfMaterialRacks() - guard( cell.PlannedInventory() / cell.PackagingCapacity(), 0 ) ) );
// CC澶栫搴撳叆搴撹垂鐢細鍙戝姩鏈洪攢閲� / 鍖呰瀹归噺锛堝悜涓婂彇鏁达級* 鏂欐灦鍏ュ簱鍗曚环
transportationQuantity1 := sum( macroPlan, SalesDemand.astype( Forecast ), tempF,
@@ -141,10 +142,56 @@
cell.Coefficient( 1.05 );
// 鎬昏垂鐢�
- cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() );
+ cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) );
cell.DL_EngineRackColumn( relset, dlerc );
}
}
+
+ // 鍒涘缓SUM琛�
+ sumR := macroPlan.DL_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 );
+ traverse ( macroPlan, DL_EngineRackColumn, dlerc ) {
+ cell := sumR.DL_EngineRackCell( relnew );
+ cell.DL_EngineRackColumn( relset, dlerc );
+
+ cell.TotalQuantityOfMaterialRacks( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.NumberOfEmptyShelves() ) );
+ cell.CCStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCStorageFeesForRentedWarehouses() ) );
+ cell.CCOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );
+ cell.CCRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCRentalWarehouseStorageFees() ) );
+ cell.CCLineHaulCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCLineHaulCost() ) );
+ cell.CCShortDistanceTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CCShortDistanceTransportationCosts() ) );
+ cell.DLStorageFeesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLStorageFeesForRentedWarehouses() ) );
+ cell.DLOutboundExpensesForRentedWarehouses( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );
+ cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
+ cell.DLRentalWarehouseStorageFees( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.DLRentalWarehouseStorageFees() ) );
+ cell.CleaningCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.CleaningCost() ) );
+ cell.EstimatedTotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.EstimatedTotalCost() ) );
+ cell.Coefficient( 1.05 );
+ cell.TotalCost( sum( dlerc, DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() <> "SUM", tempDLERCell.TotalCost() ) );
+ }
+
+ // 鍒涘缓SUM鍒�
+ sumC := macroPlan.DL_EngineRackColumn( relnew, StartDate := Date::MaxDate() );
+ traverse ( macroPlan, DL_EngineRackRow, dlerr ) {
+ cell := dlerr.DL_EngineRackCell( relnew );
+ cell.DL_EngineRackColumn( relset, sumC );
+
+ cell.TotalQuantityOfMaterialRacks( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalQuantityOfMaterialRacks() ) );
+ cell.NumberOfEmptyShelves( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.NumberOfEmptyShelves() ) );
+ cell.CCStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCStorageFeesForRentedWarehouses() ) );
+ cell.CCOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCOutboundExpensesForRentedWarehouses() ) );
+ cell.CCRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCRentalWarehouseStorageFees() ) );
+ cell.CCLineHaulCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCLineHaulCost() ) );
+ cell.CCShortDistanceTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CCShortDistanceTransportationCosts() ) );
+ cell.DLStorageFeesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLStorageFeesForRentedWarehouses() ) );
+ cell.DLOutboundExpensesForRentedWarehouses( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLOutboundExpensesForRentedWarehouses() ) );
+ cell.DLExternalRentalWarehouseTransportationCosts( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLExternalRentalWarehouseTransportationCosts() ) );
+ cell.DLRentalWarehouseStorageFees( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.DLRentalWarehouseStorageFees() ) );
+ cell.CleaningCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.CleaningCost() ) );
+ cell.EstimatedTotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.EstimatedTotalCost() ) );
+ cell.Coefficient( 1.05 );
+ cell.TotalCost( sum( dlerr, DL_EngineRackCell, tempDLERCell, not tempDLERCell.DL_EngineRackColumn().StartDate().IsMaxInfinity(), tempDLERCell.TotalCost() ) );
+ }
*]
}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
new file mode 100644
index 0000000..8cf8a6a
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Export.qbl
@@ -0,0 +1,144 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Export (
+ MacroPlan macroPlan
+) as BinaryValue
+{
+ TextBody:
+ [*
+ xmlDOMI := XMLDOMImplementation::Create();
+ xmlDOM := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name></table>' );
+
+ tableElement := xmlDOM.GetElementByTagName( "table", 0 );
+
+ // 绗竴鍒楋紙鍚嶇О锛�
+ dlerrs := selectsortedset( macroPlan, DL_EngineRackRow, tempDLERR, true, tempDLERR.Index(), tempDLERR.Name() );
+ firstColumn := xmlDOM.CreateElement( "column" );
+ firstName := xmlDOM.CreateElement( "name" );
+ firstType := xmlDOM.CreateElement( "type" );
+ firstName.TextContent( "*" );
+ firstType.TextContent( "String" );
+ firstColumn.AppendChild( firstName );
+ firstColumn.AppendChild( firstType );
+ traverse ( dlerrs, Elements, dlerr ) {
+ firstCell := xmlDOM.CreateElement( "cell" );
+ firstCell.SetAttribute( "value", dlerr.Name() );
+ firstColumn.AppendChild( firstCell );
+
+ for ( i := 0; i < 14; i++ ) {
+ firstCell := xmlDOM.CreateElement( "cell" );
+ firstCell.SetAttribute( "value", "" );
+ firstColumn.AppendChild( firstCell );
+ }
+ }
+ tableElement.AppendChild( firstColumn );
+
+
+ // 绗簩鍒�
+ 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( "鎬昏垂鐢�" );
+ secondColumn := xmlDOM.CreateElement( "column" );
+ secondName := xmlDOM.CreateElement( "name" );
+ secondType := xmlDOM.CreateElement( "type" );
+ secondName.TextContent( "*" );
+ secondType.TextContent( "String" );
+ secondColumn.AppendChild( secondName );
+ secondColumn.AppendChild( secondType );
+ for ( i := 0; i < dlerrs.Size(); i++ ) {
+ traverse ( attrs, Elements, attr ) {
+ secondCell := xmlDOM.CreateElement( "cell" );
+ secondCell.SetAttribute( "value", attr );
+ secondColumn.AppendChild( secondCell );
+ }
+ }
+ tableElement.AppendChild( secondColumn );
+
+ // 鏃堕棿鍒�
+ dlercs := selectsortedset( macroPlan, DL_EngineRackColumn, tempDLERC, true, tempDLERC.StartDate() );
+ traverse ( dlercs, Elements, dlerc ) {
+ cellColumn := xmlDOM.CreateElement( "column" );
+ cellName := xmlDOM.CreateElement( "name" );
+ cellType := xmlDOM.CreateElement( "type" );
+ cellName.TextContent( dlerc.DisplayName() );
+ cellType.TextContent( "Real" );
+ cellColumn.AppendChild( cellName );
+ cellColumn.AppendChild( cellType );
+ cells := selectsortedset( dlerc, DL_EngineRackCell, tempDLERCell, true, tempDLERCell.DL_EngineRackRow().Index(), tempDLERCell.DL_EngineRackRow().Name() );
+ traverse ( cells, Elements, c ) {
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.TotalQuantityOfMaterialRacks().Round( 0 ) ); // 鏂欐灦鎬绘暟閲�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.NumberOfEmptyShelves().Round( 0 ) ); // 绌烘枡鏋舵暟閲�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCStorageFeesForRentedWarehouses().Round( 0 ) ); // CC澶栫搴撳叆搴撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCOutboundExpensesForRentedWarehouses().Round( 0 ) ); // CC澶栫搴撳嚭搴撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCRentalWarehouseStorageFees().Round( 0 ) ); // CC澶栫搴撲粨鍌ㄨ垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCLineHaulCost().Round( 0 ) ); // CC闀块�旇繍杈撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CCShortDistanceTransportationCosts().Round( 0 ) ); // CC鐭�旇繍杈撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.DLStorageFeesForRentedWarehouses().Round( 0 ) ); // DL澶栫搴撳叆搴撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.DLOutboundExpensesForRentedWarehouses().Round( 0 ) ); // DL澶栫搴撳嚭搴撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.DLExternalRentalWarehouseTransportationCosts().Round( 0 ) ); // DL澶栫搴撹繍杈撹垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.DLRentalWarehouseStorageFees().Round( 0 ) ); // 澶栫搴撲粨鍌ㄨ垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.CleaningCost().Round( 0 ) ); // 娓呮礂璐圭敤
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.EstimatedTotalCost().Round( 0 ) ); // 棰勮鎬昏垂鐢�
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.Coefficient().Round( 2 ) ); // 绯绘暟
+ cellColumn.AppendChild( cell );
+
+ cell := xmlDOM.CreateElement( "cell" );
+ cell.SetAttribute( "value", [String]c.TotalCost().Round( 0 ) ); // 鎬昏垂鐢�
+ cellColumn.AppendChild( cell );
+ }
+ tableElement.AppendChild( cellColumn );
+ }
+
+ xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
+
+ //info( xmlString );
+
+ tableGroupHandle := TableGroupHandle::Create( "Sheet1" );
+ tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+ tableGroupHandle.Add( tableHandle );
+
+ binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+
+ return binaryData.AsBinaryValue();
+ *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
new file mode 100644
index 0000000..fc6b28d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackCell/StaticMethod_Import.qbl
@@ -0,0 +1,111 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Import (
+ MacroPlan macroPlan,
+ GeneralExcelImportAndExportDataTable table
+)
+{
+ TextBody:
+ [*
+ isUpdateFlag := "";
+ attributeUpdateFlag := "";
+
+ traverse ( table, GeneralExcelImportAndExportDataRow, row ) {
+ traverse ( table, GeneralExcelImportAndExportDataColumn, column ) {
+ // 鍗曞厓鏍煎��
+ cellValue := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDCell, tempGEIAEDCell.GeneralExcelImportAndExportDataColumn() = column ).Value();
+ // 闀挎槬鏂欐灦鎶ヨ〃鍒�
+ dlerc := select( macroPlan, DL_EngineRackColumn, tempDLERC, tempDLERC.DisplayName() = column.Name() );
+ cell := select( macroPlan, DL_EngineRackRow.DL_EngineRackCell, tempDLERCell, tempDLERCell.DL_EngineRackRow().Generation() = "SUM" and tempDLERCell.DL_EngineRackColumn() = dlerc );
+
+ if ( column.ColumnIndex() = 0 and cellValue <> "" ) {
+ isUpdateFlag := cellValue;
+ }
+
+ if ( column.ColumnIndex() = 1 and cellValue <> "" ) {
+ attributeUpdateFlag := cellValue;
+ }
+
+ if ( isUpdateFlag = "SUM" ) {
+ info( "鍗曞厓鏍煎�硷細", cellValue );
+ if ( attributeUpdateFlag = "鏂欐灦鎬绘暟閲�" and not isnull( cell ) ) {
+ if ( not cell.IsTotalQuantityOfMaterialRacks() and cell.TotalQuantityOfMaterialRacks() <> [Real]cellValue ) {
+ cell.IsTotalQuantityOfMaterialRacks( true );
+ }
+ cell.TotalQuantityOfMaterialRacks( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "绌烘枡鏋舵暟閲�" and not isnull( cell ) ) {
+ if ( not cell.IsNumberOfEmptyShelves() and cell.NumberOfEmptyShelves() <> [Real]cellValue ) {
+ cell.IsNumberOfEmptyShelves( true );
+ }
+ cell.NumberOfEmptyShelves( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "CC澶栫搴撳叆搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsCCStorageFeesForRentedWarehouses() and cell.CCStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsCCStorageFeesForRentedWarehouses( true );
+ }
+ cell.CCStorageFeesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "CC澶栫搴撳嚭搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsCCOutboundExpensesForRentedWarehouses() and cell.CCOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsCCOutboundExpensesForRentedWarehouses( true );
+ }
+ cell.CCOutboundExpensesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "CC澶栫搴撲粨鍌ㄨ垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsCCRentalWarehouseStorageFees() and cell.CCRentalWarehouseStorageFees() <> [Real]cellValue ) {
+ cell.IsCCRentalWarehouseStorageFees( true );
+ }
+ cell.CCRentalWarehouseStorageFees( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "CC闀块�旇繍杈撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsCCLineHaulCost() and cell.CCLineHaulCost() <> [Real]cellValue ) {
+ cell.IsCCLineHaulCost( true );
+ }
+ cell.CCLineHaulCost( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "CC鐭�旇繍杈撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsCCShortDistanceTransportationCosts() and cell.CCShortDistanceTransportationCosts() <> [Real]cellValue ) {
+ cell.IsCCShortDistanceTransportationCosts( true );
+ }
+ cell.CCShortDistanceTransportationCosts( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "DL澶栫搴撳叆搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsDLStorageFeesForRentedWarehouses() and cell.DLStorageFeesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsDLStorageFeesForRentedWarehouses( true );
+ }
+ cell.DLStorageFeesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "DL澶栫搴撳嚭搴撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsDLOutboundExpensesForRentedWarehouses() and cell.DLOutboundExpensesForRentedWarehouses() <> [Real]cellValue ) {
+ cell.IsDLOutboundExpensesForRentedWarehouses( true );
+ }
+ cell.DLOutboundExpensesForRentedWarehouses( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "DL澶栫搴撹繍杈撹垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsDLExternalRentalWarehouseTransportationCosts() and cell.DLExternalRentalWarehouseTransportationCosts() <> [Real]cellValue ) {
+ cell.IsDLExternalRentalWarehouseTransportationCosts( true );
+ }
+ cell.DLExternalRentalWarehouseTransportationCosts( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "澶栫搴撲粨鍌ㄨ垂鐢�" 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 ) ) {
+ if ( not cell.IsCleaningCost() and cell.CleaningCost() <> [Real]cellValue ) {
+ cell.IsCleaningCost( true );
+ }
+ cell.CleaningCost( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "棰勮鎬昏垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsEstimatedTotalCost() and cell.EstimatedTotalCost() <> [Real]cellValue ) {
+ cell.IsEstimatedTotalCost( true );
+ }
+ cell.EstimatedTotalCost( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "绯绘暟" and not isnull( cell ) ) {
+ if ( not cell.IsCoefficient() and cell.Coefficient() <> [Real]cellValue ) {
+ cell.IsCoefficient( true );
+ }
+ cell.Coefficient( [Real]cellValue );
+ } else if ( attributeUpdateFlag = "鎬昏垂鐢�" and not isnull( cell ) ) {
+ if ( not cell.IsTotalCost() and cell.TotalCost() <> [Real]cellValue ) {
+ cell.IsTotalCost( true );
+ }
+ cell.TotalCost( [Real]cellValue );
+ }
+ }
+ }
+ }
+ *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl b/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl
new file mode 100644
index 0000000..426630d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackColumn/Attribute_DisplayName.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute DisplayName
+{
+ #keys: '3[415754.0.459254782][415754.0.459254781][415754.0.459254783]'
+ Description: '鍒楁樉绀�'
+ ValueType: String
+}
diff --git a/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl b/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl
new file mode 100644
index 0000000..fea962d
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackColumn/Function_CalcDisplayName.qbl
@@ -0,0 +1,11 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcDisplayName
+{
+ TextBody:
+ [*
+ value := ifexpr( this.StartDate().IsMaxInfinity(), "SUM", this.StartDate().Format( "Y-M2-D2" ) );
+
+ this.DisplayName( value );
+ *]
+}
diff --git a/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl b/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl
new file mode 100644
index 0000000..8e32629
--- /dev/null
+++ b/_Main/BL/Type_DL_EngineRackRow/Attribute_Index.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Index
+{
+ #keys: '3[415754.0.459217915][415754.0.459217914][415754.0.459217916]'
+ Description: '鎺掑簭绱㈠紩'
+ ValueType: Number
+}
diff --git a/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl b/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
index cc3f7b8..64e6dfc 100644
--- a/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
+++ b/_Main/BL/Type_DL_EngineRackRow/Function_CalcName.qbl
@@ -6,7 +6,7 @@
[*
// lihongji Aug-12-2024 (created)
- value := this.Generation() + " " + this.MLB_MQB();
+ value := this.Generation() + ifexpr( this.MLB_MQB() <> "", " " + this.MLB_MQB(), "" );
this.Name( value );
*]
diff --git a/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp b/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
index 11bcd41..18b474f 100644
--- a/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/CC_EngineRackCell.qrp
@@ -6,6 +6,17 @@
{
AttributeKey: '[413988.0.1476832733]'
Synonym: '娓呮礂璐圭敤'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateCleaningCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation Coefficient
{
@@ -13,6 +24,14 @@
Synonym: '绯绘暟'
Conditional:
[
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateCoefficient()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
]
DataRepresentation.Default
{
@@ -24,41 +43,129 @@
{
AttributeKey: '[413988.0.1476832743]'
Synonym: '棰勮鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateEstimatedTotalCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation ExternalRentalWarehouseTransportationCosts
{
AttributeKey: '[413988.0.1476832710]'
Synonym: '澶栫搴撹繍杈撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateExternalRentalWarehouseTransportationCosts()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation NumberOfEmptyShelves
{
AttributeKey: '[413988.0.1476832677]'
Synonym: '绌烘枡鏋舵暟閲�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateNumberOfEmptyShelves()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation OutboundExpensesForRentedWarehouses
{
AttributeKey: '[413988.0.1476832700]'
Synonym: '澶栫搴撳嚭搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateOutboundExpensesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation RentalWarehouseStorageFees
{
AttributeKey: '[413988.0.1476832723]'
Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateRentalWarehouseStorageFees()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation StorageFeesForRentedWarehouses
{
AttributeKey: '[413988.0.1476832690]'
Synonym: '澶栫搴撳叆搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateStorageFeesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation TotalCost
{
AttributeKey: '[413988.0.1476832756]'
Synonym: '鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateTotalCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation TotalQuantityOfMaterialRacks
{
AttributeKey: '[413988.0.1476832664]'
Synonym: '鏂欐灦鎬绘暟閲�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsUpdateTotalQuantityOfMaterialRacks()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
RelationRepresentation CC_EngineRackColumn { RelationKey: '[413988.0.1476832593]' Visibility: 'Normal' }
}
diff --git a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
index 11c975a..4542a16 100644
--- a/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
+++ b/_Main/Sys/Repr/Global/DL_EngineRackCell.qrp
@@ -6,31 +6,97 @@
{
AttributeKey: '[413988.0.1488160126]'
Synonym: 'CC闀块�旇繍杈撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCLineHaulCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CCOutboundExpensesForRentedWarehouses
{
AttributeKey: '[413988.0.1488160087]'
Synonym: 'CC澶栫搴撳嚭搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCOutboundExpensesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CCRentalWarehouseStorageFees
{
AttributeKey: '[413988.0.1488160084]'
Synonym: 'CC澶栫搴撲粨鍌ㄨ垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCRentalWarehouseStorageFees()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CCShortDistanceTransportationCosts
{
AttributeKey: '[413988.0.1488160139]'
Synonym: 'CC鐭�旇繍杈撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCShortDistanceTransportationCosts()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CCStorageFeesForRentedWarehouses
{
AttributeKey: '[413988.0.1488160081]'
Synonym: 'CC澶栫搴撳叆搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCCStorageFeesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation CleaningCost
{
AttributeKey: '[413988.0.1488160069]'
Synonym: '娓呮礂璐圭敤'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCleaningCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation Coefficient
{
@@ -38,6 +104,14 @@
Synonym: '绯绘暟'
Conditional:
[
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsCoefficient()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
]
DataRepresentation.Default
{
@@ -49,41 +123,129 @@
{
AttributeKey: '[413988.0.1488160119]'
Synonym: 'DL澶栫搴撹繍杈撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsDLExternalRentalWarehouseTransportationCosts()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation DLOutboundExpensesForRentedWarehouses
{
AttributeKey: '[413988.0.1488160106]'
Synonym: 'DL澶栫搴撳嚭搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsDLOutboundExpensesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation DLRentalWarehouseStorageFees
{
AttributeKey: '[413988.0.1488160103]'
Synonym: '澶栫搴撲粨鍌ㄨ垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsDLRentalWarehouseStorageFees()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation DLStorageFeesForRentedWarehouses
{
AttributeKey: '[413988.0.1488160100]'
Synonym: 'DL澶栫搴撳叆搴撹垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsDLStorageFeesForRentedWarehouses()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation EstimatedTotalCost
{
AttributeKey: '[413988.0.1488160066]'
Synonym: '棰勮鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsEstimatedTotalCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation NumberOfEmptyShelves
{
AttributeKey: '[413988.0.1488160058]'
Synonym: '绌烘枡鏋舵暟閲�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsNumberOfEmptyShelves()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation TotalCost
{
AttributeKey: '[413988.0.1488160072]'
Synonym: '鎬昏垂鐢�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsTotalCost()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
AttributeRepresentation TotalQuantityOfMaterialRacks
{
AttributeKey: '[413988.0.1488160062]'
Synonym: '鏂欐灦鎬绘暟閲�'
+ Conditional:
+ [
+ DataRepresentation.Conditional
+ {
+ BackgroundColor: '$FF3399'
+ ConditionBody: 'object.IsTotalQuantityOfMaterialRacks()'
+ ConversionBody: ''
+ DefaultBackgroundColor: false
+ InheritConversion: false
+ }
+ ]
}
RelationRepresentation DL_EngineRackColumn { RelationKey: '[413988.0.1488132648]' Visibility: 'Normal' }
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
index 6179223..2a109d9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Component_MatrixEditor531.def
@@ -79,7 +79,7 @@
]
Properties:
[
- Legend: 'StartDate'
+ Legend: 'DisplayName'
SortCriteria: 'StartDate'
Taborder: 2
]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def
new file mode 100644
index 0000000..7ca9b8d
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnCheckEditability.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor531
+Response OnCheckEditability () id:Response_MatrixEditor531_OnCheckEditability
+{
+ #keys: '[415754.0.470111247]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
+ QuillAction
+ {
+ Body:
+ [*
+ cond := focusedattribute = "TotalQuantityOfMaterialRacks";
+
+ editinfo.CanEdit( cond );
+ editinfo.UserHint( ifexpr( cond, "", "涓嶈兘淇敼" ) );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def
new file mode 100644
index 0000000..3a06bb2
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCC_EngineRackReport/Response_MatrixEditor531_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor531
+Response OnUpdateValue (
+ CC_EngineRackCell cell,
+ Real value
+) id:Response_MatrixEditor531_OnUpdateValue
+{
+ #keys: '[415754.0.469051167]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+ QuillAction
+ {
+ Body:
+ [*
+ cell.SetTheTotalQuantity( value );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
index e80f1a7..353785c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_MatrixEditor392.def
@@ -79,7 +79,7 @@
]
Properties:
[
- Legend: 'StartDate'
+ Legend: 'DisplayName'
SortCriteria: 'StartDate'
Taborder: 2
]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
index d9d33b0..3eff2a7 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Component_pHeader.def
@@ -15,6 +15,28 @@
Taborder: 0
]
}
+ Component bImport id:bImport_549
+ {
+ #keys: '[415754.0.469011898]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Image: 'IMPORT1'
+ Label: '瀵煎叆'
+ Taborder: 1
+ ]
+ }
+ Component bExport id:bExport_715
+ {
+ #keys: '[415754.0.469011958]'
+ BaseType: 'WebButton'
+ Properties:
+ [
+ Image: 'EXPORT1'
+ Label: '瀵煎嚭'
+ Taborder: 2
+ ]
+ }
]
Properties:
[
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def
new file mode 100644
index 0000000..c28e190
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnCheckEditability.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor392
+Response OnCheckEditability () id:Response_MatrixEditor392_OnCheckEditability
+{
+ #keys: '[415754.0.469021886]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
+ QuillAction
+ {
+ Body:
+ [*
+ cond := focusedattribute = "TotalQuantityOfMaterialRacks";
+
+ editinfo.CanEdit( cond );
+ editinfo.UserHint( ifexpr( cond, "", "涓嶈兘淇敼" ) );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def
new file mode 100644
index 0000000..4177425
--- /dev/null
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_MatrixEditor392_OnUpdateValue.def
@@ -0,0 +1,19 @@
+Quintiq file version 2.0
+#parent: MatrixEditor392
+Response OnUpdateValue (
+ DL_EngineRackCell cell,
+ Real value
+) id:Response_MatrixEditor392_OnUpdateValue
+{
+ #keys: '[415754.0.469021864]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebMatrixEditor_OnUpdateValue'
+ QuillAction
+ {
+ Body:
+ [*
+ cell.SetTheTotalQuantity( value );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def"
new file mode 100644
index 0000000..d495159
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bExport_OnClick\043844.def"
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: pHeader/bExport_715
+Response OnClick () id:Response_pHeader_bExport_OnClick_844
+{
+ #keys: '[415754.0.469011957]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan );
+ *]
+ QuillAction
+ {
+ Body:
+ [*
+ binaryValue := DL_EngineRackCell::Export( MacroPlan );
+
+ Application.Download( "澶ц繛鍙戝姩鏈烘枡鏋舵姤琛�.xlsx", binaryValue.AsBinaryData() );
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def"
new file mode 100644
index 0000000..577891a
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormDL_EngineRackReport/Response_pHeader_bImport_OnClick\043593.def"
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: pHeader/bImport_549
+Response OnClick () id:Response_pHeader_bImport_OnClick_593
+{
+ #keys: '[415754.0.469011897]'
+ CanBindMultiple: false
+ DefinitionID: 'Responsedef_WebButton_OnClick'
+ Precondition:
+ [*
+ return not isnull( MacroPlan );
+ *]
+ QuillAction
+ {
+ Body:
+ [*
+ try {
+ uploadJsonString := Application.GetFile();
+ if ( uploadJsonString <> "" ) {
+ uploadJson := JSON::Parse( uploadJsonString );
+ Archive::VerifyTheFileName( uploadJson );
+
+ fileName := uploadJson.Get( "name" ).GetString();
+ base64String := uploadJson.Get( "data" ).GetString();
+
+ webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+
+ generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( RecycleBin, webFileBinaryData, fileName );
+ generalExcelImportAndExportDataSource.ReadStructure();
+
+ selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+
+ DL_EngineRackCell::Import( MacroPlan, selection );
+
+ // 鍚庣画鍒犻櫎
+ generalExcelImportAndExportDataSource.Delete();
+
+ WebMessageBox::Success( Translations::A_VWED_Success() );
+ }
+ } onerror {
+ WebMessageBox::Error( e.GeneralInformation() );
+ }
+ *]
+ GroupServerCalls: false
+ }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw b/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
index 12f5037..0866ece 100644
--- a/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
+++ b/_Main/UI/MacroPlannerWebApp/Views/DLEngineRackReport.vw
@@ -27,6 +27,163 @@
{
sizeRatio: 1
}
+ FormDL_EngineRackReport_MatrixEditor392
+ {
+ gridColor: '#c4c4c4'
+ totalHeaderWidth: 222
+ attributeHeaderWidthRatio: 0.6
+ nameHeaderWidthRatio: 0.4
+ columnWidth: 100
+ horizontalGrid: true
+ verticalGrid: true
+ backendState
+ {
+ componentId: 'QMacroPlanner::FormDL_EngineRackReport.MatrixEditor392'
+ state
+ {
+ cells
+ {
+ attributes
+ {
+ attribute_TotalQuantityOfMaterialRacks
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 0
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'TotalQuantityOfMaterialRacks'
+ }
+ attribute_NumberOfEmptyShelves
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 1
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'NumberOfEmptyShelves'
+ }
+ attribute_CCStorageFeesForRentedWarehouses
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 2
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CCStorageFeesForRentedWarehouses'
+ }
+ attribute_CCOutboundExpensesForRentedWarehouses
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 3
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CCOutboundExpensesForRentedWarehouses'
+ }
+ attribute_CCRentalWarehouseStorageFees
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 4
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CCRentalWarehouseStorageFees'
+ }
+ attribute_CCLineHaulCost
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 5
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CCLineHaulCost'
+ }
+ attribute_CCShortDistanceTransportationCosts
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 6
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CCShortDistanceTransportationCosts'
+ }
+ attribute_DLStorageFeesForRentedWarehouses
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 7
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DLStorageFeesForRentedWarehouses'
+ }
+ attribute_DLOutboundExpensesForRentedWarehouses
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 8
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DLOutboundExpensesForRentedWarehouses'
+ }
+ attribute_DLExternalRentalWarehouseTransportationCosts
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 9
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DLExternalRentalWarehouseTransportationCosts'
+ }
+ attribute_DLRentalWarehouseStorageFees
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 10
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'DLRentalWarehouseStorageFees'
+ }
+ attribute_CleaningCost
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 11
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'CleaningCost'
+ }
+ attribute_EstimatedTotalCost
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 12
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'EstimatedTotalCost'
+ }
+ attribute_Coefficient
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 13
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'Coefficient'
+ }
+ attribute_TotalCost
+ {
+ type: 'MatrixEditorWebApiCellDataModelInterest'
+ index: 14
+ rowsubtotal: ''
+ columnsubtotal: ''
+ attribute: 'TotalCost'
+ }
+ }
+ }
+ columns
+ {
+ sorting
+ {
+ criteria: "datamember:'StartDate'"
+ }
+ }
+ rows
+ {
+ sorting
+ {
+ criteria: "datamember:'Name'"
+ }
+ }
+ }
+ }
+ }
}
}
form_FormGeneralSettings
--
Gitblit v1.9.3