* [task#130536,done,1h] fix bug.

This commit is contained in:
sunguangming
2024-10-16 14:57:11 +08:00
committed by 王怡栋
parent a6c5c15cc8
commit 6216fc4eb5
2 changed files with 10 additions and 26 deletions
+10 -4
View File
@@ -47,11 +47,17 @@ class transfer extends control
/* Get workflow fields by module. */
if($this->config->edition != 'open')
{
$appendFields = $this->transferZen->getWorkflowFieldsByModule($module);
foreach($appendFields as $appendField)
$groupID = $this->loadModel('workflowgroup')->getGroupIDByData($module, null);
$action = $this->loadModel('workflowaction')->getByModuleAndAction($module, 'exportTemplate', $groupID);
if(!empty($action->extensionType) && $action->extensionType == 'extend')
{
$this->lang->$module->{$appendField->field} = $appendField->name;
$this->config->$module->templateFields .= ',' . $appendField->field;
$appendFields = $this->loadModel('workflowaction')->getPageFields($module, 'exportTemplate', true, null, 0, $groupID);
foreach($appendFields as $appendField)
{
$this->lang->$module->{$appendField->field} = $appendField->name;
$this->config->$module->templateFields .= ',' . $appendField->field;
}
}
}
-22
View File
@@ -12,28 +12,6 @@ declare(strict_types=1);
class transferZen extends transfer
{
/**
* 获取工作流字段.
* Get workflow fields by module.
*
* @param string $module
* @access protected
* @return array
*/
protected function getWorkflowFieldsByModule(string $module): array
{
$this->app->loadConfig('workflowaction');
$relatedModule = isset($this->config->workflowaction->buildin->relatedModules[$module]['exporttemplate']) ? $this->config->workflowaction->buildin->relatedModules[$module]['exporttemplate'] : '';
return $this->dao->select('t2.*')->from(TABLE_WORKFLOWLAYOUT)->alias('t1')
->beginIF(!$relatedModule)->leftJoin(TABLE_WORKFLOWFIELD)->alias('t2')->on('t1.module=t2.module AND t1.field=t2.field')->fi()
->beginIF($relatedModule)->leftJoin(TABLE_WORKFLOWFIELD)->alias('t2')->on("t2.module='$relatedModule' AND t1.field=t2.field")->fi()
->where('t1.module')->eq($module)
->andWhere('t1.action')->eq('exporttemplate')
->andWhere('t2.buildin')->eq(0)
->orderBy('t1.order')
->fetchAll();
}
/**
* 将参数转成变量存到SESSION中。
* Set SESSION by params.