From d43006dce877cf6a2e9164ffae2ecea6808f3459 Mon Sep 17 00:00:00 2001
From: kemengkai <282913448@qq.com>
Date: Wed, 11 May 2022 10:17:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9D=E6=AD=A5=E9=A9=B3?=
=?UTF-8?q?=E5=9B=9E=E5=8A=9F=E8=83=BD=20dom4j=E5=A2=9E=E5=8A=A0=E5=A4=B1?=
=?UTF-8?q?=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sql/ruoyi-vue-pro.sql | 1 +
yudao-dependencies/pom.xml | 9 +-
.../config/YudaoSwaggerAutoConfiguration.java | 3 +-
yudao-module-bpm/yudao-module-bpm-biz/pom.xml | 14 +
.../admin/task/BpmTaskController.java | 22 +-
.../admin/task/vo/task/BpmTaskBackReqVO.java | 43 +++
.../admin/task/vo/task/BpmTaskRespVO.java | 1 -
.../bpm/convert/task/BpmActivityConvert.java | 5 +-
.../bpm/convert/task/BpmTaskConvert.java | 134 ++++++---
.../definition/BpmProcessDefinitionExtDO.java | 2 +-
.../definition/BpmTaskAssignRuleDO.java | 4 +-
.../bpm/dal/dataobject/oa/BpmOALeaveDO.java | 2 +-
.../dal/dataobject/task/BpmActivityDO.java | 105 +++++++
.../task/BpmProcessInstanceExtDO.java | 4 +-
.../bpm/dal/dataobject/task/BpmTaskExtDO.java | 7 +-
.../bpm/dal/mysql/task/BpmActivityMapper.java | 50 ++++
.../bpm/dal/mysql/task/BpmTaskExtMapper.java | 34 ++-
.../definition/BpmModelFormTypeEnum.java | 2 +-
.../definition/BpmTaskAssignRuleTypeEnum.java | 2 +-
.../definition/BpmTaskRuleScriptEnum.java | 2 +-
.../enums/message/BpmMessageEnum.java | 2 +-
.../BpmProcessInstanceDeleteReasonEnum.java | 2 +-
.../task/BpmProcessInstanceResultEnum.java | 5 +-
.../task/BpmProcessInstanceStatusEnum.java | 2 +-
.../bpm/domain/vo/ApproveProcInstVO.java | 34 +++
.../bpm/config/BpmSecurityConfiguration.java | 28 ++
...ParallelMultiInstanceActivityBehavior.java | 2 +-
.../behavior/BpmUserTaskActivityBehavior.java | 2 +-
.../behavior/script/BpmTaskAssignScript.java | 2 +-
.../impl/BpmTaskAssignLeaderX1Script.java | 2 +-
.../impl/BpmTaskAssignLeaderX2Script.java | 2 +-
.../impl/BpmTaskAssignStartUserScript.java | 2 +-
.../definition/BpmFormServiceImpl.java | 2 +-
.../definition/BpmModelServiceImpl.java | 2 +-
.../BpmTaskAssignRuleServiceImpl.java | 2 +-
.../dto/BpmModelMetaInfoRespDTO.java | 2 +-
.../dto/BpmProcessDefinitionCreateReqDTO.java | 2 +-
.../message/BpmMessageServiceImpl.java | 2 +-
.../bpm/service/oa/BpmOALeaveServiceImpl.java | 2 +-
.../service/task/BpmActivityServiceImpl.java | 30 +-
.../task/BpmProcessInstanceServiceImpl.java | 6 +-
.../bpm/service/task/BpmTaskService.java | 37 ++-
.../bpm/service/task/BpmTaskServiceImpl.java | 151 +++++++---
.../inst/domain/HistoricApproveTaskDTO.java | 20 ++
.../hi/task/inst/domain/vo/HiTaskinstVO.java | 105 +++++++
.../task/inst/service/HiTaskinstService.java | 263 ++++++++++++++++++
.../resources/mapper/BpmActivityMapper.xml | 48 ++++
.../resources/mapper/BpmTaskExtMapper.xml | 34 ++-
.../yudao/module/bpm/MultiInstancesTest.java | 6 +-
.../config/SecurityConfiguration.java | 1 +
50 files changed, 1078 insertions(+), 168 deletions(-)
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskBackReqVO.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/task/BpmActivityDO.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/task/BpmActivityMapper.java
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/definition/BpmModelFormTypeEnum.java (87%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/definition/BpmTaskAssignRuleTypeEnum.java (92%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/definition/BpmTaskRuleScriptEnum.java (90%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/message/BpmMessageEnum.java (91%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/task/BpmProcessInstanceDeleteReasonEnum.java (93%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/task/BpmProcessInstanceResultEnum.java (77%)
rename yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/{ => domain}/enums/task/BpmProcessInstanceStatusEnum.java (87%)
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/domain/vo/ApproveProcInstVO.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/bpm/config/BpmSecurityConfiguration.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/business/hi/task/inst/domain/HistoricApproveTaskDTO.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/business/hi/task/inst/domain/vo/HiTaskinstVO.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/business/hi/task/inst/service/HiTaskinstService.java
create mode 100644 yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/BpmActivityMapper.xml
diff --git a/sql/ruoyi-vue-pro.sql b/sql/ruoyi-vue-pro.sql
index 67becba59..dcb3b2d65 100644
--- a/sql/ruoyi-vue-pro.sql
+++ b/sql/ruoyi-vue-pro.sql
@@ -546,6 +546,7 @@ COMMIT;
DROP TABLE IF EXISTS `bpm_task_ext`;
CREATE TABLE `bpm_task_ext` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
+ `task_def_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '流程任务key',
`assignee_user_id` bigint DEFAULT NULL COMMENT '任务的审批人',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务的名字',
`task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '任务的编号',
diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index 5a7e152ae..bb3185f3d 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -65,6 +65,7 @@
3.1.471
1.2.7
1.4.0
+ 2.1.3
@@ -578,7 +579,13 @@
justauth-spring-boot-starter
${justauth.version}
-
+
+
+
+ org.dom4j
+ dom4j
+ ${dom4j.version}
+
diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java
index 6ebd29b12..f8d0761e6 100644
--- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java
+++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java
@@ -58,7 +58,8 @@ public class YudaoSwaggerAutoConfiguration {
.build()
.securitySchemes(securitySchemes())
.globalRequestParameters(globalRequestParameters())
- .securityContexts(securityContexts());
+ .securityContexts(securityContexts())
+ .host("http://localhost:48080");
}
// ========== apiInfo ==========
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
index 630835c0b..2d19cd77a 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
+++ b/yudao-module-bpm/yudao-module-bpm-biz/pom.xml
@@ -10,6 +10,10 @@
4.0.0
yudao-module-bpm-biz
+
+ 2.1.3
+
+
${project.artifactId}
bpm-base 模块,实现公用的工作流的逻辑,提供给 bpm-activiti 和 bpm-flowable 复用
@@ -36,6 +40,10 @@
cn.iocoder.boot
yudao-spring-boot-starter-biz-data-permission
+
+ cn.iocoder.boot
+ yudao-spring-boot-starter-biz-tenant
+
@@ -77,5 +85,11 @@
1.4.196
test
+
+
+
+ org.dom4j
+ dom4j
+
diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
index d3318c963..eb9fa9dbb 100644
--- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
+++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
@@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
+import org.apache.ibatis.annotations.Param;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.TaskService;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -17,6 +18,7 @@ import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
+import java.util.Objects;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@@ -49,10 +51,17 @@ public class BpmTaskController {
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult> getTaskListByProcessInstanceId(
- @RequestParam("processInstanceId") String processInstanceId) {
+ @RequestParam("processInstanceId") String processInstanceId) {
return success(taskService.getTaskListByProcessInstanceId(processInstanceId));
}
+ @GetMapping("/get")
+ @ApiOperation(value = "获取审批单详情", notes = "包括完成的、未完成的")
+ @ApiImplicitParam(name = "taskId", value = "任务Id", required = true, dataTypeClass = String.class)
+ public CommonResult