From b7fda6bdf8c0670b938b72edf4d67f9ec2962bf2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 21 Aug 2023 09:48:03 +0800 Subject: [PATCH] * Refactor getDataOfTasksPerModule method. --- module/task/model.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index b2df8773d3..db30714c33 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2081,7 +2081,7 @@ class taskModel extends model } /** - * 获取执行任务的报表数据。 + * 获取按执行任务数统计的报表数据。 * Get report data of tasks per execution. * * @access public @@ -2101,20 +2101,22 @@ class taskModel extends model } /** + * 获取按模块任务数统计的报表数据。 * Get report data of tasks per module * * @access public - * @return array + * @return object[] */ - public function getDataOfTasksPerModule() + public function getDataOfTasksPerModule(): array { $tasks = $this->dao->select('id,module')->from(TABLE_TASK)->alias('t1') ->where($this->reportCondition()) ->fetchAll('id'); if(!$tasks) return array(); - $datas = $this->processData4Report($tasks, array(), 'module'); + $datas = $this->processData4Report($tasks, array(), 'module'); + /* Get modules name. */ $modules = $this->loadModel('tree')->getModulesName(array_keys($datas), true, true); foreach($datas as $moduleID => $data) {