feat: Spring Boot 3.5.14 全量升级 + 组件升级
核心升级: - Spring Boot 2.7.18 → 3.5.14 - MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter) - Springdoc 1.8.0 → 2.8.6 (OpenAPI 3) - Flowable 6.8.0 → 7.1.0 - Druid 1.2.x → 1.2.28 (boot3-starter) - kotlin-reflect 1.9.10 → 1.9.25 迁移适配: - javax → jakarta 命名空间 (620+ 文件) - Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter) - Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity) - Druid 包名迁移 (boot→boot3) - Redis 配置路径迁移 (spring.redis→spring.data.redis) - Flyway 适配 (flyway-database-postgresql) - Flowable 7.x 适配 (MULE_TASK_IMAGE 移除) 修复: - spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效) - mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突) - Flowable database-schema-update 启用自动建表 验证: 23/23 测试通过, 1374 API端点正常
This commit is contained in:
@@ -49,11 +49,7 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.flowable</groupId>
|
||||
<artifactId>flowable-spring-boot-starter</artifactId>
|
||||
@@ -67,7 +63,17 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -83,6 +89,12 @@
|
||||
<version>5.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger 注解 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations-jakarta</artifactId>
|
||||
<version>2.2.30</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- <build>-->
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.core.system.service.ISysDeptService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 扩展表达式
|
||||
|
||||
@@ -13,17 +13,18 @@ import com.core.system.domain.SysExpression;
|
||||
import com.core.system.service.ISysExpressionService;
|
||||
import com.core.system.service.ISysRoleService;
|
||||
import com.core.system.service.ISysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
@@ -42,7 +43,7 @@ import java.util.Map;
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "流程定义")
|
||||
@Tag(name = "流程定义")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/definition")
|
||||
public class FlowDefinitionController extends BaseController {
|
||||
@@ -59,14 +60,14 @@ public class FlowDefinitionController extends BaseController {
|
||||
private ISysExpressionService sysExpressionService;
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
|
||||
public AjaxResult list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
|
||||
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
|
||||
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
|
||||
@Operation(summary = "流程定义列表")
|
||||
public AjaxResult list(@Parameter(description = "当前页码", required = true) @RequestParam Integer pageNum,
|
||||
@Parameter(description = "每页条数", required = true) @RequestParam Integer pageSize,
|
||||
@Parameter(description = "流程名称", required = false) @RequestParam(required = false) String name) {
|
||||
return AjaxResult.success(flowDefinitionService.list(name, pageNum, pageSize));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导入流程文件", notes = "上传bpmn20的xml文件")
|
||||
@Operation(summary = "导入流程文件")
|
||||
@PostMapping("/import")
|
||||
public AjaxResult importFile(@RequestParam(required = false) String name,
|
||||
@RequestParam(required = false) String category, MultipartFile file) {
|
||||
@@ -90,9 +91,9 @@ public class FlowDefinitionController extends BaseController {
|
||||
return AjaxResult.success("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "读取xml文件")
|
||||
@Operation(summary = "读取xml文件")
|
||||
@GetMapping("/readXml/{deployId}")
|
||||
public AjaxResult readXml(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId) {
|
||||
public AjaxResult readXml(@Parameter(description = "流程定义id") @PathVariable(value = "deployId") String deployId) {
|
||||
try {
|
||||
return flowDefinitionService.readXml(deployId);
|
||||
} catch (Exception e) {
|
||||
@@ -101,9 +102,9 @@ public class FlowDefinitionController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "读取图片文件")
|
||||
@Operation(summary = "读取图片文件")
|
||||
@GetMapping("/readImage/{deployId}")
|
||||
public void readImage(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId,
|
||||
public void readImage(@Parameter(description = "流程定义id") @PathVariable(value = "deployId") String deployId,
|
||||
HttpServletResponse response) {
|
||||
OutputStream os = null;
|
||||
BufferedImage image = null;
|
||||
@@ -129,7 +130,7 @@ public class FlowDefinitionController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存流程设计器内的xml文件")
|
||||
@Operation(summary = "保存流程设计器内的xml文件")
|
||||
@Log(title = "流程定义", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(@RequestBody FlowSaveXmlVo vo) {
|
||||
@@ -153,24 +154,24 @@ public class FlowDefinitionController extends BaseController {
|
||||
return AjaxResult.success("导入成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起流程")
|
||||
@Operation(summary = "发起流程")
|
||||
@Log(title = "发起流程", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/start/{procDefId}")
|
||||
public AjaxResult start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
public AjaxResult start(@Parameter(description = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@Parameter(description = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
return flowDefinitionService.startProcessInstanceById(procDefId, variables);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "激活或挂起流程定义")
|
||||
@Operation(summary = "激活或挂起流程定义")
|
||||
@Log(title = "激活/挂起流程", businessType = BusinessType.UPDATE)
|
||||
@PutMapping(value = "/updateState")
|
||||
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@ApiParam(value = "流程部署ID", required = true) @RequestParam String deployId) {
|
||||
public AjaxResult updateState(@Parameter(description = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@Parameter(description = "流程部署ID", required = true) @RequestParam String deployId) {
|
||||
flowDefinitionService.updateState(state, deployId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除流程")
|
||||
@Operation(summary = "删除流程")
|
||||
@Log(title = "删除流程", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping(value = "/{deployIds}")
|
||||
public AjaxResult delete(@PathVariable String[] deployIds) {
|
||||
@@ -180,21 +181,21 @@ public class FlowDefinitionController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程办理人员列表")
|
||||
@Operation(summary = "指定流程办理人员列表")
|
||||
@GetMapping("/userList")
|
||||
public AjaxResult userList(SysUser user) {
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程办理组列表")
|
||||
@Operation(summary = "指定流程办理组列表")
|
||||
@GetMapping("/roleList")
|
||||
public AjaxResult roleList(SysRole role) {
|
||||
List<SysRole> list = sysRoleService.selectRoleList(role);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "指定流程达式列表")
|
||||
@Operation(summary = "指定流程达式列表")
|
||||
@GetMapping("/expList")
|
||||
public AjaxResult expList(SysExpression sysExpression) {
|
||||
List<SysExpression> list = sysExpressionService.selectSysExpressionList(sysExpression);
|
||||
|
||||
@@ -6,9 +6,10 @@ import com.core.common.core.domain.AjaxResult;
|
||||
import com.core.common.enums.BusinessType;
|
||||
import com.core.flowable.domain.vo.FlowTaskVo;
|
||||
import com.core.flowable.service.IFlowInstanceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -24,7 +25,7 @@ import java.util.Map;
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程实例管理")
|
||||
@Tag(name = "工作流流程实例管理")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/instance")
|
||||
public class FlowInstanceController extends BaseController {
|
||||
@@ -32,34 +33,34 @@ public class FlowInstanceController extends BaseController {
|
||||
@Autowired
|
||||
private IFlowInstanceService flowInstanceService;
|
||||
|
||||
@ApiOperation(value = "根据流程定义id启动流程实例")
|
||||
@Operation(summary = "根据流程定义id启动流程实例")
|
||||
@PostMapping("/startBy/{procDefId}")
|
||||
public AjaxResult startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
public AjaxResult startById(@Parameter(description = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
|
||||
@Parameter(description = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
|
||||
return flowInstanceService.startProcessInstanceById(procDefId, variables);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "激活或挂起流程实例")
|
||||
@Operation(summary = "激活或挂起流程实例")
|
||||
@PostMapping(value = "/updateState")
|
||||
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
|
||||
public AjaxResult updateState(@Parameter(description = "1:激活,2:挂起", required = true) @RequestParam Integer state,
|
||||
@Parameter(description = "流程实例ID", required = true) @RequestParam String instanceId) {
|
||||
flowInstanceService.updateState(state, instanceId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("结束流程实例")
|
||||
@Operation(summary = "结束流程实例")
|
||||
@PostMapping(value = "/stopProcessInstance")
|
||||
public AjaxResult stopProcessInstance(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowInstanceService.stopProcessInstance(flowTaskVo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除流程实例")
|
||||
@Operation(summary = "删除流程实例")
|
||||
@Log(title = "删除任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping(value = "/delete/{instanceIds}")
|
||||
public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds,
|
||||
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
|
||||
public AjaxResult delete(@Parameter(description = "流程实例ID", required = true) @PathVariable String[] instanceIds,
|
||||
@Parameter(description = "删除原因") @RequestParam(required = false) String deleteReason) {
|
||||
for (String instanceId : instanceIds) {
|
||||
flowInstanceService.delete(instanceId, deleteReason);
|
||||
}
|
||||
|
||||
@@ -8,15 +8,16 @@ import com.core.flowable.domain.dto.FlowTaskDto;
|
||||
import com.core.flowable.domain.vo.FlowQueryVo;
|
||||
import com.core.flowable.domain.vo.FlowTaskVo;
|
||||
import com.core.flowable.service.IFlowTaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -31,7 +32,7 @@ import java.io.OutputStream;
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程任务管理")
|
||||
@Tag(name = "工作流流程任务管理")
|
||||
@RestController
|
||||
@RequestMapping("/flowable/task")
|
||||
public class FlowTaskController extends BaseController {
|
||||
@@ -39,70 +40,70 @@ public class FlowTaskController extends BaseController {
|
||||
@Autowired
|
||||
private IFlowTaskService flowTaskService;
|
||||
|
||||
@ApiOperation(value = "我发起的流程", response = FlowTaskDto.class)
|
||||
@Operation(summary = "我发起的流程")
|
||||
@GetMapping(value = "/myProcess")
|
||||
public AjaxResult myProcess(FlowQueryVo queryVo) {
|
||||
return flowTaskService.myProcess(queryVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消申请", response = FlowTaskDto.class)
|
||||
@Operation(summary = "取消申请")
|
||||
@Log(title = "取消申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/stopProcess")
|
||||
public AjaxResult stopProcess(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.stopProcess(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "撤回流程", response = FlowTaskDto.class)
|
||||
@Operation(summary = "撤回流程")
|
||||
@Log(title = "撤回流程", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/revokeProcess")
|
||||
public AjaxResult revokeProcess(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.revokeProcess(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取待办列表", response = FlowTaskDto.class)
|
||||
@Operation(summary = "获取待办列表")
|
||||
@GetMapping(value = "/todoList")
|
||||
public AjaxResult todoList(FlowQueryVo queryVo) {
|
||||
return flowTaskService.todoList(queryVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取已办任务", response = FlowTaskDto.class)
|
||||
@Operation(summary = "获取已办任务")
|
||||
@GetMapping(value = "/finishedList")
|
||||
public AjaxResult finishedList(FlowQueryVo queryVo) {
|
||||
return flowTaskService.finishedList(queryVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "流程历史流转记录", response = FlowTaskDto.class)
|
||||
@Operation(summary = "流程历史流转记录")
|
||||
@GetMapping(value = "/flowRecord")
|
||||
public AjaxResult flowRecord(String procInsId, String deployId) {
|
||||
return flowTaskService.flowRecord(procInsId, deployId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据任务ID查询挂载的表单信息")
|
||||
@Operation(summary = "根据任务ID查询挂载的表单信息")
|
||||
@GetMapping(value = "/getTaskForm")
|
||||
public AjaxResult getTaskForm(String taskId) {
|
||||
return flowTaskService.getTaskForm(taskId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "流程初始化表单", response = FlowTaskDto.class)
|
||||
@Operation(summary = "流程初始化表单")
|
||||
@GetMapping(value = "/flowFormData")
|
||||
public AjaxResult flowFormData(String deployId) {
|
||||
return flowTaskService.flowFormData(deployId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取流程变量", response = FlowTaskDto.class)
|
||||
@Operation(summary = "获取流程变量")
|
||||
@GetMapping(value = "/processVariables/{taskId}")
|
||||
public AjaxResult processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
|
||||
public AjaxResult processVariables(@Parameter(description = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
|
||||
return flowTaskService.processVariables(taskId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "审批任务")
|
||||
@Operation(summary = "审批任务")
|
||||
@Log(title = "审批任务", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/complete")
|
||||
public AjaxResult complete(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.complete(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "驳回任务")
|
||||
@Operation(summary = "驳回任务")
|
||||
@Log(title = "驳回任务", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/reject")
|
||||
public AjaxResult taskReject(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
@@ -110,7 +111,7 @@ public class FlowTaskController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "退回任务")
|
||||
@Operation(summary = "退回任务")
|
||||
@Log(title = "退回任务", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/return")
|
||||
public AjaxResult taskReturn(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
@@ -118,13 +119,13 @@ public class FlowTaskController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取所有可回退的节点")
|
||||
@Operation(summary = "获取所有可回退的节点")
|
||||
@PostMapping(value = "/returnList")
|
||||
public AjaxResult findReturnTaskList(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.findReturnTaskList(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除任务")
|
||||
@Operation(summary = "删除任务")
|
||||
@Log(title = "删除任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping(value = "/delete")
|
||||
public AjaxResult delete(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
@@ -132,35 +133,35 @@ public class FlowTaskController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "认领/签收任务")
|
||||
@Operation(summary = "认领/签收任务")
|
||||
@PostMapping(value = "/claim")
|
||||
public AjaxResult claim(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.claim(flowTaskVo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消认领/签收任务")
|
||||
@Operation(summary = "取消认领/签收任务")
|
||||
@PostMapping(value = "/unClaim")
|
||||
public AjaxResult unClaim(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.unClaim(flowTaskVo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "委派任务")
|
||||
@Operation(summary = "委派任务")
|
||||
@PostMapping(value = "/delegateTask")
|
||||
public AjaxResult delegate(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.delegateTask(flowTaskVo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务归还")
|
||||
@Operation(summary = "任务归还")
|
||||
@PostMapping(value = "/resolveTask")
|
||||
public AjaxResult resolveTask(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.resolveTask(flowTaskVo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "转办任务")
|
||||
@Operation(summary = "转办任务")
|
||||
@PostMapping(value = "/assignTask")
|
||||
public AjaxResult assign(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.assignTask(flowTaskVo);
|
||||
@@ -168,26 +169,26 @@ public class FlowTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addMultiInstanceExecution")
|
||||
@ApiOperation(value = "多实例加签")
|
||||
@Operation(summary = "多实例加签")
|
||||
public AjaxResult addMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.addMultiInstanceExecution(flowTaskVo);
|
||||
return AjaxResult.success("加签成功");
|
||||
}
|
||||
|
||||
@PostMapping(value = "/deleteMultiInstanceExecution")
|
||||
@ApiOperation(value = "多实例减签")
|
||||
@Operation(summary = "多实例减签")
|
||||
public AjaxResult deleteMultiInstanceExecution(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
flowTaskService.deleteMultiInstanceExecution(flowTaskVo);
|
||||
return AjaxResult.success("减签成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取下一节点")
|
||||
@Operation(summary = "获取下一节点")
|
||||
@PostMapping(value = "/nextFlowNode")
|
||||
public AjaxResult getNextFlowNode(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.getNextFlowNode(flowTaskVo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "流程发起时获取下一节点")
|
||||
@Operation(summary = "流程发起时获取下一节点")
|
||||
@PostMapping(value = "/nextFlowNodeByStart")
|
||||
public AjaxResult getNextFlowNodeByStart(@RequestBody FlowTaskVo flowTaskVo) {
|
||||
return flowTaskService.getNextFlowNodeByStart(flowTaskVo);
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.core.flowable.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -19,85 +18,85 @@ import java.util.Date;
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ApiModel("工作流任务相关-返回参数")
|
||||
@Schema(description = "工作流任务相关-返回参数")
|
||||
public class FlowTaskDto implements Serializable {
|
||||
|
||||
@ApiModelProperty("任务编号")
|
||||
@Schema(description = "任务编号")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("任务执行编号")
|
||||
@Schema(description = "任务执行编号")
|
||||
private String executionId;
|
||||
|
||||
@ApiModelProperty("任务名称")
|
||||
@Schema(description = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
@ApiModelProperty("任务Key")
|
||||
@Schema(description = "任务Key")
|
||||
private String taskDefKey;
|
||||
|
||||
@ApiModelProperty("任务执行人Id")
|
||||
@Schema(description = "任务执行人Id")
|
||||
private Long assigneeId;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
@Schema(description = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("流程发起人部门名称")
|
||||
@Schema(description = "流程发起人部门名称")
|
||||
private String startDeptName;
|
||||
|
||||
@ApiModelProperty("任务执行人名称")
|
||||
@Schema(description = "任务执行人名称")
|
||||
private String assigneeName;
|
||||
@ApiModelProperty("任务执行人部门")
|
||||
@Schema(description = "任务执行人部门")
|
||||
private String assigneeDeptName;;
|
||||
|
||||
@ApiModelProperty("流程发起人Id")
|
||||
@Schema(description = "流程发起人Id")
|
||||
private String startUserId;
|
||||
|
||||
@ApiModelProperty("流程发起人名称")
|
||||
@Schema(description = "流程发起人名称")
|
||||
private String startUserName;
|
||||
|
||||
@ApiModelProperty("流程类型")
|
||||
@Schema(description = "流程类型")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty("流程变量信息")
|
||||
@Schema(description = "流程变量信息")
|
||||
private Object variables;
|
||||
|
||||
@ApiModelProperty("局部变量信息")
|
||||
@Schema(description = "局部变量信息")
|
||||
private Object taskLocalVars;
|
||||
|
||||
@ApiModelProperty("流程部署编号")
|
||||
@Schema(description = "流程部署编号")
|
||||
private String deployId;
|
||||
|
||||
@ApiModelProperty("流程ID")
|
||||
@Schema(description = "流程ID")
|
||||
private String procDefId;
|
||||
|
||||
@ApiModelProperty("流程key")
|
||||
@Schema(description = "流程key")
|
||||
private String procDefKey;
|
||||
|
||||
@ApiModelProperty("流程定义名称")
|
||||
@Schema(description = "流程定义名称")
|
||||
private String procDefName;
|
||||
|
||||
@ApiModelProperty("流程定义内置使用版本")
|
||||
@Schema(description = "流程定义内置使用版本")
|
||||
private int procDefVersion;
|
||||
|
||||
@ApiModelProperty("流程实例ID")
|
||||
@Schema(description = "流程实例ID")
|
||||
private String procInsId;
|
||||
|
||||
@ApiModelProperty("历史流程实例ID")
|
||||
@Schema(description = "历史流程实例ID")
|
||||
private String hisProcInsId;
|
||||
|
||||
@ApiModelProperty("任务耗时")
|
||||
@Schema(description = "任务耗时")
|
||||
private String duration;
|
||||
|
||||
@ApiModelProperty("任务意见")
|
||||
@Schema(description = "任务意见")
|
||||
private FlowCommentDto comment;
|
||||
|
||||
@ApiModelProperty("候选执行人")
|
||||
@Schema(description = "候选执行人")
|
||||
private String candidate;
|
||||
|
||||
@ApiModelProperty("任务创建时间")
|
||||
@Schema(description = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("任务完成时间")
|
||||
@Schema(description = "任务完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date finishTime;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.core.flowable.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -13,22 +12,22 @@ import lombok.Data;
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("工作流任务相关--请求参数")
|
||||
@Schema(description = "工作流任务相关--请求参数")
|
||||
public class FlowQueryVo {
|
||||
|
||||
@ApiModelProperty("流程名称")
|
||||
@Schema(description = "流程名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@Schema(description = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@Schema(description = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty("当前页码")
|
||||
@Schema(description = "当前页码")
|
||||
private Integer pageNum;
|
||||
|
||||
@ApiModelProperty("每页条数")
|
||||
@Schema(description = "每页条数")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.core.flowable.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,44 +15,44 @@ import java.util.Map;
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("工作流任务相关--请求参数")
|
||||
@Schema(description = "工作流任务相关--请求参数")
|
||||
public class FlowTaskVo {
|
||||
|
||||
@ApiModelProperty("任务Id")
|
||||
@Schema(description = "任务Id")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
@Schema(description = "用户Id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty("任务意见")
|
||||
@Schema(description = "任务意见")
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty("流程实例Id")
|
||||
@Schema(description = "流程实例Id")
|
||||
private String instanceId;
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
@Schema(description = "节点")
|
||||
private String targetKey;
|
||||
|
||||
private String deploymentId;
|
||||
@ApiModelProperty("流程环节定义ID")
|
||||
@Schema(description = "流程环节定义ID")
|
||||
private String defId;
|
||||
|
||||
@ApiModelProperty("子执行流ID")
|
||||
@Schema(description = "子执行流ID")
|
||||
private String currentChildExecutionId;
|
||||
|
||||
@ApiModelProperty("子执行流是否已执行")
|
||||
@Schema(description = "子执行流是否已执行")
|
||||
private Boolean flag;
|
||||
|
||||
@ApiModelProperty("流程变量信息")
|
||||
@Schema(description = "流程变量信息")
|
||||
private Map<String, Object> variables;
|
||||
|
||||
@ApiModelProperty("审批人")
|
||||
@Schema(description = "审批人")
|
||||
private String assignee;
|
||||
|
||||
@ApiModelProperty("候选人")
|
||||
@Schema(description = "候选人")
|
||||
private List<String> candidateUsers;
|
||||
|
||||
@ApiModelProperty("审批组")
|
||||
@Schema(description = "审批组")
|
||||
private List<String> candidateGroups;
|
||||
|
||||
private String requestIdStr;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.core.flowable.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -13,13 +12,13 @@ import lombok.Data;
|
||||
* @date 2022-04-23 11:01:52
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("可退回节点")
|
||||
@Schema(description = "可退回节点")
|
||||
public class ReturnTaskNodeVo {
|
||||
|
||||
@ApiModelProperty("任务Id")
|
||||
@Schema(description = "任务Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
@Schema(description = "用户Id")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.flowable.engine.*;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* flowable 引擎注入封装
|
||||
|
||||
@@ -158,8 +158,9 @@ public class CustomProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
|
||||
ImageIO.read(ReflectUtil.getResource("org/flowable/icons/dmnTask.png", this.customClassLoader));
|
||||
CAMEL_TASK_IMAGE =
|
||||
ImageIO.read(ReflectUtil.getResource("org/flowable/icons/camelTask.png", this.customClassLoader));
|
||||
MULE_TASK_IMAGE =
|
||||
ImageIO.read(ReflectUtil.getResource("org/flowable/icons/muleTask.png", this.customClassLoader));
|
||||
// MULE_TASK_IMAGE removed in Flowable 7.x
|
||||
// MULE_TASK_IMAGE =
|
||||
// ImageIO.read(ReflectUtil.getResource("org/flowable/icons/muleTask.png", this.customClassLoader));
|
||||
HTTP_TASK_IMAGE =
|
||||
ImageIO.read(ReflectUtil.getResource("org/flowable/icons/httpTask.png", this.customClassLoader));
|
||||
TIMER_IMAGE = ImageIO.read(ReflectUtil.getResource("org/flowable/icons/timer.png", this.customClassLoader));
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.flowable.image.impl.DefaultProcessDiagramGenerator;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
Reference in New Issue
Block a user