* [task#132834,done,0.5h,0h] Add charter workflow.
This commit is contained in:
@@ -10,3 +10,12 @@ ALTER TABLE `zt_approvalobject` ADD `status` varchar(30) NOT NULL DEFAULT '' AFT
|
||||
ALTER TABLE `zt_approvalobject` ADD `appliedBy` char(30) NOT NULL DEFAULT '' AFTER `status`;
|
||||
ALTER TABLE `zt_approvalobject` ADD `appliedDate` datetime NULL AFTER `appliedBy`;
|
||||
ALTER TABLE `zt_approvalobject` ADD `desc` text NULL AFTER `appliedDate`;
|
||||
|
||||
INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `createdBy`, `createdDate`, `datasource`, `view`, `keyField`, `valueField`) VALUES
|
||||
('lang', '立项级别', 'charterLevel', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterLevel', '', '', ''),
|
||||
('lang', '立项类型', 'charterCategory', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterCategory', '', '', ''),
|
||||
('lang', '立项适用市场', 'charterMarket', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterMarket', '', '', ''),
|
||||
('lang', '立项状态', 'charterStatus', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterStatus', '', '', ''),
|
||||
('lang', '立项关闭原因', 'charterCloseReason', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterCloseReason', '', '', ''),
|
||||
('lang', '立项审批结果', 'charterReviewResult', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterReviewResult', '', '', ''),
|
||||
('lang', '立项审批状态', 'charterReviewStatus', '1', 'rnd', 'admin', '1970-01-01 00:00:01', 'charterReviewStatus', '', '', '');
|
||||
|
||||
@@ -105,7 +105,7 @@ $config->upgrade->execFlow['20_5'] = array('functions' => 'fixWorkflowFie
|
||||
$config->upgrade->execFlow['20_6'] = array('functions' => 'processDemandFiles,processSqlbuilderTables');
|
||||
$config->upgrade->execFlow['20_7'] = array('functions' => 'upgradeMyDocSpace');
|
||||
$config->upgrade->execFlow['20_8'] = array('functions' => 'processWorkflowGroups');
|
||||
$config->upgrade->execFlow['21_0'] = array('functions' => '');
|
||||
$config->upgrade->execFlow['21_0'] = array('functions' => 'importBuildinWorkflow', 'params' => array('importBuildinWorkflow' => array('or', 'charter')));
|
||||
|
||||
if(!empty($config->isINT))
|
||||
{
|
||||
|
||||
@@ -9378,10 +9378,11 @@ class upgradeModel extends model
|
||||
* Import buildin workflow.
|
||||
*
|
||||
* @param string $vision
|
||||
* @param string $importModule 指定导入的模块
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function importBuildinWorkflow($vision = 'all')
|
||||
public function importBuildinWorkflow($vision = 'all', $importModule = '')
|
||||
{
|
||||
$this->loadModel('workflow');
|
||||
$this->loadModel('workflowaction');
|
||||
@@ -9414,6 +9415,8 @@ class upgradeModel extends model
|
||||
$data->app = $app;
|
||||
foreach($appModules as $module => $options)
|
||||
{
|
||||
if($importModule && $importModule != $module) continue;
|
||||
|
||||
$this->app->loadLang($module);
|
||||
|
||||
$data->vision = 'rnd';
|
||||
@@ -9444,6 +9447,8 @@ class upgradeModel extends model
|
||||
$data->createdDate = $now;
|
||||
foreach($actions as $module => $moduleActions)
|
||||
{
|
||||
if($importModule && $importModule != $module) continue;
|
||||
|
||||
$data->module = $module;
|
||||
foreach($moduleActions as $action)
|
||||
{
|
||||
@@ -9490,6 +9495,8 @@ class upgradeModel extends model
|
||||
$data->createdDate = $now;
|
||||
foreach($fields as $module => $moduleFields)
|
||||
{
|
||||
if($importModule && $importModule != $module) continue;
|
||||
|
||||
$order = 1;
|
||||
$data->module = $module;
|
||||
|
||||
@@ -9528,6 +9535,8 @@ class upgradeModel extends model
|
||||
$data = new stdclass();
|
||||
foreach($layouts as $module => $moduleLayouts)
|
||||
{
|
||||
if($importModule && $importModule != $module) continue;
|
||||
|
||||
$data->module = $module;
|
||||
foreach($moduleLayouts as $action => $layoutFields)
|
||||
{
|
||||
@@ -9563,6 +9572,8 @@ class upgradeModel extends model
|
||||
{
|
||||
foreach($appModules as $module => $options)
|
||||
{
|
||||
if($importModule && $importModule != $module) continue;
|
||||
|
||||
$labels = array();
|
||||
if($module == 'product')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user