-- 2020-08-21 tangxin 流程bpm_task_trans表添加INQU_TYPE_字段
ALTER TABLE BPM_TASK_TRANS ADD (INQU_TYPE_ VARCHAR2(20));
COMMENT ON COLUMN BPM_TASK_TRANS.INQU_TYPE_ IS '征询类型：direct,step';

-- 2020-08-24 zhaoxiangyun 新增审批意见暂存表
CREATE TABLE "BPM_SAVE_OPINION"
(
   ID_                  VARCHAR2(255)        NOT NULL,
   PROC_INST_ID_        VARCHAR2(255)        NOT NULL,
   TASK_ID_             VARCHAR2(255)        NOT NULL,
   OPINION_             VARCHAR2(2000)       NOT NULL,
   CREATE_BY_           VARCHAR2(64)         DEFAULT NULL,
   CREATE_TIME_         DATE                 DEFAULT NULL,
   UPDATE_BY_           VARCHAR2(64)         DEFAULT NULL,
   UPDATE_TIME_         DATE                 DEFAULT NULL,
   TENANT_ID_           VARCHAR2(64)         DEFAULT NULL,
   CONSTRAINT PK_BPM_SAVE_OPINION PRIMARY KEY (ID_)
);

COMMENT ON COLUMN "BPM_SAVE_OPINION".ID_ IS
'主键ID';

COMMENT ON COLUMN "BPM_SAVE_OPINION".PROC_INST_ID_ IS
'流程实例ID';

COMMENT ON COLUMN "BPM_SAVE_OPINION".TASK_ID_ IS
'任务ID';

COMMENT ON COLUMN "BPM_SAVE_OPINION".OPINION_ IS
'暂存的审批意见';

COMMENT ON COLUMN "BPM_SAVE_OPINION".CREATE_BY_ IS
'创建人';

COMMENT ON COLUMN "BPM_SAVE_OPINION".CREATE_TIME_ IS
'创建时间';

COMMENT ON COLUMN "BPM_SAVE_OPINION".UPDATE_BY_ IS
'更新人';

COMMENT ON COLUMN "BPM_SAVE_OPINION".UPDATE_TIME_ IS
'更新时间';

COMMENT ON COLUMN "BPM_SAVE_OPINION".TENANT_ID_ IS
'租户ID';

-- 2020-08-24 zhaoxiangyun 数据报表草稿数据表新增更新人、更新时间字段
alter table form_data_template_draft add UPDATE_BY_ varchar2(64);
alter table form_data_template_draft add UPDATE_TIME_ DATE;

-- 2020-08-25 黎扬贵 修改微服务名称
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-uc' WHERE ID_ = '1';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-portal' WHERE ID_ = '2';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-form' WHERE ID_ = '3';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-bpm-model' WHERE ID_ = '4';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'eip-bpm-runtime' WHERE ID_ = '5';
UPDATE portal_sys_logs_settings SET MODULE_TYPE_ = 'base' WHERE ID_ = '6';

-- -- 2020-08-26 刘美琴 修改自定义SQL字段长度
ALTER TABLE FORM_CUSTOM_DIALOG MODIFY DIY_SQL_  VARCHAR(4000);
ALTER TABLE FORM_CUSTOM_QUERY MODIFY DIY_SQL_  VARCHAR(4000);




CREATE TABLE PORTAL_SYS_APP
(
   ID_                  VARCHAR2(64)         NOT NULL,
   NAME_                VARCHAR2(128)        DEFAULT NULL,
   ICON_                VARCHAR2(128)        DEFAULT NULL,
   ICON_COLOR_          VARCHAR2(10)         DEFAULT NULL,
   TYPE_                SMALLINT             DEFAULT NULL,
   PAGE_                INTEGER              DEFAULT NULL,
   IS_PUBLISH_          SMALLINT             DEFAULT NULL,
   SN_                  INTEGER              DEFAULT NULL,
   CONTENT_             CLOB,
   CREATE_TIME_         DATE                 DEFAULT NULL,
   UPDATE_TIME_         DATE                 DEFAULT NULL,
   CREATE_BY_           VARCHAR2(64)         DEFAULT NULL,
   UPDATE_BY_           VARCHAR2(64)         DEFAULT NULL,
   TENANT_ID_           VARCHAR2(64)         DEFAULT NULL,
   CONSTRAINT PK_PORTAL_SYS_APP PRIMARY KEY (ID_)
);

COMMENT ON COLUMN PORTAL_SYS_APP.ID_ IS
'主键';

COMMENT ON COLUMN PORTAL_SYS_APP.NAME_ IS
'应用名称';

COMMENT ON COLUMN PORTAL_SYS_APP.ICON_ IS
'图标';

COMMENT ON COLUMN PORTAL_SYS_APP.ICON_COLOR_ IS
'图标颜色';

COMMENT ON COLUMN PORTAL_SYS_APP.TYPE_ IS
'类型';

COMMENT ON COLUMN PORTAL_SYS_APP.PAGE_ IS
'所在页';

COMMENT ON COLUMN PORTAL_SYS_APP.IS_PUBLISH_ IS
'是否发布 1发布 0未发布';

COMMENT ON COLUMN PORTAL_SYS_APP.SN_ IS
'顺序';

COMMENT ON COLUMN PORTAL_SYS_APP.CONTENT_ IS
'内容';

COMMENT ON COLUMN PORTAL_SYS_APP.CREATE_TIME_ IS
'创建时间';

COMMENT ON COLUMN PORTAL_SYS_APP.UPDATE_TIME_ IS
'更新时间';

COMMENT ON COLUMN PORTAL_SYS_APP.CREATE_BY_ IS
'创建人';

COMMENT ON COLUMN PORTAL_SYS_APP.UPDATE_BY_ IS
'更新人';

COMMENT ON COLUMN PORTAL_SYS_APP.TENANT_ID_ IS
'租户ID';

CREATE TABLE PORTAL_SYS_APP_MENU
(
   ID_                  VARCHAR2(64)         NOT NULL,
   PARENT_ID_           VARCHAR2(64)         DEFAULT NULL,
   NAME_                VARCHAR2(128)        DEFAULT NULL,
   ALIAS_               VARCHAR2(255)        DEFAULT NULL,
   TYPE_                SMALLINT             DEFAULT NULL,
   CONTENT_             CLOB,
   SN_                  VARCHAR2(255)        DEFAULT NULL,
   APP_ID_              VARCHAR2(64)         DEFAULT NULL,
   CREATE_TIME_         DATE                 DEFAULT NULL,
   CREATE_BY_           VARCHAR2(64)         DEFAULT NULL,
   UPDATE_TIME_         DATE                 DEFAULT NULL,
   UPDATE_BY_           VARCHAR2(64)          DEFAULT NULL,
   TENANT_ID_           VARCHAR2(64)         DEFAULT NULL,
   CONSTRAINT PK_PORTAL_SYS_APP_MENU PRIMARY KEY (ID_)
);

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.ID_ IS
'主键';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.PARENT_ID_ IS
'父节点ID';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.NAME_ IS
'菜单名称';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.ALIAS_ IS
'别名';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.TYPE_ IS
'类型';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.CONTENT_ IS
'内容';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.SN_ IS
'排序';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.APP_ID_ IS
'APPID';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.CREATE_TIME_ IS
'创建时间';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.CREATE_BY_ IS
'创建人';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.UPDATE_TIME_ IS
'更新时间';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.UPDATE_BY_ IS
'更新人';

COMMENT ON COLUMN PORTAL_SYS_APP_MENU.TENANT_ID_ IS
'组合ID';




INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1296282423985836032', '3711006', '应用中心', 'appCenter', '', '', 1, 5, '', '-1.1.3441002.3711006.1296282423985836032.', '', '-1');

