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

---
 _Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl b/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
index 54256b2..601bc91 100644
--- a/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
+++ b/_Main/BL/Type_Routing/StaticMethod_ThermalTrialRatio.qbl
@@ -15,7 +15,22 @@
     thermaltrial := '鐑紡';
     newroutings := construct( Routings );
     unit := selectobject( routing.MacroPlan(), Unit, unit, unit.ID() = thermaltrial and unit.HasCapacityTypeQuantity() );
+    
+    for( starttime := start; starttime <= end; starttime := starttime + 1 ){
+      uc := selectobject( unit, UnitCapacity, uc, uc.Start().Date() = starttime );
+      if( isnull( uc ) ){
+        uc := UnitCapacity::Create( unit, starttime.DateTime(), 'Day', 0.0, [Real]capacity, 100.0, 1, false );
+      }
+      uc.MaxCapacity( [Real]capacity );
+    }
+    
     newrouting := routing.Copy();
+    name := newrouting.Name().ReplaceAll( 'Copy', thermaltrial );
+    newrouting.Name( name );
+    newrouting.UpdateTypeIndex( name );
+    routing.Start( start );
+    routing.End( end );
+    
     routingstep := newrouting.LastStep();
     //info( '------------------', routingstep.Tool(), ',', unit.ID() );
     newroutingstep := RoutingStep::Create( newrouting, thermaltrial, routingstep.Tool(), false );

--
Gitblit v1.9.3