bpm:增加待办任务

This commit is contained in:
YunaiV
2023-01-22 09:21:22 +08:00
parent 3e4d388e70
commit 98bf423569
7 changed files with 106 additions and 178 deletions

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -21,12 +22,16 @@ public class BpmTaskTodoPageReqVO extends PageParam {
@ApiModelProperty(value = "流程任务名", example = "芋道")
private String name;
@ApiModelProperty(value = "开始的创建")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime beginCreateTime;
@ApiModelProperty(value = "结束的创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endCreateTime;
@ApiModelProperty(value = "创建")
@DateTimeFormat(pattern = DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
//
// @ApiModelProperty(value = "开始的创建收间")
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// private LocalDateTime beginCreateTime;
//
// @ApiModelProperty(value = "结束的创建时间")
// @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
// private LocalDateTime endCreateTime;
}

View File

@ -1,6 +1,8 @@
package cn.iocoder.yudao.module.bpm.service.task;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
@ -75,11 +77,11 @@ public class BpmTaskServiceImpl implements BpmTaskService {
if (StrUtil.isNotBlank(pageVO.getName())) {
taskQuery.taskNameLike("%" + pageVO.getName() + "%");
}
if (pageVO.getBeginCreateTime() != null) {
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getBeginCreateTime()));
if (ArrayUtil.get(pageVO.getCreateTime(), 0) != null) {
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0]));
}
if (pageVO.getEndCreateTime() != null) {
taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getEndCreateTime()));
if (ArrayUtil.get(pageVO.getCreateTime(), 1) != null) {
taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1]));
}
// 执行查询
List<Task> tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize());