From e1af2556a7f785c518380e63b67fe8600b9163ec Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 18 十一月 2024 17:21:03 +0800
Subject: [PATCH] 下线计划界面排版
---
 _Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
index 546ae21..080d8f1 100644
--- a/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
+++ b/_Main/BL/Type_CustomerDemandIDS/StaticMethod_GenerateData.qbl
@@ -43,7 +43,8 @@
       traverse( table, GeneralExcelImportAndExportDataRow, row ){
         productcell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
         factorycell       := selectobject( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
-        idsrow            := idstable.GetRowByUnit( productcell.Value(), factorycell.Value() );
+        unitname          := ifexpr( factorycell.Value().StartsWith( '闀挎槬' ), FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );
+        idsrow            := idstable.GetRowByUnit( productcell.Value(), unitname );
         traverse( row, GeneralExcelImportAndExportDataCell, cell, cell.GeneralExcelImportAndExportDataColumn().ColumnIndex() > 2 ){
           period          := cnv2.Convert( cell.GeneralExcelImportAndExportDataColumn().Name() );
           daycolumn       := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), period );
@@ -57,10 +58,11 @@
       }
     }
     traverse ( macroplan, SalesDemand.astype( Forecast ), forecast, not isnull( forecast.Product_MP() ) and forecast.Origin() = 'PPA' ){
-      unitname              := ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) 
+      
+      unitname              := ifexpr( forecast.StockingPointID().StartsWith( '闀挎槬' ) , FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() );/*ifexpr( forecast.SalesSegment_MP().Name().StartsWith( 'Changchun' ) 
                                        or exists( forecast.SalesSegment_MP().GetAllParent(), Elements, psalessegment, psalessegment.Name().StartsWith( 'Changchun' ) )
                                        , FinancialProductionReport::GetDefaultCCUnit()
-                                       , FinancialProductionReport::GetDefaultDLUnit() );
+                                       , FinancialProductionReport::GetDefaultDLUnit() );*/
       traverse( forecast, PlanningSalesDemandInPeriod, sdip ){
         idsrow              := idstable.GetRowByUnit( forecast.ProductID(), unitname );
         daycolumn           := idstable.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), sdip.StartDate() );
--
Gitblit v1.9.3