* Refactor transfer model: parseExcelDropdownValues method.

This commit is contained in:
tanghucheng
2023-12-21 15:56:14 +08:00
parent 92dd52d520
commit 92f860dbce
6 changed files with 143 additions and 57 deletions
+24
View File
@@ -184,4 +184,28 @@ class transferTest
$this->getQueryDatasTest($module);
return $this->objectModel->getRows($module, $fieldList);
}
/**
* 测试parseExcelDropdownValues。
* Parse excel dropdown values.
*
* @param string $module
* @param array $rows
* @access public
* @return array
*/
public function parseExcelDropdownValuesTest(string $module, array $rows = array())
{
global $tester, $app;
$app->methodName = 'export';
$tester->loadModel($module);
$_SESSION[$module . 'TransferParams']['productID'] = 1;
$app->config->story->templateFields = "product,branch,module,source,sourceNote,title,spec,verify,keywords,pri,estimate,reviewer";
$app->config->story->dtable->fieldList['product']['control'] = 'select';
$app->config->story->dtable->fieldList['module']['control'] = 'multiple';
$fields = $this->objectModel->getImportFields($module);
return $this->objectModel->parseExcelDropdownValues($module, $rows, '', $fields);
}
}