From b3805b18b19f773610283444e0a9bd479930109f Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期一, 23 九月 2024 18:07:19 +0800
Subject: [PATCH] 报表界面优化处理,换型损失导入导出添加日期

---
 _Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl b/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
index 1ce8cfa..de5f0d3 100644
--- a/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_MachiningPipelineSource0/StaticMethod_Initialize.qbl
@@ -16,29 +16,29 @@
     table                     := source.Report( relnew, ID := source.Name(), Name := source.Name() );
     showtable                 := source.Report( relnew, ID := source.Name() + 'Show', Name := source.Name(), IsShow := true );
     
-    search                    := source.Search( relnew, StartDate := Date::MinDate(), EndDate := Date::MaxDate(), TimeUnit := Translations::MP_GlobalParameters_Day() );
+    search                    := owner.MachiningPipelineSearch( relnew, StartDate := Date::MinDate(), EndDate := Date::MaxDate(), TimeUnit := Translations::MP_GlobalParameters_Day() );
     
     products                  := construct( Product_MPs );
     //鍒濆鍖栧垪
     table.GenerateColumn( owner, 'All', search.StartDate(), search.EndDate() );
     endperiod                 := maxobject( owner, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day(), period.StartDate() );
     
-    //鐢熸垚瑁呴厤銆佺敓浜у拰搴撳瓨鏁版嵁
+    //鐢熸垚瑁呴厤(闀垮唴搴�)銆佺敓浜э紙鐨凞L鍜屽簱瀛樻暟鎹�
     traverse( owner, StockingPoint_MP, stockingpoint ){
       unit                    := stockingpoint.Unit();
       parentunits             := unit.GetAllParent();
       //鏄惁灞炰簬闀挎槬宸ュ巶
-      iscc                    := unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit );
+      iscc                    := stockingpoint.ID().StartsWith( 'CC' ) or unit.ID().StartsWith( 'CC' ) or exists( parentunits, Elements, punit, punit.ID().StartsWith( 'CC' ) );//unit.ID() = ccunit or exists( parentunits, Elements, punit, punit.ID() = ccunit );
       //鏄惁灞炰簬澶ц繛宸ュ巶
-      isdl                    := unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit );
-      //鏄惁灞炰簬闀挎槬瑁呴厤绾�
-      isccassemnly            := unit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() );
-      //鏄惁灞炰簬澶ц繛瑁呴厤绾�
-      isdlassemnly            := unit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() );
+      isdl                    := stockingpoint.ID().StartsWith( 'DL' ) or unit.ID().StartsWith( 'DL' ) or exists( parentunits, Elements, punit, punit.ID().StartsWith( 'DL' ) );//unit.ID() = dlunit or exists( parentunits, Elements, punit, punit.ID() = dlunit );
+      //鏄惁灞炰簬闀挎槬瑁呴厤绾緾C鍘傚唴搴�
+      isccassemnly            := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) );//unit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCAssemnlyUnit() );
+      //鏄惁灞炰簬澶ц繛瑁呴厤绾緿L鍘傚唴搴�
+      isdlassemnly            := stockingpoint.ID().EndsWith( '鍘傚唴搴�' ) and ( stockingpoint.ID().StartsWith( 'DL' ) or stockingpoint.ID().StartsWith( '澶ц繛' ) );//unit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLAssemnlyUnit() );
       //鏄惁灞炰簬闀挎槬鏈哄姞浜х嚎
-      isccproduction          := unit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() );
+      isccproduction          := stockingpoint.ID().EndsWith( '绾胯竟搴�' ) and ( stockingpoint.ID().StartsWith( 'CC' ) or stockingpoint.ID().StartsWith( '闀挎槬' ) );//unit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultCCProductionUnit() );
       //鏄惁灞炰簬澶ц繛鏈哄姞浜х嚎
-      isdlproduction          := unit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() );
+      isdlproduction          := unit.ID().EndsWith( 'MoMo' ) and unit.ID().StartsWith( 'DL' );//unit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() or exists( parentunits, Elements, punit, punit.ID() = MachiningPipelineReport::GetDefaultDLProductionUnit() );
       if( iscc or isdl ){
         traverse( stockingpoint, ProductInStockingPoint_MP, pisp,  pisp.Product_MP().IsLeaf() and not pisp.IsSystem() 
     //              and exists( pisp.Product_MP().GetAllParent(), Elements, e, e.ID() = productparent ) 

--
Gitblit v1.9.3