From 489022017f8b581ab413455b41ec841879a75e03 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期六, 12 十月 2024 17:48:22 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
index 5dab725..b6b3d79 100644
--- a/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
+++ b/_Main/BL/Type_CCEngineLogisticsCostReport0/Method_Generate.qbl
@@ -12,35 +12,30 @@
     allunit          := '<All>';
     //娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹�
     this.Clear();
+    //骞存眹鎬�
+    yearcolumn := this.Column( relnew, Name := '姹囨��', StartDate := search.MacroPlan().StartOfPlanning().StartOfNextYear().Date() );
     //杩囨护鍚庣殑浜у搧id
     productids       := selectuniquevalues( products, Elements, product, ( search.Generation() = allunit or product.Generation() = search.Generation() )
                                       and ( search.MqbMlb() = allunit or product.MQBMLB() = search.MqbMlb() )
                                       and ( search.Power() = allunit or product.Power() = search.Power() ), product.ID() );
     sumrow           := this.Row( relnew, Name := 'SUM', RowNr := table.Row( relsize ) );
+    sumyearcell      := sumrow.Initialize( yearcolumn );
     traverse( table, Row, row ){
       productid      := construct( Strings );
       productid.Add( row.Name() );
       
       if( productids.ContainsAll( productid ) ){
         showrow      := this.Row( relnew, Name := row.Name(), RowNr := row.RowNr() );
+        yearcell     := showrow.Initialize( yearcolumn );
         
         traverse( row, Cell, cell ){
           column     := selectobject( this, Column, column, column.Name() = cell.Column().Name() );
           
           sumcell    := selectobject( column, Cell, c, c.Row() = sumrow );
           if( isnull( sumcell ) ){
-            sumcell  := sumrow.Cell( relnew, CCRentInCost            := 0
-                                     , CCRentOutOfCost               := 0 
-                                     , CCLongTransCost               := 0
-                                     , CCShorTransCost               := 0
-                                     , CCRentStorCost                := 0
-                                     , DLRentInCost                  := 0
-                                     , DLRentOutOfCost               := 0
-                                     , WerkToDLRentTransCost         := 0
-                                     , DLRentStorCost                := 0 );
-            column.Cell( relinsert, sumcell );
+            sumcell  := sumrow.Initialize( column );
           }
-          
+          //鏄剧ず鏈堝崟鍏冩牸
           showcell   := showrow.Cell( relnew, CCRentInCost           := cell.CCRentInCost()
                                       , CCRentOutOfCost              := cell.CCRentOutOfCost()
                                       , CCLongTransCost              := cell.CCLongTransCost()
@@ -51,6 +46,27 @@
                                       , WerkToDLRentTransCost        := cell.WerkToDLRentTransCost()
                                       , DLRentStorCost            := cell.DLRentStorCost() );
           column.Cell( relinsert, showcell );
+          //鏄剧ず骞村崟鍏冩牸
+          yearcell.CCRentInCost( cell.CCRentInCost() + yearcell.CCRentInCost() );
+          yearcell.CCRentOutOfCost( cell.CCRentOutOfCost() + yearcell.CCRentOutOfCost() );
+          yearcell.CCLongTransCost( cell.CCLongTransCost() + yearcell.CCLongTransCost() );
+          yearcell.CCShorTransCost( cell.CCShorTransCost() + yearcell.CCShorTransCost() );
+          yearcell.CCRentStorCost( cell.CCRentStorCost() + yearcell.CCRentStorCost() );
+          yearcell.DLRentInCost( cell.DLRentInCost() + yearcell.DLRentInCost() );
+          yearcell.DLRentOutOfCost( cell.DLRentOutOfCost() + yearcell.DLRentOutOfCost() );
+          yearcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + yearcell.WerkToDLRentTransCost() );
+          yearcell.DLRentStorCost( cell.DLRentStorCost() + yearcell.DLRentStorCost() );
+          //鏄剧ず鍚堣骞村崟鍏冩牸
+          sumyearcell.CCRentInCost( cell.CCRentInCost() + sumyearcell.CCRentInCost() );
+          sumyearcell.CCRentOutOfCost( cell.CCRentOutOfCost() + sumyearcell.CCRentOutOfCost() );
+          sumyearcell.CCLongTransCost( cell.CCLongTransCost() + sumyearcell.CCLongTransCost() );
+          sumyearcell.CCShorTransCost( cell.CCShorTransCost() + sumyearcell.CCShorTransCost() );
+          sumyearcell.CCRentStorCost( cell.CCRentStorCost() + sumyearcell.CCRentStorCost() );
+          sumyearcell.DLRentInCost( cell.DLRentInCost() + sumyearcell.DLRentInCost() );
+          sumyearcell.DLRentOutOfCost( cell.DLRentOutOfCost() + sumyearcell.DLRentOutOfCost() );
+          sumyearcell.WerkToDLRentTransCost( cell.WerkToDLRentTransCost() + sumyearcell.WerkToDLRentTransCost() );
+          sumyearcell.DLRentStorCost( cell.DLRentStorCost() + sumyearcell.DLRentStorCost() );
+          //鏄剧ず鍚堣鏈堝崟鍏冩牸
           sumcell.CCRentInCost( cell.CCRentInCost() + sumcell.CCRentInCost() );
           sumcell.CCRentOutOfCost( cell.CCRentOutOfCost() + sumcell.CCRentOutOfCost() );
           sumcell.CCLongTransCost( cell.CCLongTransCost() + sumcell.CCLongTransCost() );

--
Gitblit v1.9.3