From 76c7b6120bb5a3076a31f3c3eb7e068f290f68d3 Mon Sep 17 00:00:00 2001 From: limj <limj@taizhitech.com> Date: 星期一, 25 九月 2023 20:47:39 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj --- 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