ソースを参照

优化代码

master
PoffyZhang 1年前
コミット
b75134d813
23個のファイルの変更1213行の追加43行の削除
  1. +7
    -0
      pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql
  2. +56
    -0
      pgsql/deploy.sql
  3. +18
    -0
      pgsql/flw_ev_databasechangelog.sql
  4. +13
    -0
      pgsql/wflow_cc_tasks.sql
  5. +27
    -0
      pgsql/wflow_departments.sql
  6. +11
    -0
      pgsql/wflow_model_groups.sql
  7. +17
    -0
      pgsql/wflow_model_historys.sql
  8. +10
    -0
      pgsql/wflow_model_perms.sql
  9. +20
    -0
      pgsql/wflow_models.sql
  10. +14
    -0
      pgsql/wflow_notifys.sql
  11. +12
    -0
      pgsql/wflow_roles.sql
  12. +9
    -0
      pgsql/wflow_user_agents.sql
  13. +20
    -0
      pgsql/wflow_user_departments.sql
  14. +9
    -0
      pgsql/wflow_user_roles.sql
  15. +31
    -0
      pgsql/wflow_users.sql
  16. +910
    -0
      pgsql/wflowother.sql
  17. +0
    -7
      pmapi/pom.xml
  18. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/basic/AbstractRegionCacheHelper.java
  19. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java
  20. +8
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java
  21. +19
    -19
      pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java
  22. +0
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  23. +0
    -1
      pom.xml

+ 7
- 0
pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql ファイルの表示

@@ -0,0 +1,7 @@
CREATE TABLE PUBLIC.FLW_EV_DATABASECHANGELOGLOCK (
ID int8 NOT NULL,
LOCKED bool NOT NULL,
LOCKGRANTED timestamp,
LOCKEDBY VARCHAR(255),
CONSTRAINT FLW_EV_DATABASECHANGELOGLOCK_PK PRIMARY KEY (ID)
);

+ 56
- 0
pgsql/deploy.sql ファイルの表示

@@ -0,0 +1,56 @@
CREATE TABLE PUBLIC.FLW_EVENT_DEPLOYMENT (
ID_ VARCHAR(255) NOT NULL,
NAME_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
DEPLOY_TIME_ timestamp,
TENANT_ID_ VARCHAR(255),
PARENT_DEPLOYMENT_ID_ VARCHAR(255),
CONSTRAINT FLW_EVENT_DEPLOYMENT_PK PRIMARY KEY (ID_)
);

create table PUBLIC.FLW_CHANNEL_DEFINITION
(
ID_ VARCHAR(255) not null
constraint "flw_channel_definition_pk"
primary key,
NAME_ VARCHAR(255),
VERSION_ INT4,
KEY_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
DEPLOYMENT_ID_ VARCHAR(255),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255),
RESOURCE_NAME_ VARCHAR(255),
DESCRIPTION_ VARCHAR(255),
TYPE_ VARCHAR(255),
IMPLEMENTATION_ VARCHAR(255)
);
CREATE UNIQUE INDEX ACT_IDX_CHANNEL_DEF_UNIQ ON FLW_CHANNEL_DEFINITION(KEY_,VERSION_,TENANT_ID_);


create table FLW_EVENT_DEFINITION
(
ID_ VARCHAR(255) not null
constraint "flw_event_definition_pk"
primary key,
NAME_ VARCHAR(255),
VERSION_ INT4,
KEY_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
DEPLOYMENT_ID_ VARCHAR(255),
TENANT_ID_ VARCHAR(255),
RESOURCE_NAME_ VARCHAR(255),
DESCRIPTION_ VARCHAR(255)
);
CREATE UNIQUE INDEX ACT_IDX_EVENT_DEF_UNIQ ON FLW_EVENT_DEFINITION(KEY_,VERSION_,TENANT_ID_);


create table FLW_EVENT_RESOURCE
(
ID_ VARCHAR(255) not null
constraint "flw_event_resource_pk"
primary key,
NAME_ VARCHAR(255),
DEPLOYMENT_ID_ VARCHAR(255),
RESOURCE_BYTES_ BLOB
);

+ 18
- 0
pgsql/flw_ev_databasechangelog.sql ファイルの表示

@@ -0,0 +1,18 @@
-- PUBLIC."flw_ev_databasechangelog" definition

CREATE TABLE PUBLIC."FLW_EV_DATABASECHANGELOG" (
ID VARCHAR(255) NOT NULL,
AUTHOR VARCHAR(255) NOT NULL,
FILENAME VARCHAR(255) NOT NULL,
DATEEXECUTED timestamp,
ORDEREXECUTED int8,
EXECTYPE VARCHAR(10),
MD5SUM VARCHAR(35),
DESCRIPTION VARCHAR(255),
COMMENTS VARCHAR(255),
TAG VARCHAR(255),
LIQUIBASE VARCHAR(20),
CONTEXTS VARCHAR(255),
LABELS VARCHAR(255),
DEPLOYMENT_ID VARCHAR(10)
);

+ 13
- 0
pgsql/wflow_cc_tasks.sql ファイルの表示

@@ -0,0 +1,13 @@
DROP TABLE IF EXISTS wflow_cc_tasks;
CREATE TABLE wflow_cc_tasks (
id bigserial NOT NULL,
instance_id varchar(40) NOT NULL,
user_id varchar(30) NOT NULL,
node_id varchar(40) NOT NULL,
node_name varchar(50) NOT NULL,
create_time timestamp NOT NULL,
CONSTRAINT "wflow_cc_tasks_pri" PRIMARY KEY ("id")
)
CREATE INDEX instance_idx ON wflow_cc_tasks(instance_id, user_id);
comment on TABLE wflow_cc_tasks IS '抄送任务表';
comment on column wflow_cc_tasks.id IS '主键id';

+ 27
- 0
pgsql/wflow_departments.sql ファイルの表示

@@ -0,0 +1,27 @@
DROP TABLE IF EXISTS wflow_departments;
CREATE TABLE wflow_departments (
id bigserial NOT NULL,
dept_name varchar(255),
leader varchar(255),
parent_id int8,
created timestamp,
updated timestamp,
CONSTRAINT "wflow_departments_pri" PRIMARY KEY ("id")
)
CREATE INDEX parent_idx ON wflow_departments(parent_id);
CREATE INDEX leader_idx ON wflow_departments(leader);
comment ON TABLE wflow_departments IS '部门表';
comment ON column wflow_departments.id IS '主键';
comment ON column wflow_departments.dept_name IS '部门名';
comment ON column wflow_departments.leader IS '部门主管';
comment ON column wflow_departments.parent_id IS '父部门id';
-- ----------------------------
-- Records of wflow_departments
-- ----------------------------
INSERT INTO wflow_departments VALUES (35453, '业务部', '3286432', 4319868, '2020-09-16 13:30:37', '2022-09-25 17:49:29');
INSERT INTO wflow_departments VALUES (231535, '生产管理部', NULL, 1486186, '2020-09-16 13:30:39', '2020-09-16 13:30:42');
INSERT INTO wflow_departments VALUES (264868, '行政人事部', NULL, 1486186, '2020-09-16 13:30:42', '2020-09-16 13:30:44');
INSERT INTO wflow_departments VALUES (689698, '客服部', '489564', 4319868, '2020-09-16 13:30:34', '2022-09-04 18:26:20');
INSERT INTO wflow_departments VALUES (1486186, 'xx科技有限公司', '381496', 0, '2020-09-16 13:26:25', '2022-09-04 18:25:12');
INSERT INTO wflow_departments VALUES (4319868, '销售服务部', '927438', 1486186, '2020-09-16 13:30:44', '2022-09-04 18:26:07');
INSERT INTO wflow_departments VALUES (6179678, '研发部', '6418616', 1486186, '2020-09-16 13:26:56', '2022-09-04 18:25:49');

