From 54cd79510ab97a5fa5694adfbdd344f2eb8424d2 Mon Sep 17 00:00:00 2001
From: renhao <renhui.hao@capgemini.com>
Date: 星期五, 22 九月 2023 16:38:18 +0800
Subject: [PATCH] Merge branch 'dev_release'
---
LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd#969.qbl | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl" "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
index d91a09e..b5b095a 100644
--- "a/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
+++ "b/LibMacroPlanner/BL/Type_Process_MP/StaticMethod_GetDependentDemandEnd\043969.qbl"
@@ -16,10 +16,14 @@
//get period of start
ddstartperiod := select( gp.MacroPlan(), PlanningPeriod, pp, pp.Start() <= start and pp.End() > start );
- // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
- periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
-
- value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
+ // Tianma fix 20230920
+ if( not isnull( ddstartperiod ) )
+ {
+ // if not start from middle and leadtime < period task period duration, make sure dependent demand end before period start
+ periodstart := ifexpr( not gp.IsOperationLeadTimeLogicFromMiddle() and period.Duration() < process.LeadTime(), period.Start(), DateTime::MaxDateTime() );
+
+ value := minvalue( start + process.LeadTime(), start + ddstartperiod.Duration(), periodstart );
+ }
}
return value;
--
Gitblit v1.9.3