Commit 75f6eceea795714246513d06c580bb36c3772a90
1 parent
8b8fecc7
【功能新增】工作流:我的审批,支持 category 过滤
Showing
2 changed files
with
9 additions
and
2 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskPageReqVO.java
| @@ -4,8 +4,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; | @@ -4,8 +4,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; | ||
| 4 | import cn.iocoder.yudao.framework.common.util.date.DateUtils; | 4 | import cn.iocoder.yudao.framework.common.util.date.DateUtils; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 6 | import lombok.Data; |
| 7 | -import lombok.EqualsAndHashCode; | ||
| 8 | -import lombok.ToString; | ||
| 9 | import org.springframework.format.annotation.DateTimeFormat; | 7 | import org.springframework.format.annotation.DateTimeFormat; |
| 10 | 8 | ||
| 11 | import java.time.LocalDateTime; | 9 | import java.time.LocalDateTime; |
| @@ -17,6 +15,9 @@ public class BpmTaskPageReqVO extends PageParam { | @@ -17,6 +15,9 @@ public class BpmTaskPageReqVO extends PageParam { | ||
| 17 | @Schema(description = "流程任务名", example = "芋道") | 15 | @Schema(description = "流程任务名", example = "芋道") |
| 18 | private String name; | 16 | private String name; |
| 19 | 17 | ||
| 18 | + @Schema(description = "流程分类", example = "1") | ||
| 19 | + private String category; | ||
| 20 | + | ||
| 20 | @Schema(description = "创建时间") | 21 | @Schema(description = "创建时间") |
| 21 | @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 22 | @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 22 | private LocalDateTime[] createTime; | 23 | private LocalDateTime[] createTime; |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| @@ -113,6 +113,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -113,6 +113,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 113 | if (StrUtil.isNotBlank(pageVO.getName())) { | 113 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 114 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); | 114 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); |
| 115 | } | 115 | } |
| 116 | + if (StrUtil.isNotEmpty(pageVO.getCategory())) { | ||
| 117 | + taskQuery.taskCategory(pageVO.getCategory()); | ||
| 118 | + } | ||
| 116 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { | 119 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { |
| 117 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); | 120 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); |
| 118 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); | 121 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); |
| @@ -198,6 +201,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -198,6 +201,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 198 | if (StrUtil.isNotBlank(pageVO.getName())) { | 201 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 199 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); | 202 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); |
| 200 | } | 203 | } |
| 204 | + if (StrUtil.isNotEmpty(pageVO.getCategory())) { | ||
| 205 | + taskQuery.taskCategory(pageVO.getCategory()); | ||
| 206 | + } | ||
| 201 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { | 207 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { |
| 202 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); | 208 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); |
| 203 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); | 209 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); |