diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/domain/dto/BusinessInstanceDTO.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/domain/dto/BusinessInstanceDTO.java deleted file mode 100644 index ecf83cfcc..000000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/domain/dto/BusinessInstanceDTO.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.dromara.common.core.domain.dto; - -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 业务与流程实例关联对象 - * - * @author may - */ -@Data -@NoArgsConstructor -public class BusinessInstanceDTO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 流程实例id - */ - private String id; - - /** - * 流程定义id - */ - private String processDefinitionId; - - /** - * 流程定义名称 - */ - private String name; - - /** - * 业务id - */ - private String businessKey; - - /** - * 租户id - */ - private String tenantId; - - /** - * 启动时间 - */ - private Date startTime; - - /** - * 结束时间 - */ - private Date endTime; - - /** - * 启动人id - */ - private String startUserId; - - /** - * 流程状态 - */ - private String businessStatus; - - /** - * 流程状态 - */ - private String businessStatusName; -} diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java index a1dc2bc1b..47886d721 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java @@ -4,7 +4,6 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import io.github.linpeilie.annotations.AutoMapper; import lombok.Data; -import org.dromara.common.core.domain.dto.BusinessInstanceDTO; import org.dromara.workflow.domain.TestLeave; import java.io.Serial; @@ -68,10 +67,4 @@ public class TestLeaveVo implements Serializable { @ExcelProperty(value = "状态") private String status; - /** - * 业务与流程实例关联对象 - */ - private BusinessInstanceDTO businessInstanceDTO; - - } diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java index 2ae88ad1b..6431b3f80 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java @@ -1,6 +1,5 @@ package org.dromara.workflow.service.impl; -import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -47,9 +46,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService { */ @Override public TestLeaveVo queryById(Long id) { - TestLeaveVo testLeaveVo = baseMapper.selectVoById(id); - workflowService.setBusinessInstanceDTO(testLeaveVo, String.valueOf(id)); - return testLeaveVo; + return baseMapper.selectVoById(id); } /** @@ -59,13 +56,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService { public TableDataInfo queryPageList(TestLeaveBo bo, PageQuery pageQuery) { LambdaQueryWrapper lqw = buildQueryWrapper(bo); Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - TableDataInfo build = TableDataInfo.build(result); - List rows = build.getRows(); - if (CollUtil.isNotEmpty(rows)) { - List ids = StreamUtils.toList(rows, e -> String.valueOf(e.getId())); - workflowService.setBusinessInstanceListDTO(rows, ids, "id"); - } - return build; + return TableDataInfo.build(result); } /** @@ -99,9 +90,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService { if (flag) { bo.setId(add.getId()); } - TestLeaveVo testLeaveVo = MapstructUtils.convert(add, TestLeaveVo.class); - workflowService.setBusinessInstanceDTO(testLeaveVo, String.valueOf(add.getId())); - return testLeaveVo; + return MapstructUtils.convert(add, TestLeaveVo.class); } /** @@ -111,9 +100,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService { public TestLeaveVo updateByBo(TestLeaveBo bo) { TestLeave update = MapstructUtils.convert(bo, TestLeave.class); baseMapper.updateById(update); - TestLeaveVo testLeaveVo = MapstructUtils.convert(update, TestLeaveVo.class); - workflowService.setBusinessInstanceDTO(testLeaveVo, String.valueOf(update.getId())); - return testLeaveVo; + return MapstructUtils.convert(update, TestLeaveVo.class); } /**