疯狂的狮子Li
2024-06-03 51d66199b101ea16bc14041568ea61ab69111cda
update 优化 去除请假案例无用调用
已删除1个文件
已修改2个文件
99 ■■■■■ 文件已修改
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/domain/dto/BusinessInstanceDTO.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/domain/dto/BusinessInstanceDTO.java
ÎļþÒÑɾ³ý
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/vo/TestLeaveVo.java
@@ -4,7 +4,6 @@
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;
@@ -67,11 +66,5 @@
     */
    @ExcelProperty(value = "状态")
    private String status;
    /**
     * ä¸šåŠ¡ä¸Žæµç¨‹å®žä¾‹å…³è”å¯¹è±¡
     */
    private BusinessInstanceDTO businessInstanceDTO;
}
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 @@
     */
    @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 TableDataInfo<TestLeaveVo> queryPageList(TestLeaveBo bo, PageQuery pageQuery) {
        LambdaQueryWrapper<TestLeave> lqw = buildQueryWrapper(bo);
        Page<TestLeaveVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
        TableDataInfo<TestLeaveVo> build = TableDataInfo.build(result);
        List<TestLeaveVo> rows = build.getRows();
        if (CollUtil.isNotEmpty(rows)) {
            List<String> ids = StreamUtils.toList(rows, e -> String.valueOf(e.getId()));
            workflowService.setBusinessInstanceListDTO(rows, ids, "id");
        }
        return build;
        return TableDataInfo.build(result);
    }
    /**
@@ -99,9 +90,7 @@
        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 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);
    }
    /**