diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java index 9d2ad18c2..f6e4ebf17 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/vo/task/BpmTaskTodoPageReqVO.java @@ -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; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java index 929eb0137..62b638f2e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java @@ -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 tasks = taskQuery.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize()); diff --git a/yudao-ui-admin-vue3/src/api/bpm/task/types.ts b/yudao-ui-admin-vue3/src/api/bpm/task/types.ts deleted file mode 100644 index 8f7722529..000000000 --- a/yudao-ui-admin-vue3/src/api/bpm/task/types.ts +++ /dev/null @@ -1,39 +0,0 @@ -export type FormVO = { - id: number - name: string - conf: string - fields: string[] - status: number - remark: string - createTime: string -} - -export type TaskProcessVO = { - id: string - name: string - startUserId: number - startUserNickname: string - processDefinitionId: string -} - -export type TaskTodoVO = { - id: string - name: string - claimTime: string - createTime: string - suspensionState: number - processInstance: TaskProcessVO -} - -export type TaskDoneVO = { - id: string - name: string - claimTime: string - createTime: string - endTime: string - durationInMillis: number - suspensionState: number - result: number - reason: string - processInstance: TaskProcessVO -} diff --git a/yudao-ui-admin-vue3/src/views/bpm/task/my/index.vue b/yudao-ui-admin-vue3/src/views/bpm/task/my/index.vue deleted file mode 100644 index 3e2ddcc26..000000000 --- a/yudao-ui-admin-vue3/src/views/bpm/task/my/index.vue +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/yudao-ui-admin-vue3/src/views/bpm/task/todo/done.data.ts b/yudao-ui-admin-vue3/src/views/bpm/task/todo/done.data.ts deleted file mode 100644 index 5ad3d2c46..000000000 --- a/yudao-ui-admin-vue3/src/views/bpm/task/todo/done.data.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' -const { t } = useI18n() // 国际化 - -// CrudSchema -const crudSchemas = reactive([ - { - label: t('common.index'), - field: 'id', - type: 'index' - }, - { - label: '任务名称', - field: 'name', - search: { - show: true - } - }, - { - label: '所属流程', - field: 'processInstance.name' - }, - { - label: '流程发起人', - field: 'processInstance.startUserNickname' - }, - { - label: t('common.createTime'), - field: 'createTime', - search: { - show: true, - component: 'DatePicker', - componentProps: { - type: 'datetimerange', - valueFormat: 'YYYY-MM-DD HH:mm:ss', - defaultTime: [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)], - shortcuts: [ - { - text: '近一周', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) - return [start, end] - } - }, - { - text: '近一个月', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) - return [start, end] - } - }, - { - text: '近三个月', - value: () => { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) - return [start, end] - } - } - ] - } - } - }, - { - label: t('table.action'), - field: 'action', - width: '100px' - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/bpm/task/todo/index.vue b/yudao-ui-admin-vue3/src/views/bpm/task/todo/index.vue index f0e59a090..a2843440b 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/task/todo/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/task/todo/index.vue @@ -1,56 +1,37 @@ - -