* Refactor the getProductList method.

This commit is contained in:
tianshujie
2023-08-17 08:44:28 +08:00
parent 2b84442579
commit cdf4ff0a26
3 changed files with 22 additions and 6 deletions
+2 -2
View File
@@ -1947,13 +1947,13 @@ class executionModel extends model
$burns = $this->getBurnData($executions);
foreach($executions as $execution)
{
$execution->productName = isset($productList[$execution->id]) ? $productList[$execution->id]->productName : '';
$execution->productName = isset($productList[$execution->id]) ? trim($productList[$execution->id]->productName, ',') : '';
$execution->end = date(DT_DATE1, strtotime($execution->end));
$execution->hours = isset($hours[$execution->id]) ? $hours[$execution->id] : (object)$emptyHour;
$execution->teamCount = isset($memberGroup[$execution->id]) ? $memberGroup[$execution->id]->teams : 0;
if(isset($executions[$execution->parent])) $executions[$execution->parent]->isParent = 1;
if(empty($productID) && !empty($productList[$execution->id])) $execution->product = $productList[$execution->id]->product;
if(empty($productID) && !empty($productList[$execution->id])) $execution->product = trim($productList[$execution->id]->product, ',');
/* Judge whether the execution is delayed. */
if($execution->status != 'done' && $execution->status != 'closed' && $execution->status != 'suspended')