INSERT INTO PORTAL_SYS_COLUMN(ID, NAME, ALIAS, CATALOG, COL_TYPE, DATA_MODE, DATA_FROM, DS_ALIAS, DS_NAME, COL_HEIGHT, COL_URL, TEMPLATE_HTML, IS_PUBLIC, SUPPORT_REFESH, REFESH_TIME, SHOW_EFFECT, MEMO, DATA_PARAM, NEEDPAGE, ORG_ID, CREATOR, CREATE_BY_, UPDATE_BY_, CREATE_TIME_, UPDATE_TIME_, REQUEST_TYPE, CATALOG_NAME, CREATE_ORG_ID_, TENANT_ID_) VALUES ('1298555788968726528', '应用中心', 'yyzx', '31081', 0, 3, '${portal}/portal/sysApp/v1/listJson', '', NULL, 250, '/appCenterFront', 'PGVsLXJvdyBzdHlsZT0icGFkZGluZy10b3A6MTBweDt0ZXh0LWFsaWduOiBjZW50ZXI7Ij4KICAgIDxlbC1jb2wgCiAgICAgICAgOnNwYW49JzYnIAogICAgICAgIHN0eWxlPSJ0ZXh0LWFsaWduOiBjZW50ZXIiCiAgICAgICAgdi1mb3I9J2FwcCBpbiBkYXRhLnJvd3MnPgogICAgICAgIDxlbC1jYXJkCiAgICAgICAgICAgICAgc2hhZG93PSJob3ZlciIKICAgICAgICAgICAgICA6c3R5bGU9IntoZWlnaHQ6ICc5MHB4Jyx3aWR0aDogJzkwcHgnLGJhY2tncm91bmQ6IGFwcC5pY29uQ29sb3I/YXBwLmljb25Db2xvcjonIzEzMzlFMCcsY3Vyc29yOidwb2ludGVyJ30iCiAgICAgICAgICAgICAgOmJvZHktc3R5bGU9InsgcGFkZGluZzogJzBweCcgfSIKICAgICAgICAgICAgICBAY2xpY2submF0aXZlPSJjbGlja0FwcChhcHApIj4KICAgICAgICAgICAgPGkgc3R5bGU9ImZvbnQtc2l6ZTo4MHB4O3BhZGRpbmctdG9wOiA1cHg7Y29sb3I6ICNmZmZmZmYiIDpjbGFzcz0iYXBwLmljb24/YXBwLmljb246J2ljb24taG90ZW50LUgnIj48L2k+CiAgICAgICAgICA8L2VsLWNhcmQ+CiAgICAgICAgICA8ZGl2IHN0eWxlPSJmb250LXNpemU6IDEwcHg7dGV4dC1vdmVyZmxvdzplbGxpcHNpczt3aWR0aDogOTBweDsiPnt7YXBwLm5hbWV9fTwvZGl2PgogICAgPC9lbC1jb2w+CjwvZWwtcm93Pg==', 2, NULL, NULL, NULL, '', '[{"name":"pageBean","type":"string","mode":"0","value":"{\"page\":1,\"pageSize\":8,\"total\":0,\"showTotal\":false}"},{"name":"querys","type":"string","mode":"0","value":"[{\"property\": \"is_publish_\", \"value\": \"1\", \"group\": \"main\", \"operation\": \"EQUAL\", \"relation\": \"OR\"}]"},{"name":"sorter","type":"string","mode":"0","value":"[{\"direction\": \"ASC\",\"property\": \"sn_\"}]"}]', 0, NULL, NULL, NULL, '1', NULL, NULL, 'POST', '默认分类', NULL, '-1');

UPDATE PORTAL_SYS_LAYOUT_MANAGE SET NAME = '应用端-系统默认布局', MEMO = '', TEMPLATE_HTML = '', DESIGN_HTML = 'eyJsaXN0IjpbeyJ0eXBlIjoiZ3JpZCIsIm5hbWUiOiLmoIXmoLzluIPlsYAiLCJpY29uIjoiaWNvbi1ncmlkIiwiY29sdW1ucyI6W3sic3BhbiI6MjQsImxpc3QiOlt7Im5hbWUiOiLkuKrkurrkv6Hmga/moI/nm64iLCJhbGlhcyI6ImdyeHhsbSIsIm9wdGlvbnMiOnsicmVtb3RlRnVuYyI6ImZ1bmNfMTU5MTE0OTIwODAwMF81NDE1MyJ9LCJrZXkiOiIxNTkxMTQ5MjA4MDAwXzU0MTUzIiwibW9kZWwiOiJ1bmRlZmluZWRfMTU5MTE0OTIwODAwMF81NDE1MyIsInJ1bGVzIjpbXX1dfV0sIm9wdGlvbnMiOnsiZ3V0dGVyIjowLCJqdXN0aWZ5Ijoic3RhcnQiLCJhbGlnbiI6InRvcCIsInJlbW90ZUZ1bmMiOiJmdW5jXzE1OTEwOTcxNTIwMDBfNjQwMzAifSwia2V5IjoiMTU5MTA5NzE1MjAwMF82NDAzMCIsIm1vZGVsIjoiZ3JpZF8xNTkxMDk3MTUyMDAwXzY0MDMwIiwicnVsZXMiOltdfSx7InR5cGUiOiJncmlkIiwibmFtZSI6IuagheagvOW4g+WxgCIsImljb24iOiJpY29uLWdyaWQiLCJjb2x1bW5zIjpbeyJzcGFuIjoxMiwibGlzdCI6W3sibmFtZSI6IuaIkeeahOW+heWKniIsImFsaWFzIjoidnVlVG9kbyIsIm9wdGlvbnMiOnsicmVtb3RlRnVuYyI6ImZ1bmNfMTU5MTE0OTIxMjAwMF84ODQ3MyJ9LCJrZXkiOiIxNTkxMTQ5MjEyMDAwXzg4NDczIiwibW9kZWwiOiJ1bmRlZmluZWRfMTU5MTE0OTIxMjAwMF84ODQ3MyIsInJ1bGVzI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wLCJsYWJlbFBvc2l0aW9uIjoicmlnaHQiLCJzaXplIjoic21hbGwifX0=') WHERE ID = '2';
INSERT INTO PORTAL_SYS_AUTH_USER(ID_, AUTHORIZE_ID_, OWNER_ID_, OWNER_NAME_, RIGHT_TYPE_, OBJ_TYPE_, TENANT_ID_) VALUES ('1298555789090361344', '1298555788968726528', NULL, NULL, 'everyone', 'indexColumn', '-1');

INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1300728049968484352', '3', '应用中心', 'appCenterFront', '', '', NULL, 4, '', '-1.3.1300728049968484352.', '', '-1');



-- lingpj 默认角色的菜单授权
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163664288452608', 'xtgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163664317812736', 'xtgly', 'manage_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665894871040', 'xtgly', 'orgManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665915842560', 'xtgly', 'jobManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665932619776', 'xtgly', 'postManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665953591296', 'xtgly', 'prgParamManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665974562816', 'xtgly', 'ucManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163665995534336', 'xtgly', 'userListManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666016505856', 'xtgly', 'userParamManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666033283072', 'xtgly', 'loginLogManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666050060288', 'xtgly', 'roleMatrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666071031808', 'xtgly', 'matrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666092003328', 'xtgly', 'roleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666117169152', 'xtgly', 'reportLine', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666138140672', 'xtgly', 'pwdStrategy', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666154917888', 'xtgly', 'heiOrganization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666171695104', 'xtgly', 'scheduling', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666196860928', 'xtgly', 'holidayManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666217832448', 'xtgly', 'shiftRuleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666230415360', 'xtgly', 'tenant', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666251386880', 'xtgly', 'tenantTypeManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666276552704', 'xtgly', 'tenantManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666289135616', 'xtgly', 'tenantParamsManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666310107136', 'xtgly', 'front_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666326884352', 'xtgly', 'v-flow', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666343661568', 'xtgly', 'v-leader', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666364633088', 'xtgly', 'v-todo', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666385604608', 'xtgly', 'v-done', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666402381824', 'xtgly', 'v-request', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666419159040', 'xtgly', 'v-flowList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666435936256', 'xtgly', 'v-todoRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666452713472', 'xtgly', 'v-doneRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666473684992', 'xtgly', 'v-myRead', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666486267904', 'xtgly', 'v-myDelegate', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666507239424', 'xtgly', 'v-mail', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666524016640', 'xtgly', 'v-mailList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666549182464', 'xtgly', 'v-linkmanList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666565959680', 'xtgly', 'v-settingList', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666582736896', 'xtgly', 'v-personal', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666599514112', 'xtgly', 'v-agent', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666616291328', 'xtgly', 'v-approvalItem', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163666637262848', 'xtgly', 'v-secretary', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705140973568', 'rsgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705157750784', 'rsgly', 'manage_menu', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705174528000', 'rsgly', 'orgStructure', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705199693824', 'rsgly', 'organization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705220665344', 'rsgly', 'demension', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705241636864', 'rsgly', 'orgManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705266802688', 'rsgly', 'jobManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705287774208', 'rsgly', 'postManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705312940032', 'rsgly', 'prgParamManage', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705338105856', 'rsgly', 'ucManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705367465984', 'rsgly', 'userListManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705392631808', 'rsgly', 'userParamManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705413603328', 'rsgly', 'loginLogManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705430380544', 'rsgly', 'roleMatrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705447157760', 'rsgly', 'matrixManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705472323584', 'rsgly', 'roleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705501683712', 'rsgly', 'reportLine', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705518460928', 'rsgly', 'pwdStrategy', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705543626752', 'rsgly', 'heiOrganization', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705568792576', 'rsgly', 'scheduling', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705589764096', 'rsgly', 'holidayManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705606541312', 'rsgly', 'shiftRuleManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705623318528', 'rsgly', 'tenant', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705644290048', 'rsgly', 'tenantTypeManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705669455872', 'rsgly', 'tenantManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163705690427392', 'rsgly', 'tenantParamsManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163775647223808', 'lcgly', 'bpm_platform', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1299163775689166848', 'lcgly', 'designCenter', NULL, NULL, '-1');

