update work-flow 1.6.8 => 1.8.0-m1

This commit is contained in:
AprilWind
2025-08-01 18:34:09 +08:00
parent 808ce9c25a
commit 0ba909c52e
9 changed files with 159 additions and 131 deletions

View File

@ -9,13 +9,11 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.constant.SystemConstants;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.ObjectUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.core.utils.TreeBuildUtils;
import org.dromara.common.core.utils.*;
import org.dromara.common.mybatis.helper.DataBaseHelper;
import org.dromara.warm.flow.core.service.DefService;
import org.dromara.warm.flow.orm.entity.FlowDefinition;
import org.dromara.warm.flow.ui.service.CategoryService;
import org.dromara.workflow.common.ConditionalOnEnable;
import org.dromara.workflow.common.constant.FlowConstant;
import org.dromara.workflow.domain.FlowCategory;
@ -39,7 +37,7 @@ import java.util.List;
@ConditionalOnEnable
@RequiredArgsConstructor
@Service
public class FlwCategoryServiceImpl implements IFlwCategoryService {
public class FlwCategoryServiceImpl implements IFlwCategoryService, CategoryService {
private final DefService defService;
private final FlwCategoryMapper baseMapper;
@ -108,6 +106,21 @@ public class FlwCategoryServiceImpl implements IFlwCategoryService {
);
}
/**
* 工作流查询分类
*
* @return 分类树结构列表
*/
@Override
public List<org.dromara.warm.flow.core.dto.Tree> queryCategory() {
List<FlowCategoryVo> list = this.queryList(new FlowCategoryBo());
return StreamUtils.toList(list, category -> new org.dromara.warm.flow.core.dto.Tree()
.setId(Convert.toStr(category.getCategoryId()))
.setName(category.getCategoryName())
.setParentId(Convert.toStr(category.getParentId()))
);
}
/**
* 校验流程分类名称是否唯一
*

View File

@ -12,7 +12,6 @@ import org.dromara.common.core.service.DeptService;
import org.dromara.common.core.service.DictService;
import org.dromara.common.core.service.UserService;
import org.dromara.common.core.utils.DateUtils;
import org.dromara.common.core.utils.ServletUtils;
import org.dromara.common.core.utils.StreamUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.warm.flow.core.dto.DefJson;
@ -57,12 +56,8 @@ public class FlwChartExtServiceImpl implements ChartExtService {
*/
@Override
public void execute(DefJson defJson) {
// 临时修复 后续版本将通过defjson获取流程实例ID
String[] parts = ServletUtils.getRequest().getRequestURI().split("/");
Long instanceId = Convert.toLong(parts[parts.length - 1]);
// 根据流程实例ID查询所有相关的历史任务列表
List<FlowHisTask> flowHisTasks = this.getHisTaskGroupedByNode(instanceId);
List<FlowHisTask> flowHisTasks = this.getHisTaskGroupedByNode(defJson.getInstance().getId());
if (CollUtil.isEmpty(flowHisTasks)) {
return;
}
@ -143,7 +138,8 @@ public class FlwChartExtServiceImpl implements ChartExtService {
"fontSize", "14px",
"zIndex", "1000",
"maxWidth", "500px",
"overflowY", "visible",
"maxHeight", "300px",
"overflowY", "auto",
"overflowX", "hidden",
"color", "#333",
"pointerEvents", "auto",