Skip to content

Commit 95de74d

Browse files
committed
add isMaterialApply
1 parent 7a88d81 commit 95de74d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ProdScheduler/SchedulerConfigTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ trait SchedulerConfigTrait
4040
public array $nextDayCalendar = [];
4141
public array $prevDayCalendar = [];
4242
public array $config = [];
43+
public bool $isMaterialApply = false;
4344

4445
public function init(array $config): void
4546
{
@@ -53,6 +54,7 @@ private function parseConfig(array $config)
5354
$this->month = $config['month'];
5455
$this->groupName = $config['groupName'];
5556
$this->computeDirection = $config['computeDirection'];
57+
$this->isMaterialApply = $config['isMaterialApply'];
5658
$this->ISDT = $config['start'];
5759
$this->ISTS = strtotime($config['start']);
5860
$this->initialPhase = $config['initialPhase'];
@@ -198,6 +200,9 @@ function ($e) {
198200
if ($p['code_id'] < $this->initialPhase) {
199201
$reversePhase[] = $p;
200202
} else {
203+
if ($this->isMaterialApply && count($forwardPhase) > 0) {
204+
continue;
205+
}
201206
$forwardPhase[] = $p;
202207
}
203208
}

0 commit comments

Comments
 (0)