Merge branch dev/bug-65418 of zentao/zentaopms (#11445)

This commit is contained in:
刘刚
2025-09-12 11:03:31 +08:00
committed by Gitfox
3 changed files with 50 additions and 4 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ $lang->custom->testcase = new stdClass();
$lang->custom->testcase->fields['required'] = $lang->custom->required;
$lang->custom->testcase->fields['priList'] = '优先级';
$lang->custom->testcase->fields['typeList'] = '类型';
$lang->custom->testcase->fields['stageList'] = '环节';
$lang->custom->testcase->fields['stageList'] = '适用环节';
$lang->custom->testcase->fields['resultList'] = '执行结果';
$lang->custom->testcase->fields['statusList'] = '状态';
$lang->custom->testcase->fields['review'] = '评审流程';
+1 -1
View File
@@ -112,7 +112,7 @@ $config->upgrade->execFlow['21_6_beta'] = array('functions' => 'processCharter
$config->upgrade->execFlow['21_6_1'] = array('xxsqls' => "$appRoot/db/upgradexuanxuan9.1.2.sql");
$config->upgrade->execFlow['21_7'] = array('functions' => 'fixWorkflowNameForExecution');
$config->upgrade->execFlow['21_7_1'] = array('functions' => 'convertCharset,processActionProduct');
$config->upgrade->execFlow['21_7_3'] = array('functions' => 'upgradeProcessAndActivity,addDefaultDeliverableModule,upgradeDesignToDeliverable,buildinTestcaseStageDeliverable,upgradeDeliverable,buildinBaselineReview,upgradeBaselineObjects,upgradeReviewToDeliverable');
$config->upgrade->execFlow['21_7_3'] = array('functions' => 'upgradeProcessAndActivity,addDefaultDeliverableModule,upgradeDesignToDeliverable,buildinTestcaseStageDeliverable,upgradeDeliverable,buildinBaselineReview,upgradeReviewclCategory,upgradeBaselineObjects,upgradeReviewToDeliverable');
if(!empty($config->isINT))
{
+48 -2
View File
@@ -11841,9 +11841,9 @@ class upgradeModel extends model
* Buildin baseline review flow.
*
* @access public
* @return void
* @return bool
*/
public function buildinBaselineReview()
public function buildinBaselineReview(): bool
{
$reviewFlow = new stdclass();
$reviewFlow->flow = '1';
@@ -11862,6 +11862,52 @@ class upgradeModel extends model
$this->dao->insert(TABLE_APPROVALFLOWOBJECT)->data($reviewFlow)->exec();
}
}
return true;
}
/**
* 升级检查单分类到项目流程下。
* Upgrade reviewcl category.
*
* @access public
* @return bool
*/
public function upgradeReviewclCategory(): bool
{
$this->loadModel('custom');
$clientLang = $this->app->getClientLang();
$categoryList = $this->dao->select('`key`, value')->from(TABLE_LANG)
->where('module')->eq('reviewcl')
->andWhere('section')->eq('waterfallCategoryList')
->andWhere('lang')->in(array($clientLang, 'all'))
->orderBy('id_asc')
->fetchPairs();
$categoryPlusList = $this->dao->select('`key`, value')->from(TABLE_LANG)
->where('module')->eq('reviewcl')
->andWhere('section')->eq('waterfallplusCategoryList')
->andWhere('lang')->in(array($clientLang, 'all'))
->orderBy('id_asc')
->fetchPairs();
if(empty($categoryList) && empty($categoryPlusList)) return true;
$workflows = $this->dao->select('id,projectModel')->from(TABLE_WORKFLOWGROUP)->where('projectModel')->in('waterfall,waterfallplus')->fetchAll('id');
foreach($workflows as $workflow)
{
if($workflow->projectModel == 'waterfall' && !empty($categoryList))
{
foreach($categoryList as $key => $value) $this->custom->setItem("{$clientLang}.reviewcl.{$workflow->id}CategoryList.{$key}.1", $value);
}
if($workflow->projectModel == 'waterfallplus' && !empty($categoryPlusList))
{
foreach($categoryPlusList as $key => $value) $this->custom->setItem("{$clientLang}.reviewcl.{$workflow->id}CategoryList.{$key}.1", $value);
}
}
$this->dao->delete()->from(TABLE_LANG)->where('section')->in('waterfallCategoryList,waterfallplusCategoryList')->exec();
return true;
}
/**