From 8bc5478819b1792e0ef1e43d475956c41a5568d5 Mon Sep 17 00:00:00 2001 From: songgaoshuai <1742057357@qq.com> Date: Fri, 1 Dec 2023 12:09:55 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E8=AF=B7=E5=81=87?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=8C=E8=B0=83=E6=95=B4=E8=8F=9C=E5=8D=95?= =?UTF-8?q?sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/workflow/domain/TestLeave.java | 17 ++- .../workflow/domain/bo/TestLeaveBo.java | 25 +++- .../workflow/domain/vo/TestLeaveVo.java | 21 ++- .../service/impl/TestLeaveServiceImpl.java | 2 +- script/sql/flowable.sql | 63 +++++++++ script/sql/oracle/oracle_ry_vue_5.X.sql | 30 ---- script/sql/postgres/postgres_ry_vue_5.X.sql | 30 ---- script/sql/ry_vue_5.X.sql | 133 ++---------------- script/sql/sqlserver/sqlserver_ry_vue_5.X.sql | 82 ----------- script/sql/test.sql | 23 --- 10 files changed, 125 insertions(+), 301 deletions(-) create mode 100644 script/sql/flowable.sql diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java index e02fc28ab..0e2646701 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java @@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode; import org.dromara.common.mybatis.core.domain.BaseEntity; import java.io.Serial; +import java.util.Date; /** * 请假对象 test_leave @@ -29,9 +30,19 @@ public class TestLeave extends BaseEntity { private Long id; /** - * 标题 + * 请假类型 */ - private String title; + private String leaveType; + + /** + * 开始时间 + */ + private Date startDate; + + /** + * 结束时间 + */ + private Date endDate; /** * 请假天数 @@ -39,7 +50,7 @@ public class TestLeave extends BaseEntity { private Integer leaveDays; /** - * 备注 + * 请假原因 */ private String remark; diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/bo/TestLeaveBo.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/bo/TestLeaveBo.java index 35acebc85..207eb16ae 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/bo/TestLeaveBo.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/bo/TestLeaveBo.java @@ -1,5 +1,6 @@ package org.dromara.workflow.domain.bo; +import com.fasterxml.jackson.annotation.JsonFormat; import io.github.linpeilie.annotations.AutoMapper; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; @@ -10,6 +11,8 @@ import org.dromara.common.core.validate.EditGroup; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.workflow.domain.TestLeave; +import java.util.Date; + /** * 请假业务对象 test_leave * @@ -28,10 +31,24 @@ public class TestLeaveBo extends BaseEntity { private Long id; /** - * 标题 + * 请假类型 */ - @NotBlank(message = "标题不能为空", groups = {AddGroup.class, EditGroup.class}) - private String title; + @NotBlank(message = "请假类型不能为空", groups = {AddGroup.class, EditGroup.class}) + private String leaveType; + + /** + * 开始时间 + */ + @NotNull(message = "开始时间不能为空", groups = {AddGroup.class, EditGroup.class}) + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startDate; + + /** + * 结束时间 + */ + @NotNull(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class}) + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endDate; /** * 请假天数 @@ -40,7 +57,7 @@ public class TestLeaveBo extends BaseEntity { private Integer leaveDays; /** - * 备注 + * 请假原因 */ private String remark; diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java index 749ff76d6..c62a35612 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java @@ -8,6 +8,7 @@ import org.dromara.workflow.domain.TestLeave; import java.io.Serial; import java.io.Serializable; +import java.util.Date; /** @@ -31,10 +32,22 @@ public class TestLeaveVo implements Serializable { private Long id; /** - * 标题 + * 请假类型 */ - @ExcelProperty(value = "标题") - private String title; + @ExcelProperty(value = "请假类型") + private String leaveType; + + /** + * 开始时间 + */ + @ExcelProperty(value = "开始时间") + private Date startDate; + + /** + * 结束时间 + */ + @ExcelProperty(value = "结束时间") + private Date endDate; /** * 请假天数 @@ -45,7 +58,7 @@ public class TestLeaveVo implements Serializable { /** * 备注 */ - @ExcelProperty(value = "备注") + @ExcelProperty(value = "请假原因") private String remark; /** diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java index b347a08a2..6e291d2c3 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java @@ -73,7 +73,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService { private LambdaQueryWrapper buildQueryWrapper(TestLeaveBo bo) { Map params = bo.getParams(); LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(StringUtils.isNotBlank(bo.getTitle()), TestLeave::getTitle, bo.getTitle()); + lqw.eq(StringUtils.isNotBlank(bo.getLeaveType()), TestLeave::getLeaveType, bo.getLeaveType()); lqw.eq(bo.getLeaveDays() != null, TestLeave::getLeaveDays, bo.getLeaveDays()); return lqw; } diff --git a/script/sql/flowable.sql b/script/sql/flowable.sql new file mode 100644 index 000000000..5a0f13300 --- /dev/null +++ b/script/sql/flowable.sql @@ -0,0 +1,63 @@ +insert into sys_menu values('1616', '工作流' , '0', '6', 'workflow', '', '', '1', '0', 'M', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1617', '模型管理', '1616', '2', 'model', 'workflow/model/index', '', '1', '1', 'C', '0', '0', 'workflow:model:list', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1618', '我的待办', '1616', '5', 'task', '', '', '1', '0', 'M', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1619', '待办任务', '1618', '2', 'taskWaiting', 'workflow/task/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1620', '流程定义', '1616', '3', 'processDefinition', 'workflow/processDefinition/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1621', '流程实例', '1630', '1', 'processInstance', 'workflow/processInstance/index', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1622', '流程分类', '1616', '1', 'category', 'workflow/category/index', '', '1', '0', 'C', '0', '0', 'workflow:category:list', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1629', '我发起的', '1618', '1', 'myDocument', 'workflow/task/myDocument', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1630', '流程监控', '1616', '4', 'monitor', '', '', '1', '0', 'M', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); +insert into sys_menu values('1631', '待办任务', '1630', '2', 'allTaskWaiting', 'workflow/task/allTaskWaiting', '', '1', '1', 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), NULL, NULL, ''); + + +-- 流程分类管理相关按钮 +insert into sys_menu values ('1623', '流程分类查询', '1622', '1', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:query', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values ('1624', '流程分类新增', '1622', '2', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:add', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values ('1625', '流程分类修改', '1622', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:edit', '#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values ('1626', '流程分类删除', '1622', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:remove','#', 103, 1, sysdate(), null, null, ''); +insert into sys_menu values ('1627', '流程分类导出', '1622', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:export','#', 103, 1, sysdate(), null, null, ''); +-- 请假单信息 +DROP TABLE if EXISTS test_leave; +create table test_leave +( + id bigint not null comment '主键', + leave_type varchar(255) not null comment '请假类型', + startDate datetime not null comment '开始时间', + endDate datetime not null comment '结束时间', + leave_days int(10) not null comment '请假天数', + remark varchar(255) null comment '请假原因', + create_dept bigint null comment '创建部门', + create_by bigint null comment '创建者', + create_time datetime null comment '创建时间', + update_by bigint null comment '更新者', + update_time datetime null comment '更新时间', + tenant_id varchar(20) default '000000' null comment '租户编号', + PRIMARY KEY (id) USING BTREE +) ENGINE = InnoDB COMMENT = '请假申请表'; + +-- 流程分类信息表 +DROP TABLE if EXISTS wf_category; +create table wf_category +( + id bigint not null comment '主键' + primary key, + category_name varchar(255) null comment '分类名称', + category_code varchar(255) null comment '分类编码', + parent_id bigint null comment '父级id', + sort_num int(19) null comment '排序', + tenant_id varchar(20) default '000000' null comment '租户编号', + create_dept bigint null comment '创建部门', + create_by bigint null comment '创建者', + create_time datetime null comment '创建时间', + update_by bigint null comment '更新者', + update_time datetime null comment '更新时间', + constraint uni_category_code + unique (category_code) +) engine=innodb comment= '流程分类'; + +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1638, '请假申请', 5, 1, 'leave', 'workflow/leave/index', 1, 0, 'C', '0', '0', 'demo:leave:list', '#', 103, 1, sysdate(), NULL, NULL, '请假申请菜单'); +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1639, '请假申请查询', 1638, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:query', '#', 103, 1, sysdate(), NULL, NULL, ''); +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1640, '请假申请新增', 1638, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:add', '#', 103, 1, sysdate(), NULL, NULL, ''); +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1641, '请假申请修改', 1638, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:edit', '#', 103, 1, sysdate(), NULL, NULL, ''); +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1642, '请假申请删除', 1638, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:remove', '#', 103, 1, sysdate(), NULL, NULL, ''); +INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1643, '请假申请导出', 1638, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:export', '#', 103, 1, sysdate(), NULL, NULL, ''); diff --git a/script/sql/oracle/oracle_ry_vue_5.X.sql b/script/sql/oracle/oracle_ry_vue_5.X.sql index 670e7c1af..1100fa92e 100644 --- a/script/sql/oracle/oracle_ry_vue_5.X.sql +++ b/script/sql/oracle/oracle_ry_vue_5.X.sql @@ -1199,36 +1199,6 @@ insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'X insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); --- ---------------------------- --- 流程表单信息表 --- ---------------------------- -create table wf_form ( - form_id number(20) not null, - form_name varchar(64) default '', - content nclob, - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar(255) default '', - del_flag char(1) default '0' -); - -alter table wf_form add constraint pk_wf_form primary key (form_id); - -comment on table wf_form is '流程表单信息表'; -comment on column wf_form.form_id is '表单主键'; -comment on column wf_form.form_name is '表单名称'; -comment on column wf_form.content is '表单内容'; -comment on column wf_form.create_dept is '创建部门'; -comment on column wf_form.create_by is '创建者'; -comment on column wf_form.create_time is '创建时间'; -comment on column wf_form.update_by is '更新者'; -comment on column wf_form.update_time is '更新时间'; -comment on column wf_form.remark is '备注'; -comment on column wf_form.del_flag is '删除标志(0代表存在 2代表删除)'; - -- ---------------------------- -- 系统授权表 -- ---------------------------- diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql index 4a82e5344..48860dc7c 100644 --- a/script/sql/postgres/postgres_ry_vue_5.X.sql +++ b/script/sql/postgres/postgres_ry_vue_5.X.sql @@ -1221,36 +1221,6 @@ insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'X insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 103, 1, now(), 1, now(), null); insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), NULL); --- ---------------------------- --- 流程表单信息表 --- ---------------------------- -drop table if exists bpmn_form; -create table if not exists bpmn_form -( - form_id int8, - tenant_id varchar(20) default '000000'::varchar, - form_name varchar(255) default ''::varchar not null, - content text, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - remark varchar(500) default ''::varchar, - constraint bpmn_form_pk primary key (bpmn_form) -); - -comment on table wf_form is '流程表单信息表'; -comment on column bpmn_form.form_id is '表单主键'; -comment on column bpmn_form.form_name is '表单名称'; -comment on column bpmn_form.content is '表单内容'; -comment on column bpmn_form.create_dept is '创建部门'; -comment on column bpmn_form.create_by is '创建者'; -comment on column bpmn_form.create_time is '创建时间'; -comment on column bpmn_form.update_by is '更新者'; -comment on column bpmn_form.update_time is '更新时间'; -comment on column bpmn_form.remark is '备注'; -comment on column bpmn_form.del_flag is '删除标志(0代表存在 2代表删除)'; -- ---------------------------- -- 系统授权表 -- ---------------------------- diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql index 3eb2711f0..09f15ff26 100644 --- a/script/sql/ry_vue_5.X.sql +++ b/script/sql/ry_vue_5.X.sql @@ -270,8 +270,6 @@ insert into sys_menu values('6', '租户管理', '0', '2', 'tenant', n insert into sys_menu values('2', '系统监控', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate(), null, null, '系统监控目录'); insert into sys_menu values('3', '系统工具', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate(), null, null, '系统工具目录'); insert into sys_menu values('4', 'PLUS官网', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide', 103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus官网地址'); -insert into sys_menu values('1616', '工作流','0', '6', 'workflow', NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'tree-table', 103, 1, sysdate(), null, null, '工作流目录'); - -- 二级菜单 insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, sysdate(), null, null, '用户管理菜单'); insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 103, 1, sysdate(), null, null, '角色管理菜单'); @@ -286,17 +284,9 @@ insert into sys_menu values('109', '在线用户', '2', '1', 'online', insert into sys_menu values('113', '缓存监控', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate(), null, null, '缓存监控菜单'); insert into sys_menu values('114', '表单构建', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 103, 1, sysdate(), null, null, '表单构建菜单'); insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate(), null, null, '代码生成菜单'); -insert into sys_menu values('121', '租户管理', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate(), null, null, '租户管理菜单'); -insert into sys_menu values('122', '租户套餐管理', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, '租户套餐管理菜单'); +insert into sys_menu values('121', '租户管理', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate(), null, null, '租户管理菜单'); +insert into sys_menu values('122', '租户套餐管理', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate(), null, null, '租户套餐管理菜单'); insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 103, 1, sysdate(), null, null, '客户端管理菜单'); -insert into sys_menu values('1622', '流程分类', '1616', '1', 'category', 'workflow/category/index', '', 1, 0, 'C', '0', '0', 'workflow:category:list', 'tree-table', 103, 1, sysdate(), null, null, '流程分类菜单'); -insert into sys_menu values('1617', '模型管理', '1616', '2', 'model', 'workflow/model/index', '', 1, 1, 'C', '0', '0', 'workflow:model:list', 'tree-table', 103, 1, sysdate(), null, null, '模型管理菜单'); -insert into sys_menu values('1620', '流程定义', '1616', '3', 'processDefinition', 'workflow/processDefinition/index', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '流程定义菜单'); -insert into sys_menu values('1630', '流程监控', '1616', '4', 'monitor', '', '', 1, 0, 'M', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '流程监控菜单'); -insert into sys_menu values('1618', '我的待办', '1616', '5', 'task', '', '', 1, 0, 'M', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '我的待办菜单'); -insert into sys_menu values('1628', '动态表单', '1616', '6', 'form', 'workflow/form/index', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '动态表单菜单'); -insert into sys_menu values('1638', '发起流程', '1616', '7', 'businessForm', 'workflow/businessForm/index', '', 1, 1, 'C', '0', '0', 'workflow:businessForm:list', 'tree-table', 103, 1, sysdate(), null, null, '发起流程菜单'); -insert into sys_menu values('1639', '我的单据', '1616', '8', 'businessFormList', 'workflow/businessForm/list', '', 1, 1, 'C', '0', '0', 'workflow:businessForm:list', 'tree-table', 103, 1, sysdate(), null, null, '我的单据菜单'); -- springboot-admin监控 insert into sys_menu values('117', 'Admin监控', '2', '5', 'Admin', 'monitor/admin/index', '', 1, 0, 'C', '0', '0', 'monitor:admin:list', 'dashboard', 103, 1, sysdate(), null, null, 'Admin监控菜单'); @@ -306,12 +296,8 @@ insert into sys_menu values('118', '文件管理', '1', '10', 'oss', insert into sys_menu values('120', '任务调度中心', '2', '5', 'powerjob', 'monitor/powerjob/index', '', 1, 0, 'C', '0', '0', 'monitor:powerjob:list', 'job', 103, 1, sysdate(), null, null, 'PowerJob控制台菜单'); -- 三级菜单 -insert into sys_menu values('500', '操作日志', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, sysdate(), null, null, '操作日志菜单'); -insert into sys_menu values('501', '登录日志', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, sysdate(), null, null, '登录日志菜单'); -insert into sys_menu values('1621', '流程实例', '1630','1', 'processInstance', 'workflow/processInstance/index', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '流程实例'); -insert into sys_menu values('1631', '待办任务', '1630','2', 'allTaskWaiting', 'workflow/task/allTaskWaiting', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '待办任务'); -insert into sys_menu values('1619', '待办任务', '1618','2', 'taskWaiting', 'workflow/task/index', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '待办任务'); -insert into sys_menu values('1629', '我的单据', '1618','1', 'myDocument', 'workflow/task/myDocument', '', 1, 1, 'C', '0', '0', '', 'tree-table', 103, 1, sysdate(), null, null, '我的单据'); +insert into sys_menu values('500', '操作日志', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, sysdate(), null, null, '操作日志菜单'); +insert into sys_menu values('501', '登录日志', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, sysdate(), null, null, '登录日志菜单'); -- 用户管理按钮 insert into sys_menu values('1001', '用户查询', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1002', '用户新增', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, sysdate(), null, null, ''); @@ -398,30 +384,12 @@ insert into sys_menu values ('1612', '租户套餐新增', '122', '2', '#', '', insert into sys_menu values ('1613', '租户套餐修改', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values ('1614', '租户套餐删除', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values ('1615', '租户套餐导出', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103, 1, sysdate(), null, null, ''); --- 动态表单管理相关按钮 -insert into sys_menu values ('1633', '动态表单查询', '1628', '1', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:form:query', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1634', '动态表单新增', '1628', '2', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:form:add', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1635', '动态表单修改', '1628', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:form:edit', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1636', '动态表单删除', '1628', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:form:remove','#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1637', '动态表单导出', '1628', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:form:export','#', 103, 1, sysdate(), null, null, ''); --- 流程分类管理相关按钮 -insert into sys_menu values ('1623', '流程分类查询', '1622', '1', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:query', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1624', '流程分类新增', '1622', '2', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:add', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1625', '流程分类修改', '1622', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:edit', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1626', '流程分类删除', '1622', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:remove','#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values ('1627', '流程分类导出', '1622', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:category:export','#', 103, 1, sysdate(), null, null, ''); -- 客户端管理按钮 insert into sys_menu values('1061', '客户端管理查询', '123', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:query', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1062', '客户端管理新增', '123', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:add', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1063', '客户端管理修改', '123', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:edit', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1064', '客户端管理删除', '123', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:remove', '#', 103, 1, sysdate(), null, null, ''); insert into sys_menu values('1065', '客户端管理导出', '123', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:export', '#', 103, 1, sysdate(), null, null, ''); --- 发起流程按钮 -insert into sys_menu values('1640', '发起流程查询', '1638', '1', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:businessForm:query', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1641', '发起流程新增', '1638', '2', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:businessForm:add', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1642', '发起流程修改', '1638', '3', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:businessForm:edit', '#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1643', '发起流程删除', '1638', '4', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:businessForm:remove','#', 103, 1, sysdate(), null, null, ''); -insert into sys_menu values('1644', '发起流程导出', '1638', '5', '#', '', '', 1, 0, 'F', '0', '0', 'workflow:businessForm:export','#', 103, 1, sysdate(), null, null, ''); -- ---------------------------- -- 6、用户和角色关联表 用户N-1角色 @@ -883,94 +851,11 @@ create table sys_oss_config ( primary key (oss_config_id) ) engine=innodb comment='对象存储配置表'; -insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL); -insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); -insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); -insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); -insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL); - --- ---------------------------- --- 流程表单信息表 --- ---------------------------- -drop table if exists wf_form; -create table wf_form ( - form_id bigint not null comment '表单id', - tenant_id varchar(20) default '000000'comment '租户编号', - form_name varchar(255) default null comment '表单名称', - status char(1) default '1' comment '状态(0正常 1停用)', - content longtext comment '表单内容', - create_dept bigint default null comment '创建部门', - create_by bigint default null comment '创建者', - create_time datetime default null comment '创建时间', - update_by bigint default null comment '更新者', - update_time datetime default null comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (form_id) -) engine=innodb comment='流程表单信息表'; - --- ---------------------------- --- 流程分类信息表 --- ---------------------------- -create table wf_category -( - id bigint not null comment '主键' - primary key, - category_name varchar(255) null comment '分类名称', - category_code varchar(255) null comment '分类编码', - parent_id bigint null comment '父级id', - sort_num int(19) null comment '排序', - tenant_id varchar(20) default '000000' null comment '租户编号', - create_dept bigint null comment '创建部门', - create_by bigint null comment '创建者', - create_time datetime null comment '创建时间', - update_by bigint null comment '更新者', - update_time datetime null comment '更新时间', - constraint uni_category_code - unique (category_code) -) engine=innodb comment= '流程分类'; - --- ---------------------------- --- 流程分类信息表 --- ---------------------------- -drop table if exists wf_form_definition; -create table wf_form_definition -( - id bigint not null comment '主键' - primary key, - form_id bigint not null comment '动态表单id', - process_definition_key varchar(255) not null comment '流程定义key', - process_definition_name varchar(255) not null comment '流程定义名称', - process_definition_id varchar(255) not null comment '流程定义id', - process_definition_version int not null comment '流程定义版本', - tenant_id varchar(20) default '000000' null comment '租户编号', - create_dept bigint null comment '创建部门', - create_by bigint null comment '创建者', - create_time datetime null comment '创建时间', - update_by bigint null comment '更新者', - update_time datetime null comment '更新时间' -) engine=innodb comment= '动态表单与流程定义关联信息'; - --- ---------------------------- --- 业务单据表 --- ---------------------------- -drop table if exists wf_business_form; -create table wf_business_form -( - id bigint not null comment '主键' - primary key, - apply_code varchar(255) not null comment '申请编码', - form_id bigint not null comment '表单id', - form_name varchar(255) not null comment '表单名称', - content longtext not null comment '表单内容', - tenant_id varchar(20) default '000000' null comment '租户编号', - create_dept bigint null comment '创建部门', - create_by bigint null comment '创建者', - create_time datetime null comment '创建时间', - update_by bigint null comment '更新者', - update_time datetime null comment '更新时间', - content_value longtext null comment '表单值' -) engine=innodb comment= '业务单据表'; - +insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), null); +insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), null); +insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), null); +insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), null); +insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), null); -- ---------------------------- -- 系统授权表 diff --git a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql index c276355f8..2045c587e 100644 --- a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql +++ b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql @@ -3079,88 +3079,6 @@ GO INSERT INTO sys_oss_config VALUES (N'5', N'000000', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL) GO -CREATE TABLE wf_form -( - form_id bigint NOT NULL, - form_name nvarchar(64) DEFAULT '' NULL, - content nvarchar(max) NULL, - create_dept bigint NULL, - create_by nvarchar(64) DEFAULT '' NULL, - create_time datetime2(7) NULL, - update_by nvarchar(64) DEFAULT '' NULL, - update_time datetime2(7) NULL, - remark nvarchar(255) NULL, - del_flag nchar(1) DEFAULT ('0') NULL, - CONSTRAINT [PK__wf_form] PRIMARY KEY CLUSTERED ([form_id]) - WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) - ON [PRIMARY] -) -GO - -EXEC sp_addextendedproperty - 'MS_Description', N'表单主键', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'form_id' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'表单名称', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'form_name' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'表单内容', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'content' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'创建部门' , - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'create_dept' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'创建者', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'create_by' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'创建时间', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'create_time' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'更新者', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'update_by' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'更新时间', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'update_time' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'备注', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'remark' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'删除标志(0代表存在 2代表删除)', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form', - 'COLUMN', N'del_flag' -GO -EXEC sp_addextendedproperty - 'MS_Description', N'流程表单信息表', - 'SCHEMA', N'dbo', - 'TABLE', N'wf_form' CREATE TABLE sys_client ( diff --git a/script/sql/test.sql b/script/sql/test.sql index f6381301d..d4cea0567 100644 --- a/script/sql/test.sql +++ b/script/sql/test.sql @@ -37,22 +37,6 @@ CREATE TABLE test_tree PRIMARY KEY (id) USING BTREE ) ENGINE = InnoDB COMMENT = '测试树表'; -DROP TABLE if EXISTS test_leave; -create table test_leave -( - id bigint not null comment '主键', - title varchar(255) not null comment '标题', - leave_days int(10) not null comment '请假天数', - remark varchar(255) null comment '备注', - create_dept bigint null comment '创建部门', - create_by bigint null comment '创建者', - create_time datetime null comment '创建时间', - update_by bigint null comment '更新者', - update_time datetime null comment '更新时间', - tenant_id varchar(20) default '000000' null comment '租户编号', - PRIMARY KEY (id) USING BTREE -) ENGINE = InnoDB COMMENT = '请假表'; - INSERT INTO sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, '000000', 108, 'test', '本部门及以下 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 3, sysdate(), NULL); INSERT INTO sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, '000000', 102, 'test1', '仅本人 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 4, sysdate(), NULL); @@ -72,13 +56,6 @@ INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1510, '测试树表删除', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 103, 1, sysdate(), NULL, NULL, ''); INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1511, '测试树表导出', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 103, 1, sysdate(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1638, '请假申请', 5, 1, 'leave', 'workflow/leave/index', 1, 0, 'C', '0', '0', 'demo:leave:list', '#', 103, 1, sysdate(), NULL, NULL, '请假申请菜单'); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1639, '请假申请查询', 1638, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:query', '#', 103, 1, sysdate(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1640, '请假申请新增', 1638, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:add', '#', 103, 1, sysdate(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1641, '请假申请修改', 1638, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:edit', '#', 103, 1, sysdate(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1642, '请假申请删除', 1638, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:remove', '#', 103, 1, sysdate(), NULL, NULL, ''); -INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (1643, '请假申请导出', 1638, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:leave:export', '#', 103, 1, sysdate(), NULL, NULL, ''); - INSERT INTO sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, '000000', '本部门及以下', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL); INSERT INTO sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, '000000', '仅本人', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL);