From bcd7eb876bff759f6aef96f1014b0bca7a3322ff Mon Sep 17 00:00:00 2001
From: rislai <risheng.lai@capgemini.com>
Date: 星期五, 16 八月 2024 15:53:14 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl b/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
index 63d74ca..53e032b 100644
--- a/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
+++ b/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
@@ -28,17 +28,19 @@
     name := newrouting.Name().ReplaceAll( 'Copy', thermaltrial );
     newrouting.Name( name );
     newrouting.UpdateTypeIndex( name );
-    routing.Start( start );
-    routing.End( end );
+    
+    newrouting.Start( start );
+    newrouting.End( end );
     
     routingstep := newrouting.LastStep();
-    //info( '------------------', routingstep.Tool(), ',', unit.ID() );
-    newroutingstep := RoutingStep::Create( newrouting, thermaltrial, routingstep.Tool(), false );
     
+    newroutingstep := RoutingStep::Create( newrouting, thermaltrial, routingstep.Tool(), false );
+    spname      := ifexpr( unit.ID().EndsWith( '鎵归噺鐑瘯' ), unit.ID().ReplaceAll( '鎵归噺鐑瘯', '-' + thermaltrial ), unit.ID().ReplaceAll( '鐑瘯', '-' + thermaltrial ) );
+    info( '------------------', routingstep.Tool(), ',', unit.ID(), ',', spname );
     traverse( routingstep, Operation, operation ){
       id := Operation::GetConcatenatedID( newrouting.ID(), newroutingstep.Name(), unit.ID() );
     //  info( '------------------', operation.Name(), routingstep.Name(), newroutingstep.Name() );
-      stockingpoint := StockingPoint_MP::FindCreateUpdate( routing.MacroPlan(), thermaltrial, unit, newrouting, true );
+      stockingpoint := StockingPoint_MP::FindCreateUpdate( routing.MacroPlan(), spname, unit, newrouting, true );
       
       traverse( operation, OperationBOM, obom, not obom.IsInput() ){
         pisp := obom.PISPNodeInRouting().ProductInStockingPoint_MP();

--
Gitblit v1.9.3