-- oracle 下将 MANAGE_FIELD_ 调整为 clob 类型
ALTER TABLE FORM_DATA_TEMPLATE RENAME COLUMN MANAGE_FIELD_ TO MANAGE_FIELD_BAK_;
ALTER TABLE FORM_DATA_TEMPLATE ADD MANAGE_FIELD_ CLOB;
UPDATE FORM_DATA_TEMPLATE SET MANAGE_FIELD_=MANAGE_FIELD_BAK_;
COMMIT;
ALTER TABLE FORM_DATA_TEMPLATE DROP COLUMN MANAGE_FIELD_BAK_;

--  zhangxw 2020-09-02 流程终止恢复消息通知模板
INSERT INTO PORTAL_SYS_MSG_TPL(ID_, NAME_, KEY_, TYPE_KEY_, IS_DEFAULT_, SUBJECT_, PLAIN_, HTML_, CREATE_BY_, CREATE_TIME_, CREATE_ORG_ID_, UPDATE_BY_, UPDATE_TIME_, SMS_TEMPLATE_NO_, VOICE_TEMPLATE_NO_, TENANT_ID_) VALUES ('20', '流程终止恢复默认', 'bpmrenewprocess-default', 'bpmrenewprocess', '1', '流程终止恢复通知', '流程实例终止恢复通知：${instSubject}，意见:${cause}。', '流程实例已恢复运行中状态<a href=\"#\">${instSubject}</a>，意见:${cause}。', null, null, null, null, null, null, null, '-1');

-- 2020-09-03 zhaoxiangyun 租户管理表新增应用端租户名称字段
alter table UC_TENANT_MANAGE add NAME_FRONT_ varchar2(128);




-- 2020-09-04 流程仿真 字段不够长
ALTER TABLE BPM_TEST_CASE MODIFY FLOW_VARS_  VARCHAR(4000);
ALTER TABLE BPM_TEST_CASE MODIFY ACTION_TYPE_  VARCHAR(4000);
ALTER TABLE BPM_TEST_CASE MODIFY BPM_DEBUGGER_  VARCHAR(4000);

-- 2020-09-04 紧急程度没有显示的问题修改
UPDATE PORTAL_SYS_PROPERTIES SET NAME = '紧急状态配置', ALIAS = 'urgentStateConf', GROUP_ = NULL, VALUE = '[{state:"1",name:"非常紧急",color:"red" }, {state:"2",name:"比较紧急",color:"#e6a23c" },{state:"3",name:"一般",color:"#5daf34",default:true}]', ENCRYPT = 0, DESCRIPTION = '', UPDATE_TIME_ = NULL, CREATE_BY_ = NULL, CREATE_TIME_ = NULL, CREATE_ORG_ID_ = NULL, UPDATE_BY_ = NULL, TENANT_ID_ = '-1' WHERE ID = '18';

