* [perf story #69170] Adjust cancel parent task and cancel children tasks.

This commit is contained in:
wangyidong
2024-11-08 14:16:56 +08:00
committed by 孙广明
parent 4023defab4
commit e2bd232bcc
5 changed files with 9 additions and 112 deletions
@@ -1945,30 +1945,6 @@ class taskTest
return $this->objectModel->dao->select('action')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('objectID')->eq($oldParentTask->id)->orderBy('`id` desc')->fetch();;
}
/**
* 取消父任务更新子任务。。
* Update a child task when cancel its parent task.
*
* @param int $taskID
* @access public
* @return object|false
*/
public function cancelParentTaskTest(int $taskID): object|false
{
$task = $this->objectModel->getByID($taskID);
$data = new stdclass();
$data->id = $task->id;
$data->name = $task->name;
$data->pri = $task->pri;
$data->status = $task->status;
$data->execution = $task->execution;
$this->objectModel->cancelParentTask($data);
$childID = $this->objectModel->dao->select('id')->from(TABLE_TASK)->where('parent')->eq($taskID)->fetch('id');
return $this->objectModel->dao->select('action')->from(TABLE_ACTION)->where('objectType')->eq('task')->andWhere('objectID')->eq($childID)->orderBy('id_desc')->fetch();
}
/**
* 获取报表的查询语句。
* Get report condition from session.