1、逻辑模型 2、建表脚本 DROP TABLE IF EXISTS `pro_approval_flow_instance_t`;CREATE TABLE `pro_approval_flow_instance_t` ( `flo
DROP TABLE IF EXISTS `pro_approval_flow_instance_t`;CREATE TABLE `pro_approval_flow_instance_t` ( `flow_instance_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '流程实例ID', `flow_id` bigint(20) DEFAULT NULL COMMENT '流程ID', `flow_node_version` varchar(50) DEFAULT NULL COMMENT '流程节点版本号', `biz_type` varchar(50) DEFAULT NULL COMMENT '业务类型', `biz_data_id` varchar(50) DEFAULT NULL COMMENT '业务数据ID', `biz_data` varchar(5000) DEFAULT NULL COMMENT '业务数据', `owner` varchar(50) DEFAULT NULL COMMENT '责任人', `owner_name` varchar(50) DEFAULT NULL COMMENT '责任人名称', `current_node` bigint(20) DEFAULT NULL COMMENT '当前节点', `resubmit_node` bigint(20) DEFAULT NULL COMMENT '重新提交节点', `status` varchar(20) DEFAULT NULL COMMENT '实例状态,RUNNING进行中,FINISHED已完成,ABORT作废,REVOKE撤回,REJECT驳回', `creator` varchar(100) DEFAULT NULL COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT NULL COMMENT '创建人名称', `create_date` datetime DEFAULT NULL COMMENT '创建时间', `last_updater` varchar(100) DEFAULT NULL COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT NULL COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT NULL COMMENT '最后更新时间', PRIMARY KEY (`flow_instance_id`), KEY `idx_biztype_bizdataid` (`biz_type`,`biz_data_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批流流程实例表';DROP TABLE IF EXISTS `pro_approval_flow_log_t`;CREATE TABLE `pro_approval_flow_log_t` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `flow_instance_id` bigint(20) DEFAULT NULL COMMENT '流程实例ID', `flow_node_id` bigint(20) DEFAULT NULL COMMENT '流程节点ID', `op_type` varchar(50) DEFAULT NULL COMMENT '操作类型,SUBMIT提交,AGREE同意,REJECT驳回,RESUBMIT重新提交,REVOKE撤回,REFERRAL转审,ABORT作废,FINISHED已完成', `remark` varchar(5000) DEFAULT NULL COMMENT '备注', `creator` varchar(100) DEFAULT NULL COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT NULL COMMENT '创建人名称', `create_date` datetime DEFAULT NULL COMMENT '创建时间', `last_updater` varchar(100) DEFAULT NULL COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT NULL COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT NULL COMMENT '最后更新时间', PRIMARY KEY (`id`), KEY `idx_flowinstanceid` (`flow_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批日志表';DROP TABLE IF EXISTS `pro_approval_flow_node_handler_t`;CREATE TABLE `pro_approval_flow_node_handler_t` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `flow_instance_id` bigint(20) DEFAULT NULL COMMENT '流程实例ID', `flow_node_id` bigint(20) DEFAULT NULL COMMENT '流程节点ID', `handler` varchar(50) DEFAULT NULL COMMENT '处理人', `handler_name` varchar(50) DEFAULT NULL COMMENT '处理人名称', `handler_type` varchar(20) DEFAULT NULL COMMENT '处理人类型,approver审批人,ccperson抄送人', `creator` varchar(100) DEFAULT NULL COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT NULL COMMENT '创建人名称', `create_date` datetime DEFAULT NULL COMMENT '创建时间', `last_updater` varchar(100) DEFAULT NULL COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT NULL COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT NULL COMMENT '最后更新时间', PRIMARY KEY (`id`), KEY `idx_flowinstanceid_flownodeid` (`flow_instance_id`,`flow_node_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批节点处理人表';DROP TABLE IF EXISTS `pro_approval_flow_node_t`;CREATE TABLE `pro_approval_flow_node_t` ( `flow_node_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '流程节点ID', `flow_node_code` varchar(50) DEFAULT NULL COMMENT '节点编码', `flow_node_name` varchar(50) DEFAULT NULL COMMENT '节点名称', `flow_id` bigint(20) DEFAULT NULL COMMENT '流程ID', `node_type` varchar(50) DEFAULT 'APPROVAL' COMMENT '节点类型,APPROVAL:审批节点;CONDITION:条件节点;SYSTEM:系统节点', `approver_rule` varchar(5000) DEFAULT NULL COMMENT '审批人规则', `cc_user_rule` varchar(5000) DEFAULT NULL COMMENT '抄送人规则', `reject_node_rule` varchar(500) DEFAULT NULL COMMENT '驳回节点规则', `pass_ratio` decimal(4,3) DEFAULT NULL COMMENT '通过比例', `reject_ratio` decimal(4,3) DEFAULT NULL COMMENT '驳回比例', `condition_expression` varchar(500) DEFAULT NULL COMMENT '条件表达式', `system_activity` varchar(50) DEFAULT NULL COMMENT '系统活动', `resubmit_to_self` varchar(1) DEFAULT NULL COMMENT '重新提交后回到当前节点', `active_todo_rule` varchar(500) DEFAULT NULL COMMENT '激活待办规则', `reject_todo_rule` varchar(500) DEFAULT NULL COMMENT '驳回待办规则', `biz_status` varchar(50) DEFAULT NULL COMMENT '业务数据状态', `last_flag` varchar(1) DEFAULT 'N' COMMENT '最后节点标记', `sort_num` tinyint(4) DEFAULT NULL COMMENT '排序号', `flow_node_version` varchar(50) DEFAULT NULL COMMENT '流程节点版本号', `creator` varchar(100) DEFAULT 'admin' COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT 'admin' COMMENT '创建人名称', `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `last_updater` varchar(100) DEFAULT 'admin' COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT 'admin' COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`flow_node_id`), KEY `idx_flowid_flownodeversion_ordernum` (`flow_id`,`flow_node_version`,`sort_num`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批流节点表';DROP TABLE IF EXISTS `pro_approval_flow_t`;CREATE TABLE `pro_approval_flow_t` ( `flow_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '流程ID', `flow_code` varchar(50) DEFAULT NULL COMMENT '流程编码', `flow_name` varchar(50) DEFAULT NULL COMMENT '流程名称', `biz_finished_status` varchar(50) DEFAULT NULL COMMENT '业务数据已完成状态', `todo_done_rule` varchar(4000) DEFAULT NULL COMMENT '已完成待办规则', `public_flag` varchar(1) DEFAULT 'Y' COMMENT '发布状态,Y发布,N草稿', `creator` varchar(100) DEFAULT 'admin' COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT 'admin' COMMENT '创建人名称', `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `last_updater` varchar(100) DEFAULT 'admin' COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT 'admin' COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间', PRIMARY KEY (`flow_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批流流程表';DROP TABLE IF EXISTS `pro_approval_flow_todo_t`;CREATE TABLE `pro_approval_flow_todo_t` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `app_task_id` varchar(100) DEFAULT NULL COMMENT 'W3待办ID', `flow_instance_id` bigint(20) DEFAULT NULL COMMENT '流程实例ID', `flow_node_id` bigint(20) DEFAULT NULL COMMENT '流程节点ID', `handler` varchar(50) DEFAULT NULL COMMENT '处理人', `handler_name` varchar(50) DEFAULT NULL COMMENT '处理人名称', `result` varchar(20) DEFAULT NULL COMMENT '待办结果,UNHANDLED未处理,AGREE同意,REJECT驳回,REFERRAL转审,REVOKE撤回,ABORT作废', `comment` varchar(5000) DEFAULT NULL COMMENT '审批意见', `forward_user` varchar(50) DEFAULT NULL COMMENT '转审人W3账号,当待办结果为转审时必填', `forward_user_name` varchar(50) DEFAULT NULL COMMENT '转审人名称,当待办结果为转审时必填', `active_flag` varchar(1) DEFAULT 'Y' COMMENT '激活标识,Y激活,N未激活', `creator` varchar(100) DEFAULT NULL COMMENT '创建人W3账号', `creator_name` varchar(100) DEFAULT NULL COMMENT '创建人名称', `create_date` datetime DEFAULT NULL COMMENT '创建时间', `last_updater` varchar(100) DEFAULT NULL COMMENT '最后更新人W3账号', `last_updater_name` varchar(100) DEFAULT NULL COMMENT '最后更新人名称', `last_update_date` datetime DEFAULT NULL COMMENT '最后更新时间', PRIMARY KEY (`id`), KEY `idx_flowinstanceid_flownodeid_handler` (`flow_instance_id`,`flow_node_id`,`handler`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='审批流待办表';
insert into `pro_approval_flow_t`(`flow_id`,`flow_code`,`flow_name`,`biz_finished_status`,`todo_done_rule`,`public_flag`,`creator`,`creator_name`,`create_date`,`last_updater`,`last_updater_name`,`last_update_date`) values (1,'ADD_SITE','新增Site审批流','EFFECTIVE','static:{\"title\":\"“${supplierName}供应商${siteCode}已集成”。(${supplierName} supplier${siteCode} is already Integrated)\",\"desc\":\"“${supplierName}供应商${siteCode}已集成”。(${supplierName} supplier${siteCode} is already Integrated)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','Y','admin','admin','2023-03-01 14:26:23','admin','admin','2023-03-01 14:26:28');insert into `pro_approval_flow_node_t`(`flow_node_id`,`flow_node_code`,`flow_node_name`,`flow_id`,`node_type`,`approver_rule`,`cc_user_rule`,`reject_node_rule`,`pass_ratio`,`reject_ratio`,`condition_expression`,`system_activity`,`resubmit_to_self`,`active_todo_rule`,`reject_todo_rule`,`biz_status`,`last_flag`,`sort_num`,`flow_node_version`,`creator`,`creator_name`,`create_date`,`last_updater`,`last_updater_name`,`last_update_date`) values (1,'FILL_SITE_INFO','填写Site基本信息',1,'APPROVAL','var:owner',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DRAFT','N',1,'20230310001','admin','admin','2023-03-10 13:32:46','admin','admin','2023-03-10 13:32:55'),(2,'SITECREATOR_SUPOWNER_NOT_EQUAL','Site创建人与供应商Owner不为同一个人',1,'CONDITION',NULL,NULL,NULL,NULL,NULL,'#map[\'isSiteCreatorSupOwnerNotEqual\']?3:4',NULL,NULL,NULL,NULL,NULL,'N',2,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(3,'SUPPLIER_OWNER_APPROVAL','供应商Owner审核',1,'APPROVAL','var:ownerApprover',NULL,'static:1',NULL,NULL,NULL,NULL,NULL,'static:{\"title\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"desc\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','static:{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','DRAFT','N',3,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(4,'REF_EXISTING_BANK_LETTER','是否引用现有银行信息',1,'CONDITION',NULL,NULL,NULL,NULL,NULL,'#map[\'isRefExistingBankLetter\']?8:5',NULL,NULL,NULL,NULL,NULL,'N',4,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(5,'IS_SUP_MAIN','是否供应商维护',1,'CONDITION',NULL,NULL,NULL,NULL,NULL,'#map[\'isSupMain\']?6:7',NULL,NULL,NULL,NULL,NULL,'N',5,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(6,'SUPPLIER_FILL','供应商填写',1,'APPROVAL','var:supApprover',NULL,'static:1',NULL,NULL,NULL,NULL,NULL,'static:{\"title\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"desc\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"url\":\"${isupplierTodoHost}/#/group/procurement/bank-letter-infORMation?id=${siteMainId}\"}',NULL,'DRAFT','N',6,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(7,'AP_APPROVAL','AP审核',1,'APPROVAL','var:apApprover',NULL,'spel:#map[\'isSupMain\']?6:1',NULL,NULL,NULL,NULL,'Y','static:{\"title\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"desc\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','spel:\'{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"\'+(#map[\'isSupMain\']?\'${isupplierTodoHost}/#/group/procurement/bank-letter-information?id=${siteMainId}\':\'${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\')+\'\"}\'','DRAFT','N',7,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-13 10:41:44'),(8,'COMPLIANCE_APPROVAL','金融合规审核',1,'SYSTEM',NULL,NULL,'static:1',NULL,NULL,NULL,'SYSTEM_ACTIVITY_BEAN:COMPLIANCE',NULL,NULL,'static:{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','DRAFT','N',8,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(9,'PROCUREMENT_REAPPROVAL','采购复核',1,'APPROVAL','var:proApprover',NULL,'static:1',NULL,NULL,NULL,NULL,NULL,'static:{\"title\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"desc\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','static:{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','DRAFT','N',9,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(10,'CEG_LEADER_APPROVAL','CEG Leader 审批',1,'APPROVAL','var:cegLeaderApprover',NULL,'static:1',NULL,NULL,NULL,NULL,NULL,'static:{\"title\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"desc\":\"“请审核${supplierName}供应商${siteCode}新增”。(Please review ${supplierName} supplier ${siteCode} Add)。\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','static:{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','DRAFT','N',10,'20230310001','admin','admin','2023-03-10 13:32:51','admin','admin','2023-03-10 13:32:57'),(11,'EBS_INTE','EBS集成',1,'SYSTEM',NULL,NULL,'static:1',NULL,NULL,NULL,'SYSTEM_ACTIVITY_BEAN:ADD_SITE_CALL_EBS',NULL,NULL,'static:{\"title\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"desc\":\"“新增${supplierName}供应商${siteCode}被驳回”。(Add ${supplierName} supplier ${siteCode} has been rejected)\",\"url\":\"${todoHost}/#/group/procurement/site-approve?id=${siteMainId}\"}','DRAFT','Y',11,'20230310001','admin','admin','2023-06-01 12:04:54','admin','admin','2023-06-01 12:04:59');
来源地址:https://blog.csdn.net/luo381821/article/details/131429005
--结束END--
本文标题: JAVA简易审批流-01
本文链接: https://lsjlt.com/news/395699.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-04-01
2024-04-03
2024-04-03
2024-01-21
2024-01-21
2024-01-21
2024-01-21
2023-12-23
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0