+ 11
- 0
pgsql/wflow_model_groups.sql ファイルの表示

@@ -0,0 +1,11 @@
DROP TABLE IF EXISTS wflow_model_groups;
CREATE TABLE wflow_model_groups (
group_id bigserial NOT NULL,
group_name varchar(50),
sort int2 NOT NULL,
updated timestamp,
CONSTRAINT wflow_model_groups_pri PRIMARY key ("group_id")
);
comment ON TABLE wflow_model_groups IS '流程分组表';
comment ON COLUMN wflow_model_groups.group_name IS '分组名';
comment ON COLUMN wflow_model_groups.sort IS '排序';

+ 17
- 0
pgsql/wflow_model_historys.sql ファイルの表示

@@ -0,0 +1,17 @@
DROP TABLE IF EXISTS wflow_model_historys;
CREATE TABLE wflow_model_historys (
id bigserial NOT NULL,
process_def_id varchar(40),
form_id varchar(40) NOT NULL,
form_name varchar(40) NOT NULL,
version int4 NOT NULL DEFAULT 0,
logo json NOT NULL,
settings json NOT NULL,
group_id int8 NOT NULL,
form_items json NOT NULL,
process json NOT NULL,
remark varchar(255),
created timestamp NULL DEFAULT NULL,
CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id")
)
CREATE UNIQUE INDEX form_id_uk ON wflow_model_historys(form_id,version);

+ 10
- 0
pgsql/wflow_model_perms.sql ファイルの表示

@@ -0,0 +1,10 @@
DROP TABLE IF EXISTS wflow_model_perms;
CREATE TABLE wflow_model_perms (
id varchar(40) NOT NULL,
form_id varchar(40),
perm_type varchar(5),
org_id int8 NOT NULL,
create_time timestamp,
CONSTRAINT "wflow_model_perms_pri" PRIMARY KEY ("id")
)
CREATE INDEX form_idx ON wflow_model_perms(form_id, perm_type);

+ 20
- 0
pgsql/wflow_models.sql ファイルの表示

@@ -0,0 +1,20 @@
DROP TABLE IF EXISTS wflow_models;
CREATE TABLE wflow_models (
form_id varchar(40),
process_def_id varchar(40),
deploy_id varchar(40),
version int4 NOT NULL DEFAULT 1,
form_name varchar(50),
logo json,
settings json,
group_id int8,
form_items json NOT NULL,
process json NOT NULL,
remark varchar(125),
sort int4 NOT NULL,
is_delete BOOL,
is_stop BOOL,
created timestamp,
updated timestamp,
CONSTRAINT "wflow_models_pri" PRIMARY KEY ("form_id")
)

+ 14
- 0
pgsql/wflow_notifys.sql ファイルの表示

@@ -0,0 +1,14 @@
DROP TABLE IF EXISTS wflow_notifys;
CREATE TABLE wflow_notifys (
id varchar(40) NOT NULL,
title varchar(255) NOT NULL,
user_id varchar(50) NOT NULL,
type varchar(10),
instance_id varchar(40),
content varchar(255) NOT NULL,
readed BOOL,
link varchar(255),
create_time timestamp,
CONSTRAINT "wflow_notifys_pri" PRIMARY KEY ("id")
)
CREATE INDEX user_idx ON wflow_notifys(user_id);

+ 12
- 0
pgsql/wflow_roles.sql ファイルの表示

@@ -0,0 +1,12 @@
DROP TABLE IF EXISTS wflow_roles;
CREATE TABLE wflow_roles (
role_id varchar(20) NOT NULL,
role_name varchar(50) NOT NULL,
created timestamp,
CONSTRAINT "wflow_roles_pri" PRIMARY KEY ("role_id")
)


INSERT INTO wflow_roles VALUES ('BOOS', '董事长', '2022-09-04 18:22:18');
INSERT INTO wflow_roles VALUES ('HR', '人事', '2022-09-04 18:22:47');
INSERT INTO wflow_roles VALUES ('WFLOW_APPROVAL_ADMIN', '审批管理员', '2022-09-04 18:14:16');

+ 9
- 0
pgsql/wflow_user_agents.sql ファイルの表示

@@ -0,0 +1,9 @@
DROP TABLE IF EXISTS wflow_user_agents;
CREATE TABLE wflow_user_agents (
user_id varchar(30) NOT NULL,
agent_user_id varchar(30) NOT NULL,
start_time timestamp NOT NULL,
end_time timestamp NULL DEFAULT NULL,
create_time timestamp NULL DEFAULT NULL,
CONSTRAINT "wflow_user_agents_pri" PRIMARY KEY ("user_id")
)

+ 20
- 0
pgsql/wflow_user_departments.sql ファイルの表示

@@ -0,0 +1,20 @@
DROP TABLE IF EXISTS wflow_user_departments;
CREATE TABLE wflow_user_departments (
id bigserial,
user_id varchar(20) NOT NULL,
dept_id varchar(20) NOT NULL,
created timestamp,
CONSTRAINT "wflow_user_departments_pri" PRIMARY KEY ("id")
)
CREATE UNIQUE INDEX user_uk ON wflow_user_departments(user_id,dept_id);

INSERT INTO wflow_user_departments VALUES (1, '381496', '1486186', '2022-07-05 17:42:17');
INSERT INTO wflow_user_departments VALUES (2, '489564', '689698', '2022-07-05 17:42:34');
INSERT INTO wflow_user_departments VALUES (3, '568898', '4319868', '2022-07-05 17:42:52');
INSERT INTO wflow_user_departments VALUES (4, '6418616', '6179678', '2022-07-05 17:43:09');
INSERT INTO wflow_user_departments VALUES (5, '61769798', '231535', '2022-07-05 17:43:24');
INSERT INTO wflow_user_departments VALUES (6, '327382', '6179678', '2022-09-04 18:17:55');
INSERT INTO wflow_user_departments VALUES (7, '8902743', '689698', '2022-09-04 18:19:12');
INSERT INTO wflow_user_departments VALUES (8, '927438', '4319868', '2022-09-04 18:21:08');
INSERT INTO wflow_user_departments VALUES (9, '3286432', '35453', '2022-09-25 17:49:19');
INSERT INTO wflow_user_departments VALUES (10, '3243678', '35453', '2022-09-25 17:50:58');

+ 9
- 0
pgsql/wflow_user_roles.sql ファイルの表示

