mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
Pre Merge pull request !800 from 搬砖的小庄/dev
This commit is contained in:
commit
2ef3dc8c27
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.common.mybatis.core.domain;
|
package org.dromara.common.mybatis.core.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
@ -33,19 +34,19 @@ public class BaseEntity implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 创建部门
|
* 创建部门
|
||||||
*/
|
*/
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
|
||||||
private Long createDept;
|
private Long createDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建者
|
* 创建者
|
||||||
*/
|
*/
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
|
||||||
private Long createBy;
|
private Long createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -527,20 +527,19 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
}
|
}
|
||||||
//获取可驳回的前置节点
|
//获取可驳回的前置节点
|
||||||
List<Node> nodes = nodeService.previousNodeList(task.getDefinitionId(), nowNodeCode);
|
List<Node> nodes = nodeService.previousNodeList(task.getDefinitionId(), nowNodeCode);
|
||||||
List<HisTask> taskList = hisTaskService.getByInsId(task.getInstanceId());
|
List<HisTask> hisTaskList = hisTaskService.getByInsId(task.getInstanceId());
|
||||||
|
|
||||||
Map<String, Node> nodeMap = StreamUtils.toIdentityMap(nodes, Node::getNodeCode);
|
Map<String, Node> nodeMap = StreamUtils.toIdentityMap(nodes, Node::getNodeCode);
|
||||||
|
Set<String> added = new HashSet<>();
|
||||||
List<Node> backNodeList = new ArrayList<>();
|
List<Node> backNodeList = new ArrayList<>();
|
||||||
for (HisTask hisTask : taskList) {
|
for (HisTask hisTask : hisTaskList) {
|
||||||
Node nodeValue = nodeMap.get(hisTask.getNodeCode());
|
Node nodeValue = nodeMap.get(hisTask.getNodeCode());
|
||||||
if (nodeValue != null) {
|
if (nodeValue != null && NodeType.BETWEEN.getKey().equals(nodeValue.getNodeType()) && added.add(nodeValue.getNodeCode())) {
|
||||||
backNodeList.add(nodeValue);
|
backNodeList.add(nodeValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(backNodeList)) {
|
if (CollUtil.isNotEmpty(backNodeList)) {
|
||||||
List<Node> prefixOrSuffixNodes = StreamUtils.filter(backNodeList, e -> NodeType.BETWEEN.getKey().equals(e.getNodeType()));
|
Collections.reverse(backNodeList);
|
||||||
Collections.reverse(prefixOrSuffixNodes);
|
return backNodeList;
|
||||||
return prefixOrSuffixNodes;
|
|
||||||
}
|
}
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user