From 77f06e79c41bdb9ff0e2cb4962150b68c7e3b6ce Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 8 Jan 2022 16:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=20bpm=20=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=9A=84=E5=89=8D=E7=AB=AF=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/task/BpmTaskTodoPageItemRespVO.java | 10 +- .../bpm/convert/task/BpmTaskConvert.java | 8 +- .../service/task/impl/BpmTaskServiceImpl.java | 2 +- .../src/views/bpm/definition/index.vue | 2 +- .../{process => processInstance}/index.vue | 0 yudao-admin-ui/src/views/bpm/task/todo.vue | 221 +++--------------- 6 files changed, 48 insertions(+), 195 deletions(-) rename yudao-admin-ui/src/views/bpm/{process => processInstance}/index.vue (100%) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/vo/task/BpmTaskTodoPageItemRespVO.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/vo/task/BpmTaskTodoPageItemRespVO.java index 1eccc3eba..bf167bc39 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/vo/task/BpmTaskTodoPageItemRespVO.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/controller/task/vo/task/BpmTaskTodoPageItemRespVO.java @@ -19,8 +19,11 @@ public class BpmTaskTodoPageItemRespVO { @ApiModelProperty(value = "接收时间", required = true) private Date claimTime; - @ApiModelProperty(value = "任务状态", notes = "参见 bpm_process_instance_status", example = "1") - private Integer status; + @ApiModelProperty(value = "创建时间", required = true) + private Date createTime; + + @ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举") + private Integer suspensionState; /** * 所属流程实例 @@ -34,6 +37,9 @@ public class BpmTaskTodoPageItemRespVO { @ApiModelProperty(value = "流程实例编号", required = true, example = "1024") private String id; + @ApiModelProperty(value = "流程实例名称", required = true, example = "芋道") + private String name; + @ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024") private Long startUserId; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/task/BpmTaskConvert.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/task/BpmTaskConvert.java index ff2e6482e..e62085c7a 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/task/BpmTaskConvert.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/convert/task/BpmTaskConvert.java @@ -45,16 +45,18 @@ public interface BpmTaskConvert { @Mapping(source = "task.id", target = "id"), @Mapping(source = "task.name", target = "name"), @Mapping(source = "task.claimTime", target = "claimTime"), - @Mapping(source = "task.suspended", target = "status", qualifiedByName = "convertSuspendedToStatus"), + @Mapping(source = "task.createTime", target = "createTime"), + @Mapping(source = "task.suspended", target = "suspensionState", qualifiedByName = "convertSuspendedToSuspensionState"), @Mapping(source = "processInstance.id", target = "processInstance.id"), + @Mapping(source = "processInstance.name", target = "processInstance.name"), @Mapping(source = "processInstance.startUserId", target = "processInstance.startUserId"), @Mapping(source = "processInstance.processDefinitionId", target = "processInstance.processDefinitionId"), @Mapping(source = "user.nickname", target = "processInstance.startUserNickname") }) BpmTaskTodoPageItemRespVO convert(Task task, ProcessInstance processInstance, SysUserDO user); - @Named("convertSuspendedToStatus") - default Integer convertAssigneeToStatus(boolean suspended) { + @Named("convertSuspendedToSuspensionState") + default Integer convertSuspendedToSuspensionState(boolean suspended) { return suspended ? SuspensionState.SUSPENDED.getStateCode() : SuspensionState.ACTIVE.getStateCode(); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmTaskServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmTaskServiceImpl.java index 4a033198d..e50f9ce76 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmTaskServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/bpm/service/task/impl/BpmTaskServiceImpl.java @@ -85,7 +85,7 @@ public class BpmTaskServiceImpl implements BpmTaskService { TaskQuery taskQuery = taskService.createTaskQuery() .taskAssignee(String.valueOf(userId)); if (StrUtil.isNotBlank(pageVO.getName())) { - taskQuery.taskName("%s" + pageVO.getName() + "%s"); + taskQuery.taskNameLike("%" + pageVO.getName() + "%"); } if (pageVO.getBeginCreateTime() != null) { taskQuery.taskCreatedAfter(pageVO.getBeginCreateTime()); diff --git a/yudao-admin-ui/src/views/bpm/definition/index.vue b/yudao-admin-ui/src/views/bpm/definition/index.vue index 30dc9dd66..2b6554af5 100644 --- a/yudao-admin-ui/src/views/bpm/definition/index.vue +++ b/yudao-admin-ui/src/views/bpm/definition/index.vue @@ -29,7 +29,7 @@ 未部署 - +