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 | 4 | import cn.iocoder.yudao.framework.common.util.date.DateUtils; |
| 5 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | 6 | import lombok.Data; |
| 7 | -import lombok.EqualsAndHashCode; | |
| 8 | -import lombok.ToString; | |
| 9 | 7 | import org.springframework.format.annotation.DateTimeFormat; |
| 10 | 8 | |
| 11 | 9 | import java.time.LocalDateTime; |
| ... | ... | @@ -17,6 +15,9 @@ public class BpmTaskPageReqVO extends PageParam { |
| 17 | 15 | @Schema(description = "流程任务名", example = "芋道") |
| 18 | 16 | private String name; |
| 19 | 17 | |
| 18 | + @Schema(description = "流程分类", example = "1") | |
| 19 | + private String category; | |
| 20 | + | |
| 20 | 21 | @Schema(description = "创建时间") |
| 21 | 22 | @DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 22 | 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 | 113 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 114 | 114 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); |
| 115 | 115 | } |
| 116 | + if (StrUtil.isNotEmpty(pageVO.getCategory())) { | |
| 117 | + taskQuery.taskCategory(pageVO.getCategory()); | |
| 118 | + } | |
| 116 | 119 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { |
| 117 | 120 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); |
| 118 | 121 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); |
| ... | ... | @@ -198,6 +201,9 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
| 198 | 201 | if (StrUtil.isNotBlank(pageVO.getName())) { |
| 199 | 202 | taskQuery.taskNameLike("%" + pageVO.getName() + "%"); |
| 200 | 203 | } |
| 204 | + if (StrUtil.isNotEmpty(pageVO.getCategory())) { | |
| 205 | + taskQuery.taskCategory(pageVO.getCategory()); | |
| 206 | + } | |
| 201 | 207 | if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) { |
| 202 | 208 | taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0])); |
| 203 | 209 | taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1])); | ... | ... |