Merge branch 'feature/REQ-5865' into pre

This commit is contained in:
wangli 2025-11-25 17:02:46 +08:00
commit 941ca60061
4 changed files with 26 additions and 8 deletions

View File

@ -120,7 +120,7 @@ public interface ProcessTaskApi {
*/
@Operation(summary = "系统操作回退任务到指定节点")
@PostMapping("/api/process/task/system/back")
@Manageable
@InvokeMode(ASYNC)
CommonResponse<Boolean> systemBackTask(@Validated @RequestBody BpmnNodeBackSystemOperateDTO dto);
/**

View File

@ -47,6 +47,13 @@ public class BpmnProcessInstanceLogQueryDTO {
@Builder.Default
private Boolean hasButton = false;
/**
* 是否包含未来的节点默认包含
*/
@ApiModelProperty(value = "是否包含未来的节点,默认包含")
@Builder.Default
private Boolean includeFutureTasks = true;
/**
* 是否需要加密同一个实例的日志在不同端[cms/oms]审批人的信息需要按一定规则进行隐藏控制
*/

View File

@ -1245,7 +1245,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
List<ProcessNodeDetailVO> forecasting = new ArrayList<>();
// 只有还在运行中的实例才需要推测后续节点
if (Objects.equals(historicProcessInstance.getBusinessStatus(), PROCESSING.getStatus())) {
if (Objects.equals(historicProcessInstance.getBusinessStatus(), PROCESSING.getStatus()) && Objects.equals(Boolean.TRUE, dto.getIncludeFutureTasks())) {
ProcessInstance instance = runtimeService.createProcessInstanceQuery()
.processInstanceId(dto.getProcessInstanceId())
.includeProcessVariables()

View File

@ -81,19 +81,30 @@ public class ImplementationReadyChecker implements ApplicationListener<Applicati
}
/**
* 自适应转换value 15 时返回 4 位数组否则返回最小所需位数数组
*/
public static boolean[] toBooleansAdaptive(int value) {
if (value < 0) throw new IllegalArgumentException("adaptive mode only for non-negative");
if (value == 0) return new boolean[]{false};
int bits = 32 - Integer.numberOfLeadingZeros(value);
if (value < 0) {
throw new IllegalArgumentException("adaptive mode only for non-negative");
}
// 核心修改value 15 强制用 4 否则计算最小所需位数
int bits = (value <= 15) ? 4 : (32 - Integer.numberOfLeadingZeros(value));
return toBooleans(value, bits);
}
// 高位在前index=0 是最高位
/**
* value 转换为指定位数的 boolean 数组高位在前
*/
public static boolean[] toBooleans(int value, int bits) {
if (bits <= 0 || bits > 32) throw new IllegalArgumentException("bits must be 1~32");
if (bits <= 0 || bits > 32) {
throw new IllegalArgumentException("bits must be 1~32");
}
boolean[] arr = new boolean[bits];
for (int i = 0; i < bits; i++) {
int shift = bits - 1 - i;
int shift = bits - 1 - i; // 从高位到低位遍历
arr[i] = ((value >>> shift) & 1) == 1;
}
return arr;