-- 2020-09-04 更新移动端数据台
UPDATE PORTAL_SYS_COLUMN set TEMPLATE_HTML='PGRpdiBpZD0iYXBwIj4KPGVsLXJvdyA6Z3V0dGVyPSIyMCIgc3R5bGU9InBhZGRpbmctdG9wOjVweDtwYWRkaW5nLWJvdHRvbTo1cHg7Ij4KICA8ZWwtY29sIDpzcGFuPSI4Ij4KIDxkaXY+CiAgPHJvdXRlci1saW5rIHRvPSIvd29yay9teU1hdHRlcnMiIHRhZz0iZGl2Ij4KICAgPGRpdiBzdHlsZT0icGFkZGluZy1sZWZ0OjVweCI+CiAgIDxkaXYgc3R5bGU9IndpZHRoOjUwcHg7aGVpZ2h0OjUwcHg7YmFja2dyb3VuZDpsaW5lYXItZ3JhZGllbnQoMGRlZyxyZ2JhKDU0LDE0MywyNTUsMSkgMCUscmdiYSgxNTcsMjEyLDI1NSwxKSAxMDAlKTtib3gtc2hhZG93OjBweCA5cHggMjBweCAwcHggcmdiYSgwLDg2LDIyOCwwLjI2KTtib3JkZXItcmFkaXVzOjUwJTsiPgogICAgIDxzcGFuIGNsYXNzPSJpY29uLXRvZG8iIHN0eWxlPSJmb250LXNpemU6IDM1cHg7IHBhZGRpbmc6IDhweDsgY29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KTsiPjwvc3Bhbj4KICAgIDwvZGl2PgogICAgIDwvZGl2PgogICA8ZGl2PiA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0OjUwcHg7YmFja2dyb3VuZDpsaW5lYXItZ3JhZGllbnQoMGRlZyxyZ2JhKDg3LDIwMiwxNzYsMSkgMCUscmdiYSgxNTQsMjU1LDIyOCwxKSAxMDAlKTtib3gtc2hhZG93OjBweCA5cHggMjBweCAwcHggcmdiYSgwLDIxMywxNDQsMC4yNik7Ym9yZGVyLXJhZGl1czo1MCU7Ij4KICAgICAgICAgIDxzcGFuIGNsYXNzPSJpY29uLXhpbmppYW5saXVjaGVuZyIgc3R5bGU9ImZvbnQtc2l6ZTogMzVweDsgcGFkZGluZzogOHB4OyBjb2xvcjogcmdiKDI1NSwgMjU1LCAyNTUpOyI+PC9zcGFuPgogICAgPC9kaXY+CiAgIDwvZGl2PiAgICAgCiAgIDxkaXYgc3R5bGU9InBhZGRpbmctbGVmdDo1cHgiPiA8c3BhbiBzdHlsZT0iZm9udC1zaXplOjEycHg7Zm9udC1mYW1pbHk6TWljcm9zb2Z0IFlhSGVpO2ZvbnQtd2VpZ2h0OjQwMDtjb2xvcjpyZ2JhKDE0NSwxNDUsMTQ1LDEpO2xpbmUtaGVpZ2h0OjMwcHg7Ij7mlrDlu7rmtYHnqIs8L3NwYW4+PC9kaXY+CiAgIDwvcm91dGVyLWxpbms+CiAgICA8L2Rpdj4KICA8L2VsLWNvbD4KPC9lbC1yb3c+CjwvZGl2Pg==') WHERE ID='1267991710768697344';

-- 2020-09-05 李洪桥 将菜单应用中心改成移动端应用中心
UPDATE PORTAL_SYS_MENU SET NAME_='移动端应用中心' WHERE ID_='1285866737765584896';

-- 2020-09-05 提醒设置增加外键
ALTER TABLE fORM_REMIND_DATA ADD REF_ID_ VARCHAR(64) NULL;

-- 2020-9-8 流程水印 qiuxd
CREATE TABLE BPM_WATERMARK(
  ID_  				VARCHAR(64)  	NOT NULL,
  NAME_ 			VARCHAR(128) 	DEFAULT NULL,
  CONTENT_ 			CLOB, 			
  TYPE_ 			SMALLINT		DEFAULT NULL,
  COLOR_			VARCHAR(32) 	DEFAULT NULL,
  AMOUNT_ 			INTEGER 		DEFAULT NULL,
  CREATE_TIME_ 		DATE 			DEFAULT NULL,
  CREATE_BY_ 		VARCHAR(64) 	DEFAULT NULL,
  UPDATE_TIME_ 		DATE 			DEFAULT NULL,
  UPDATE_BY_ 		VARCHAR(64) 	DEFAULT NULL,
  CREATE_ORG_ID_ 	VARCHAR(64) 	DEFAULT NULL,
  TENANT_ID_ 		VARCHAR(64) 	DEFAULT NULL,
  CONSTRAINT BPM_WATERMARK PRIMARY KEY (ID_)
);
COMMENT ON COLUMN BPM_WATERMARK.ID_ IS
'主键';
COMMENT ON COLUMN BPM_WATERMARK.NAME_ IS
'名称';
COMMENT ON COLUMN BPM_WATERMARK.CONTENT_ IS
'内容';
COMMENT ON COLUMN BPM_WATERMARK.TYPE_ IS
'类型 1文字 2图片';
COMMENT ON COLUMN BPM_WATERMARK.COLOR_ IS
'颜色 透明度';
COMMENT ON COLUMN BPM_WATERMARK.AMOUNT_ IS
'页面展示数量';
COMMENT ON COLUMN BPM_WATERMARK.CREATE_TIME_ IS
'创建时间';
COMMENT ON COLUMN BPM_WATERMARK.CREATE_BY_ IS
'创建人';
COMMENT ON COLUMN BPM_WATERMARK.UPDATE_TIME_ IS
'更新时间';
COMMENT ON COLUMN BPM_WATERMARK.UPDATE_BY_  IS
'更新人';
COMMENT ON COLUMN BPM_WATERMARK.CREATE_ORG_ID_   IS
'创建人组织ID';
COMMENT ON COLUMN BPM_WATERMARK.TENANT_ID_  IS
'租户ID';

