diff --git a/module/execution/model.php b/module/execution/model.php index eb5d3dc9aa..715bc2d342 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3248,6 +3248,7 @@ class executionModel extends model } $current = $begin; + $today = helper::today(); $endTime = strtotime($end); $preValue = 0; $todayTag = 0; @@ -3261,18 +3262,19 @@ class executionModel extends model { $currentTime = strtotime($current); if($currentTime > $endTime) break; - if(isset($sets[$current])) $preValue = $sets[$current]->value; if($currentTime > time() and !$todayTag) { $todayTag = $i + 1; } + if(isset($sets[$current])) $preValue = $sets[$current]->value; if(!isset($sets[$current]) and $mode == 'noempty') { $sets[$current] = new stdclass(); $sets[$current]->name = $current; - $sets[$current]->value = $preValue; + $sets[$current]->value = helper::diffDate($current, $today) < 0 ? $preValue : 'null'; } + $nextDay = date(DT_DATE1, $currentTime + 24 * 3600); $current = $nextDay; }