* [bug#64827,done,1h,0h] Fix repetitive project manage category.

This commit is contained in:
wangyuting
2025-08-20 14:42:35 +08:00
parent 521a88afed
commit f64d86c3db
3 changed files with 9 additions and 18 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ formPanel
set::label($lang->doc->module),
set::name('parent'),
set::items(array('m_0' => '/') + $optionMenu),
set::value($moduleID ? "m_$moduleID" : 0),
set::value(!empty($doc->parent) ? $doc->parent : ($moduleID ? "m_$moduleID" : 0)),
set::required(true)
),
formGroup
+1 -12
View File
@@ -11496,18 +11496,7 @@ class upgradeModel extends model
*/
public function createOtherActivity(int $workflowGroupID): int
{
/* 创建其他过程分类。 */
$module = new stdclass();
$module->root = $workflowGroupID;
$module->name = $this->lang->upgrade->projectManage;
$module->parent = '0';
$module->grade = '1';
$module->type = 'process';
$module->deleted = '0';
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
$moduleID = $this->dao->lastInsertID();
$this->dao->update(TABLE_MODULE)->set('path')->eq(",$moduleID,")->where('id')->eq($moduleID)->exec();
$moduleID = $this->dao->select('id')->from(TABLE_MODULE)->where('root')->eq($workflowGroupID)->andWhere('type')->eq('process')->andWhere('extra')->eq('project')->fetch('id');
$process = new stdclass();
$process->workflowGroup = $workflowGroupID;
+7 -5
View File
@@ -960,7 +960,7 @@ class upgradeTao extends upgradeModel
foreach($classifyList as $key => $value)
{
$order = isset($orderList[$key]) ? $orderList[$key] : $customOrder;
$moduleID = $this->createProcessModule($groupID, $value, $order);
$moduleID = $this->createProcessModule($groupID, $key, $value, $order);
$classifyModule[$key] = $moduleID;
if(!isset($orderList[$key])) $customOrder += 10;
}
@@ -972,12 +972,13 @@ class upgradeTao extends upgradeModel
* 创建过程模块。
* Create process module.
*
* @param int $groupID 流程ID
* @param string $name 模块名称
* @param int $order 排序
* @param int $groupID 流程ID
* @param string $key 模块标识
* @param string $name 模块名称
* @param int $order 排序
* @return int
*/
protected function createProcessModule(int $groupID, string $name, int $order)
protected function createProcessModule(int $groupID, string $key, string $name, int $order)
{
$module = new stdclass();
$module->root = $groupID;
@@ -986,6 +987,7 @@ class upgradeTao extends upgradeModel
$module->grade = '1';
$module->order = $order;
$module->type = 'process';
$module->extra = $key;
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
$moduleID = $this->dao->lastInsertID();