This commit is contained in:
tianshujie
2024-04-29 14:12:02 +08:00
parent c5c30fd1e8
commit a8710ffd65
3 changed files with 10 additions and 21 deletions
+1 -1
View File
@@ -1341,8 +1341,8 @@ class programModel extends model
->where('t1.`date`')->ge($updateTime)
->andWhere('t1.project')->ne(0)
->fetchAll('project');
if(empty($projects)) return;
}
if(empty($projects)) return;
/* 1. Refresh stats to db. */
$this->programTao->updateStats(array_keys($projects));
+3 -2
View File
@@ -336,10 +336,11 @@ class programTao extends programModel
*/
protected function setNoTaskExecution(array $projectIdList): array
{
$summary = array();
$summary = array();
$executionGroup = $this->dao->select('id, project')->from(TABLE_PROJECT)->where('project')->in($projectIdList)->andWhere('deleted')->eq(0)->fetchGroup('project', 'id');
foreach($projectIdList as $projectID)
{
$executions = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('deleted')->eq(0)->fetchPairs();
$executions = zget($executionGroup, $projectID, array());
foreach($executions as $executionID)
{
$taskCount = $this->dao->select('id')->from(TABLE_TASK)