Merge branch 'sprint/tsj_uinttest' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/tsj_uinttest

This commit is contained in:
caoyanyi
2023-01-12 10:06:59 +08:00
2 changed files with 75 additions and 0 deletions
+23
View File
@@ -13,6 +13,29 @@ class executionTest
$this->objectModel = $tester->loadModel('execution');
}
/**
* Check the workload format and total.
*
* @param string $executionID
* @param string $type
* @param int $percent
* @access public
* @return object
*/
public function checkWorkloadTest($executionID, $type = '', $percent = 0)
{
global $tester;
$tester->loadModel('programplan');
$_POST['percent'] = $percent;
$oldExecution = empty($executionID) ? '' : $this->objectModel->getByID($executionID);
$this->objectModel->checkWorkload($type, $percent, $oldExecution);
unset($_POST);
if(dao::isError()) return dao::getError();
return true;
}
/**
* Set Kanban.
*