CREATE TABLE BPM_WATERMARK_TYPE(
  ID_ 				varchar(64) 	NOT NULL,
  TYPE_ID_ 			varchar(64) 	DEFAULT NULL,
  WATERMARK_ID_ 	varchar(64) 	DEFAULT NULL,
  TYPE_NAME_ 		varchar(256) 	DEFAULT NULL,
  TENANT_ID_ 		varchar(64) 	DEFAULT NULL,
  CONSTRAINT BPM_WATERMARK_TYPE PRIMARY KEY (ID_)
);
COMMENT ON COLUMN BPM_WATERMARK_TYPE.ID_  IS
'主键';
COMMENT ON COLUMN BPM_WATERMARK_TYPE.TYPE_ID_  IS
'分类ID';
COMMENT ON COLUMN BPM_WATERMARK_TYPE.WATERMARK_ID_  IS
'水印ID';
COMMENT ON COLUMN BPM_WATERMARK_TYPE.TYPE_NAME_  IS
'分类名称';
COMMENT ON COLUMN BPM_WATERMARK_TYPE.TENANT_ID_  IS
'租户ID';

INSERT INTO PORTAL_SYS_MENU(ID_, PARENT_ID_, NAME_, ALIAS_, ACTIVE_TAB_, MENU_ICON_, OPENED_, SN_, TABS_STYLE_, PATH_, HREF_, TENANT_ID_) VALUES ('1303147346326065152', '3761202', '流程水印', 'watermarkManager', '', '', NULL, 5, '', '-1.1.3641025.3761202.1303147346326065152.', '', '-1');

-- 2020-09-09 lingpj 流程水印菜单授权
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1303524385981861888', 'xtgly', 'watermarkManager', NULL, NULL, '-1');
INSERT INTO PORTAL_SYS_ROLE_AUTH(ID_, ROLE_ALIAS_, MENU_ALIAS_, METHOD_ALIAS_, DATA_PERMISSION_, TENANT_ID_) VALUES ('1303524446065266688', 'lcgly', 'watermarkManager', NULL, NULL, '-1');


-- 2020-09-09 qiuxd 催办历史添加taskID
ALTER TABLE BPM_REMINDER_HISTORY ADD TASK_ID_ VARCHAR(64) NOT NULL;

-- 2020-09-10 李洪桥 移动端获取数据台信息调用getDefaultInfoMap接口（迁移海雅分支#58277）
UPDATE PORTAL_SYS_COLUMN SET DATA_FROM='${bpmRunTime}/runtime/instance/v1/getDefaultInfoMap' where ID = '1267991710768697344';

-- 2020-09-10 赵祥云 人员脚本 获取上一节点执行人的部门负责人新增一个参数（传维度id或编码都可以）
DELETE FROM BPM_MULTI_SCRIPT WHERE ID_='11';
INSERT INTO BPM_MULTI_SCRIPT(ID_, ALIAS_NAME_, ALIAS_DESC_, CLASS_NAME_, CLASS_INS_NAME_, METHOD_NAME_, METHOD_DESC_, RETURN_TYPE_, ARGUMENT_, ENABLE_, TYPE_, TENANT_ID_) VALUES ('11', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getChargesByPreNode', '获取上一节点执行人的部门负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人\",\"paraCt\":\"\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"传维度id或编码都可以          \"}]', '1', '2', '-1');