@@ -0,0 +1,9 @@
DROP TABLE IF EXISTS wflow_user_roles;
CREATE TABLE wflow_user_roles (
id bigserial,
user_id varchar(30),
role_id varchar(20),
created timestamp,
CONSTRAINT "wflow_user_roles_pri" PRIMARY KEY ("id")
)
CREATE UNIQUE INDEX user_role_uk ON wflow_user_roles(user_id,role_id);

+ 31
- 0
pgsql/wflow_users.sql ファイルの表示

@@ -0,0 +1,31 @@
DROP TABLE IF EXISTS wflow_users;
CREATE TABLE wflow_users (
user_id int8 NOT NULL,
user_name varchar(50) NOT NULL,
pingyin varchar(50),
py varchar(5),
alisa varchar(50),
avatar varchar(1024),
sex BOOL,
entry_date date,
leave_date date,
created timestamp,
updated timestamp,
CONSTRAINT "wflow_users_pri" PRIMARY KEY ("user_id")
)
CREATE INDEX user_id_idx ON wflow_users(user_id);
CREATE INDEX leave_date_idex ON wflow_users(leave_date);

-- ----------------------------
-- Records of wflow_users
-- ----------------------------
INSERT INTO wflow_users VALUES (327382, '李富贵', 'lifugui', 'lfg', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/188230/26/28979/10654/633026fdEf64e5e84/fc5c07ab3d5eac19.png', b'1', '2022-09-23', NULL, '2022-09-04 18:14:53', '2022-09-25 18:01:41');
INSERT INTO wflow_users VALUES (381496, '旅人', 'lvren', 'lr', 'lr', 'https://pic.rmb.bdstatic.com/bjh/203726324a891b1946ba223209cb3fee.png', b'1', '2020-09-16', NULL, '2020-09-16 13:33:41', '2022-08-14 11:27:49');
INSERT INTO wflow_users VALUES (489564, '李秋香', 'liqiuxiang', 'lqx', 'lqx', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:35:40', '2022-06-27 16:48:25');
INSERT INTO wflow_users VALUES (568898, '王翠花', 'wangcuihua', 'wch', 'wch', 'https://dd-static.jd.com/ddimg/jfs/t1/204270/25/26917/8646/63302601E2794a142/5b75f81e6d0c4856.png', b'1', '2020-09-16', NULL, '2020-09-16 13:35:01', '2022-09-25 17:57:29');
INSERT INTO wflow_users VALUES (927438, '隔壁老王', 'gebilaowang', 'gblw', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/21515/30/18678/11719/633025abEe734404d/c2950fef75e96028.png', b'1', NULL, NULL, '2022-09-04 18:16:51', '2022-09-25 17:56:04');
INSERT INTO wflow_users VALUES (3243678, '狗剩', 'gousheng', 'gs', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/177987/31/29200/17909/63302676E5c00167f/13c59e53269e9f67.png', b'1', NULL, NULL, '2022-09-25 17:50:15', '2022-09-25 17:59:25');
INSERT INTO wflow_users VALUES (3286432, '铁蛋', 'tiedan', 'td', NULL, 'https://dd-static.jd.com/ddimg/jfs/t1/203154/8/26845/14302/633026b7Ea9b381f7/7e7c5d96fcda0d39.png', b'1', NULL, NULL, '2022-09-25 17:48:39', '2022-09-25 18:00:28');
INSERT INTO wflow_users VALUES (6418616, '张三', 'zhangsan', 'zs', 'zs', NULL, b'1', '2020-09-16', NULL, '2020-09-16 13:32:25', '2022-06-27 16:48:32');
INSERT INTO wflow_users VALUES (8902743, '张秋梅', 'zhengqiumei', 'zqm', NULL, NULL, b'1', NULL, NULL, '2022-09-04 18:16:12', '2022-09-04 18:16:13');
INSERT INTO wflow_users VALUES (61769798, '李四', 'lisi', 'ls', 'ls', NULL, b'1', '2019-09-16', NULL, '2020-09-16 13:33:00', '2022-06-27 16:48:34');

+ 910
- 0
pgsql/wflowother.sql ファイルの表示

@@ -0,0 +1,910 @@
create table ACT_HI_COMMENT(
ID_ VARCHAR(64) not NULL,

TYPE_ VARCHAR(255),

TIME_ TIMESTAMP not null,

USER_ID_ VARCHAR(255),

TASK_ID_ VARCHAR(64),

PROC_INST_ID_ VARCHAR(64),

ACTION_ VARCHAR(255),

MESSAGE_ VARCHAR(2000),

FULL_MSG_ BLOB,

constraint ACT_HI_COMMENT_PKEY primary KEY(ID_)
);

create table ACT_HI_DETAIL
(
ID_ VARCHAR(64) not NULL,
TYPE_ VARCHAR(255) not null,
PROC_INST_ID_ VARCHAR(64),
EXECUTION_ID_ VARCHAR(64),
TASK_ID_ VARCHAR(64),
ACT_INST_ID_ VARCHAR(64),
NAME_ VARCHAR(255) not null,
VAR_TYPE_ VARCHAR(64),
REV_ INT4,
TIME_ TIMESTAMP not null,
BYTEARRAY_ID_ VARCHAR(64),
DOUBLE_ NUMERIC(30,10),
LONG_ NUMERIC(19),
TEXT_ VARCHAR(2000),
TEXT2_ VARCHAR(2000),
constraint ACT_HI_DETAIL_PKEY primary KEY(ID_)
);
create index ACT_IDX_HI_DETAIL_ACT_INST
on ACT_HI_DETAIL (ACT_INST_ID_);
create index ACT_IDX_HI_DETAIL_NAME
on ACT_HI_DETAIL (NAME_);
create index ACT_IDX_HI_DETAIL_PROC_INST
on ACT_HI_DETAIL (PROC_INST_ID_);
create index ACT_IDX_HI_DETAIL_TASK_ID
on ACT_HI_DETAIL (TASK_ID_);
create index ACT_IDX_HI_DETAIL_TIME
on ACT_HI_DETAIL (TIME_);

create table ACT_HI_ENTITYLINK
(
ID_ VARCHAR(64) not null,
LINK_TYPE_ VARCHAR(255),
CREATE_TIME_ TIMESTAMP,
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
PARENT_ELEMENT_ID_ VARCHAR(255),
REF_SCOPE_ID_ VARCHAR(255),
REF_SCOPE_TYPE_ VARCHAR(255),
REF_SCOPE_DEFINITION_ID_ VARCHAR(255),
ROOT_SCOPE_ID_ VARCHAR(255),
ROOT_SCOPE_TYPE_ VARCHAR(255),
HIERARCHY_TYPE_ VARCHAR(255),
constraint ACT_HI_ENTITYLINK_PKEY primary key(ID_)
);

create index ACT_IDX_HI_ENT_LNK_REF_SCOPE
on ACT_HI_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_HI_ENT_LNK_ROOT_SCOPE
on ACT_HI_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_HI_ENT_LNK_SCOPE
on ACT_HI_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF
on ACT_HI_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);


create table ACT_HI_IDENTITYLINK(
ID_ VARCHAR(64) not NULL,
GROUP_ID_ VARCHAR(255),
TYPE_ VARCHAR(255),
USER_ID_ VARCHAR(255),
TASK_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP ,
PROC_INST_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
constraint ACT_HI_IDENTITYLINK_PKEY primary KEY(ID_)
);

create index ACT_IDX_HI_IDENT_LNK_PROCINST
on ACT_HI_IDENTITYLINK (PROC_INST_ID_);
create index ACT_IDX_HI_IDENT_LNK_SCOPE
on ACT_HI_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_IDENT_LNK_SCOPE_DEF
on ACT_HI_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_IDENT_LNK_SUB_SCOPE
on ACT_HI_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_IDENT_LNK_TASK
on ACT_HI_IDENTITYLINK (TASK_ID_);
create index ACT_IDX_HI_IDENT_LNK_USER
on ACT_HI_IDENTITYLINK (USER_ID_);

create table ACT_HI_PROCINST
(
ID_ VARCHAR(64) not NULL,
REV_ INT4 default 1,
PROC_INST_ID_ VARCHAR(64) not NULL,
BUSINESS_KEY_ VARCHAR(255),
PROC_DEF_ID_ VARCHAR(64) not null,
START_TIME_ TIMESTAMP not null,
END_TIME_ TIMESTAMP,
DURATION_ NUMERIC(12,2),
START_USER_ID_ VARCHAR(255),
START_ACT_ID_ VARCHAR(255),
END_ACT_ID_ VARCHAR(255),
SUPER_PROCESS_INSTANCE_ID_ VARCHAR(64),
DELETE_REASON_ text,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
NAME_ VARCHAR(255),
CALLBACK_ID_ VARCHAR(255),
CALLBACK_TYPE_ VARCHAR(255),
REFERENCE_ID_ VARCHAR(255),
REFERENCE_TYPE_ VARCHAR(255),
PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
BUSINESS_STATUS_ VARCHAR(255),
constraint ACT_HI_PROCINST_PKEY primary KEY(ID_)
);
CREATE UNIQUE INDEX ACT_HI_PROCINST_PROC_INST_ID_UK ON ACT_HI_PROCINST(PROC_INST_ID_);
create index ACT_IDX_HI_PRO_INST_END
on ACT_HI_PROCINST (END_TIME_);
create index ACT_IDX_HI_PRO_I_BUSKEY
on ACT_HI_PROCINST (BUSINESS_KEY_);

create table ACT_HI_TASKINST
(
ID_ VARCHAR(64) not NULL,
REV_ INT4 default 1,
PROC_DEF_ID_ VARCHAR(64),
TASK_DEF_ID_ VARCHAR(64),
TASK_DEF_KEY_ VARCHAR(255),
PROC_INST_ID_ VARCHAR(64),
EXECUTION_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
PARENT_TASK_ID_ VARCHAR(64),
NAME_ VARCHAR(255),
DESCRIPTION_ VARCHAR(2000),
OWNER_ VARCHAR(255),
ASSIGNEE_ VARCHAR(255),
START_TIME_ TIMESTAMP not null,
CLAIM_TIME_ TIMESTAMP,
END_TIME_ TIMESTAMP,
DURATION_ NUMERIC(19),
DELETE_REASON_ VARCHAR(2000),
PRIORITY_ INT4,
DUE_DATE_ TIMESTAMP,
FORM_KEY_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
LAST_UPDATED_TIME_ TIMESTAMP,
constraint ACT_HI_TASKINST_PKEY primary KEY(ID_)
);


create index ACT_IDX_HI_TASK_INST_PROCINST
on ACT_HI_TASKINST (PROC_INST_ID_);
create index ACT_IDX_HI_TASK_SCOPE
on ACT_HI_TASKINST (SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_TASK_SCOPE_DEF
on ACT_HI_TASKINST (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_TASK_SUB_SCOPE
on ACT_HI_TASKINST (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_HI_TSK_LOG (
ID_ NUMERIC(19) not NULL,
TYPE_ VARCHAR(64),
TASK_ID_ VARCHAR(64) not null,
TIME_STAMP_ TIMESTAMP not null,
USER_ID_ VARCHAR(255),
DATA_ VARCHAR(2000),
EXECUTION_ID_ VARCHAR(64),
PROC_INST_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
constraint ACT_HI_TSK_LOG_PKEY primary KEY(ID_)
);

create table ACT_HI_VARINST
(
ID_ VARCHAR(64) not NULL,
REV_ INT4 default 1,
PROC_INST_ID_ VARCHAR(64),
EXECUTION_ID_ VARCHAR(64),
TASK_ID_ VARCHAR(64),
NAME_ VARCHAR(255) not null,
VAR_TYPE_ VARCHAR(100),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
BYTEARRAY_ID_ VARCHAR(64),
DOUBLE_ NUMERIC(12,2),
LONG_ NUMERIC(12,2),
TEXT_ text,
TEXT2_ text,
CREATE_TIME_ TIMESTAMP,
LAST_UPDATED_TIME_ TIMESTAMP,
constraint ACT_HI_VARINST_PKEY primary KEY(ID_)
);

create index ACT_IDX_HI_PROCVAR_EX
on ACT_HI_VARINST (EXECUTION_ID_);
create index ACT_IDX_HI_PROCVAR_NAME_TYPE
on ACT_HI_VARINST (NAME_, VAR_TYPE_);
create index ACT_IDX_HI_PROCVAR_PROC_INST
on ACT_HI_VARINST (PROC_INST_ID_);
create index ACT_IDX_HI_PROCVAR_TASK_ID
on ACT_HI_VARINST (TASK_ID_);
create index ACT_IDX_HI_VAR_SCOPE_ID_TYPE
on ACT_HI_VARINST (SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_HI_VAR_SUB_ID_TYPE
on ACT_HI_VARINST (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_PROCDEF_INFO (
ID_ VARCHAR(64) not NULL,
PROC_DEF_ID_ VARCHAR(64) not null,
REV_ INT4,
INFO_JSON_ID_ VARCHAR(64),
constraint ACT_PROCDEF_INFO_PKEY
primary KEY(ID_)
);

create index ACT_IDX_PROCDEF_INFO_JSON
on ACT_PROCDEF_INFO (INFO_JSON_ID_);
create index ACT_IDX_PROCDEF_INFO_PROC
on ACT_PROCDEF_INFO (PROC_DEF_ID_);

create table ACT_RE_DEPLOYMENT
(
ID_ VARCHAR(64) not NULL,
NAME_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
KEY_ VARCHAR(255),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
DEPLOY_TIME_ TIMESTAMP ,
DERIVED_FROM_ VARCHAR(64),
DERIVED_FROM_ROOT_ VARCHAR(64),
PARENT_DEPLOYMENT_ID_ VARCHAR(255),
ENGINE_VERSION_ VARCHAR(255),
constraint ACT_RE_DEPLOYMENT_PKEY
primary KEY(ID_)
);

create table ACT_RE_MODEL
(
ID_ VARCHAR(64) not NULL,
REV_ INT4,
NAME_ VARCHAR(255),
KEY_ VARCHAR(255),
CATEGORY_ VARCHAR(255),
CREATE_TIME_ TIMESTAMP,
LAST_UPDATE_TIME_ TIMESTAMP,
VERSION_ INT4,
META_INFO_ VARCHAR(2000),
DEPLOYMENT_ID_ VARCHAR(64),
EDITOR_SOURCE_VALUE_ID_ VARCHAR(64),
EDITOR_SOURCE_EXTRA_VALUE_ID_ VARCHAR(64),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
constraint ACT_RE_MODEL_PKEY
primary key(ID_)
);

create index ACT_IDX_MODEL_DEPLOYMENT
on ACT_RE_MODEL (DEPLOYMENT_ID_);
create index ACT_IDX_MODEL_SOURCE
on ACT_RE_MODEL (EDITOR_SOURCE_VALUE_ID_);
create index ACT_IDX_MODEL_SOURCE_EXTRA
on ACT_RE_MODEL (EDITOR_SOURCE_EXTRA_VALUE_ID_);

create table ACT_RE_PROCDEF
(
ID_ VARCHAR(64) not NULL,
REV_ INT4,
CATEGORY_ VARCHAR(255),
NAME_ VARCHAR(255),
KEY_ VARCHAR(255) not null,
VERSION_ INT4 not null,
DEPLOYMENT_ID_ VARCHAR(64),
RESOURCE_NAME_ VARCHAR(2000),
DGRM_RESOURCE_NAME_ VARCHAR(4000),
DESCRIPTION_ VARCHAR(2000),
HAS_START_FORM_KEY_ NUMERIC(1),
HAS_GRAPHICAL_NOTATION_ NUMERIC(1),
SUSPENSION_STATE_ INT4,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
DERIVED_FROM_ VARCHAR(64),
DERIVED_FROM_ROOT_ VARCHAR(64),
DERIVED_VERSION_ INT4 default 0 not null,
ENGINE_VERSION_ VARCHAR(255),
constraint ACT_RE_PROCDEF_PKEY primary key(ID_)
);
create unique index ACT_UNIQ_PROCDEF_UK on ACT_RE_PROCDEF(KEY_, VERSION_, DERIVED_VERSION_, TENANT_ID_);

create table ACT_RU_ACTINST
(
ID_ VARCHAR(64) not NULL,
REV_ INT4 default 1,
PROC_DEF_ID_ VARCHAR(64) not null,
PROC_INST_ID_ VARCHAR(64) not null,
EXECUTION_ID_ VARCHAR(64) not null,
ACT_ID_ VARCHAR(255) not null,
TASK_ID_ VARCHAR(64),
CALL_PROC_INST_ID_ VARCHAR(64),
ACT_NAME_ VARCHAR(255),
ACT_TYPE_ VARCHAR(255) not null,
ASSIGNEE_ VARCHAR(255),
START_TIME_ TIMESTAMP not null,
END_TIME_ TIMESTAMP,
DURATION_ NUMERIC(12,2),
TRANSACTION_ORDER_ INT4,
DELETE_REASON_ VARCHAR(2000),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
constraint ACT_RU_ACTINST_PKEY primary key(ID_)
);

create index ACT_IDX_RU_ACTI_END
on ACT_RU_ACTINST (END_TIME_);
create index ACT_IDX_RU_ACTI_EXEC
on ACT_RU_ACTINST (EXECUTION_ID_);
create index ACT_IDX_RU_ACTI_EXEC_ACT
on ACT_RU_ACTINST (EXECUTION_ID_, ACT_ID_);
create index ACT_IDX_RU_ACTI_PROC
on ACT_RU_ACTINST (PROC_INST_ID_);
create index ACT_IDX_RU_ACTI_PROC_ACT
on ACT_RU_ACTINST (PROC_INST_ID_, ACT_ID_);
create index ACT_IDX_RU_ACTI_START
on ACT_RU_ACTINST (START_TIME_);
create index ACT_IDX_RU_ACTI_TASK
on ACT_RU_ACTINST (TASK_ID_);

create table ACT_RU_DEADLETTER_JOB
(
ID_ VARCHAR(64) not NULL,
REV_ INT4,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) not null,
EXCLUSIVE_ BOOL,
EXECUTION_ID_ VARCHAR(64),
PROCESS_INSTANCE_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
ELEMENT_ID_ VARCHAR(255),
ELEMENT_NAME_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
CORRELATION_ID_ VARCHAR(255),
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ VARCHAR(4000),
DUEDATE_ TIMESTAMP,
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ text,
CUSTOM_VALUES_ID_ VARCHAR(12),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
constraint ACT_RU_DEADLETTER_JOB_PKEY primary KEY(ID_)
);

create index ACT_IDX_DEADLETTER_JOB_CORRELATION_ID
on ACT_RU_DEADLETTER_JOB (CORRELATION_ID_);
create index ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID
on ACT_RU_DEADLETTER_JOB (CUSTOM_VALUES_ID_);
create index ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID
on ACT_RU_DEADLETTER_JOB (EXCEPTION_STACK_ID_);
create index ACT_IDX_DJOB_EXECUTION_ID
on ACT_RU_DEADLETTER_JOB (EXECUTION_ID_);
create index ACT_IDX_DJOB_PROC_DEF_ID
on ACT_RU_DEADLETTER_JOB (PROC_DEF_ID_);
create index ACT_IDX_DJOB_PROC_INST_ID
on ACT_RU_DEADLETTER_JOB (PROCESS_INSTANCE_ID_);
create index ACT_IDX_DJOB_SCOPE
on ACT_RU_DEADLETTER_JOB (SCOPE_ID_, SCOPE_TYPE_);
create index ACT_IDX_DJOB_SCOPE_DEF
on ACT_RU_DEADLETTER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);
create index ACT_IDX_DJOB_SUB_SCOPE
on ACT_RU_DEADLETTER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_RU_ENTITYLINK
(
ID_ VARCHAR(64) not null,
REV_ INT4,
CREATE_TIME_ TIMESTAMP,
LINK_TYPE_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
PARENT_ELEMENT_ID_ VARCHAR(255),
REF_SCOPE_ID_ VARCHAR(255),
REF_SCOPE_TYPE_ VARCHAR(255),
REF_SCOPE_DEFINITION_ID_ VARCHAR(255),
ROOT_SCOPE_ID_ VARCHAR(255),
ROOT_SCOPE_TYPE_ VARCHAR(255),
HIERARCHY_TYPE_ VARCHAR(255)
);
create index ACT_IDX_ENT_LNK_REF_SCOPE
on ACT_RU_ENTITYLINK (REF_SCOPE_ID_, REF_SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_ENT_LNK_ROOT_SCOPE
on ACT_RU_ENTITYLINK (ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_ENT_LNK_SCOPE
on ACT_RU_ENTITYLINK (SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_ENT_LNK_SCOPE_DEF
on ACT_RU_ENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);

-- auto-generated definition
create table ACT_RU_EVENT_SUBSCR
(
ID_ VARCHAR(64) not null
constraint ACT_RU_EVENT_SUBSCR_PKEY
primary key,
REV_ INT4,
EVENT_TYPE_ VARCHAR(255) not null,
EVENT_NAME_ VARCHAR(255),
EXECUTION_ID_ VARCHAR(64),
PROC_INST_ID_ VARCHAR(64),
ACTIVITY_ID_ VARCHAR(64),
CONFIGURATION_ VARCHAR(255),
CREATED_ TIMESTAMP,
PROC_DEF_ID_ VARCHAR(64),
SUB_SCOPE_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(64),
SCOPE_DEFINITION_ID_ VARCHAR(64),
SCOPE_TYPE_ VARCHAR(64),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create index ACT_IDX_EVENT_SUBSCR_CONFIG_
on ACT_RU_EVENT_SUBSCR (CONFIGURATION_);

-- auto-generated definition
create table ACT_RU_EXECUTION
(
ID_ VARCHAR(64) not null
constraint ACT_RU_EXECUTION_PKEY
primary key,
REV_ INT4,
PROC_INST_ID_ VARCHAR(64),
BUSINESS_KEY_ VARCHAR(255),
PARENT_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
SUPER_EXEC_ VARCHAR(64),
ROOT_PROC_INST_ID_ VARCHAR(64),
ACT_ID_ VARCHAR(255),
IS_ACTIVE_ NUMERIC(1),
IS_CONCURRENT_ NUMERIC(1),
IS_SCOPE_ NUMERIC(1),
IS_EVENT_SCOPE_ NUMERIC(1),
IS_MI_ROOT_ NUMERIC(1),
SUSPENSION_STATE_ INT4,
CACHED_ENT_STATE_ INT4,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
NAME_ VARCHAR(255),
START_ACT_ID_ VARCHAR(255),
START_TIME_ TIMESTAMP,
START_USER_ID_ VARCHAR(255),
LOCK_TIME_ TIMESTAMP,
LOCK_OWNER_ VARCHAR(255),
IS_COUNT_ENABLED_ NUMERIC(12,2),
EVT_SUBSCR_COUNT_ INT4,
TASK_COUNT_ INT4,
JOB_COUNT_ INT4,
TIMER_JOB_COUNT_ INT4,
SUSP_JOB_COUNT_ INT4,
DEADLETTER_JOB_COUNT_ INT4,
EXTERNAL_WORKER_JOB_COUNT_ INT4,
VAR_COUNT_ INT4,
ID_LINK_COUNT_ INT4,
CALLBACK_ID_ VARCHAR(255),
CALLBACK_TYPE_ VARCHAR(255),
REFERENCE_ID_ VARCHAR(255),
REFERENCE_TYPE_ VARCHAR(255),
PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
BUSINESS_STATUS_ VARCHAR(255)
);

create index ACT_IDX_EXEC_BUSKEY
on ACT_RU_EXECUTION (BUSINESS_KEY_);

create index ACT_IDX_EXEC_REF_ID_
on ACT_RU_EXECUTION (REFERENCE_ID_);

create index ACT_IDX_EXEC_ROOT
on ACT_RU_EXECUTION (ROOT_PROC_INST_ID_);

create index ACT_IDX_EXE_PARENT
on ACT_RU_EXECUTION (PARENT_ID_);

create index ACT_IDX_EXE_PROCDEF
on ACT_RU_EXECUTION (PROC_DEF_ID_);

create index ACT_IDX_EXE_PROCINST
on ACT_RU_EXECUTION (PROC_INST_ID_);

create index ACT_IDX_EXE_SUPER
on ACT_RU_EXECUTION (SUPER_EXEC_);

create table ACT_RU_EXTERNAL_JOB
(
ID_ VARCHAR(64) not null
constraint ACT_RU_EXTERNAL_JOB_PKEY
primary key,
REV_ INT4,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) not null,
LOCK_EXP_TIME_ TIMESTAMP,
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ BOOL,
EXECUTION_ID_ VARCHAR(64),
PROCESS_INSTANCE_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
ELEMENT_ID_ VARCHAR(255),
ELEMENT_NAME_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
CORRELATION_ID_ VARCHAR(255),
RETRIES_ INT4,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ text,
DUEDATE_ TIMESTAMP,
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ text,
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create index ACT_IDX_EJOB_SCOPE
on ACT_RU_EXTERNAL_JOB (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_EJOB_SCOPE_DEF
on ACT_RU_EXTERNAL_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_EJOB_SUB_SCOPE
on ACT_RU_EXTERNAL_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_EXTERNAL_JOB_CORRELATION_ID
on ACT_RU_EXTERNAL_JOB (CORRELATION_ID_);

create index ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID
on ACT_RU_EXTERNAL_JOB (CUSTOM_VALUES_ID_);

create index ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID
on ACT_RU_EXTERNAL_JOB (EXCEPTION_STACK_ID_);

create table ACT_RU_HISTORY_JOB
(
ID_ VARCHAR(64) not null
constraint ACT_RU_HISTORY_JOB_PKEY
primary key,
REV_ INT4,
LOCK_EXP_TIME_ TIMESTAMP,
LOCK_OWNER_ VARCHAR(255),
RETRIES_ INT4,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ VARCHAR(4000),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(4000),
CUSTOM_VALUES_ID_ VARCHAR(64),
ADV_HANDLER_CFG_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP,
SCOPE_TYPE_ VARCHAR(255),
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create table ACT_RU_IDENTITYLINK
(
ID_ VARCHAR(64) not null
constraint ACT_RU_IDENTITYLINK_PKEY
primary key,
REV_ INT4,
GROUP_ID_ VARCHAR(255),
TYPE_ VARCHAR(255),
USER_ID_ VARCHAR(255),
TASK_ID_ VARCHAR(64),
PROC_INST_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255)
);

create index ACT_IDX_ATHRZ_PROCEDEF
on ACT_RU_IDENTITYLINK (PROC_DEF_ID_);

create index ACT_IDX_IDENT_LNK_GROUP
on ACT_RU_IDENTITYLINK (GROUP_ID_);

create index ACT_IDX_IDENT_LNK_SCOPE
on ACT_RU_IDENTITYLINK (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_IDENT_LNK_SCOPE_DEF
on ACT_RU_IDENTITYLINK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_IDENT_LNK_SUB_SCOPE
on ACT_RU_IDENTITYLINK (SUB_SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_IDENT_LNK_USER
on ACT_RU_IDENTITYLINK (USER_ID_);

create index ACT_IDX_IDL_PROCINST
on ACT_RU_IDENTITYLINK (PROC_INST_ID_);

create index ACT_IDX_TSKASS_TASK
on ACT_RU_IDENTITYLINK (TASK_ID_);

create table ACT_RU_JOB
(
ID_ VARCHAR(64) not null
constraint ACT_RU_JOB_PKEY
primary key,
REV_ INT4,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) not null,
LOCK_EXP_TIME_ TIMESTAMP,
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ BOOL,
EXECUTION_ID_ VARCHAR(64),
PROCESS_INSTANCE_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
ELEMENT_ID_ VARCHAR(255),
ELEMENT_NAME_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
CORRELATION_ID_ VARCHAR(255),
RETRIES_ INT4,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ text,
DUEDATE_ TIMESTAMP,
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(4000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create index ACT_IDX_JOB_CORRELATION_ID
on ACT_RU_JOB (CORRELATION_ID_);

create index ACT_IDX_JOB_CUSTOM_VALUES_ID
on ACT_RU_JOB (CUSTOM_VALUES_ID_);

create index ACT_IDX_JOB_EXCEPTION_STACK_ID
on ACT_RU_JOB (EXCEPTION_STACK_ID_);

create index ACT_IDX_JOB_EXECUTION_ID
on ACT_RU_JOB (EXECUTION_ID_);

create index ACT_IDX_JOB_PROC_DEF_ID
on ACT_RU_JOB (PROC_DEF_ID_);

create index ACT_IDX_JOB_PROC_INST_ID
on ACT_RU_JOB (PROCESS_INSTANCE_ID_);

create index ACT_IDX_JOB_SCOPE
on ACT_RU_JOB (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_JOB_SCOPE_DEF
on ACT_RU_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_JOB_SUB_SCOPE
on ACT_RU_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_RU_SUSPENDED_JOB
(
ID_ VARCHAR(64) not null
constraint ACT_RU_SUSPENDED_JOB_PKEY
primary key,
REV_ INT4,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) not null,
EXCLUSIVE_ BOOL,
EXECUTION_ID_ VARCHAR(64),
PROCESS_INSTANCE_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
ELEMENT_ID_ VARCHAR(255),
ELEMENT_NAME_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
CORRELATION_ID_ VARCHAR(255),
RETRIES_ INT4,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ VARCHAR(4000),
DUEDATE_ TIMESTAMP,
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(4000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create index ACT_IDX_SJOB_EXECUTION_ID
on ACT_RU_SUSPENDED_JOB (EXECUTION_ID_);

create index ACT_IDX_SJOB_PROC_DEF_ID
on ACT_RU_SUSPENDED_JOB (PROC_DEF_ID_);

create index ACT_IDX_SJOB_PROC_INST_ID
on ACT_RU_SUSPENDED_JOB (PROCESS_INSTANCE_ID_);

create index ACT_IDX_SJOB_SCOPE
on ACT_RU_SUSPENDED_JOB (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_SJOB_SCOPE_DEF
on ACT_RU_SUSPENDED_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_SJOB_SUB_SCOPE
on ACT_RU_SUSPENDED_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_SUSPENDED_JOB_CORRELATION_ID
on ACT_RU_SUSPENDED_JOB (CORRELATION_ID_);

create index ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID
on ACT_RU_SUSPENDED_JOB (CUSTOM_VALUES_ID_);

create index ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID
on ACT_RU_SUSPENDED_JOB (EXCEPTION_STACK_ID_);

create table ACT_RU_TASK
(
ID_ VARCHAR(64) not null
constraint ACT_RU_TASK_PKEY
primary key,
REV_ INT4,
EXECUTION_ID_ VARCHAR(64),
PROC_INST_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
TASK_DEF_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
PROPAGATED_STAGE_INST_ID_ VARCHAR(255),
NAME_ VARCHAR(255),
PARENT_TASK_ID_ VARCHAR(64),
DESCRIPTION_ VARCHAR(2000),
TASK_DEF_KEY_ VARCHAR(255),
OWNER_ VARCHAR(255),
ASSIGNEE_ VARCHAR(255),
DELEGATION_ VARCHAR(64),
PRIORITY_ INT4,
CREATE_TIME_ TIMESTAMP ,
DUE_DATE_ TIMESTAMP,
CATEGORY_ VARCHAR(255),
SUSPENSION_STATE_ INT4,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING',
FORM_KEY_ VARCHAR(255),
CLAIM_TIME_ TIMESTAMP,
IS_COUNT_ENABLED_ NUMERIC(12,2),
VAR_COUNT_ INT4,
ID_LINK_COUNT_ INT4,
SUB_TASK_COUNT_ INT4
);

create index ACT_IDX_TASK_CREATE
on ACT_RU_TASK (CREATE_TIME_);

create index ACT_IDX_TASK_EXEC
on ACT_RU_TASK (EXECUTION_ID_);

create index ACT_IDX_TASK_PROCDEF
on ACT_RU_TASK (PROC_DEF_ID_);

create index ACT_IDX_TASK_PROCINST
on ACT_RU_TASK (PROC_INST_ID_);

create index ACT_IDX_TASK_SCOPE
on ACT_RU_TASK (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_TASK_SCOPE_DEF
on ACT_RU_TASK (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_TASK_SUB_SCOPE
on ACT_RU_TASK (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_RU_TIMER_JOB
(
ID_ VARCHAR(64) not null
constraint ACT_RU_TIMER_JOB_PKEY
primary key,
REV_ INT4,
CATEGORY_ VARCHAR(255),
TYPE_ VARCHAR(255) not null,
LOCK_EXP_TIME_ TIMESTAMP,
LOCK_OWNER_ VARCHAR(255),
EXCLUSIVE_ BOOL,
EXECUTION_ID_ VARCHAR(64),
PROCESS_INSTANCE_ID_ VARCHAR(64),
PROC_DEF_ID_ VARCHAR(64),
ELEMENT_ID_ VARCHAR(255),
ELEMENT_NAME_ VARCHAR(255),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
SCOPE_DEFINITION_ID_ VARCHAR(255),
CORRELATION_ID_ VARCHAR(255),
RETRIES_ INT4,
EXCEPTION_STACK_ID_ VARCHAR(64),
EXCEPTION_MSG_ VARCHAR(4000),
DUEDATE_ TIMESTAMP,
REPEAT_ VARCHAR(255),
HANDLER_TYPE_ VARCHAR(255),
HANDLER_CFG_ VARCHAR(4000),
CUSTOM_VALUES_ID_ VARCHAR(64),
CREATE_TIME_ TIMESTAMP,
TENANT_ID_ VARCHAR(255) default 'NULL::CHARACTER VARYING'
);

create index ACT_IDX_TIMER_JOB_CORRELATION_ID
on ACT_RU_TIMER_JOB (CORRELATION_ID_);

create index ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID
on ACT_RU_TIMER_JOB (CUSTOM_VALUES_ID_);

create index ACT_IDX_TIMER_JOB_DUEDATE
on ACT_RU_TIMER_JOB (DUEDATE_);

create index ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID
on ACT_RU_TIMER_JOB (EXCEPTION_STACK_ID_);

create index ACT_IDX_TJOB_EXECUTION_ID
on ACT_RU_TIMER_JOB (EXECUTION_ID_);

create index ACT_IDX_TJOB_PROC_DEF_ID
on ACT_RU_TIMER_JOB (PROC_DEF_ID_);

create index ACT_IDX_TJOB_PROC_INST_ID
on ACT_RU_TIMER_JOB (PROCESS_INSTANCE_ID_);

create index ACT_IDX_TJOB_SCOPE
on ACT_RU_TIMER_JOB (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_TJOB_SCOPE_DEF
on ACT_RU_TIMER_JOB (SCOPE_DEFINITION_ID_, SCOPE_TYPE_);

create index ACT_IDX_TJOB_SUB_SCOPE
on ACT_RU_TIMER_JOB (SUB_SCOPE_ID_, SCOPE_TYPE_);

create table ACT_RU_VARIABLE
(
ID_ VARCHAR(64) not null
constraint ACT_RU_VARIABLE_PKEY
primary key,
REV_ INT4,
TYPE_ VARCHAR(255) not null,
NAME_ VARCHAR(255) not null,
EXECUTION_ID_ VARCHAR(64),
PROC_INST_ID_ VARCHAR(64),
TASK_ID_ VARCHAR(64),
SCOPE_ID_ VARCHAR(255),
SUB_SCOPE_ID_ VARCHAR(255),
SCOPE_TYPE_ VARCHAR(255),
BYTEARRAY_ID_ VARCHAR(64),
DOUBLE_ NUMERIC(12,2),
LONG_ NUMERIC(12,2),
TEXT_ VARCHAR(2000),
TEXT2_ VARCHAR(2000)
);

create index ACT_IDX_RU_VAR_SCOPE_ID_TYPE
on ACT_RU_VARIABLE (SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_RU_VAR_SUB_ID_TYPE
on ACT_RU_VARIABLE (SUB_SCOPE_ID_, SCOPE_TYPE_);

create index ACT_IDX_VARIABLE_TASK_ID
on ACT_RU_VARIABLE (TASK_ID_);

create index ACT_IDX_VAR_BYTEARRAY
on ACT_RU_VARIABLE (BYTEARRAY_ID_);

create index ACT_IDX_VAR_EXE
on ACT_RU_VARIABLE (EXECUTION_ID_);

create index ACT_IDX_VAR_PROCINST
on ACT_RU_VARIABLE (PROC_INST_ID_);


+ 0
- 7
pmapi/pom.xml ファイルの表示

@@ -215,12 +215,6 @@
<artifactId>nd-basic</artifactId>
</dependency>
<dependency>
<groupId>com.kingbase.dialect</groupId>
<artifactId>kingbase8-8.2.0</artifactId>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/kingbase8-8.2.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel-core</artifactId>
</dependency>
@@ -259,7 +253,6 @@
<groupId>org.springframework.statemachine</groupId>
<artifactId>spring-statemachine-core</artifactId>
</dependency>

</dependencies>
<!-- 打包 -->
<!--配置环境的profile-->


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/basic/AbstractRegionCacheHelper.java ファイルの表示

@@ -63,7 +63,7 @@ public abstract class AbstractRegionCacheHelper implements InitializingBean {
return RegionConverter.toRegionDTO(region);
});
// 初始化所有区域数据到缓存
initRegionCache();
// initRegionCache();
}

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/task/ExpertInviteTask.java ファイルの表示

@@ -100,7 +100,7 @@ public class ExpertInviteTask {
log.warn("随机邀请已关闭……");
return;
}
initInviteTaskByStart();
// initInviteTaskByStart();
}

/**


+ 8
- 8
pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractDictionaryCache.java ファイルの表示

@@ -29,14 +29,14 @@ public abstract class AbstractDictionaryCache implements InitializingBean, Dicti

@Override
public void afterPropertiesSet() {
dictionaryCacheHelper = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES)
.refreshAfterWrite(5, TimeUnit.MINUTES).build(key -> {
List<DictionaryDTO> dictionaryDTOList = iMetaDictionaryService.queryAll();
dictionaryMap = buildCateMap(dictionaryDTOList);
Map<String, List<DictionaryDTO>> dictionaryTypeListMap = dictionaryDTOList.stream().collect(Collectors.groupingBy(DictionaryDTO::getDictionaryType));
return dictionaryTypeListMap.get(key);
});
warmUp();
// dictionaryCacheHelper = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES)
// .refreshAfterWrite(5, TimeUnit.MINUTES).build(key -> {
// List<DictionaryDTO> dictionaryDTOList = iMetaDictionaryService.queryAll();
// dictionaryMap = buildCateMap(dictionaryDTOList);
// Map<String, List<DictionaryDTO>> dictionaryTypeListMap = dictionaryDTOList.stream().collect(Collectors.groupingBy(DictionaryDTO::getDictionaryType));
// return dictionaryTypeListMap.get(key);
// });
// warmUp();
}

private Map<String, DictionaryDTO> buildCateMap(List<DictionaryDTO> dictionaryDTOList) {


+ 19
- 19
pmapi/src/main/java/com/ningdatech/pmapi/meta/helper/basic/AbstractTagsCache.java ファイルの表示

@@ -34,25 +34,25 @@ public abstract class AbstractTagsCache implements InitializingBean, TagCache {

@Override
public void afterPropertiesSet() {
tagsCache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES)
.refreshAfterWrite(5, TimeUnit.MINUTES)
.build(key -> {
// 查询全部
List<TagDTO> tagDTOList = iMetaTagService.queryAll();
// TODO 临时关闭校验
// Assert.isTrue(CollectionUtils.isNotEmpty(tagDTOList), "MetaTags queryAll is Empty");
tagDtoMap = buildCateMap(tagDTOList);
List<TagDTO> tagInLevel = tagDTOList.stream().filter(tagDto -> {
// 只过滤出小于等于level的tag
if (Objects.isNull(tagDto.getTagLevel())) {
return false;
}
return Integer.parseInt(key) >= tagDto.getTagLevel();
}).collect(Collectors.toList());
List<TagTreeDTO> treeDtos = MetaTagAssembler.toTagTreeDTOList(tagInLevel);
return toTreeStructure(treeDtos);
});
warmUp();
// tagsCache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES)
// .refreshAfterWrite(5, TimeUnit.MINUTES)
// .build(key -> {
// // 查询全部
// List<TagDTO> tagDTOList = iMetaTagService.queryAll();
// // TODO 临时关闭校验
//// Assert.isTrue(CollectionUtils.isNotEmpty(tagDTOList), "MetaTags queryAll is Empty");
// tagDtoMap = buildCateMap(tagDTOList);
// List<TagDTO> tagInLevel = tagDTOList.stream().filter(tagDto -> {
// // 只过滤出小于等于level的tag
// if (Objects.isNull(tagDto.getTagLevel())) {
// return false;
// }
// return Integer.parseInt(key) >= tagDto.getTagLevel();
// }).collect(Collectors.toList());
// List<TagTreeDTO> treeDtos = MetaTagAssembler.toTagTreeDTOList(tagInLevel);
// return toTreeStructure(treeDtos);
// });
// warmUp();
}

private Map<String, TagDTO> buildCateMap(List<TagDTO> tagDTOList) {


+ 0
- 6
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java ファイルの表示

@@ -12,7 +12,6 @@ import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter;
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.common.util.ExcelDownUtil;
import com.ningdatech.pmapi.common.util.SendWorkNoticeUtil;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService;
@@ -32,9 +31,7 @@ import com.ningdatech.pmapi.todocenter.model.dto.req.ProcessDetailReq;
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq;
import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq;
import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO;

import com.ningdatech.pmapi.user.entity.UserInfo;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.contants.HisProInsEndActId;
@@ -60,9 +57,6 @@ import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

import static cn.hutool.core.collection.CollUtil.isEmpty;
import static cn.hutool.core.collection.CollUtil.isNotEmpty;
import static com.ningdatech.pmapi.todocenter.constant.WorkNotice.*;
import static com.wflow.workflow.task.TriggerServiceTask.runtimeService;



+ 0
- 1
pom.xml ファイルの表示

@@ -117,7 +117,6 @@
<artifactId>kingbase8-8.2.0</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>com.kingbase.dialect</groupId>
<artifactId>kingbase8-8.2.0</artifactId>


読み込み中…
キャンセル
保存