From cbe91feadb7cd8340edf0eed7fc3e9839b8b8068 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 31 May 2023 17:18:22 +0800 Subject: [PATCH] - Delete duplicate method. --- module/task/model.php | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index eddf589e91..c96a177ece 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1738,17 +1738,18 @@ class taskModel extends model * 根据任务、人员和日志ID查询并排序任务的日志列表。 * Get task efforts by taskID, account or effortID. * - * @param int $taskID - * @param string $account - * @param int $effortID - * @param string $orderBy + * @param int|array $taskIdList + * @param string $account + * @param int $effortID + * @param string $orderBy * @access public * @return array */ - public function getTaskEfforts(int $taskID, string $account = '', int $effortID = 0, string $orderBy = 'date,id'): array + public function getTaskEfforts(int|array $taskIdList, string $account = '', int $effortID = 0, string $orderBy = 'date,id'): array { - return $this->dao->select('*')->from(TABLE_EFFORT)->where('objectID')->eq($taskID) - ->andWhere('objectType')->eq('task') + return $this->dao->select('*')->from(TABLE_EFFORT) + ->where('objectType')->eq('task') + ->andWhere('objectID')->in($taskIdList) ->andWhere('deleted')->eq('0') ->beginIF($account)->andWhere('account')->eq($account)->fi() ->beginIF($effortID)->orWhere('id')->eq($effortID)->fi() @@ -1756,22 +1757,6 @@ class taskModel extends model ->fetchAll(); } - /** - * Get taskList date record. - * - * @param int|array $taskID - * @access public - * @return array - */ - public function getTaskDateRecord($taskID) - { - return $this->dao->select('id,date')->from(TABLE_EFFORT)->where('objectID')->in($taskID) - ->andWhere('objectType')->eq('task') - ->andWhere('deleted')->eq('0') - ->orderBy('date') - ->fetchAll('id'); - } - /** * Get estimate by id. *